From 8d359a1df4f4b314ba5bad490d3cb92eedecdce6 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Sat, 23 May 2026 11:51:48 -0500 Subject: [PATCH 01/22] Started a document to list which triggers are used in which integtests. --- ...SurveyOfTriggersUsedInIntegtestsMay2026.md | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 docs/SurveyOfTriggersUsedInIntegtestsMay2026.md diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md new file mode 100644 index 0000000..05fb286 --- /dev/null +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -0,0 +1,45 @@ +# Survey of triggers that are used in existing integtests as of May 2026 + +Reminders of the typical trigger sources that we use in integration/regression tests (and emulated-data running generally): + +* RandomTriggerCandidateMaker + * This software module typically runs in the MLTApplication (along with the MLTModule and the DataHandlerModule that converts TriggerActivity objects into TriggerCandidate objects), and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. +* FakeHSIEventGenerator +* TriggerActivity and TriggerCandidate objects derived from TriggerPrimitives + +## daqsystemtest package + +### 3ru_1df_multirun_test.py + +### 3ru_3df_multirun_test.py + +- 3 Hz periodic triggers from RTCM + +### disabled_tpg_test.py + +### example_system_test.py + +- + +### fake_data_producer_test.py + +### long_window_readout_test.py + +### minimal_system_quick_test.py + +### readout_type_scan_test.py + +### sample_ehn1_multihost_test.py + +### small_footprint_quick_test.py + +### tpg_state_collection_test.py + +### tpreplay_test.py + +### tpstream_writing_test.py + +### trigger_bitwords_test.py + +## dfmodules package + From c7f3e09eaaa8ffc94ce217b62bc42affc49304e6 Mon Sep 17 00:00:00 2001 From: bieryAtFnal <36311946+bieryAtFnal@users.noreply.github.com> Date: Sat, 23 May 2026 12:11:05 -0500 Subject: [PATCH 02/22] Revise Survey of Triggers in Integtests Updated the survey document to include an introduction and a summary table for integration tests. --- ...SurveyOfTriggersUsedInIntegtestsMay2026.md | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index 05fb286..4473ea1 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -1,13 +1,22 @@ # Survey of triggers that are used in existing integtests as of May 2026 -Reminders of the typical trigger sources that we use in integration/regression tests (and emulated-data running generally): +## Introduction -* RandomTriggerCandidateMaker - * This software module typically runs in the MLTApplication (along with the MLTModule and the DataHandlerModule that converts TriggerActivity objects into TriggerCandidate objects), and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. -* FakeHSIEventGenerator -* TriggerActivity and TriggerCandidate objects derived from TriggerPrimitives +First, here a list of the typical trigger sources that we use in integration/regression tests (and emulated-data running generally): -## daqsystemtest package +* **RandomTriggerCandidateMaker** + * This software module typically runs in the MLTApplication (along with the _MLTModule_ and the _DataHandlerModule_ that converts TriggerActivity objects into TriggerCandidate objects), and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. +* **FakeHSIEventGenerator** +* **TriggerActivity and TriggerCandidate objects derived from TriggerPrimitives** + +Next, recall that it is the MLT (Module Level Trigger) that specifies the readout window size for each trigger (TriggerDecision). It does this based on the configuration that it was provided. + +## Summary information, by repository + +| Integtest name | RTCM | FakeHSI | Triggers from TPs | +| --- | --- | --- | --- | +| 3ru_1df_multirun_test.py | | | | +| 3ru_3df_multirun_test.py | 3Hz | - | - | ### 3ru_1df_multirun_test.py From aaed3a45a27710638133340b8c042d2fb96789bf Mon Sep 17 00:00:00 2001 From: bieryAtFnal <36311946+bieryAtFnal@users.noreply.github.com> Date: Sat, 23 May 2026 13:40:28 -0500 Subject: [PATCH 03/22] added more introduction and organized integtest-based config param information in tables. --- ...SurveyOfTriggersUsedInIntegtestsMay2026.md | 69 +++++++++---------- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index 4473ea1..9608bf9 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -1,54 +1,47 @@ -# Survey of triggers that are used in existing integtests as of May 2026 +# Survey of triggers that are used in existing integtests, May 2026 ## Introduction -First, here a list of the typical trigger sources that we use in integration/regression tests (and emulated-data running generally): +First, here a list of the trigger sources that we typically use in integration/regression tests (and emulated-data running generally): * **RandomTriggerCandidateMaker** * This software module typically runs in the MLTApplication (along with the _MLTModule_ and the _DataHandlerModule_ that converts TriggerActivity objects into TriggerCandidate objects), and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. * **FakeHSIEventGenerator** * **TriggerActivity and TriggerCandidate objects derived from TriggerPrimitives** -Next, recall that it is the MLT (Module Level Trigger) that specifies the readout window size for each trigger (TriggerDecision). It does this based on the configuration that it was provided. +Next, recall that it is the MLT (Module Level Trigger) that specifies the readout window size for each trigger (TriggerDecision). It does this based on the configuration information that it was provided. -## Summary information, by repository +## Configured trigger types, trigger rates, readout window widths, etc. -| Integtest name | RTCM | FakeHSI | Triggers from TPs | -| --- | --- | --- | --- | -| 3ru_1df_multirun_test.py | | | | -| 3ru_3df_multirun_test.py | 3Hz | - | - | - -### 3ru_1df_multirun_test.py - -### 3ru_3df_multirun_test.py - -- 3 Hz periodic triggers from RTCM - -### disabled_tpg_test.py - -### example_system_test.py - -- - -### fake_data_producer_test.py +The following tables list the configuration parameters that are set for each of the integration tests. If a given test does not use a particular trigger type, nothing is listed. -### long_window_readout_test.py +To help save space in the table cells, the following abbreviations are used: -### minimal_system_quick_test.py +* RWTB - readout window ticks before - this value determines the start of the readout window. This number of DTS clock ticks is subtracted from the trigger time to determine the start of the readout window. +* RWTA - readout window ticks after - this value determines the end of the readout window. This number of DTS clock ticks is added to the trigger time to determine the end of the readout window. +* RWW - readout window width, in either DTS clock ticks, wallclock seconds, or both -### readout_type_scan_test.py +### Integtests in the _daqsystemtest_ repo: -### sample_ehn1_multihost_test.py - -### small_footprint_quick_test.py - -### tpg_state_collection_test.py - -### tpreplay_test.py - -### tpstream_writing_test.py - -### trigger_bitwords_test.py - -## dfmodules package +| Integtest name | RTCM | FakeHSI | Triggers from TPs | +| --- | :---: | :---: | :---: | +| 3ru_1df_multirun_test.py | | | | +| 3ru_3df_multirun_test.py | 3Hz | - | - | +| disabled_tpg_test.py | - | - | - | +| example_system_test.py | - | - | - | +| fake_data_producer_test.py | - | - | - | +| long_window_readout_test.py | - | - | - | +| minimal_system_quick_test.py | - | - | - | +| readout_type_scan_test.py | - | - | - | +| sample_ehn1_multihost_test.py | - | - | - | +| small_footprint_quick_test.py | - | - | - | +| tpg_state_collection_test.py | - | - | - | +| tpreplay_test.py | - | - | - | +| tpstream_writing_test.py | - | - | - | +| trigger_bitwords_test.py | - | - | - | + +### Integtests in the _dfmodules_ repo: +| Integtest name | RTCM | FakeHSI | Triggers from TPs | +| --- | :---: | :---: | :---: | +| disabled_output_test.py | - | - | - | From d1df5f3770f6f2b175825ec04c14a1c346185b57 Mon Sep 17 00:00:00 2001 From: bieryAtFnal <36311946+bieryAtFnal@users.noreply.github.com> Date: Sat, 23 May 2026 13:51:21 -0500 Subject: [PATCH 04/22] minor changes --- docs/SurveyOfTriggersUsedInIntegtestsMay2026.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index 9608bf9..2ed05d0 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -1,4 +1,4 @@ -# Survey of triggers that are used in existing integtests, May 2026 +# Survey of trigger and readout window configurations that are used in existing integtests, May 2026 ## Introduction @@ -13,7 +13,7 @@ Next, recall that it is the MLT (Module Level Trigger) that specifies the readou ## Configured trigger types, trigger rates, readout window widths, etc. -The following tables list the configuration parameters that are set for each of the integration tests. If a given test does not use a particular trigger type, nothing is listed. +The tables in this section list the configuration parameters that are set for each of the integration tests. If an integtest uses more than one DUNE-DAQ configuration, the super-set of trigger types is listed. If a given test does not use a particular trigger type, nothing is listed. To help save space in the table cells, the following abbreviations are used: @@ -26,7 +26,7 @@ To help save space in the table cells, the following abbreviations are used: | Integtest name | RTCM | FakeHSI | Triggers from TPs | | --- | :---: | :---: | :---: | | 3ru_1df_multirun_test.py | | | | -| 3ru_3df_multirun_test.py | 3Hz | - | - | +| 3ru_3df_multirun_test.py | 3Hz trigger rate, RWTB=abc,
RWTB=def, RWW: pdq sec | - | - | | disabled_tpg_test.py | - | - | - | | example_system_test.py | - | - | - | | fake_data_producer_test.py | - | - | - | From 27c61e304473e4844d2aa8a5569b147eefd888b9 Mon Sep 17 00:00:00 2001 From: bieryAtFnal <36311946+bieryAtFnal@users.noreply.github.com> Date: Sun, 24 May 2026 20:53:18 -0500 Subject: [PATCH 05/22] Updated 3ru_1df information --- docs/SurveyOfTriggersUsedInIntegtestsMay2026.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index 2ed05d0..0f59a03 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -17,16 +17,16 @@ The tables in this section list the configuration parameters that are set for ea To help save space in the table cells, the following abbreviations are used: -* RWTB - readout window ticks before - this value determines the start of the readout window. This number of DTS clock ticks is subtracted from the trigger time to determine the start of the readout window. -* RWTA - readout window ticks after - this value determines the end of the readout window. This number of DTS clock ticks is added to the trigger time to determine the end of the readout window. -* RWW - readout window width, in either DTS clock ticks, wallclock seconds, or both +* RWBT - readout window begin ticks - this value determines the beginning of the readout window. It is added to the trigger time to determine the beginning of the readout window. Obviously, if this value is less than zero, the result is a timestamp that is earlier than the trigger time. +* RWET - readout window end ticks - this value determines the end of the readout window. It is added to the trigger time to determine the end of the readout window. +* RWW - readout window width, in either DTS clock ticks, wallclock time, or both. ### Integtests in the _daqsystemtest_ repo: | Integtest name | RTCM | FakeHSI | Triggers from TPs | | --- | :---: | :---: | :---: | -| 3ru_1df_multirun_test.py | | | | -| 3ru_3df_multirun_test.py | 3Hz trigger rate, RWTB=abc,
RWTB=def, RWW: pdq sec | - | - | +| 3ru_1df_multirun_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of data producers=3, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, effective 5.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| 3ru_3df_multirun_test.py | 3 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of data produsers=2, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, effective 3.6 Hz, RWBT=0, RWET=32, RWW=512 nsec | | disabled_tpg_test.py | - | - | - | | example_system_test.py | - | - | - | | fake_data_producer_test.py | - | - | - | From 909c8bf5bc727d3b4b3407087cfc17f21d3f3e38 Mon Sep 17 00:00:00 2001 From: bieryAtFnal <36311946+bieryAtFnal@users.noreply.github.com> Date: Tue, 26 May 2026 10:34:51 -0500 Subject: [PATCH 06/22] Enhance integtest documentation with WIB details Updated the integtest documentation to include WIB counts and trigger rates for various tests. --- docs/SurveyOfTriggersUsedInIntegtestsMay2026.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index 0f59a03..be58d2f 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -21,15 +21,17 @@ To help save space in the table cells, the following abbreviations are used: * RWET - readout window end ticks - this value determines the end of the readout window. It is added to the trigger time to determine the end of the readout window. * RWW - readout window width, in either DTS clock ticks, wallclock time, or both. +ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x100 = 57,600 Hz of TPs; 57600/100/100 = 5.8 Hz of kPrescale triggers + ### Integtests in the _daqsystemtest_ repo: | Integtest name | RTCM | FakeHSI | Triggers from TPs | | --- | :---: | :---: | :---: | -| 3ru_1df_multirun_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of data producers=3, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, effective 5.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | -| 3ru_3df_multirun_test.py | 3 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of data produsers=2, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, effective 3.6 Hz, RWBT=0, RWET=32, RWW=512 nsec | -| disabled_tpg_test.py | - | - | - | -| example_system_test.py | - | - | - | -| fake_data_producer_test.py | - | - | - | +| 3ru_1df_multirun_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=9, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, effective 5.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| 3ru_3df_multirun_test.py | 3 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=6, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, effective 3.6 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| disabled_tpg_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | +| example_system_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | number of WIBs=4 or 8, StreamEmu TP_rate param=1, TAMakerPrescale=1000, TCMakerPrescale=100, effective 0.25 or 0.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| fake_data_producer_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=2001, RWW=64.02 usec | - | - | | long_window_readout_test.py | - | - | - | | minimal_system_quick_test.py | - | - | - | | readout_type_scan_test.py | - | - | - | From 324d15137faa2e68090ea1c7ff33c8eafa5309ec Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Wed, 27 May 2026 09:34:08 -0500 Subject: [PATCH 07/22] Temporary file with functions that help to set trigger and readout window parameters. --- src/integrationtest/utility_functions2.py | 85 +++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/integrationtest/utility_functions2.py diff --git a/src/integrationtest/utility_functions2.py b/src/integrationtest/utility_functions2.py new file mode 100644 index 0000000..188a1c1 --- /dev/null +++ b/src/integrationtest/utility_functions2.py @@ -0,0 +1,85 @@ +import pytest +import os +import re +import integrationtest.data_classes as data_classes + +from integrationtest.verbosity_helper import IntegtestVerbosityLevels + +import functools +print = functools.partial(print, flush=True) # always flush print() output + +# ************************************************************ +# Enable the FakeHSI trigger and optionally set some of its parameters. +# - Note that this function can currently only be called with integtest parameters +# that request a _generated_ DUNE-DAQ configuration. +# - Note that enabling the FakeHSI trigger in generated DUNE-DAQ configurations currently +# disables the generation of DUNE-DAQ configuration for the RandomTriggerCandidateMaker. +# (Not sure of the history of this choice; it is a feature of the 'generation' code.) +# ************************************************************ +def enable_fake_hsi_trigger(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, + readout_window_before_ticks: int = None, readout_window_after_ticks: int = None): + if not isinstance(integtest_params, data_classes.integtest_params_for_generated_dunedaq_config): + fail_msg = "The FakeHSI trigger can only be dynamically enabled in DUNE-DAQ configurations that are generated by the integration test infrastructure, not ones that are pre-defined." + pytest.fail(fail_msg, pytrace=False) + + integtest_params.fake_hsi_enabled = True + set_fake_hsi_trigger_params(integtest_params, trigger_rate, readout_window_before_ticks, readout_window_after_ticks) + +# ************************************************************ +# Set values for one or more parameters associated with the FakeHSI trigger +# ************************************************************ +def set_fake_hsi_trigger_params(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, + readout_window_before_ticks: int = None, readout_window_after_ticks: int = None): + if trigger_rate is not None: + integtest_params.config_substitutions.append( + data_classes.attribute_substitution( + obj_class="FakeHSIEventGeneratorConf", + updates={"trigger_rate": trigger_rate}, + ) + ) + + readout_params = {} + if readout_window_before_ticks is not None: + readout_params["time_before"] = readout_window_before_ticks + if readout_window_after_ticks is not None: + readout_params["time_after"] = readout_window_after_ticks + if readout_params: + integtest_params.config_substitutions.append( + data_classes.attribute_substitution( + obj_class="TCReadoutMap", + obj_id = "def-hsi-tc-map", + updates=readout_params, + ) + ) + +# ************************************************************ +# Set values for one or more parameters associated with the RandomTriggerCandidateMaker trigger. +# - Note that this function makes use of the DUNE-DAQ configuration parameters that are +# available in the RTCM C++ code itself. It does *not* use the DUNE-DAQ configuration +# parameters that are part of the TCReadoutMap. This is because the former has more +# flexibility, for example the ability to set a backshift amount of time. +# - Currently, this function does *not* check if a TCReadoutMap entry for kRandom triggers +# exists in the input/template DUNE-DAQ configuration, so there is the possibility of some +# confusion if a kRandom TCReadoutMap entry exists. +# ************************************************************ +def set_RTCM_trigger_params(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, + readout_window_before_ticks: int = None, readout_window_after_ticks: int = None, + readout_window_backshift_ticks: int = None): + rtcm_params = {} + if trigger_rate is not None: + rtcm_params["trigger_rate_hz"] = trigger_rate + if readout_window_before_ticks is not None: + rtcm_params["candidate_window_before_ts"] = readout_window_before_ticks + if readout_window_after_ticks is not None: + rtcm_params["candidate_window_after_ts"] = readout_window_after_ticks + if readout_window_backshift_ticks is not None: + rtcm_params["candidate_backshift_ts"] = readout_window_backshift_ticks + + if rtcm_params: + integtest_params.config_substitutions.append( + data_classes.attribute_substitution( + obj_class="RandomTCMakerConf", + obj_id = "random-tc-generator", + updates=rtcm_params, + ) + ) From eac283e0dd9e304859b29b2e0ffe6028e3222c77 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Wed, 27 May 2026 09:34:40 -0500 Subject: [PATCH 08/22] filled in MSQT and SFQT info --- docs/SurveyOfTriggersUsedInIntegtestsMay2026.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index be58d2f..ec2760e 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -33,10 +33,10 @@ ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x | example_system_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | number of WIBs=4 or 8, StreamEmu TP_rate param=1, TAMakerPrescale=1000, TCMakerPrescale=100, effective 0.25 or 0.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | | fake_data_producer_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=2001, RWW=64.02 usec | - | - | | long_window_readout_test.py | - | - | - | -| minimal_system_quick_test.py | - | - | - | +| minimal_system_quick_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | | readout_type_scan_test.py | - | - | - | | sample_ehn1_multihost_test.py | - | - | - | -| small_footprint_quick_test.py | - | - | - | +| small_footprint_quick_test.py | - | 1 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | | tpg_state_collection_test.py | - | - | - | | tpreplay_test.py | - | - | - | | tpstream_writing_test.py | - | - | - | From 0682880b3f0f4ae20acb9d0c21ea31bf38a9b196 Mon Sep 17 00:00:00 2001 From: bieryAtFnal <36311946+bieryAtFnal@users.noreply.github.com> Date: Wed, 27 May 2026 12:27:56 -0500 Subject: [PATCH 09/22] Update trigger rates and parameters in documentation --- docs/SurveyOfTriggersUsedInIntegtestsMay2026.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index ec2760e..5557a68 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -32,13 +32,13 @@ ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x | disabled_tpg_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | | example_system_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | number of WIBs=4 or 8, StreamEmu TP_rate param=1, TAMakerPrescale=1000, TCMakerPrescale=100, effective 0.25 or 0.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | | fake_data_producer_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=2001, RWW=64.02 usec | - | - | -| long_window_readout_test.py | - | - | - | +| long_window_readout_test.py | 0.05 Hz trigger rate, RWBT=-100000000, RWET=1000000, RWW=1.62 sec | - | - | | minimal_system_quick_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | | readout_type_scan_test.py | - | - | - | | sample_ehn1_multihost_test.py | - | - | - | | small_footprint_quick_test.py | - | 1 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | -| tpg_state_collection_test.py | - | - | - | -| tpreplay_test.py | - | - | - | +| tpg_state_collection_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | +| tpreplay_test.py | 0 Hz | - | - | | tpstream_writing_test.py | - | - | - | | trigger_bitwords_test.py | - | - | - | From d84e1ee8665ba4d73b15424398bf3fac89b767ca Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Thu, 18 Jun 2026 11:35:41 -0500 Subject: [PATCH 10/22] Merged develop into kbiery/integtest_trigger_choices and removed unneeded files. --- src/integrationtest/basic_checks.py | 29 -------- src/integrationtest/utility_functions2.py | 85 ----------------------- 2 files changed, 114 deletions(-) delete mode 100644 src/integrationtest/basic_checks.py delete mode 100644 src/integrationtest/utility_functions2.py diff --git a/src/integrationtest/basic_checks.py b/src/integrationtest/basic_checks.py deleted file mode 100644 index 5209872..0000000 --- a/src/integrationtest/basic_checks.py +++ /dev/null @@ -1,29 +0,0 @@ -import pytest -import os -import re -from integrationtest.verbosity_helper import IntegtestVerbosityLevels - -def basic_checks(run_dunerc, caplog, print_test_name: bool = True): - - # print out the name of the current test, if requested - if print_test_name and run_dunerc.verbosity_helper.compare_level(IntegtestVerbosityLevels.drunc_transitions): - # print the name of the current test - current_test = os.environ.get("PYTEST_CURRENT_TEST") - match_obj = re.search(r".*\[(.+)-run_.*rc.*\d].*", current_test) - if match_obj: - current_test = match_obj.group(1) - banner_line = re.sub(".", "=", current_test) - print(banner_line) - print(current_test) - print(banner_line) - - # Check that dunerc completed correctly - if run_dunerc.completed_process.returncode != 0: - fail_msg = f"The run control session returned a non-zero status code ({run_dunerc.completed_process.returncode})." - pytest.fail(fail_msg, pytrace=False) - - # Check that there weren't any warnings or errors during setup - setup_logs = caplog.get_records("setup") - if len(setup_logs) > 0: - fail_msg = f"One or more problems were encountered during the setup of the pytest: {setup_logs}" - pytest.fail(fail_msg, pytrace=False) diff --git a/src/integrationtest/utility_functions2.py b/src/integrationtest/utility_functions2.py deleted file mode 100644 index 188a1c1..0000000 --- a/src/integrationtest/utility_functions2.py +++ /dev/null @@ -1,85 +0,0 @@ -import pytest -import os -import re -import integrationtest.data_classes as data_classes - -from integrationtest.verbosity_helper import IntegtestVerbosityLevels - -import functools -print = functools.partial(print, flush=True) # always flush print() output - -# ************************************************************ -# Enable the FakeHSI trigger and optionally set some of its parameters. -# - Note that this function can currently only be called with integtest parameters -# that request a _generated_ DUNE-DAQ configuration. -# - Note that enabling the FakeHSI trigger in generated DUNE-DAQ configurations currently -# disables the generation of DUNE-DAQ configuration for the RandomTriggerCandidateMaker. -# (Not sure of the history of this choice; it is a feature of the 'generation' code.) -# ************************************************************ -def enable_fake_hsi_trigger(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, - readout_window_before_ticks: int = None, readout_window_after_ticks: int = None): - if not isinstance(integtest_params, data_classes.integtest_params_for_generated_dunedaq_config): - fail_msg = "The FakeHSI trigger can only be dynamically enabled in DUNE-DAQ configurations that are generated by the integration test infrastructure, not ones that are pre-defined." - pytest.fail(fail_msg, pytrace=False) - - integtest_params.fake_hsi_enabled = True - set_fake_hsi_trigger_params(integtest_params, trigger_rate, readout_window_before_ticks, readout_window_after_ticks) - -# ************************************************************ -# Set values for one or more parameters associated with the FakeHSI trigger -# ************************************************************ -def set_fake_hsi_trigger_params(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, - readout_window_before_ticks: int = None, readout_window_after_ticks: int = None): - if trigger_rate is not None: - integtest_params.config_substitutions.append( - data_classes.attribute_substitution( - obj_class="FakeHSIEventGeneratorConf", - updates={"trigger_rate": trigger_rate}, - ) - ) - - readout_params = {} - if readout_window_before_ticks is not None: - readout_params["time_before"] = readout_window_before_ticks - if readout_window_after_ticks is not None: - readout_params["time_after"] = readout_window_after_ticks - if readout_params: - integtest_params.config_substitutions.append( - data_classes.attribute_substitution( - obj_class="TCReadoutMap", - obj_id = "def-hsi-tc-map", - updates=readout_params, - ) - ) - -# ************************************************************ -# Set values for one or more parameters associated with the RandomTriggerCandidateMaker trigger. -# - Note that this function makes use of the DUNE-DAQ configuration parameters that are -# available in the RTCM C++ code itself. It does *not* use the DUNE-DAQ configuration -# parameters that are part of the TCReadoutMap. This is because the former has more -# flexibility, for example the ability to set a backshift amount of time. -# - Currently, this function does *not* check if a TCReadoutMap entry for kRandom triggers -# exists in the input/template DUNE-DAQ configuration, so there is the possibility of some -# confusion if a kRandom TCReadoutMap entry exists. -# ************************************************************ -def set_RTCM_trigger_params(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, - readout_window_before_ticks: int = None, readout_window_after_ticks: int = None, - readout_window_backshift_ticks: int = None): - rtcm_params = {} - if trigger_rate is not None: - rtcm_params["trigger_rate_hz"] = trigger_rate - if readout_window_before_ticks is not None: - rtcm_params["candidate_window_before_ts"] = readout_window_before_ticks - if readout_window_after_ticks is not None: - rtcm_params["candidate_window_after_ts"] = readout_window_after_ticks - if readout_window_backshift_ticks is not None: - rtcm_params["candidate_backshift_ts"] = readout_window_backshift_ticks - - if rtcm_params: - integtest_params.config_substitutions.append( - data_classes.attribute_substitution( - obj_class="RandomTCMakerConf", - obj_id = "random-tc-generator", - updates=rtcm_params, - ) - ) From 31819708f56759618e51f03f09b3fe82981c947e Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Thu, 18 Jun 2026 11:37:28 -0500 Subject: [PATCH 11/22] merged develop into kbiery/integtest_trigger_choices --- src/integrationtest/data_classes.py | 0 .../integrationtest_commandline.py | 0 src/integrationtest/integrationtest_drunc.py | 0 src/integrationtest/utility_functions.py | 77 +++++++++++++++++++ 4 files changed, 77 insertions(+) mode change 100755 => 100644 src/integrationtest/data_classes.py mode change 100755 => 100644 src/integrationtest/integrationtest_commandline.py mode change 100755 => 100644 src/integrationtest/integrationtest_drunc.py diff --git a/src/integrationtest/data_classes.py b/src/integrationtest/data_classes.py old mode 100755 new mode 100644 diff --git a/src/integrationtest/integrationtest_commandline.py b/src/integrationtest/integrationtest_commandline.py old mode 100755 new mode 100644 diff --git a/src/integrationtest/integrationtest_drunc.py b/src/integrationtest/integrationtest_drunc.py old mode 100755 new mode 100644 diff --git a/src/integrationtest/utility_functions.py b/src/integrationtest/utility_functions.py index e72c2db..d715ee0 100644 --- a/src/integrationtest/utility_functions.py +++ b/src/integrationtest/utility_functions.py @@ -2,6 +2,7 @@ import os import re import pathlib +import integrationtest.data_classes as data_classes from integrationtest.verbosity_helper import IntegtestVerbosityLevels import functools @@ -42,3 +43,79 @@ def delete_file(file: pathlib.PosixPath, verbose: bool = False): print(f"File {file} could not be deleted because it was not found.") except IsADirectoryError: print(f"File {file} could not be deleted because it is actually a directory.") + +# ************************************************************ +# Enable the FakeHSI trigger and optionally set some of its parameters. +# - Note that this function can currently only be called with integtest parameters +# that request a _generated_ DUNE-DAQ configuration. +# - Note that enabling the FakeHSI trigger in generated DUNE-DAQ configurations currently +# disables the generation of DUNE-DAQ configuration for the RandomTriggerCandidateMaker. +# (Not sure of the history of this choice; it is a feature of the 'generation' code.) +# ************************************************************ +def enable_fake_hsi_trigger(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, + readout_window_before_ticks: int = None, readout_window_after_ticks: int = None): + if not isinstance(integtest_params, data_classes.integtest_params_for_generated_dunedaq_config): + fail_msg = "The FakeHSI trigger can only be dynamically enabled in DUNE-DAQ configurations that are generated by the integration test infrastructure, not ones that are pre-defined." + pytest.fail(fail_msg, pytrace=False) + + integtest_params.fake_hsi_enabled = True + set_fake_hsi_trigger_params(integtest_params, trigger_rate, readout_window_before_ticks, readout_window_after_ticks) + +# ************************************************************ +# Set values for one or more parameters associated with the FakeHSI trigger +# ************************************************************ +def set_fake_hsi_trigger_params(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, + readout_window_before_ticks: int = None, readout_window_after_ticks: int = None): + if trigger_rate is not None: + integtest_params.config_substitutions.append( + data_classes.attribute_substitution( + obj_class="FakeHSIEventGeneratorConf", + updates={"trigger_rate": trigger_rate}, + ) + ) + + readout_params = {} + if readout_window_before_ticks is not None: + readout_params["time_before"] = readout_window_before_ticks + if readout_window_after_ticks is not None: + readout_params["time_after"] = readout_window_after_ticks + if readout_params: + integtest_params.config_substitutions.append( + data_classes.attribute_substitution( + obj_class="TCReadoutMap", + obj_id = "def-hsi-tc-map", + updates=readout_params, + ) + ) + +# ************************************************************ +# Set values for one or more parameters associated with the RandomTriggerCandidateMaker trigger. +# - Note that this function makes use of the DUNE-DAQ configuration parameters that are +# available in the RTCM C++ code itself. It does *not* use the DUNE-DAQ configuration +# parameters that are part of the TCReadoutMap. This is because the former has more +# flexibility, for example the ability to set a backshift amount of time. +# - Currently, this function does *not* check if a TCReadoutMap entry for kRandom triggers +# exists in the input/template DUNE-DAQ configuration, so there is the possibility of some +# confusion if a kRandom TCReadoutMap entry exists. +# ************************************************************ +def set_RTCM_trigger_params(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, + readout_window_before_ticks: int = None, readout_window_after_ticks: int = None, + readout_window_backshift_ticks: int = None): + rtcm_params = {} + if trigger_rate is not None: + rtcm_params["trigger_rate_hz"] = trigger_rate + if readout_window_before_ticks is not None: + rtcm_params["candidate_window_before_ts"] = readout_window_before_ticks + if readout_window_after_ticks is not None: + rtcm_params["candidate_window_after_ts"] = readout_window_after_ticks + if readout_window_backshift_ticks is not None: + rtcm_params["candidate_backshift_ts"] = readout_window_backshift_ticks + + if rtcm_params: + integtest_params.config_substitutions.append( + data_classes.attribute_substitution( + obj_class="RandomTCMakerConf", + obj_id = "random-tc-generator", + updates=rtcm_params, + ) + ) From 70a555e1c56df0683689dab10674aa96e3f4b691 Mon Sep 17 00:00:00 2001 From: bieryAtFnal <36311946+bieryAtFnal@users.noreply.github.com> Date: Mon, 22 Jun 2026 09:45:08 -0400 Subject: [PATCH 12/22] Updated survey document for June 2026 --- docs/SurveyOfTriggersUsedInIntegtestsMay2026.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index 5557a68..1920192 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -1,4 +1,4 @@ -# Survey of trigger and readout window configurations that are used in existing integtests, May 2026 +# Survey of trigger and readout window configurations that are used in existing integtests, June 2026 ## Introduction @@ -7,6 +7,7 @@ First, here a list of the trigger sources that we typically use in integration/r * **RandomTriggerCandidateMaker** * This software module typically runs in the MLTApplication (along with the _MLTModule_ and the _DataHandlerModule_ that converts TriggerActivity objects into TriggerCandidate objects), and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. * **FakeHSIEventGenerator** + * This software module typically runs in the XYZ Application, and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. * **TriggerActivity and TriggerCandidate objects derived from TriggerPrimitives** Next, recall that it is the MLT (Module Level Trigger) that specifies the readout window size for each trigger (TriggerDecision). It does this based on the configuration information that it was provided. @@ -27,19 +28,19 @@ ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x | Integtest name | RTCM | FakeHSI | Triggers from TPs | | --- | :---: | :---: | :---: | -| 3ru_1df_multirun_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=9, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, effective 5.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | -| 3ru_3df_multirun_test.py | 3 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=6, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, effective 3.6 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| 3ru_1df_multirun_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=9, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, calculated 5.8 Hz, observed 5.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| 3ru_3df_multirun_test.py | 3 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=6, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, calculated 3.8 Hz, observed 3.6 Hz, RWBT=0, RWET=32, RWW=512 nsec | | disabled_tpg_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | -| example_system_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | number of WIBs=4 or 8, StreamEmu TP_rate param=1, TAMakerPrescale=1000, TCMakerPrescale=100, effective 0.25 or 0.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| example_system_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | number of WIBs=4 or 8, StreamEmu TP_rate param=1, TAMakerPrescale=1000, TCMakerPrescale=100, observed 0.25 or 0.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | | fake_data_producer_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=2001, RWW=64.02 usec | - | - | | long_window_readout_test.py | 0.05 Hz trigger rate, RWBT=-100000000, RWET=1000000, RWW=1.62 sec | - | - | | minimal_system_quick_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | -| readout_type_scan_test.py | - | - | - | +| readout_type_scan_test.py | 1 Hz trigger rate, various readout window widths | - | various rates and readout window widths | | sample_ehn1_multihost_test.py | - | - | - | | small_footprint_quick_test.py | - | 1 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | | tpg_state_collection_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | | tpreplay_test.py | 0 Hz | - | - | -| tpstream_writing_test.py | - | - | - | +| tpstream_writing_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=2, StreamEmu TP_rate param=1, TAMakerPrescale=25, TCMakerPrescale=100, calculated 5.1 Hz, observed 4.9 Hz, RWBT=0, RWET=32, RWW=512 nsec | | trigger_bitwords_test.py | - | - | - | ### Integtests in the _dfmodules_ repo: From 78daf714803f67f6ba0b89ffeedc02bc99103315 Mon Sep 17 00:00:00 2001 From: bieryAtFnal <36311946+bieryAtFnal@users.noreply.github.com> Date: Mon, 22 Jun 2026 10:08:50 -0400 Subject: [PATCH 13/22] Updated trigger rates for trigger_bitwords_test.py --- docs/SurveyOfTriggersUsedInIntegtestsMay2026.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index 1920192..de1b8dd 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -41,7 +41,7 @@ ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x | tpg_state_collection_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | | tpreplay_test.py | 0 Hz | - | - | | tpstream_writing_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=2, StreamEmu TP_rate param=1, TAMakerPrescale=25, TCMakerPrescale=100, calculated 5.1 Hz, observed 4.9 Hz, RWBT=0, RWET=32, RWW=512 nsec | -| trigger_bitwords_test.py | - | - | - | +| trigger_bitwords_test.py | 40 Hz trigger rate, RWBT=-62500, RWET=62500 | 30 Hz trigger rate, RWBT=-62500, RWET=62500 | - | ### Integtests in the _dfmodules_ repo: From 693fe0c42e44561ae4240550feed3147b65a18d0 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Mon, 22 Jun 2026 09:47:18 -0500 Subject: [PATCH 14/22] Updated SurveyOfTriggersUsedInIntegtestsMay2026.md --- ...SurveyOfTriggersUsedInIntegtestsMay2026.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index de1b8dd..0756f39 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -41,10 +41,27 @@ ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x | tpg_state_collection_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | | tpreplay_test.py | 0 Hz | - | - | | tpstream_writing_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=2, StreamEmu TP_rate param=1, TAMakerPrescale=25, TCMakerPrescale=100, calculated 5.1 Hz, observed 4.9 Hz, RWBT=0, RWET=32, RWW=512 nsec | -| trigger_bitwords_test.py | 40 Hz trigger rate, RWBT=-62500, RWET=62500 | 30 Hz trigger rate, RWBT=-62500, RWET=62500 | - | +| trigger_bitwords_test.py | typical rate and readout window plus 40 Hz trigger rate, RWBT=-62500, RWET=62500 | typical rates and readout window plus 30 Hz trigger rate, RWBT=-62500, RWET=62500 | - | ### Integtests in the _dfmodules_ repo: | Integtest name | RTCM | FakeHSI | Triggers from TPs | | --- | :---: | :---: | :---: | | disabled_output_test.py | - | - | - | +| hdf5_compression_test.py | - | - | - | +| insufficient_disk_space_test.py | - | - | - | +| large_trigger_record_test.py | - | - | - | +| max_file_size_test.py | - | - | - | +| multiple_data_writers_test.py | - | - | - | +| offline_prod_run_test.py | - | - | - | +| trmonrequestor_test.py | - | - | - | + +### Other integtests: + +| Integtest name | RTCM | FakeHSI | Triggers from TPs | +| --- | :---: | :---: | :---: | +| crtmodules/crt_frame_builder_test.py | - | - | - | +| hsilibs/iceberg_real_hsi_test.py | - | - | - | +| listrev/listrev_test.py | - | - | - | +| snbmodules/simple_transform_test.py | - | - | - | +| trigger/change_rate_test.py | - | - | - | From c39a2b0ac8d1da847bb15ac3cd357b55b792179a Mon Sep 17 00:00:00 2001 From: bieryAtFnal <36311946+bieryAtFnal@users.noreply.github.com> Date: Mon, 22 Jun 2026 11:18:12 -0400 Subject: [PATCH 15/22] Refine trigger source descriptions in documentation Updated descriptions of trigger sources and their configurations in the integration tests documentation. --- ...SurveyOfTriggersUsedInIntegtestsMay2026.md | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index 0756f39..cb4c46c 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -2,15 +2,23 @@ ## Introduction -First, here a list of the trigger sources that we typically use in integration/regression tests (and emulated-data running generally): +Here a list of the trigger sources that we typically use in integration/regression tests (and emulated-data running generally): * **RandomTriggerCandidateMaker** * This software module typically runs in the MLTApplication (along with the _MLTModule_ and the _DataHandlerModule_ that converts TriggerActivity objects into TriggerCandidate objects), and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. + * Trigger records that are produced from these triggers have a TriggerCandidate type of _kRandom_ assigned to them. * **FakeHSIEventGenerator** - * This software module typically runs in the XYZ Application, and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. + * This software module typically runs in the FakeHSIApplication (along with the _HSIDataHandlerModule_), and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. + * Trigger records that are produced from these triggers have a TriggerCandidate type of _kTiming_ assigned to them. * **TriggerActivity and TriggerCandidate objects derived from TriggerPrimitives** + * The software modules that produce TAs and TCs run in the ReadoutApps, TriggerApps, and the MLT. + * In integration tests, we typically configure the TA and TC makers to simply produce one output trigger object for every N input objects ("prescaling" the input messages). The baseline values for both the TP->TA and TA->TC prescales are 100. + * Trigger records that are produced from these triggers have a TriggerCandidate type of _kPrescale_ assigned to them. + * To calculate the expected rate of these triggers, we multiply the number of emulated WIBs in the system by 64 (the number of channels per WIB), and multiply that value by 100 and the SourceEmu TP_rate parameter. The SourceEmulator code is designed to produce 100 Hz of TPs times its configured "rate" value. + * So, for 6 WIBs and a configured SourceEmu TP_rate of 1, the rate of TPs would be (6 * 64 * 100 * 1) = 38400. + * Dividing this number by the TA and TC prescale values gives the expected rate of triggers, e.g. 38400 / 100 / 100 = 3.8 Hz. -Next, recall that it is the MLT (Module Level Trigger) that specifies the readout window size for each trigger (TriggerDecision). It does this based on the configuration information that it was provided. +The readout windows that are assigned to each trigger can be configured in the MLT or in modules that are upstream of that. ## Configured trigger types, trigger rates, readout window widths, etc. @@ -28,10 +36,10 @@ ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x | Integtest name | RTCM | FakeHSI | Triggers from TPs | | --- | :---: | :---: | :---: | -| 3ru_1df_multirun_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=9, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, calculated 5.8 Hz, observed 5.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | -| 3ru_3df_multirun_test.py | 3 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=6, StreamEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, calculated 3.8 Hz, observed 3.6 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| 3ru_1df_multirun_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=9, SourceEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, calculated 5.8 Hz, observed 5.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| 3ru_3df_multirun_test.py | 3 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=6, SourceEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, calculated 3.8 Hz, observed 3.6 Hz, RWBT=0, RWET=32, RWW=512 nsec | | disabled_tpg_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | -| example_system_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | number of WIBs=4 or 8, StreamEmu TP_rate param=1, TAMakerPrescale=1000, TCMakerPrescale=100, observed 0.25 or 0.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| example_system_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | number of WIBs=4 or 8, SourceEmu TP_rate param=1, TAMakerPrescale=1000, TCMakerPrescale=100, observed 0.25 or 0.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | | fake_data_producer_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=2001, RWW=64.02 usec | - | - | | long_window_readout_test.py | 0.05 Hz trigger rate, RWBT=-100000000, RWET=1000000, RWW=1.62 sec | - | - | | minimal_system_quick_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | @@ -40,7 +48,7 @@ ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x | small_footprint_quick_test.py | - | 1 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | | tpg_state_collection_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | | tpreplay_test.py | 0 Hz | - | - | -| tpstream_writing_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=2, StreamEmu TP_rate param=1, TAMakerPrescale=25, TCMakerPrescale=100, calculated 5.1 Hz, observed 4.9 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| tpstream_writing_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=2, SourceEmu TP_rate param=1, TAMakerPrescale=25, TCMakerPrescale=100, calculated 5.1 Hz, observed 4.9 Hz, RWBT=0, RWET=32, RWW=512 nsec | | trigger_bitwords_test.py | typical rate and readout window plus 40 Hz trigger rate, RWBT=-62500, RWET=62500 | typical rates and readout window plus 30 Hz trigger rate, RWBT=-62500, RWET=62500 | - | ### Integtests in the _dfmodules_ repo: From e49ea662ef9c3fd768d244360bbf1f3eec68bf21 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Mon, 22 Jun 2026 10:19:54 -0500 Subject: [PATCH 16/22] Updated SurveyOfTriggersUsedInIntegtestsMay2026.md --- ...SurveyOfTriggersUsedInIntegtestsMay2026.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md index cb4c46c..cccd415 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md @@ -1,4 +1,4 @@ -# Survey of trigger and readout window configurations that are used in existing integtests, June 2026 +# Survey of trigger and readout window configurations that are used in existing integtests, Summer 2026 ## Introduction @@ -55,21 +55,21 @@ ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x | Integtest name | RTCM | FakeHSI | Triggers from TPs | | --- | :---: | :---: | :---: | -| disabled_output_test.py | - | - | - | -| hdf5_compression_test.py | - | - | - | -| insufficient_disk_space_test.py | - | - | - | -| large_trigger_record_test.py | - | - | - | -| max_file_size_test.py | - | - | - | -| multiple_data_writers_test.py | - | - | - | -| offline_prod_run_test.py | - | - | - | -| trmonrequestor_test.py | - | - | - | +| disabled_output_test.py | | | | +| hdf5_compression_test.py | | | | +| insufficient_disk_space_test.py | | | | +| large_trigger_record_test.py | | | | +| max_file_size_test.py | | | | +| multiple_data_writers_test.py | | | | +| offline_prod_run_test.py | | | | +| trmonrequestor_test.py | | | | ### Other integtests: | Integtest name | RTCM | FakeHSI | Triggers from TPs | | --- | :---: | :---: | :---: | -| crtmodules/crt_frame_builder_test.py | - | - | - | -| hsilibs/iceberg_real_hsi_test.py | - | - | - | -| listrev/listrev_test.py | - | - | - | -| snbmodules/simple_transform_test.py | - | - | - | -| trigger/change_rate_test.py | - | - | - | +| crtmodules/crt_frame_builder_test.py | | | | +| hsilibs/iceberg_real_hsi_test.py | | | | +| listrev/listrev_test.py | | | | +| snbmodules/simple_transform_test.py | | | | +| trigger/change_rate_test.py | | | | From c429b162ca729138679618f00ee54e04b65aeb12 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Mon, 22 Jun 2026 10:20:42 -0500 Subject: [PATCH 17/22] Renamed the trigger summary doc --- ...veyOfTriggersUsedInIntegtestsSummer2026.md | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md diff --git a/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md b/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md new file mode 100644 index 0000000..cccd415 --- /dev/null +++ b/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md @@ -0,0 +1,75 @@ +# Survey of trigger and readout window configurations that are used in existing integtests, Summer 2026 + +## Introduction + +Here a list of the trigger sources that we typically use in integration/regression tests (and emulated-data running generally): + +* **RandomTriggerCandidateMaker** + * This software module typically runs in the MLTApplication (along with the _MLTModule_ and the _DataHandlerModule_ that converts TriggerActivity objects into TriggerCandidate objects), and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. + * Trigger records that are produced from these triggers have a TriggerCandidate type of _kRandom_ assigned to them. +* **FakeHSIEventGenerator** + * This software module typically runs in the FakeHSIApplication (along with the _HSIDataHandlerModule_), and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. + * Trigger records that are produced from these triggers have a TriggerCandidate type of _kTiming_ assigned to them. +* **TriggerActivity and TriggerCandidate objects derived from TriggerPrimitives** + * The software modules that produce TAs and TCs run in the ReadoutApps, TriggerApps, and the MLT. + * In integration tests, we typically configure the TA and TC makers to simply produce one output trigger object for every N input objects ("prescaling" the input messages). The baseline values for both the TP->TA and TA->TC prescales are 100. + * Trigger records that are produced from these triggers have a TriggerCandidate type of _kPrescale_ assigned to them. + * To calculate the expected rate of these triggers, we multiply the number of emulated WIBs in the system by 64 (the number of channels per WIB), and multiply that value by 100 and the SourceEmu TP_rate parameter. The SourceEmulator code is designed to produce 100 Hz of TPs times its configured "rate" value. + * So, for 6 WIBs and a configured SourceEmu TP_rate of 1, the rate of TPs would be (6 * 64 * 100 * 1) = 38400. + * Dividing this number by the TA and TC prescale values gives the expected rate of triggers, e.g. 38400 / 100 / 100 = 3.8 Hz. + +The readout windows that are assigned to each trigger can be configured in the MLT or in modules that are upstream of that. + +## Configured trigger types, trigger rates, readout window widths, etc. + +The tables in this section list the configuration parameters that are set for each of the integration tests. If an integtest uses more than one DUNE-DAQ configuration, the super-set of trigger types is listed. If a given test does not use a particular trigger type, nothing is listed. + +To help save space in the table cells, the following abbreviations are used: + +* RWBT - readout window begin ticks - this value determines the beginning of the readout window. It is added to the trigger time to determine the beginning of the readout window. Obviously, if this value is less than zero, the result is a timestamp that is earlier than the trigger time. +* RWET - readout window end ticks - this value determines the end of the readout window. It is added to the trigger time to determine the end of the readout window. +* RWW - readout window width, in either DTS clock ticks, wallclock time, or both. + +ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x100 = 57,600 Hz of TPs; 57600/100/100 = 5.8 Hz of kPrescale triggers + +### Integtests in the _daqsystemtest_ repo: + +| Integtest name | RTCM | FakeHSI | Triggers from TPs | +| --- | :---: | :---: | :---: | +| 3ru_1df_multirun_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=9, SourceEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, calculated 5.8 Hz, observed 5.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| 3ru_3df_multirun_test.py | 3 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=6, SourceEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, calculated 3.8 Hz, observed 3.6 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| disabled_tpg_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | +| example_system_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | number of WIBs=4 or 8, SourceEmu TP_rate param=1, TAMakerPrescale=1000, TCMakerPrescale=100, observed 0.25 or 0.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| fake_data_producer_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=2001, RWW=64.02 usec | - | - | +| long_window_readout_test.py | 0.05 Hz trigger rate, RWBT=-100000000, RWET=1000000, RWW=1.62 sec | - | - | +| minimal_system_quick_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | +| readout_type_scan_test.py | 1 Hz trigger rate, various readout window widths | - | various rates and readout window widths | +| sample_ehn1_multihost_test.py | - | - | - | +| small_footprint_quick_test.py | - | 1 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | +| tpg_state_collection_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | +| tpreplay_test.py | 0 Hz | - | - | +| tpstream_writing_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=2, SourceEmu TP_rate param=1, TAMakerPrescale=25, TCMakerPrescale=100, calculated 5.1 Hz, observed 4.9 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| trigger_bitwords_test.py | typical rate and readout window plus 40 Hz trigger rate, RWBT=-62500, RWET=62500 | typical rates and readout window plus 30 Hz trigger rate, RWBT=-62500, RWET=62500 | - | + +### Integtests in the _dfmodules_ repo: + +| Integtest name | RTCM | FakeHSI | Triggers from TPs | +| --- | :---: | :---: | :---: | +| disabled_output_test.py | | | | +| hdf5_compression_test.py | | | | +| insufficient_disk_space_test.py | | | | +| large_trigger_record_test.py | | | | +| max_file_size_test.py | | | | +| multiple_data_writers_test.py | | | | +| offline_prod_run_test.py | | | | +| trmonrequestor_test.py | | | | + +### Other integtests: + +| Integtest name | RTCM | FakeHSI | Triggers from TPs | +| --- | :---: | :---: | :---: | +| crtmodules/crt_frame_builder_test.py | | | | +| hsilibs/iceberg_real_hsi_test.py | | | | +| listrev/listrev_test.py | | | | +| snbmodules/simple_transform_test.py | | | | +| trigger/change_rate_test.py | | | | From 24fce0f387d7609946277b77ee39612213cc65f1 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Mon, 22 Jun 2026 10:20:56 -0500 Subject: [PATCH 18/22] Renamed the trigger summary doc --- ...SurveyOfTriggersUsedInIntegtestsMay2026.md | 75 ------------------- 1 file changed, 75 deletions(-) delete mode 100644 docs/SurveyOfTriggersUsedInIntegtestsMay2026.md diff --git a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md b/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md deleted file mode 100644 index cccd415..0000000 --- a/docs/SurveyOfTriggersUsedInIntegtestsMay2026.md +++ /dev/null @@ -1,75 +0,0 @@ -# Survey of trigger and readout window configurations that are used in existing integtests, Summer 2026 - -## Introduction - -Here a list of the trigger sources that we typically use in integration/regression tests (and emulated-data running generally): - -* **RandomTriggerCandidateMaker** - * This software module typically runs in the MLTApplication (along with the _MLTModule_ and the _DataHandlerModule_ that converts TriggerActivity objects into TriggerCandidate objects), and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. - * Trigger records that are produced from these triggers have a TriggerCandidate type of _kRandom_ assigned to them. -* **FakeHSIEventGenerator** - * This software module typically runs in the FakeHSIApplication (along with the _HSIDataHandlerModule_), and it receives TimeSync messages from the ReadoutApplications so that it knows what DTS (DUNE Timing System) timestamps are currently being processed by the emulated-data system. It has the ability to produce periodic triggers at a configurable rate, and it uses the knowledge of "detector time" that it gains from the TimeSync messages to provide a useful timestamp in the TriggerCandidate objects that it creates. - * Trigger records that are produced from these triggers have a TriggerCandidate type of _kTiming_ assigned to them. -* **TriggerActivity and TriggerCandidate objects derived from TriggerPrimitives** - * The software modules that produce TAs and TCs run in the ReadoutApps, TriggerApps, and the MLT. - * In integration tests, we typically configure the TA and TC makers to simply produce one output trigger object for every N input objects ("prescaling" the input messages). The baseline values for both the TP->TA and TA->TC prescales are 100. - * Trigger records that are produced from these triggers have a TriggerCandidate type of _kPrescale_ assigned to them. - * To calculate the expected rate of these triggers, we multiply the number of emulated WIBs in the system by 64 (the number of channels per WIB), and multiply that value by 100 and the SourceEmu TP_rate parameter. The SourceEmulator code is designed to produce 100 Hz of TPs times its configured "rate" value. - * So, for 6 WIBs and a configured SourceEmu TP_rate of 1, the rate of TPs would be (6 * 64 * 100 * 1) = 38400. - * Dividing this number by the TA and TC prescale values gives the expected rate of triggers, e.g. 38400 / 100 / 100 = 3.8 Hz. - -The readout windows that are assigned to each trigger can be configured in the MLT or in modules that are upstream of that. - -## Configured trigger types, trigger rates, readout window widths, etc. - -The tables in this section list the configuration parameters that are set for each of the integration tests. If an integtest uses more than one DUNE-DAQ configuration, the super-set of trigger types is listed. If a given test does not use a particular trigger type, nothing is listed. - -To help save space in the table cells, the following abbreviations are used: - -* RWBT - readout window begin ticks - this value determines the beginning of the readout window. It is added to the trigger time to determine the beginning of the readout window. Obviously, if this value is less than zero, the result is a timestamp that is earlier than the trigger time. -* RWET - readout window end ticks - this value determines the end of the readout window. It is added to the trigger time to determine the end of the readout window. -* RWW - readout window width, in either DTS clock ticks, wallclock time, or both. - -ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x100 = 57,600 Hz of TPs; 57600/100/100 = 5.8 Hz of kPrescale triggers - -### Integtests in the _daqsystemtest_ repo: - -| Integtest name | RTCM | FakeHSI | Triggers from TPs | -| --- | :---: | :---: | :---: | -| 3ru_1df_multirun_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=9, SourceEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, calculated 5.8 Hz, observed 5.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | -| 3ru_3df_multirun_test.py | 3 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=6, SourceEmu TP_rate param=1, TAMakerPrescale=100, TCMakerPrescale=100, calculated 3.8 Hz, observed 3.6 Hz, RWBT=0, RWET=32, RWW=512 nsec | -| disabled_tpg_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | -| example_system_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | number of WIBs=4 or 8, SourceEmu TP_rate param=1, TAMakerPrescale=1000, TCMakerPrescale=100, observed 0.25 or 0.5 Hz, RWBT=0, RWET=32, RWW=512 nsec | -| fake_data_producer_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=2001, RWW=64.02 usec | - | - | -| long_window_readout_test.py | 0.05 Hz trigger rate, RWBT=-100000000, RWET=1000000, RWW=1.62 sec | - | - | -| minimal_system_quick_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | -| readout_type_scan_test.py | 1 Hz trigger rate, various readout window widths | - | various rates and readout window widths | -| sample_ehn1_multihost_test.py | - | - | - | -| small_footprint_quick_test.py | - | 1 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | -| tpg_state_collection_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | -| tpreplay_test.py | 0 Hz | - | - | -| tpstream_writing_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=2, SourceEmu TP_rate param=1, TAMakerPrescale=25, TCMakerPrescale=100, calculated 5.1 Hz, observed 4.9 Hz, RWBT=0, RWET=32, RWW=512 nsec | -| trigger_bitwords_test.py | typical rate and readout window plus 40 Hz trigger rate, RWBT=-62500, RWET=62500 | typical rates and readout window plus 30 Hz trigger rate, RWBT=-62500, RWET=62500 | - | - -### Integtests in the _dfmodules_ repo: - -| Integtest name | RTCM | FakeHSI | Triggers from TPs | -| --- | :---: | :---: | :---: | -| disabled_output_test.py | | | | -| hdf5_compression_test.py | | | | -| insufficient_disk_space_test.py | | | | -| large_trigger_record_test.py | | | | -| max_file_size_test.py | | | | -| multiple_data_writers_test.py | | | | -| offline_prod_run_test.py | | | | -| trmonrequestor_test.py | | | | - -### Other integtests: - -| Integtest name | RTCM | FakeHSI | Triggers from TPs | -| --- | :---: | :---: | :---: | -| crtmodules/crt_frame_builder_test.py | | | | -| hsilibs/iceberg_real_hsi_test.py | | | | -| listrev/listrev_test.py | | | | -| snbmodules/simple_transform_test.py | | | | -| trigger/change_rate_test.py | | | | From 1d93173b526d4c36bbde02d0c73d93510551bd94 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Tue, 30 Jun 2026 11:11:42 -0500 Subject: [PATCH 19/22] Made the changes to utility_functions.py suggested by Michal in PR #161. --- src/integrationtest/utility_functions.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/integrationtest/utility_functions.py b/src/integrationtest/utility_functions.py index d715ee0..f754388 100644 --- a/src/integrationtest/utility_functions.py +++ b/src/integrationtest/utility_functions.py @@ -8,6 +8,7 @@ import functools print = functools.partial(print, flush=True) # always flush print() output + def basic_checks(run_dunerc, caplog, print_test_name: bool = True): # print out the name of the current test, if requested @@ -44,6 +45,7 @@ def delete_file(file: pathlib.PosixPath, verbose: bool = False): except IsADirectoryError: print(f"File {file} could not be deleted because it is actually a directory.") + # ************************************************************ # Enable the FakeHSI trigger and optionally set some of its parameters. # - Note that this function can currently only be called with integtest parameters @@ -55,12 +57,15 @@ def delete_file(file: pathlib.PosixPath, verbose: bool = False): def enable_fake_hsi_trigger(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, readout_window_before_ticks: int = None, readout_window_after_ticks: int = None): if not isinstance(integtest_params, data_classes.integtest_params_for_generated_dunedaq_config): - fail_msg = "The FakeHSI trigger can only be dynamically enabled in DUNE-DAQ configurations that are generated by the integration test infrastructure, not ones that are pre-defined." + fail_msg = ("The FakeHSI trigger can only be dynamically enabled in DUNE-DAQ " + "configurations that are generated by the integration test infrastructure, " + "not ones that are pre-defined.") pytest.fail(fail_msg, pytrace=False) integtest_params.fake_hsi_enabled = True set_fake_hsi_trigger_params(integtest_params, trigger_rate, readout_window_before_ticks, readout_window_after_ticks) + # ************************************************************ # Set values for one or more parameters associated with the FakeHSI trigger # ************************************************************ @@ -70,6 +75,7 @@ def set_fake_hsi_trigger_params(integtest_params: data_classes.integtest_param_b integtest_params.config_substitutions.append( data_classes.attribute_substitution( obj_class="FakeHSIEventGeneratorConf", + obj_id="fakehsi", updates={"trigger_rate": trigger_rate}, ) ) @@ -83,11 +89,12 @@ def set_fake_hsi_trigger_params(integtest_params: data_classes.integtest_param_b integtest_params.config_substitutions.append( data_classes.attribute_substitution( obj_class="TCReadoutMap", - obj_id = "def-hsi-tc-map", + obj_id="def-hsi-tc-map", updates=readout_params, ) ) + # ************************************************************ # Set values for one or more parameters associated with the RandomTriggerCandidateMaker trigger. # - Note that this function makes use of the DUNE-DAQ configuration parameters that are @@ -98,7 +105,7 @@ def set_fake_hsi_trigger_params(integtest_params: data_classes.integtest_param_b # exists in the input/template DUNE-DAQ configuration, so there is the possibility of some # confusion if a kRandom TCReadoutMap entry exists. # ************************************************************ -def set_RTCM_trigger_params(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, +def set_rtcm_trigger_params(integtest_params: data_classes.integtest_param_base_class, trigger_rate: float = None, readout_window_before_ticks: int = None, readout_window_after_ticks: int = None, readout_window_backshift_ticks: int = None): rtcm_params = {} @@ -115,7 +122,7 @@ def set_RTCM_trigger_params(integtest_params: data_classes.integtest_param_base_ integtest_params.config_substitutions.append( data_classes.attribute_substitution( obj_class="RandomTCMakerConf", - obj_id = "random-tc-generator", + obj_id="random-tc-generator", updates=rtcm_params, ) ) From a26c58d0cfe9950cd0a608c9718ac79fdc9acf89 Mon Sep 17 00:00:00 2001 From: bieryAtFnal <36311946+bieryAtFnal@users.noreply.github.com> Date: Tue, 30 Jun 2026 11:46:22 -0500 Subject: [PATCH 20/22] Add trigger rate details for sample_ehn1_multihost_test --- docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md b/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md index cccd415..2749433 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md @@ -30,8 +30,6 @@ To help save space in the table cells, the following abbreviations are used: * RWET - readout window end ticks - this value determines the end of the readout window. It is added to the trigger time to determine the end of the readout window. * RWW - readout window width, in either DTS clock ticks, wallclock time, or both. -ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x100 = 57,600 Hz of TPs; 57600/100/100 = 5.8 Hz of kPrescale triggers - ### Integtests in the _daqsystemtest_ repo: | Integtest name | RTCM | FakeHSI | Triggers from TPs | @@ -44,7 +42,7 @@ ToDo: add an explanation of how the emulated TP rate is determined. e.g. 9x64x | long_window_readout_test.py | 0.05 Hz trigger rate, RWBT=-100000000, RWET=1000000, RWW=1.62 sec | - | - | | minimal_system_quick_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | | readout_type_scan_test.py | 1 Hz trigger rate, various readout window widths | - | various rates and readout window widths | -| sample_ehn1_multihost_test.py | - | - | - | +| sample_ehn1_multihost_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | 3 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | number of WIBs=4, SourceEmu TP_rate param=1, TAMakerPrescale=1000, TCMakerPrescale=100, observed 0.25 Hz, RWBT=0, RWET=32, RWW=512 nsec | | small_footprint_quick_test.py | - | 1 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | | tpg_state_collection_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | | tpreplay_test.py | 0 Hz | - | - | From 053608dfa241c0308f78c9a2f725d7fbbd7d50e2 Mon Sep 17 00:00:00 2001 From: Kurt Biery Date: Wed, 1 Jul 2026 09:54:32 -0500 Subject: [PATCH 21/22] First attempt at filling in triggers for dfmodules tests in the Survey doc. --- ...SurveyOfTriggersUsedInIntegtestsSummer2026.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md b/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md index 2749433..11289cc 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md @@ -53,14 +53,14 @@ To help save space in the table cells, the following abbreviations are used: | Integtest name | RTCM | FakeHSI | Triggers from TPs | | --- | :---: | :---: | :---: | -| disabled_output_test.py | | | | -| hdf5_compression_test.py | | | | -| insufficient_disk_space_test.py | | | | -| large_trigger_record_test.py | | | | -| max_file_size_test.py | | | | -| multiple_data_writers_test.py | | | | -| offline_prod_run_test.py | | | | -| trmonrequestor_test.py | | | | +| disabled_output_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | +| hdf5_compression_test.py| - | 10 Hz trigger rate, RWBT=-120000, RWET=1000, RWW=1.94 msec | - | +| insufficient_disk_space_test.py | 0.2 Hz trigger rate, RWBT=-9000000, RWET=1000000, RWW=160 msec | - | - | +| large_trigger_record_test.py | 0.06 Hz trigger rate, RWBT=-10000000, RWET=1000000, RWW=176 msec | - | - | +| max_file_size_test.py | - | 10 Hz trigger rate, RWBT=-52000, RWET=1000, RWW=848 usec | - | +| multiple_data_writers_test.py | - | 10 Hz trigger rate, RWBT=-52000, RWET=1000, RWW=848 usec | - | +| offline_prod_run_test.py | - | 1 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | +| trmonrequestor_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | ### Other integtests: From bde350d641d6bcbba88e416af4f78e4ac3ed26f0 Mon Sep 17 00:00:00 2001 From: bieryAtFnal <36311946+bieryAtFnal@users.noreply.github.com> Date: Wed, 1 Jul 2026 13:28:07 -0500 Subject: [PATCH 22/22] Revise integration test parameters and expected rates Updated integration test details for trigger rates and configurations, including specific parameters for WIB and DAPHNE data. Clarified expected rates and added observed rates for various tests. --- ...urveyOfTriggersUsedInIntegtestsSummer2026.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md b/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md index 11289cc..e3f47f7 100644 --- a/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md +++ b/docs/SurveyOfTriggersUsedInIntegtestsSummer2026.md @@ -12,11 +12,14 @@ Here a list of the trigger sources that we typically use in integration/regressi * Trigger records that are produced from these triggers have a TriggerCandidate type of _kTiming_ assigned to them. * **TriggerActivity and TriggerCandidate objects derived from TriggerPrimitives** * The software modules that produce TAs and TCs run in the ReadoutApps, TriggerApps, and the MLT. - * In integration tests, we typically configure the TA and TC makers to simply produce one output trigger object for every N input objects ("prescaling" the input messages). The baseline values for both the TP->TA and TA->TC prescales are 100. + * In our integration tests, we have examples of creating TPs from WIB data and from DAPHNE data. + * For WIB data, we typically use a data-replay file that has all of the ADC values set to zero. We combine this with software (`SourceEmulatorModel`) that modifies every Nth ADC value to a large number, where N is configurable. In this way, we can set the rate of TPs to match the needs of the integration test. + * For DAPHNE data, we use a data-replay file taken from a particular run at EHN1. That file has some number of TPs in the data, and we tune parameters of the DAQ system to provide the desired TA and TC rates for a given integration test. + * In both cases, we configure the TA and TC makers to simply produce one output trigger object for every N input objects ("prescaling" the input messages). The baseline values for the TP->TA and TA->TC prescales are 1000 and 100, respectively. * Trigger records that are produced from these triggers have a TriggerCandidate type of _kPrescale_ assigned to them. - * To calculate the expected rate of these triggers, we multiply the number of emulated WIBs in the system by 64 (the number of channels per WIB), and multiply that value by 100 and the SourceEmu TP_rate parameter. The SourceEmulator code is designed to produce 100 Hz of TPs times its configured "rate" value. + * To calculate the expected rate of TP-based triggers from emulated WIB data, we multiply the number of emulated WIBs in the system by 64 (the number of channels per WIB), and multiply that value by 100 and the SourceEmu TP_rate parameter. The SourceEmulator code is designed to produce 100 Hz of TPs times its configured "rate" value. * So, for 6 WIBs and a configured SourceEmu TP_rate of 1, the rate of TPs would be (6 * 64 * 100 * 1) = 38400. - * Dividing this number by the TA and TC prescale values gives the expected rate of triggers, e.g. 38400 / 100 / 100 = 3.8 Hz. + * Dividing this number by TA and TC prescale values of 100 gives the expected rate of triggers, e.g. 38400 / 100 / 100 = 3.8 Hz. The readout windows that are assigned to each trigger can be configured in the MLT or in modules that are upstream of that. @@ -53,11 +56,11 @@ To help save space in the table cells, the following abbreviations are used: | Integtest name | RTCM | FakeHSI | Triggers from TPs | | --- | :---: | :---: | :---: | -| disabled_output_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - | -| hdf5_compression_test.py| - | 10 Hz trigger rate, RWBT=-120000, RWET=1000, RWW=1.94 msec | - | +| disabled_output_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | number of WIBs=2, SourceEmu TP_rate param=1, TAMakerPrescale=25, TCMakerPrescale=100, calculated 5.1 Hz, observed 4.9 Hz, RWBT=0, RWET=32, RWW=512 nsec | +| hdf5_compression_test.py| - | 10 Hz trigger rate, RWBT=-120000, RWET=1000, RWW=1.94 msec | number of emulated DAPHNE cards=6, DAPHNE replay data from run 36012, TAMakerPrescale=2000, TCMakerPrescale=100, observed ~2.1 Hz, RWBT=0, RWET=3040, RWW=48.6 usec | | insufficient_disk_space_test.py | 0.2 Hz trigger rate, RWBT=-9000000, RWET=1000000, RWW=160 msec | - | - | -| large_trigger_record_test.py | 0.06 Hz trigger rate, RWBT=-10000000, RWET=1000000, RWW=176 msec | - | - | -| max_file_size_test.py | - | 10 Hz trigger rate, RWBT=-52000, RWET=1000, RWW=848 usec | - | +| large_trigger_record_test.py | 0.06 Hz trigger rate, RWBT=-10000000 or -25000000, RWET=1000000, RWW=176 or 416 msec | - | - | +| max_file_size_test.py | - | 10 Hz trigger rate, RWBT=-52000, RWET=1000, RWW=848 usec | number of WIBs=6, SourceEmu TP_rate param=5, TAMakerPrescale=1000, TCMakerPrescale=100, calculated 1.92 Hz, observed 1.84 Hz, RWBT=0, RWET=32, RWW=512 nsec | | multiple_data_writers_test.py | - | 10 Hz trigger rate, RWBT=-52000, RWET=1000, RWW=848 usec | - | | offline_prod_run_test.py | - | 1 Hz trigger rate, RWBT=-3000, RWET=1001, RWW=64.02 usec | - | | trmonrequestor_test.py | 1 Hz trigger rate, RWBT=-2000, RWET=5, RWW=32.1 usec | - | - |