DUNE-DAQ / trigger

Trigger infrastructure of the DUNE DAQ
0 stars 6 forks source link

fix error when both "use_timing_hsi" and "use_fake_hsi" are set to false #239

Closed MRiganSUSX closed 1 year ago

MRiganSUSX commented 1 year ago

when setting both hsi options to false in daqconf configuration:

"use_timing_hsi": false
"use_fake_hsi": false

the daqconf throws and error:

ValueError: Connection with name hsievents has no producers!

The issue is that the hsi input is set to true (hardcoded) in trigger_gen: USE_HSI_INPUT = True, in trigger_gen and it is not actually loaded from set values in daqconf_multiru_gen.

This means that a hsievent consume connection is made when there are no producers. The USE_HSI_INPUT should be passed from daqconf_multiru_gen to trigger_gen, depending on how the hsi options are set in the configuration.


The fix for this are 3 PRs:

The solution:

Tests:

Test # Fake HSI Timing HSI RTCM CTCM Result Status Note Log
1 0 0 0 0 Daqconf: RuntimeError RuntimeError: There are no TC sources!
2 1 0 0 0 config, run no issues Run 111: Received 11 TCs. Sent 10 TDs consisting of 10 TCs. 1 TDs (1 TCs) were created during pause, and 0 TDs (0 TCs) were inhibited.
3 0 1 0 0 Daqconf: Exception Exception: If --use-hsi-hw flag is set to true, --hsi-device-name must be specified!
4 1 1 0 0 Daqconf: Exception Exception: If --use-hsi-hw flag is set to true, --hsi-device-name must be specified!
5 0 0 0 1 config, run no issues Run 115: Received 88 TCs. Sent 37 TDs consisting of 37 TCs. 23 TDs (23 TCs) were created during pause, and 27 TDs (27 TCs) were inhibited.
6 0 0 1 0 config, run no issues Run 116: Received 14 TCs. Sent 10 TDs consisting of 10 TCs. 4 TDs (4 TCs) were created during pause, and 0 TDs (0 TCs) were inhibited.
7 1 0 1 0 config, run no issues Run 117: Received 21 TCs. Sent 20 TDs consisting of 20 TCs. 1 TDs (1 TCs) were created during pause, and 0 TDs (0 TCs) were inhibited.

Also passes integration tests:

MRiganSUSX commented 11 months ago

A report available here: HSI_fix.pdf