Closed philiprodrigues closed 2 years ago
Also, using sleep_for
here will result in a slightly lower-than-requested trigger rate, because the rest of the loop takes some time. Better to use sleep_until
.
Closing as https://github.com/DUNE-DAQ/hsilibs/pull/5 has been merged.
If I set the fake hsi trigger rate very low (eg 0.01 Hz), then the fake hsi app times out at "stop", because this line is waiting in a long sleep:
https://github.com/DUNE-DAQ/timinglibs/blob/953d7f5a61181fe18d72947751b9163465b8afab/plugins/FakeHSIEventGenerator.cpp#L211
You could split up the sleep and check running_flag periodically, as done here:
https://github.com/DUNE-DAQ/trigger/blob/ae24612ebc371ac787f6fbf88896629825e286d5/plugins/TriggerPrimitiveMaker.cpp#L159