Skip to content

Commit

Permalink
Merge pull request #205 from sy-c/master
Browse files Browse the repository at this point in the history
v2.8.2
  • Loading branch information
sy-c authored Feb 15, 2022
2 parents 6e1f1b3 + af0cc05 commit c3614dc
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 11 deletions.
10 changes: 6 additions & 4 deletions doc/configurationParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The parameters related to 3rd-party libraries are described here for convenience
| consumer-zmq-* | zmqOptions | string | | Additional ZMQ options, as a comma-separated list of key=value pairs. Possible keys: ZMQ_CONFLATE, ZMQ_IO_THREADS, ZMQ_LINGER, ZMQ_SNDBUF, ZMQ_SNDHWM, ZMQ_SNDTIMEO. |
| equipment-* | blockAlign | bytes | 2M | Alignment of the beginning of the big memory block from which the pool is created. Pool will start at a multiple of this value. Each page will then begin at a multiple of memoryPoolPageSize from the beginning of big block. |
| equipment-* | consoleStatsUpdateTime | double | 0 | If set, number of seconds between printing statistics on console. |
| equipment-* | dataPagesLogPath | string | | Path where to save a summary of each data pages generated by equipment. |
| equipment-* | dataPagesLogPath | string | | Path where to save a summary of each data pages generated by equipment. |
| equipment-* | debugFirstPages | int | 0 | If set, print debug information for first (given number of) data pages readout. |
| equipment-* | disableOutput | int | 0 | If non-zero, data generated by this equipment is discarded immediately and is not pushed to output fifo of readout thread. Used for testing. |
| equipment-* | enabled | int | 1 | Enable (value=1) or disable (value=0) the equipment. |
Expand All @@ -105,6 +105,7 @@ The parameters related to 3rd-party libraries are described here for convenience
| equipment-* | name | string| | Name used to identify this equipment (in logs). By default, it takes the name of the configuration section, equipment-xxx |
| equipment-* | outputFifoSize | int | -1 | Size of output fifo (number of pages). If -1, set to the same value as memoryPoolNumberOfPages (this ensures that nothing can block the equipment while there are free pages). |
| equipment-* | rdhCheckEnabled | int | 0 | If set, data pages are parsed and RDH headers checked. Errors are reported in logs. |
| equipment-* | rdhCheckFirstOrbit | int | 1 | If set, it is checked that the first orbit of all equipments is the same. |
| equipment-* | rdhDumpEnabled | int | 0 | If set, data pages are parsed and RDH headers summary printed. Setting a negative number will print only the first N RDH.|
| equipment-* | rdhDumpErrorEnabled | int | 1 | If set, a log message is printed for each RDH header error found.|
| equipment-* | rdhDumpWarningEnabled | int | 1 | If set, a log message is printed for each RDH header warning found.|
Expand All @@ -124,7 +125,7 @@ The parameters related to 3rd-party libraries are described here for convenience
| equipment-cruemulator-* | numberOfLinks | int | 1 | Number of GBT links simulated by equipment. |
| equipment-cruemulator-* | PayloadSize | int | 64k | Maximum payload size for each trigger. Actual size is randomized, and then split in a number of (cruBlockSize) packets. |
| equipment-cruemulator-* | systemId | int | 19 | System Id, used for System Id field in RDH. By default, using the TEST code. |
| equipment-cruemulator-* | triggerRate | double | 0 | If set, the HB frame rate is limited to given value in Hz (1 HBF per data page). |
| equipment-cruemulator-* | triggerRate | double | 0 | If set, the HB frame rate is limited to given value in Hz (1 HBF per data page). |
| equipment-dummy-* | eventMaxSize | bytes | 128k | Maximum size of randomly generated event. |
| equipment-dummy-* | eventMinSize | bytes | 128k | Minimum size of randomly generated event. |
| equipment-dummy-* | fillData | int | 0 | Pattern used to fill data page: (0) no pattern used, data page is left untouched, with whatever values were in memory (1) incremental byte pattern (2) incremental word pattern, with one random word out of 5. |
Expand Down Expand Up @@ -153,8 +154,8 @@ The parameters related to 3rd-party libraries are described here for convenience
| readout | logbookEnabled | int | 0 | When set, the logbook is enabled and populated with readout stats at runtime. |
| readout | logbookUpdateInterval | int | 30 | Amount of time (in seconds) between logbook publish updates. |
| readout | logbookUrl | string | | The address to be used for the logbook API. |
| readout | maxMsgError | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
| readout | maxMsgWarning | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
| readout | maxMsgError | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
| readout | maxMsgWarning | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
| readout | memoryPoolStatsEnabled | int | 0 | Global debugging flag to enable statistics on memory pool usage (printed to stdout when pool released). |
| readout | rate | double | -1 | Data rate limit, per equipment, in Hertz. -1 for unlimited. |
| readout | tfRateLimit | double | 0 | When set, the output is limited to a given timeframe rate. |
Expand All @@ -172,3 +173,4 @@ The parameters related to 3rd-party libraries are described here for convenience
| receiverFMQ | dumpTF | int | 0 | When set, a message is printed when a new timeframe is received. If the value is bigger than one, this specifies a periodic interval between TF print after the first one. (e.g. 100 would print TF 1, 100, 200, etc). |
| receiverFMQ | releaseDelay | double | 0 | When set, the messages received are not immediately released, but kept for specified time (s).|
| receiverFMQ | transportType | string | shmem | c.f. parameter with same name in consumer-FairMQchannel-* |

