From fab07db057a3aa2e9b20de3d2a096df6a16ba966 Mon Sep 17 00:00:00 2001 From: Eric Flumerfelt Date: Mon, 29 Jun 2026 15:14:36 -0500 Subject: [PATCH 01/10] Add DataflowStatusModule configuration objects. oks-format schema file --- schema/appmodel/application.schema.xml | 56 ++++++++++++++++---------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/schema/appmodel/application.schema.xml b/schema/appmodel/application.schema.xml index a75dba2..f22a3d6 100644 --- a/schema/appmodel/application.schema.xml +++ b/schema/appmodel/application.schema.xml @@ -80,7 +80,7 @@ - + @@ -171,6 +171,16 @@ + + + + + + + + + + @@ -191,16 +201,6 @@ - - - - - - - - - - @@ -239,6 +239,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -414,16 +438,6 @@ - - - - - - - - - - From 832772c647e33c06a36dfc31a387583c78b4b029 Mon Sep 17 00:00:00 2001 From: Eric Flumerfelt Date: Mon, 6 Jul 2026 09:57:24 -0500 Subject: [PATCH 02/10] Add more attributes to DataflowStatusModuleConf --- schema/appmodel/application.schema.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/schema/appmodel/application.schema.xml b/schema/appmodel/application.schema.xml index f22a3d6..0ae85d2 100644 --- a/schema/appmodel/application.schema.xml +++ b/schema/appmodel/application.schema.xml @@ -80,7 +80,7 @@ - + @@ -251,6 +251,8 @@ + + From dd856ba6d98526b7e1ddfd22fac3037089b20df9 Mon Sep 17 00:00:00 2001 From: Eric Flumerfelt Date: Mon, 13 Jul 2026 07:59:38 -0500 Subject: [PATCH 03/10] Remove trigger_record_output from TRBModule configuration --- schema/appmodel/application.schema.xml | 4 ++-- src/DFApplication.cpp | 17 ++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/schema/appmodel/application.schema.xml b/schema/appmodel/application.schema.xml index 0ae85d2..5fab32b 100644 --- a/schema/appmodel/application.schema.xml +++ b/schema/appmodel/application.schema.xml @@ -80,7 +80,7 @@ - + @@ -607,6 +607,7 @@ + @@ -615,7 +616,6 @@ - diff --git a/src/DFApplication.cpp b/src/DFApplication.cpp index 399ca46..cc04049 100644 --- a/src/DFApplication.cpp +++ b/src/DFApplication.cpp @@ -37,7 +37,7 @@ namespace dunedaq { namespace appmodel { - + static inline void fill_sourceid_object(const ConfigObjectFactory& obj_fac, const conffwk::ConfigObject* netConn, @@ -266,13 +266,13 @@ DFApplication::generate_modules( if (processed_apps.contains(uid)) { continue; } - + for ( const auto & [uid, rel_sources] : helper->get_all_app_source_ids(ctb_type) ) { for ( auto [rel, id] : rel_sources ) { std::string local_uid = uid; local_uid += rel.find("LLT")!=std::string::npos ? "_LLT" : "_HLT"; - + dreqNetObjs.emplace_back(obj_fac.create_net_obj(descriptor, local_uid)); sidObjs.push_back(std::make_shared(id->config_object())); @@ -280,18 +280,18 @@ DFApplication::generate_modules( sidNetObjs.emplace_back(obj_fac.create("SourceIDToNetworkConnection", sidToNetUid)); sidNetObjs.back().set_objs("source_ids", {sidObjs.back().get()}); sidNetObjs.back().set_obj("netconn", &dreqNetObjs.back()); - + } // loop on relational sources - + processed_apps.insert(uid); - } // loop over CTB apps + } // loop over CTB apps } // loop over descriptors for the CTB apps auto app_sources = helper->get_app_source_ids(); // Now look at all Smart apps that are not Readout, FakeData or DF for (auto [uid, descriptor]: helper->get_netdescriptors("DataRequest")) { - + if (processed_apps.contains(uid)) { continue; } @@ -342,7 +342,6 @@ DFApplication::generate_modules( trbObj.set_obj("configuration", &trbConfObj); trbObj.set_objs("inputs", trbInputObjs); trbObj.set_objs("outputs", trbOutputObjs); - trbObj.set_obj("trigger_record_output", &trQueueObj); trbObj.set_objs("request_connections", trbSidNetObjs); // Push TRB Module Object from confdb modules.push_back(obj_fac.get_dal(trbUid)); @@ -373,5 +372,5 @@ DFApplication::generate_modules( obj_fac.update_modules(modules); } -} // namespace appmodel +} // namespace appmodel } // namespace dunedaq From 5dfc5f7d046eea417d73c23b2162d68e2dcc33f4 Mon Sep 17 00:00:00 2001 From: Eric Flumerfelt Date: Tue, 14 Jul 2026 14:20:39 -0500 Subject: [PATCH 04/10] Add more timeout and reallocation configuration to DFOConf. Remove deprecated parameters --- schema/appmodel/application.schema.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/schema/appmodel/application.schema.xml b/schema/appmodel/application.schema.xml index 5fab32b..b0bfcb1 100644 --- a/schema/appmodel/application.schema.xml +++ b/schema/appmodel/application.schema.xml @@ -80,7 +80,7 @@ - + @@ -126,11 +126,14 @@ - - + + + - - + + + + From d0bac4bad8edecdaae7110370c8325f98e3dbcf2 Mon Sep 17 00:00:00 2001 From: Eric Flumerfelt Date: Wed, 15 Jul 2026 15:43:03 -0500 Subject: [PATCH 05/10] Update DFApplication and DFOApplication to correctly generate applications using the DataflowStatus-based DFO Protocol --- schema/appmodel/application.schema.xml | 5 +- src/DFApplication.cpp | 161 +++++++++++++++---------- src/DFOApplication.cpp | 30 +++-- 3 files changed, 113 insertions(+), 83 deletions(-) diff --git a/schema/appmodel/application.schema.xml b/schema/appmodel/application.schema.xml index b0bfcb1..a3e7a06 100644 --- a/schema/appmodel/application.schema.xml +++ b/schema/appmodel/application.schema.xml @@ -80,7 +80,7 @@ - + @@ -105,7 +105,8 @@ - + + diff --git a/src/DFApplication.cpp b/src/DFApplication.cpp index cc04049..717e30a 100644 --- a/src/DFApplication.cpp +++ b/src/DFApplication.cpp @@ -8,12 +8,14 @@ * received with this code. */ +#include "appmodel/DFApplication.hpp" #include "ConfigObjectFactory.hpp" #include "appmodel/ConfigurationHelper.hpp" -#include "appmodel/DFApplication.hpp" #include "appmodel/DataStoreConf.hpp" #include "appmodel/DataWriterConf.hpp" #include "appmodel/DataWriterModule.hpp" +#include "appmodel/DataflowStatusModule.hpp" +#include "appmodel/DataflowStatusModuleConf.hpp" #include "appmodel/FilenameParams.hpp" #include "appmodel/NetworkConnectionDescriptor.hpp" #include "appmodel/NetworkConnectionRule.hpp" @@ -37,7 +39,6 @@ namespace dunedaq { namespace appmodel { - static inline void fill_sourceid_object(const ConfigObjectFactory& obj_fac, const conffwk::ConfigObject* netConn, @@ -75,7 +76,6 @@ fill_sourceid_object(const ConfigObjectFactory& obj_fac, sidNetObj.set_objs("source_ids", source_id_objs); } - inline void fill_replay_sourceid_object(const ConfigObjectFactory& obj_fac, const std::string& uid, @@ -98,8 +98,7 @@ fill_replay_sourceid_object(const ConfigObjectFactory& obj_fac, // set Network connections std::string dreqNetUid(uid + ext); - netConn->emplace_back( - obj_fac.create_net_obj(descriptor, dreqNetUid)); + netConn->emplace_back(obj_fac.create_net_obj(descriptor, dreqNetUid)); netConn->back().set_by_val("data_type", descriptor->get_data_type()); netConn->back().set_by_val("connection_type", descriptor->get_connection_type()); auto serviceObj = descriptor->get_associated_service()->config_object(); @@ -107,8 +106,7 @@ fill_replay_sourceid_object(const ConfigObjectFactory& obj_fac, // set SourceID to Network connections std::string sidToNetUid(uid + ext + "-sids"); - sidNetObj->emplace_back( - obj_fac.create("SourceIDToNetworkConnection", sidToNetUid)); + sidNetObj->emplace_back(obj_fac.create("SourceIDToNetworkConnection", sidToNetUid)); sidNetObj->back().set_obj("netconn", &netConn->back()); // set SourceID objs @@ -117,11 +115,9 @@ fill_replay_sourceid_object(const ConfigObjectFactory& obj_fac, } } - - void -DFApplication::generate_modules( - std::shared_ptr helper) const { +DFApplication::generate_modules(std::shared_ptr helper) const +{ ConfigObjectFactory obj_fac(this); @@ -131,31 +127,60 @@ DFApplication::generate_modules( // Prepare TRB output objects std::vector trbInputObjs; std::vector trbOutputObjs; + std::vector dfsInputObjs; + std::vector dfsOutputObjs; std::vector trbSidNetObjs; // -- First, we process expected Queue and Network connections and create their objects. // Process the queue rules looking for the TriggerRecord queue between TRB and DataWriterModule const QueueDescriptor* trQDesc = nullptr; + const QueueDescriptor* tdQDesc = nullptr; + const QueueDescriptor* trbcQDesc = nullptr; + const QueueDescriptor* tokenQDesc = nullptr; for (auto rule : get_queue_rules()) { auto destination_class = rule->get_destination_class(); + if (destination_class == "TRBModule") { + tdQDesc = rule->get_descriptor(); + } if (destination_class == "DataWriterModule") { trQDesc = rule->get_descriptor(); } + if (destination_class == "DataflowStatusModule") { + auto descriptor = rule->get_descriptor(); + if (descriptor->get_data_type() == "TriggerDecisionToken") { + tokenQDesc = descriptor; + } else if (descriptor->get_data_type() == "TRBCompletion") { + trbcQDesc = descriptor; + } + } + } + if (tdQDesc == nullptr) { // BadConf if no descriptor between DataflowStatus and TRB + throw(BadConf(ERS_HERE, "Could not find queue descriptor rule for TriggerDecisions!")); } if (trQDesc == nullptr) { // BadConf if no descriptor between TRB and DataWriterModule throw(BadConf(ERS_HERE, "Could not find queue descriptor rule for TriggerRecords!")); } + if (tokenQDesc == nullptr) { // BadConf if no descriptor between DataWriterModule and DataflowStatus + throw(BadConf(ERS_HERE, "Could not find queue descriptor rule for TriggerDecisionTokens!")); + } + if (trbcQDesc == nullptr) { // BadConf if no descriptor between TRB and DataflowStatus + throw(BadConf(ERS_HERE, "Could not find queue descriptor rule for TRBCompletions!")); + } // Create queue connection config object auto trQueueObj = obj_fac.create_queue_obj(trQDesc, UID()); + auto tdQueueObj = obj_fac.create_queue_obj(tdQDesc, UID()); + auto trbcQueueObj = obj_fac.create_queue_obj(trbcQDesc, UID()); + auto tokenQueueObj = obj_fac.create_queue_obj(tokenQDesc, UID()); // Place trigger record queue object into vector of output objs of TRB module trbOutputObjs.push_back(&trQueueObj); + trbOutputObjs.push_back(&trbcQueueObj); // Process the network rules looking for the Fragments and TriggerDecision inputs for TRB const NetworkConnectionDescriptor* fragNetDesc = nullptr; const NetworkConnectionDescriptor* trigdecNetDesc = nullptr; - const NetworkConnectionDescriptor* tokenNetDesc = nullptr; + const NetworkConnectionDescriptor* statusReqNetDesc = nullptr; const NetworkConnectionDescriptor* trmonReqNetDesc = nullptr; const NetworkConnectionDescriptor* trmonTRNetDesc = nullptr; for (auto rule : get_network_rules()) { @@ -165,30 +190,30 @@ DFApplication::generate_modules( fragNetDesc = rule->get_descriptor(); } else if (data_type == "TriggerDecision") { trigdecNetDesc = rule->get_descriptor(); - } else if (data_type == "TriggerDecisionToken") { - tokenNetDesc = rule->get_descriptor(); } else if (data_type == "TRMonRequest") { trmonReqNetDesc = rule->get_descriptor(); } else if (data_type == "TriggerRecord") { trmonTRNetDesc = rule->get_descriptor(); + } else if (data_type == "DataflowStatusRequest") { + statusReqNetDesc = rule->get_descriptor(); } } if (fragNetDesc == nullptr) { // BadConf if no descriptor for Fragments into TRB throw(BadConf(ERS_HERE, "Could not find network descriptor rule for input Fragments!")); } - if (trigdecNetDesc == nullptr) { // BadCond if no descriptor for TriggerDecisions into TRB + if (trigdecNetDesc == nullptr) { // BadConf if no descriptor for TriggerDecisions into TRB throw(BadConf(ERS_HERE, "Could not find network descriptor rule for input TriggerDecisions!")); } - if (tokenNetDesc == nullptr) { // BadCond if no descriptor for Tokens out of DataWriterModule - throw(BadConf(ERS_HERE, "Could not find network descriptor rule for output TriggerDecisionTokens!")); + if (statusReqNetDesc == nullptr) { // BadConf if no descriptor for DataflowStatusRequest output + throw(BadConf(ERS_HERE, "Could not find network descriptor rule for output DataflowStatusRequests!")); } if (get_source_id() == nullptr) { throw(BadConf(ERS_HERE, "Could not retrieve SourceIDConf")); } // Create network connection config object auto fragNetObj = obj_fac.create_net_obj(fragNetDesc, UID()); - auto trigdecNetObj = obj_fac.create_net_obj(trigdecNetDesc, UID()); - auto tokenNetObj = obj_fac.create_net_obj(tokenNetDesc, ""); + auto trigdecNetObj = obj_fac.create_net_obj(trigdecNetDesc, UID()); + auto statusReqNetObj = obj_fac.create_net_obj(statusReqNetDesc, UID()); conffwk::ConfigObject trmonReqNetObj; conffwk::ConfigObject trmonTRNetObj; if (trmonReqNetDesc != nullptr) { @@ -204,47 +229,30 @@ DFApplication::generate_modules( std::vector sidNetObjs; std::vector> sidObjs; std::set processed_apps; - for (auto uid: helper->get_app_uids("DFApplication")) { + for (auto uid : helper->get_app_uids("DFApplication")) { processed_apps.insert(uid); } auto stream_src_ids = helper->get_stream_source_ids(); auto tp_src_ids = helper->get_tp_source_ids(); - for (auto [uid, descriptor]: - helper->get_netdescriptors("DataRequest", "ReadoutApplication")) { - dreqNetObjs.emplace_back(obj_fac.create_net_obj(descriptor, uid)); + for (auto [uid, descriptor] : helper->get_netdescriptors("DataRequest", "ReadoutApplication")) { + dreqNetObjs.emplace_back(obj_fac.create_net_obj(descriptor, uid)); std::string sidToNetUid(descriptor->get_uid_base() + uid + "-sids"); sidNetObjs.emplace_back(obj_fac.create("SourceIDToNetworkConnection", sidToNetUid)); - fill_sourceid_object(obj_fac, - &dreqNetObjs.back(), - uid, - stream_src_ids.at(uid), - tp_src_ids.at(uid), - sidNetObjs.back(), - sidObjs); + fill_sourceid_object( + obj_fac, &dreqNetObjs.back(), uid, stream_src_ids.at(uid), tp_src_ids.at(uid), sidNetObjs.back(), sidObjs); processed_apps.insert(uid); } - for (auto [uid, descriptor]: - helper->get_netdescriptors("DataRequest", "TPReplayApplication")) { - fill_replay_sourceid_object(obj_fac, - uid, - tp_src_ids.at(uid), - &dreqNetObjs, - &sidNetObjs, - descriptor, - sidObjs); + for (auto [uid, descriptor] : helper->get_netdescriptors("DataRequest", "TPReplayApplication")) { + fill_replay_sourceid_object(obj_fac, uid, tp_src_ids.at(uid), &dreqNetObjs, &sidNetObjs, descriptor, sidObjs); processed_apps.insert(uid); } - - - - for (auto [uid, descriptor]: - helper->get_netdescriptors("DataRequest", "FakeDataApplication")) { - dreqNetObjs.emplace_back(obj_fac.create_net_obj(descriptor, uid)); + for (auto [uid, descriptor] : helper->get_netdescriptors("DataRequest", "FakeDataApplication")) { + dreqNetObjs.emplace_back(obj_fac.create_net_obj(descriptor, uid)); std::string sidToNetUid(descriptor->get_uid_base() + uid + "-sids"); sidNetObjs.emplace_back(obj_fac.create("SourceIDToNetworkConnection", sidToNetUid)); @@ -261,25 +269,24 @@ DFApplication::generate_modules( // now we treat the CTB which has 2 connections related to source IDs const auto ctb_type = "CTBApplication"; - for (auto [uid, descriptor]: helper->get_netdescriptors("DataRequest", ctb_type)) { + for (auto [uid, descriptor] : helper->get_netdescriptors("DataRequest", ctb_type)) { if (processed_apps.contains(uid)) { continue; } - for ( const auto & [uid, rel_sources] : - helper->get_all_app_source_ids(ctb_type) ) { - for ( auto [rel, id] : rel_sources ) { - std::string local_uid = uid; - local_uid += rel.find("LLT")!=std::string::npos ? "_LLT" : "_HLT"; + for (const auto& [uid, rel_sources] : helper->get_all_app_source_ids(ctb_type)) { + for (auto [rel, id] : rel_sources) { + std::string local_uid = uid; + local_uid += rel.find("LLT") != std::string::npos ? "_LLT" : "_HLT"; - dreqNetObjs.emplace_back(obj_fac.create_net_obj(descriptor, local_uid)); - sidObjs.push_back(std::make_shared(id->config_object())); + dreqNetObjs.emplace_back(obj_fac.create_net_obj(descriptor, local_uid)); + sidObjs.push_back(std::make_shared(id->config_object())); - std::string sidToNetUid(descriptor->get_uid_base() + local_uid); - sidNetObjs.emplace_back(obj_fac.create("SourceIDToNetworkConnection", sidToNetUid)); - sidNetObjs.back().set_objs("source_ids", {sidObjs.back().get()}); - sidNetObjs.back().set_obj("netconn", &dreqNetObjs.back()); + std::string sidToNetUid(descriptor->get_uid_base() + local_uid); + sidNetObjs.emplace_back(obj_fac.create("SourceIDToNetworkConnection", sidToNetUid)); + sidNetObjs.back().set_objs("source_ids", { sidObjs.back().get() }); + sidNetObjs.back().set_obj("netconn", &dreqNetObjs.back()); } // loop on relational sources @@ -289,8 +296,7 @@ DFApplication::generate_modules( auto app_sources = helper->get_app_source_ids(); // Now look at all Smart apps that are not Readout, FakeData or DF - for (auto [uid, descriptor]: helper->get_netdescriptors("DataRequest")) { - + for (auto [uid, descriptor] : helper->get_netdescriptors("DataRequest")) { if (processed_apps.contains(uid)) { continue; @@ -298,19 +304,17 @@ DFApplication::generate_modules( if (app_sources.contains(uid)) { dreqNetObjs.emplace_back(obj_fac.create_net_obj(descriptor, uid)); - sidObjs.push_back(std::make_shared( - app_sources.at(uid)->config_object())); + sidObjs.push_back(std::make_shared(app_sources.at(uid)->config_object())); std::string sidToNetUid(descriptor->get_uid_base() + uid + "-sids"); sidNetObjs.emplace_back(obj_fac.create("SourceIDToNetworkConnection", sidToNetUid)); - sidNetObjs.back().set_objs("source_ids", {sidObjs.back().get()}); + sidNetObjs.back().set_objs("source_ids", { sidObjs.back().get() }); sidNetObjs.back().set_obj("netconn", &dreqNetObjs.back()); processed_apps.insert(uid); } } - // Get pointers to objects here, after vector has been filled so they don't move on us for (auto& obj : dreqNetObjs) { trbOutputObjs.push_back(&obj); @@ -329,7 +333,7 @@ DFApplication::generate_modules( } auto trbConfObj = trbConf->config_object(); trbConfObj.set_by_val("source_id", get_source_id()->get_sid()); - trbInputObjs = { &trigdecNetObj, &fragNetObj }; + trbInputObjs = { &tdQueueObj, &fragNetObj }; if (trmonReqNetDesc != nullptr) { trbInputObjs.push_back(&trmonReqNetObj); } @@ -363,12 +367,39 @@ DFApplication::generate_modules( dwrObj.set_by_val("writer_identifier", fmt::format("{}_dw_{}", UID(), dw_idx)); dwrObj.set_obj("configuration", &dwrConfObj); dwrObj.set_objs("inputs", { &trQueueObj }); - dwrObj.set_objs("outputs", { &tokenNetObj }); + dwrObj.set_objs("outputs", { &tokenQueueObj }); // Push DataWriterModule Module Object from confdb modules.push_back(obj_fac.get_dal(dwrUid)); ++dw_idx; } + // Get DataflowStatusModule Config Object + auto dfsConf = get_dfs(); + if (dfsConf == nullptr) { + throw(BadConf(ERS_HERE, "No DataflowStatusModule configuration given")); + } + + std::vector dfsOutputs; + for (auto [uid, descriptor] : helper->get_netdescriptors("DataflowStatus", "DFOApplication")) { + dfsOutputs.push_back(obj_fac.create_net_obj(descriptor, uid)); + } + + for (auto& dfsOut : dfsOutputs) { + dfsOutputObjs.push_back(&dfsOut); + } + + auto dfsConfObj = dfsConf->config_object(); + dfsInputObjs = { &trigdecNetObj, &statusReqNetObj, &trbcQueueObj, &tokenQueueObj }; + dfsOutputObjs.push_back(&tdQueueObj); + // Prepare TRB Module Object and assign its Config Object. + std::string dfsUid(UID() + "-dfs"); + conffwk::ConfigObject dfsObj = obj_fac.create("DataflowStatusModule", dfsUid); + dfsObj.set_obj("configuration", &dfsConfObj); + dfsObj.set_objs("inputs", dfsInputObjs); + dfsObj.set_objs("outputs", dfsOutputObjs); + // Push TRB Module Object from confdb + modules.push_back(obj_fac.get_dal(dfsUid)); + obj_fac.update_modules(modules); } diff --git a/src/DFOApplication.cpp b/src/DFOApplication.cpp index 3d2b5ba..2a5f9e9 100644 --- a/src/DFOApplication.cpp +++ b/src/DFOApplication.cpp @@ -8,10 +8,9 @@ * received with this code. */ - +#include "appmodel/DFOApplication.hpp" #include "ConfigObjectFactory.hpp" #include "appmodel/ConfigurationHelper.hpp" -#include "appmodel/DFOApplication.hpp" #include "appmodel/DFOConf.hpp" #include "appmodel/DFOModule.hpp" #include "appmodel/NetworkConnectionDescriptor.hpp" @@ -39,7 +38,6 @@ DFOApplication::generate_modules(std::shared_ptr ConfigObjectFactory obj_fac(this); - std::string dfoUid("DFO-" + UID()); TLOG_DEBUG(7) << "creating OKS configuration object for DFOModule class "; auto dfoObj = obj_fac.create("DFOModule", dfoUid); @@ -55,7 +53,8 @@ DFOApplication::generate_modules(std::shared_ptr std::vector input_conns; conffwk::ConfigObject tdInObj; conffwk::ConfigObject busyOutObj; - conffwk::ConfigObject tokenInObj; + conffwk::ConfigObject statusInObj; + conffwk::ConfigObject statusReqOutObj; for (auto rule : get_network_rules()) { auto endpoint_class = rule->get_endpoint_class(); @@ -68,14 +67,14 @@ DFOApplication::generate_modules(std::shared_ptr tdInObj = connObj; input_conns.push_back(&tdInObj); } - } else if (descriptor->get_data_type() == "TriggerDecisionToken") { - tokenInObj = connObj; - input_conns.push_back(&tokenInObj); - } - - else if (descriptor->get_data_type() == "TriggerInhibit") { + } else if (descriptor->get_data_type() == "TriggerInhibit") { busyOutObj = connObj; output_conns.push_back(&busyOutObj); + } else if (descriptor->get_data_type() == "DataflowStatus") { + if (endpoint_class == "DFOModule") { + statusInObj = obj_fac.create_net_obj(descriptor, UID()); + input_conns.push_back(&statusInObj); + } } } @@ -85,14 +84,13 @@ DFOApplication::generate_modules(std::shared_ptr if (busyOutObj == nullptr) { throw(BadConf(ERS_HERE, "No TriggerInhibit output connection descriptor given")); } - if (tokenInObj == nullptr) { - throw(BadConf(ERS_HERE, "No TriggerDecisionToken input connection descriptor given")); - } // Process special Network rules! std::vector tdOutObjs; - for (auto [uid, descriptor]: - helper->get_netdescriptors("TriggerDecision", "DFApplication")) { + for (auto [uid, descriptor] : helper->get_netdescriptors("TriggerDecision", "DFApplication")) { + tdOutObjs.emplace_back(obj_fac.create_net_obj(descriptor, uid)); + } + for (auto [uid, descriptor] : helper->get_netdescriptors("DataflowStatusRequest", "DFApplication")) { tdOutObjs.emplace_back(obj_fac.create_net_obj(descriptor, uid)); } @@ -109,5 +107,5 @@ DFOApplication::generate_modules(std::shared_ptr obj_fac.update_modules(modules); } -} // namespace appmodel +} // namespace appmodel } // namespace dunedaq From ed1c9a9995730869f3c31f83345452034b67f10d Mon Sep 17 00:00:00 2001 From: Eric Flumerfelt Date: Thu, 16 Jul 2026 09:05:43 -0500 Subject: [PATCH 06/10] Fix direction for requests, add check on DataflowStatus in DFO --- src/DFApplication.cpp | 4 ++-- src/DFOApplication.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/DFApplication.cpp b/src/DFApplication.cpp index 717e30a..fefc5b3 100644 --- a/src/DFApplication.cpp +++ b/src/DFApplication.cpp @@ -204,8 +204,8 @@ DFApplication::generate_modules(std::shared_ptr h if (trigdecNetDesc == nullptr) { // BadConf if no descriptor for TriggerDecisions into TRB throw(BadConf(ERS_HERE, "Could not find network descriptor rule for input TriggerDecisions!")); } - if (statusReqNetDesc == nullptr) { // BadConf if no descriptor for DataflowStatusRequest output - throw(BadConf(ERS_HERE, "Could not find network descriptor rule for output DataflowStatusRequests!")); + if (statusReqNetDesc == nullptr) { // BadConf if no descriptor for DataflowStatusRequest input + throw(BadConf(ERS_HERE, "Could not find network descriptor rule for input DataflowStatusRequests!")); } if (get_source_id() == nullptr) { throw(BadConf(ERS_HERE, "Could not retrieve SourceIDConf")); diff --git a/src/DFOApplication.cpp b/src/DFOApplication.cpp index 2a5f9e9..a82605b 100644 --- a/src/DFOApplication.cpp +++ b/src/DFOApplication.cpp @@ -84,6 +84,9 @@ DFOApplication::generate_modules(std::shared_ptr if (busyOutObj == nullptr) { throw(BadConf(ERS_HERE, "No TriggerInhibit output connection descriptor given")); } + if (statusInObj == nullptr) { + throw(BadConf(ERS_HERE, "No DataflowStatus input connection descriptor given")); + } // Process special Network rules! std::vector tdOutObjs; From 5eae6422c435be5132ca62f3703d14c62cc59015 Mon Sep 17 00:00:00 2001 From: Eric Flumerfelt Date: Thu, 16 Jul 2026 09:42:50 -0500 Subject: [PATCH 07/10] Make DFOApplication a Resource so it can be disabled in Sessions --- schema/appmodel/application.schema.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schema/appmodel/application.schema.xml b/schema/appmodel/application.schema.xml index a3e7a06..170bd05 100644 --- a/schema/appmodel/application.schema.xml +++ b/schema/appmodel/application.schema.xml @@ -80,7 +80,7 @@ - + @@ -120,6 +120,7 @@ + From 926c4523d0caa55aabbe208cdb81b05478935f10 Mon Sep 17 00:00:00 2001 From: Eric Flumerfelt Date: Mon, 3 Aug 2026 15:09:18 -0500 Subject: [PATCH 08/10] Update schema header --- schema/appmodel/application.schema.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/appmodel/application.schema.xml b/schema/appmodel/application.schema.xml index 008348c..a6970e2 100644 --- a/schema/appmodel/application.schema.xml +++ b/schema/appmodel/application.schema.xml @@ -80,7 +80,7 @@ - + From fa82b253fbeef4dbe4230b57184e1a26d6e32be5 Mon Sep 17 00:00:00 2001 From: Eric Flumerfelt Date: Tue, 4 Aug 2026 14:20:04 -0500 Subject: [PATCH 09/10] Label DFO TriggerDecision input with application name. Pass all TriggerDecision inputs to MLT --- src/DFOApplication.cpp | 6 ++---- src/MLTApplication.cpp | 38 ++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/src/DFOApplication.cpp b/src/DFOApplication.cpp index a82605b..9f9d3d6 100644 --- a/src/DFOApplication.cpp +++ b/src/DFOApplication.cpp @@ -60,15 +60,13 @@ DFOApplication::generate_modules(std::shared_ptr auto endpoint_class = rule->get_endpoint_class(); auto descriptor = rule->get_descriptor(); - auto connObj = obj_fac.create_net_obj(descriptor, ""); - if (descriptor->get_data_type() == "TriggerDecision") { if (endpoint_class == "DFOModule") { - tdInObj = connObj; + tdInObj = obj_fac.create_net_obj(descriptor, UID()); input_conns.push_back(&tdInObj); } } else if (descriptor->get_data_type() == "TriggerInhibit") { - busyOutObj = connObj; + busyOutObj = obj_fac.create_net_obj(descriptor, ""); output_conns.push_back(&busyOutObj); } else if (descriptor->get_data_type() == "DataflowStatus") { if (endpoint_class == "DFOModule") { diff --git a/src/MLTApplication.cpp b/src/MLTApplication.cpp index 79d700d..7002884 100644 --- a/src/MLTApplication.cpp +++ b/src/MLTApplication.cpp @@ -101,7 +101,6 @@ MLTApplication::generate_modules(std::shared_ptr const NetworkConnectionDescriptor* req_net_desc = nullptr; const NetworkConnectionDescriptor* tc_net_desc = nullptr; const NetworkConnectionDescriptor* ti_net_desc = nullptr; - const NetworkConnectionDescriptor* td_net_desc = nullptr; const NetworkConnectionDescriptor* timesync_net_desc = nullptr; for (auto rule : get_network_rules()) { @@ -111,9 +110,6 @@ MLTApplication::generate_modules(std::shared_ptr if (data_type == "TriggerInhibit") { ti_net_desc = rule->get_descriptor(); } - if (data_type == "TriggerDecision") { - td_net_desc = rule->get_descriptor(); - } if (data_type == "TriggerCandidate") { tc_net_desc = rule->get_descriptor(); } @@ -127,9 +123,6 @@ MLTApplication::generate_modules(std::shared_ptr TLOG_DEBUG(3) << "Endpoint class (currently not used in for networkconnections): data_type: " << data_type; } - if (!td_net_desc) { - throw(BadConf(ERS_HERE, "No MLT network connection for the output TriggerDecision given")); - } if (!ti_net_desc) { throw(BadConf(ERS_HERE, "No MLT network connection for the output TriggerInhibit given")); } @@ -147,10 +140,6 @@ MLTApplication::generate_modules(std::shared_ptr conffwk::ConfigObject tc_net_obj = obj_fac.create_net_obj(tc_net_desc, ".*"); - // Network connection for output TriggerDecision - conffwk::ConfigObject td_net_obj = - obj_fac.create_net_obj(td_net_desc, ""); - // Network conection for the input Data Requests conffwk::ConfigObject dr_net_obj = obj_fac.create_net_obj(req_net_desc, UID()); @@ -237,7 +226,7 @@ MLTApplication::generate_modules(std::shared_ptr sourceIds.push_back(tcSourceIdConf); } } - + for (auto app_class: {"TriggerApplication", "FakeHSIApplication", "DTSHSIApplication", "CIBApplication"}) { for (auto [uid, src_id]: helper->get_app_source_ids(app_class)) { @@ -249,9 +238,9 @@ MLTApplication::generate_modules(std::shared_ptr tcSourceIdConf->set_by_val("subsystem", src_id->get_subsystem()); sourceIds.push_back(tcSourceIdConf); - } - } - + } + } + // Get mandatory links std::vector mandatory_sids; const TCDataProcessor* tc_dp = tch_conf->get_data_processor()->cast(); @@ -260,7 +249,7 @@ MLTApplication::generate_modules(std::shared_ptr mandatory_sids.push_back(&m->config_object()); } } - + /************************************************************** * Create the TC handler **************************************************************/ @@ -298,7 +287,7 @@ MLTApplication::generate_modules(std::shared_ptr for (auto [uid, descriptor]: helper->get_netdescriptors("Fragment", "DFApplication")) { fragOutObjs.emplace_back(obj_fac.create_net_obj(descriptor, uid)); - } + } // build up the full list of outputs std::vector ti_output_objs; @@ -329,15 +318,24 @@ MLTApplication::generate_modules(std::shared_ptr * Instantiate the MLTModule module **************************************************************/ + std::vector tdOutObjs; + for (auto [uid, descriptor] : helper->get_netdescriptors("TriggerDecision", "DFOApplication")) { + tdOutObjs.emplace_back(obj_fac.create_net_obj(descriptor, uid)); + } + + std::vector output_conns; + for (auto& tdOut : tdOutObjs) { + output_conns.push_back(&tdOut); + } conffwk::ConfigObject mlt_obj = obj_fac.create(mlt_conf->get_template_for(), mlt_conf->UID()); mlt_obj.set_obj("configuration", &(mlt_conf->config_object())); mlt_obj.set_objs("inputs", { &output_queue_obj, &ti_net_obj }); - mlt_obj.set_objs("outputs", { &td_net_obj }); + mlt_obj.set_objs("outputs", output_conns); modules.push_back(obj_fac.get_dal(mlt_conf->UID())); obj_fac.update_modules(modules); } - -} // namespace appmodel + +} // namespace appmodel } // namespace dunedaq From bc340652005dfc27a360702e76ebd353c5b76bfe Mon Sep 17 00:00:00 2001 From: Eric Flumerfelt Date: Fri, 28 Aug 2026 13:38:37 -0500 Subject: [PATCH 10/10] Linting updates --- src/DFApplication.cpp | 2 +- src/MLTApplication.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DFApplication.cpp b/src/DFApplication.cpp index fefc5b3..d73d64e 100644 --- a/src/DFApplication.cpp +++ b/src/DFApplication.cpp @@ -401,7 +401,7 @@ DFApplication::generate_modules(std::shared_ptr h modules.push_back(obj_fac.get_dal(dfsUid)); obj_fac.update_modules(modules); -} +} // NOLINT(readability/fn_size) } // namespace appmodel } // namespace dunedaq diff --git a/src/MLTApplication.cpp b/src/MLTApplication.cpp index 7002884..981469f 100644 --- a/src/MLTApplication.cpp +++ b/src/MLTApplication.cpp @@ -335,7 +335,7 @@ MLTApplication::generate_modules(std::shared_ptr modules.push_back(obj_fac.get_dal(mlt_conf->UID())); obj_fac.update_modules(modules); -} +} // NOLINT(readability/fn_size) } // namespace appmodel } // namespace dunedaq