Skip to content

Commit 9d83f3d

Browse files
committed
added monitorFirstOrbitEnabled
1 parent 0cd404d commit 9d83f3d

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

doc/configurationParameters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ The parameters related to 3rd-party libraries are described here for convenience
194194
| equipment-rorc-* | firmwareCheckEnabled | int | 1 | If set, RORC driver checks compatibility with detected firmware. Use 0 to bypass this check (eg new fw version not yet recognized by ReadoutCard version). |
195195
| equipment-rorc-* | firmwareVersionsAllowed | string | | Comma-separated list of ROC firmware versions allowed (6-digit hash). If empty, all are allowed. |
196196
| equipment-rorc-* | firmwareVersionsDenied | string | e4a5a46e | Comma-separated list of ROC firmware versions denied (6-digit hash), i.e. which would cause configuration to abort. |
197+
| equipment-rorc-* | monitorFirstOrbitEnabled | int | 0 | If set, enable monitoring of RORC first orbit. |
197198
| equipment-zmq-* | address | string | | Address of remote server to connect, eg tcp://remoteHost:12345. |
198199
| equipment-zmq-* | mode | string | stream | Possible values: stream (1 input ZMQ message = 1 output data page), snapshot (last ZMQ message = one output data page per TF). |
199200
| equipment-zmq-* | timeframeClientUrl | string | | The address to be used to retrieve current timeframe. When set, data is published only once for each TF id published by remote server. |

doc/releaseNotes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,3 +659,5 @@ This file describes the main feature changes for each readout.exe released versi
659659
## next version
660660
- Updated configuration parameters:
661661
- equipment.TFperiod is now set to 32 by default, instead of 128 previously. This is the duration of a timeframe, in number of LHC orbits. The new value corresponds to what is used in production.
662+
- equipment-rorc-*: added parameter monitorFirstOrbitEnabled, to enable reporting to monitoring system the metric "readout.RORCfirstOrbit" on startup, as retrieved from CRU firmware. This is to be used on CTP FLP to detect possibly wrong orbit. A return value of 0xFFFFFFFF indicates the value could not be retrieved.
663+
- ConsumerStats: added an internal queue to allow pushing spontaneous monitoring measurements (compared to periodic ones) from any readout module.

src/ReadoutEquipmentRORC.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "ReadoutEquipment.h"
2727
#include "ReadoutUtils.h"
2828
#include "readoutInfoLogger.h"
29+
#include "ReadoutMonitoringQueue.h"
2930

3031
class ReadoutEquipmentRORC : public ReadoutEquipment
3132
{
@@ -131,6 +132,10 @@ ReadoutEquipmentRORC::ReadoutEquipmentRORC(ConfigFile& cfg, std::string name) :
131132
// configuration parameter: | equipment-rorc-* | debugStatsEnabled | int | 0 | If set, enable extra statistics about internal buffers status. (printed to stdout when stopping) |
132133
cfg.getOptionalValue<int>(name + ".debugStatsEnabled", cfgDebugStatsEnabled);
133134

135+
// configuration parameter: | equipment-rorc-* | monitorFirstOrbitEnabled | int | 0 | If set, enable monitoring of RORC first orbit. |
136+
int cfgMonitorFirstOrbitEnabled = 0;
137+
cfg.getOptionalValue<int>(name + ".monitorFirstOrbitEnabled", cfgMonitorFirstOrbitEnabled);
138+
134139
// get readout memory buffer parameters
135140
// std::string sMemorySize=cfg.getValue<std::string>(name + ".memoryBufferSize");
136141
// std::string sPageSize=cfg.getValue<std::string>(name + ".memoryPageSize"); long long
@@ -216,6 +221,11 @@ ReadoutEquipmentRORC::ReadoutEquipmentRORC(ConfigFile& cfg, std::string name) :
216221
BOOST_THROW_EXCEPTION(ReadoutEquipmentRORCException() << ErrorInfo::Message("This firmware version is not allowed"));
217222
}
218223

224+
// publish relevant card info
225+
if (cfgMonitorFirstOrbitEnabled) {
226+
gReadoutMonitoringQueue.push({.name = "readout.RORCfirstOrbit", .tag = id, .value = (uint64_t)channel->getCounterFirstOrbit()});
227+
}
228+
219229
// todo: log parameters ?
220230

221231
if (logRocCallsEnable) {

src/readoutConfigEditor.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ set configurationParametersDescriptor {
140140
| equipment-rorc-* | firmwareCheckEnabled | int | 1 | If set, RORC driver checks compatibility with detected firmware. Use 0 to bypass this check (eg new fw version not yet recognized by ReadoutCard version). |
141141
| equipment-rorc-* | firmwareVersionsAllowed | string | | Comma-separated list of ROC firmware versions allowed (6-digit hash). If empty, all are allowed. |
142142
| equipment-rorc-* | firmwareVersionsDenied | string | e4a5a46e | Comma-separated list of ROC firmware versions denied (6-digit hash), i.e. which would cause configuration to abort. |
143+
| equipment-rorc-* | monitorFirstOrbitEnabled | int | 0 | If set, enable monitoring of RORC first orbit. |
143144
| equipment-zmq-* | address | string | | Address of remote server to connect, eg tcp://remoteHost:12345. |
144145
| equipment-zmq-* | mode | string | stream | Possible values: stream (1 input ZMQ message = 1 output data page), snapshot (last ZMQ message = one output data page per TF). |
145146
| equipment-zmq-* | timeframeClientUrl | string | | The address to be used to retrieve current timeframe. When set, data is published only once for each TF id published by remote server. |

0 commit comments

Comments
 (0)