Skip to content

Commit 2283706

Browse files
committed
added cfg numberOfRuns
1 parent 903d280 commit 2283706

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

doc/configurationParameters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ The parameters related to 3rd-party libraries are described here for convenience
210210
| readout | maxMsgError | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
211211
| readout | maxMsgWarning | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
212212
| readout | memoryPoolStatsEnabled | int | 0 | Global debugging flag to enable statistics on memory pool usage (printed to stdout when pool released). |
213+
| readout | numberOfRuns | int | 1 | In standalone mode, number of runs to execute (ie START/STOP cycles). |
213214
| readout | rate | double | -1 | Data rate limit, per equipment, in Hertz. -1 for unlimited. |
214215
| readout | tfRateLimit | double | 0 | When set, the output is limited to a given timeframe rate. |
215216
| readout | timeframeServerUrl | string | | The address to be used to publish current timeframe, e.g. to be used as reference clock for other readout instances. |

doc/releaseNotes.md

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

574574
## next version
575575
- When running from the command line, the environment variable O2_RUN can be used to set the run number. It is set to 0 by default, i.e. undefined run number.
576+
- Updated configuration parameters:
577+
- added readout.numberOfRuns: in standalone mode, number of START/STOP cycles to execute (used for testing).

src/mainReadout.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ class Readout
334334
bool standaloneMode = false; // flag set when readout running in standalone mode (auto state machines)
335335
int cfgTimeStart = 0; // time at which START should be executed in standalone mode
336336
int cfgTimeStop = 0; // time at which STOP should be executed in standalone mode
337+
int cfgNumberOfRuns = 1; // number of START/STOP loops to execute
337338

338339
private:
339340
int _init(int argc, char* argv[]);
@@ -902,6 +903,9 @@ int Readout::_configure(const boost::property_tree::ptree& properties)
902903

903904
// configuration parameter: | readout | timeStop | string | | In standalone mode, time at which to execute stop. If not set, on int/term/quit signal. |
904905
scanTime("readout.timeStop", cfgTimeStop);
906+
907+
// configuration parameter: | readout | numberOfRuns | int | 1 | In standalone mode, number of runs to execute (ie START/STOP cycles). |
908+
cfg.getOptionalValue<int>("readout.numberOfRuns", cfgNumberOfRuns);
905909
}
906910

907911
cfgMaxMsgError = 0;
@@ -2253,7 +2257,8 @@ int main(int argc, char* argv[])
22532257
return err;
22542258
}
22552259

2256-
int nloop = 3; // number of start/stop loop to execute
2260+
int nloop = theReadout->cfgNumberOfRuns; // number of start/stop loop to execute
2261+
theLog.log("Will execute %d START/STOP cycle", nloop);
22572262

22582263
auto logTimeGuard = [&](const std::string command, int t) {
22592264
if (t) {

src/readoutConfigEditor.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ set configurationParametersDescriptor {
156156
| readout | maxMsgError | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
157157
| readout | maxMsgWarning | int | 0 | If non-zero, maximum number of error messages allowed while running. Readout stops when threshold is reached. |
158158
| readout | memoryPoolStatsEnabled | int | 0 | Global debugging flag to enable statistics on memory pool usage (printed to stdout when pool released). |
159+
| readout | numberOfRuns | int | 1 | In standalone mode, number of runs to execute (ie START/STOP cycles). |
159160
| readout | rate | double | -1 | Data rate limit, per equipment, in Hertz. -1 for unlimited. |
160161
| readout | tfRateLimit | double | 0 | When set, the output is limited to a given timeframe rate. |
161162
| readout | timeframeServerUrl | string | | The address to be used to publish current timeframe, e.g. to be used as reference clock for other readout instances. |

0 commit comments

Comments
 (0)