DUNE-DAQ / trigemu

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

Add "initial_token_count" parameter to TriggerDecisionEmulator, for #24

Closed eflumerf closed 3 years ago

eflumerf commented 3 years ago

credit-based TriggerDecisionToken tracking. Resolves #23 (with configuration changes in minidaqapp)

bieryAtFnal commented 3 years ago

I noticed that a side effect of this change was to start using dfmessages::TypeDefaults::s_invalid_timestamp in TriggerDecisionEmulator instead of a locally-defined INVALID_TIMESTAMP variable. However, TimestampEstimator is still using a locally-defined value for an invalid timestamp, and TDE is comparing the dfmessages constant against the TimestampEstimator one. Possibly the two values are equivalent, at the moment, but it seems more reliable to use dfmessages::TypeDefaults::s_invalid_timestamp everywhere. Does that make sense?

A very trivial point is that I was initially expecting the new configuration parameter for the credits in the TDE to have "credits" in the name. Instead it has "tokens". I'm mainly just making a note. And, it seems very reasonable to me that the variable name(s) inside the code continue to have "token" in their name, for now.

eflumerf commented 3 years ago

That's exactly the kind of potential for de-synchronization that I was trying to avoid by removing that locally-defined constant!