DUNE-DAQ / trigemu

Trigger decision emulator for January 2020 readout application tests
0 stars 0 forks source link

Second run with two-process system seems to be mostly Inhibited #23

Closed bieryAtFnal closed 3 years ago

bieryAtFnal commented 3 years ago

In a two-process FakeCardReader system, if I stop the first run and start a second one, most/all of the triggers in the second run seem to be Inhibited. I'm not sure yet if this is a lack of fresh tokens sent at the beginning of the second run...

eflumerf commented 3 years ago

https://github.com/DUNE-DAQ/dfmodules/blob/1ade03ffe10c416baeaaf321a142d8050cd27325/plugins/DataWriter.cpp#L134

eflumerf commented 3 years ago

https://github.com/DUNE-DAQ/trigemu/blob/80e89279125152ccf3fce05de008213b3544d9f8/plugins/TriggerDecisionEmulator.cpp#L351

There should be a TLOG_DEBUG each time a token is received. However, I can see that it would be easy to craft a sequence of commands such that the initial tokens are either eaten by a previous run of TriggerDecisionEmulator, or ignored if the run number has changed and the next run has not been started in TDE. (Or if the tokens are sent while TDE is not running at all)

eflumerf commented 3 years ago

Giovanna has suggested that changing to a credit-based system (i.e. the Data Selection components are configured with the maximum number of Trigger Decisions they can have outstanding instead of the Data Flow) will likely resolve this Issue. This should be fairly straightforward to implement in the current system, and could be something that is configurable on either end. (Basically, add initial_token_count to TriggerDecisionEmulator and set the default in DataWriter to 0)