4 changes: 4 additions & 0 deletions doc/releaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,7 @@ This file describes the main feature changes for each readout.exe released versi
- Updated configuration parameters:
- equipment-cruemulator-*.triggerRate: when set, the equipment HBF rate is limited to given value (eg to emulate slow triggers).
- Fixed verbosity for non-contiguous TF warnings.

## v2.8.2 - 15/02/2022
- Updated configuration paratmeters:
- equipment-*-rdhCheckFirstOrbit: when set to zero, readout does not check mismatch of first orbit received by equipments.
6 changes: 5 additions & 1 deletion src/ReadoutEquipment.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ ReadoutEquipment::ReadoutEquipment(ConfigFile& cfg, std::string cfgEntryPoint, b
cfg.getOptionalValue<int>(cfgEntryPoint + ".rdhDumpWarningEnabled", cfgRdhDumpWarningEnabled);
// configuration parameter: | equipment-* | rdhUseFirstInPageEnabled | int | 0 or 1 | If set, the first RDH in each data page is used to populate readout headers (e.g. linkId). Default is 1 for equipments generating data with RDH, 0 otherwsise. |
cfg.getOptionalValue<int>(cfgEntryPoint + ".rdhUseFirstInPageEnabled", cfgRdhUseFirstInPageEnabled);
// configuration parameter: | equipment-* | rdhCheckFirstOrbit | int | 1 | If set, it is checked that the first orbit of all equipments is the same. |
cfg.getOptionalValue<int>(cfgEntryPoint + ".rdhCheckFirstOrbit", cfgRdhCheckFirstOrbit);
theLog.log(LogInfoDevel_(3002), "RDH settings: rdhCheckEnabled=%d rdhDumpEnabled=%d rdhDumpErrorEnabled=%d rdhDumpWarningEnabled=%d rdhUseFirstInPageEnabled=%d", cfgRdhCheckEnabled, cfgRdhDumpEnabled, cfgRdhDumpErrorEnabled, cfgRdhDumpWarningEnabled, cfgRdhUseFirstInPageEnabled);

if (!cfgDisableTimeframes) {
Expand Down Expand Up @@ -568,7 +570,9 @@ uint64_t ReadoutEquipment::getTimeframeFromOrbit(uint32_t hbOrbit)
gReadoutStats.mutex.unlock();
theLog.log(LogInfoDevel_(3003), "Equipment %s : first HB orbit = %X", name.c_str(), (unsigned int)firstTimeframeHbOrbitBegin);
if (!isOk) {
theLog.log(LogErrorDevel_(3241), "Equipment %s : first HB orbit is different from other equipments", name.c_str());
if (cfgRdhCheckFirstOrbit) {
theLog.log(LogErrorDevel_(3241), "Equipment %s : first HB orbit is different from other equipments", name.c_str());
}
}
}
uint64_t tfId = 1 + (hbOrbit - firstTimeframeHbOrbitBegin) / getTimeframePeriodOrbits();
Expand Down
1 change: 1 addition & 0 deletions src/ReadoutEquipment.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class ReadoutEquipment
int cfgRdhDumpErrorEnabled = 1; // flag to enable RDH error log at runtime
int cfgRdhDumpWarningEnabled = 1; // flag to enable RDH warning log at runtime
int cfgRdhUseFirstInPageEnabled = 0; // flag to enable reading of first RDH in page to populate readout headers
int cfgRdhCheckFirstOrbit = 1; // flag to enable RDH check of first orbit is the same in all equipments
//int cfgRdhCheckPacketCounterContiguous = 1; // flag to enable checking if RDH packetCounter value contiguous (done link-by-link)
double cfgTfRateLimit = 0; // TF rate limit, to throttle data readout
int cfgDisableTimeframes = 0; // When set, all TF features disabled
Expand Down
2 changes: 1 addition & 1 deletion src/ReadoutVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#define READOUT_VERSION "2.8.1"
#define READOUT_VERSION "2.8.2"

2 changes: 1 addition & 1 deletion src/mainReadout.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void Readout::publishLogbookStats()
logbookHandle->flpAdd(occRole, "localhost", occRunNumber);
testLogbook=0;
}
logbookHandle->flpUpdateCounters(occRunNumber, occRole, (int64_t)gReadoutStats.counters.numberOfSubtimeframes, (int64_t)gReadoutStats.counters.bytesReadout, (int64_t)gReadoutStats.counters.bytesRecorded, (int64_t)gReadoutStats.counters.bytesFairMQ);
//logbookHandle->flpUpdateCounters(occRunNumber, occRole, (int64_t)gReadoutStats.counters.numberOfSubtimeframes, (int64_t)gReadoutStats.counters.bytesReadout, (int64_t)gReadoutStats.counters.bytesRecorded, (int64_t)gReadoutStats.counters.bytesFairMQ);
isOk = true;
} catch (const std::exception& ex) {
theLog.log(LogErrorDevel_(3210), "Failed to update logbook: %s", ex.what());
Expand Down
9 changes: 5 additions & 4 deletions src/readoutConfigEditor.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ set configurationParametersDescriptor {
| consumer-zmq-* | zmqOptions | string | | Additional ZMQ options, as a comma-separated list of key=value pairs. Possible keys: ZMQ_CONFLATE, ZMQ_IO_THREADS, ZMQ_LINGER, ZMQ_SNDBUF, ZMQ_SNDHWM, ZMQ_SNDTIMEO. |
| equipment-* | blockAlign | bytes | 2M | Alignment of the beginning of the big memory block from which the pool is created. Pool will start at a multiple of this value. Each page will then begin at a multiple of memoryPoolPageSize from the beginning of big block. |
| equipment-* | consoleStatsUpdateTime | double | 0 | If set, number of seconds between printing statistics on console. |
| equipment-* | dataPagesLogPath | string | | Path where to save a summary of each data pages generated by equipment. |
| equipment-* | dataPagesLogPath | string | | Path where to save a summary of each data pages generated by equipment. |
| equipment-* | debugFirstPages | int | 0 | If set, print debug information for first (given number of) data pages readout. |
| equipment-* | disableOutput | int | 0 | If non-zero, data generated by this equipment is discarded immediately and is not pushed to output fifo of readout thread. Used for testing. |
| equipment-* | enabled | int | 1 | Enable (value=1) or disable (value=0) the equipment. |
Expand All @@ -83,6 +83,7 @@ set configurationParametersDescriptor {
| equipment-* | name | string| | Name used to identify this equipment (in logs). By default, it takes the name of the configuration section, equipment-xxx |
| equipment-* | outputFifoSize | int | -1 | Size of output fifo (number of pages). If -1, set to the same value as memoryPoolNumberOfPages (this ensures that nothing can block the equipment while there are free pages). |
| equipment-* | rdhCheckEnabled | int | 0 | If set, data pages are parsed and RDH headers checked. Errors are reported in logs. |
| equipment-* | rdhCheckFirstOrbit | int | 1 | If set, it is checked that the first orbit of all equipments is the same. |
| equipment-* | rdhDumpEnabled | int | 0 | If set, data pages are parsed and RDH headers summary printed. Setting a negative number will print only the first N RDH.|
| equipment-* | rdhDumpErrorEnabled | int | 1 | If set, a log message is printed for each RDH header error found.|
| equipment-* | rdhDumpWarningEnabled | int | 1 | If set, a log message is printed for each RDH header warning found.|
Expand All @@ -102,7 +103,7 @@ set configurationParametersDescriptor {
| equipment-cruemulator-* | numberOfLinks | int | 1 | Number of GBT links simulated by equipment. |
| equipment-cruemulator-* | PayloadSize | int | 64k | Maximum payload size for each trigger. Actual size is randomized, and then split in a number of (cruBlockSize) packets. |
| equipment-cruemulator-* | systemId | int | 19 | System Id, used for System Id field in RDH. By default, using the TEST code. |
| equipment-cruemulator-* | triggerRate | double | 0 | If set, the HB frame rate is limited to given value in Hz (1 HBF per data page). |
| equipment-cruemulator-* | triggerRate | double | 0 | If set, the HB frame rate is limited to given value in Hz (1 HBF per data page). |
| equipment-dummy-* | eventMaxSize | bytes | 128k | Maximum size of randomly generated event. |
| equipment-dummy-* | eventMinSize | bytes | 128k | Minimum size of randomly generated event. |
| equipment-dummy-* | fillData | int | 0 | Pattern used to fill data page: (0) no pattern used, data page is left untouched, with whatever values were in memory (1) incremental byte pattern (2) incremental word pattern, with one random word out of 5. |
Expand Down Expand Up @@ -131,8 +132,8 @@ set configurationParametersDescriptor {
| readout | logbookEnabled | int | 0 | When set, the logbook is enabled and populated with readout stats at runtime. |
| readout | logbookUpdateInterval | int | 30 | Amount of time (in seconds) between logbook publish updates. |
| readout | logbookUrl | string | | The address to be used for the logbook API. |
| readout | maxMsgError | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
| readout | maxMsgWarning | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
| readout | maxMsgError | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
| readout | maxMsgWarning | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
| readout | memoryPoolStatsEnabled | int | 0 | Global debugging flag to enable statistics on memory pool usage (printed to stdout when pool released). |
| readout | rate | double | -1 | Data rate limit, per equipment, in Hertz. -1 for unlimited. |
| readout | tfRateLimit | double | 0 | When set, the output is limited to a given timeframe rate. |
Expand Down

0 comments on commit c3614dc

Please sign in to comment.