DUNE-DAQ / trigemu

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

Better handling of invalid `trigger_interval_ticks` #28

Closed philiprodrigues closed 3 years ago

philiprodrigues commented 3 years ago

This PR adds better handling for invalid values of trigger_interval_ticks, in particular zero. In the moo schema, the trigger_interval_ticks value in constrained to be at least 1. Unfortunately, moo currently doesn't do numeric constraints validation when generating from python objects, so this has no effect (yet).

In the TriggerDecisionEmulator class itself, the value of trigger_interval_ticks is checked in do_start and do_resume, with an exception thrown if it's zero