From 6449dbf19807cd85c1c1f8866c4944a50cd18d1e Mon Sep 17 00:00:00 2001 From: Artur Sztuc Date: Mon, 14 Oct 2024 17:09:10 +0200 Subject: [PATCH] Fixing subdetector readout maps... --- plugins/MLTModule.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/MLTModule.cpp b/plugins/MLTModule.cpp index 59542a6..eb29fae 100644 --- a/plugins/MLTModule.cpp +++ b/plugins/MLTModule.cpp @@ -294,8 +294,16 @@ MLTModule::trigger_decisions_callback(dfmessages::TriggerDecision& decision ) // Overwrite the component's readout window if we have custom // subdetector--readout window map - for ( const auto& [sourceid, window] : m_subdetector_readout_window_map ) { + for ( const auto& [subdetectorid, window] : m_subdetector_readout_window_map ) { for (auto& request: decision.components) { + if (request.component.subsystem != daqdataformats::SourceID::Subsystem::kDetectorReadout) { + continue; + } + + if (subdetectorid != m_srcid_detid_map[request.component]) { + continue; + } + request.window_begin = decision.trigger_timestamp - window.first; request.window_end = decision.trigger_timestamp + window.second; }