DcmEmulator: Add new option maxEventRateHz to control the input rate
Add a new DcmEmulator functionality to limit the rate of serving new events. This is meant to mimic what happens at P1 with the real DCM where the L1 rate is always below the maximum possible (to have a safety margin) so HLT doesn't always get a new event when it asks for one. This is testing the tryGetNextUntil
interface used at P1 (as opposed to basic getNext
).
I tested this on my laptop with athenaHLT MTCalibPeb job options with 4 threads (and 4 slots). The rate I was getting without any limits was 9.76 Hz. Imposing rate limits using the new option maxEventRateHz
resulted in the rate always staying below the specified number, as intended. It was very close to the requested limit at rates much lower than the maximum possible on my machine, but at higher rates the discrepancy was a bit larger. This isn't meant to be a precise fixed rate, but rather introducing a limit, so it seems to work decently enough.