Skip to content

Commit 02ca3f4

Browse files
authored
Merge pull request #235 from sy-c/master
v2.15.1
2 parents 705e234 + 1446fcf commit 02ca3f4

File tree

6 files changed

+33
-2
lines changed

6 files changed

+33
-2
lines changed

doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ When enabled, Readout will copy the datapages to connected clients (copy overhea
267267
The interactive EventDump client can be started with parameter `port=...` (use the same as readout consumer address parameter) and `pageSize=...` (maximum super page size configured for readout equipments). Example launch command:
268268

269269
```
270-
o2-readout-eventDump port=ipc:///tmp/o2-readout-out
270+
o2-readout-eventdump port=ipc:///tmp/o2-readout-out
271271
```
272272

273273
Once running, the program accepts the following interactive keyboard commands:

doc/configurationParameters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ The parameters related to 3rd-party libraries are described here for convenience
161161
| readout | disableAggregatorSlicing | int | 0 | When set, the aggregator slicing is disabled, data pages are passed through without grouping/slicing. |
162162
| readout | disableTimeframes | int | 0 | When set, all timeframe related features are disabled (this may supersede other config parameters). |
163163
| readout | exitTimeout | double | -1 | Time in seconds after which the program exits automatically. -1 for unlimited. |
164+
| readout | fairmqConsoleSeverity | int | -1 | Select amount of FMQ messages with fair::Logger::SetConsoleSeverity(). Value as defined in Severity enum defined from FairLogger/Logger.h. Use -1 to leave current setting. |
164165
| readout | flushConsumerTimeout | double | 1 | Time in seconds to wait before stopping the consumers (ie wait allocated pages released). 0 means stop immediately. |
165166
| readout | flushEquipmentTimeout | double | 1 | Time in seconds to wait for data once the equipments are stopped. 0 means stop immediately. |
166167
| readout | logbookApiToken | string | | The token to be used for the logbook API. |

doc/releaseNotes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,3 +496,8 @@ This file describes the main feature changes for each readout.exe released versi
496496

497497
## v2.15 - 03/11/2022
498498
- equipment-*.rdhCheckFirstOrbit: when set, readout also check consistency of orbits between all the links of an equipment. If not all links/equipments first orbit are the same, readout will interrupt the run.
499+
500+
## v2.15.1 - 16/11/2022
501+
- Updated configuration parameters:
502+
- added readout.fairmqConsoleSeverity, to set fair::Logger::SetConsoleSeverity
503+
- Explicit log message when reporting error state, in case not reported by state machine

src/ReadoutVersion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#define READOUT_VERSION "2.15"
12+
#define READOUT_VERSION "2.15.1"
1313

src/mainReadout.cxx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ class Readout
210210
int latencyFd = -1; // file descriptor for the "deep sleep" disabled
211211

212212
bool isError = 0; // flag set to 1 when error has been detected
213+
bool logFirstError = 0; // flag set to 1 after 1 error reported from iterateCheck/iterateRunning procedures
213214
std::vector<std::string> strErrors; // errors backlog
214215
std::mutex mutexErrors; // mutex to guard access to error variables
215216

@@ -752,6 +753,17 @@ int Readout::configure(const boost::property_tree::ptree& properties)
752753
#endif
753754
}
754755

756+
#ifdef WITH_FAIRMQ
757+
// configuration parameter: | readout | fairmqConsoleSeverity | int | -1 | Select amount of FMQ messages with fair::Logger::SetConsoleSeverity(). Value as defined in Severity enum defined from FairLogger/Logger.h. Use -1 to leave current setting. |
758+
int cfgFairmqConsoleSeverity = -1;
759+
cfg.getOptionalValue<int>("readout.fairmqConsoleSeverity", cfgFairmqConsoleSeverity);
760+
if (cfgFairmqConsoleSeverity >= 0) {
761+
unsetFMQLogsToInfoLogger(); // default redirection was set already on readout startup, so unset it first.
762+
fair::Logger::SetConsoleSeverity((fair::Severity)cfgFairmqConsoleSeverity); // set console severity
763+
setFMQLogsToInfoLogger(&theLog); // redirect
764+
}
765+
#endif
766+
755767
// configuration of memory banks
756768
int numaNodeChanged = 0;
757769
for (auto kName : ConfigFileBrowser(&cfg, "bank-")) {
@@ -1307,6 +1319,10 @@ int Readout::iterateCheck()
13071319
}
13081320
}
13091321
if (isError) {
1322+
if (!logFirstError) {
1323+
theLog.log(LogErrorSupport_(3231), "Error reported to state machine");
1324+
logFirstError = 1;
1325+
}
13101326
return -1;
13111327
}
13121328
if ((cfgMaxMsgError > 0) && (theLog.getMessageCount(InfoLogger::Severity::Error) >= (unsigned long) cfgMaxMsgError)) {
@@ -1332,6 +1348,10 @@ int Readout::iterateRunning()
13321348
return 1;
13331349
}
13341350
if (isError) {
1351+
if (!logFirstError) {
1352+
theLog.log(LogErrorSupport_(3231), "Error reported to state machine");
1353+
logFirstError = 1;
1354+
}
13351355
return -1;
13361356
}
13371357
// regular logbook stats update
@@ -1451,6 +1471,10 @@ int Readout::reset()
14511471
gReadoutStats.counters.notify++;
14521472
gReadoutStats.publishNow();
14531473

1474+
// reset error flags
1475+
isError = 0;
1476+
logFirstError = 0 ;
1477+
14541478
// close consumers before closing readout equipments (owner of data blocks)
14551479
theLog.log(LogInfoDevel, "Releasing primary consumers");
14561480
for (unsigned int i = 0; i < dataConsumers.size(); i++) {

src/readoutConfigEditor.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ set configurationParametersDescriptor {
139139
| readout | disableAggregatorSlicing | int | 0 | When set, the aggregator slicing is disabled, data pages are passed through without grouping/slicing. |
140140
| readout | disableTimeframes | int | 0 | When set, all timeframe related features are disabled (this may supersede other config parameters). |
141141
| readout | exitTimeout | double | -1 | Time in seconds after which the program exits automatically. -1 for unlimited. |
142+
| readout | fairmqConsoleSeverity | int | -1 | Select amount of FMQ messages with fair::Logger::SetConsoleSeverity(). Value as defined in Severity enum defined from FairLogger/Logger.h. Use -1 to leave current setting. |
142143
| readout | flushConsumerTimeout | double | 1 | Time in seconds to wait before stopping the consumers (ie wait allocated pages released). 0 means stop immediately. |
143144
| readout | flushEquipmentTimeout | double | 1 | Time in seconds to wait for data once the equipments are stopped. 0 means stop immediately. |
144145
| readout | logbookApiToken | string | | The token to be used for the logbook API. |

0 commit comments

Comments
 (0)