From 94d87e59ef94b41c1bb23458408b14bbc31b1658 Mon Sep 17 00:00:00 2001 From: Marco Roda Date: Mon, 29 Jul 2024 13:03:38 +0200 Subject: [PATCH 1/5] Removing cmake build of old metric --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 95fa5b6..669784d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,6 @@ daq_oks_codegen(appfwk.schema.xml TEST NAMESPACE dunedaq::appfwk::dal DALDIR dal DEP_PKGS confmodel) daq_codegen( app.jsonnet cmd.jsonnet DEP_PKGS iomanager rcif cmdlib TEMPLATES Structs.hpp.j2 Nljs.hpp.j2 ) -daq_codegen( appinfo.jsonnet DEP_PKGS opmonlib TEMPLATES opmonlib/InfoStructs.hpp.j2 opmonlib/InfoNljs.hpp.j2 ) ############################################################################## # Main library From cd67ec9ffc2341da9dac999b5a90f2b9d34b78ae Mon Sep 17 00:00:00 2001 From: Marco Roda Date: Mon, 29 Jul 2024 17:00:45 +0200 Subject: [PATCH 2/5] Restore compilation in appfwk --- CMakeLists.txt | 1 + include/appfwk/DAQModule.hpp | 7 +-- schema/appfwk/AppInfo.proto | 13 ++++ schema/appfwk/appinfo.jsonnet | 24 -------- src/Application.hpp | 22 +++---- src/DAQModuleManager.hpp | 4 -- src/detail/Application.hxx | 95 +++++++++++++----------------- src/detail/DAQModuleManager.hxx | 27 --------- unittest/Application_test.cxx | 40 ------------- unittest/DAQModuleManager_test.cxx | 8 --- 10 files changed, 64 insertions(+), 177 deletions(-) create mode 100644 schema/appfwk/AppInfo.proto delete mode 100644 schema/appfwk/appinfo.jsonnet diff --git a/CMakeLists.txt b/CMakeLists.txt index 669784d..912abfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ daq_oks_codegen(appfwk.schema.xml TEST NAMESPACE dunedaq::appfwk::dal DALDIR dal DEP_PKGS confmodel) daq_codegen( app.jsonnet cmd.jsonnet DEP_PKGS iomanager rcif cmdlib TEMPLATES Structs.hpp.j2 Nljs.hpp.j2 ) +daq_protobuf_codegen( *.proto ) ############################################################################## # Main library diff --git a/include/appfwk/DAQModule.hpp b/include/appfwk/DAQModule.hpp index c35fc41..f80d10a 100644 --- a/include/appfwk/DAQModule.hpp +++ b/include/appfwk/DAQModule.hpp @@ -22,8 +22,7 @@ #include "appfwk/ModuleConfiguration.hpp" #include "utilities/NamedObject.hpp" - -#include "opmonlib/InfoCollector.hpp" +#include "opmonlib/MonitorableObject.hpp" #include "cetlib/BasicPluginFactory.h" #include "cetlib/compiler_macros.h" @@ -160,7 +159,7 @@ namespace appfwk { * This header also contains the definitions of the Issues that can be * thrown by the DAQModule. */ -class DAQModule : public utilities::NamedObject + class DAQModule : public utilities::NamedObject, public opmonlib::MonitorableObject { public: using data_t = nlohmann::json; @@ -204,8 +203,6 @@ class DAQModule : public utilities::NamedObject bool has_command(const std::string& name, const std::string& state) const; - virtual void get_info(opmonlib::InfoCollector& /*ci*/, int /*level*/) { return; } - protected: /** * @brief Registers a mdoule command under the name `cmd`. diff --git a/schema/appfwk/AppInfo.proto b/schema/appfwk/AppInfo.proto new file mode 100644 index 0000000..f5dccee --- /dev/null +++ b/schema/appfwk/AppInfo.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package dunedaq.appfwk.opmon; + +message AppInfo { + + string state = 1; + string host = 2; + + bool busy = 5; + bool error = 6; + +} \ No newline at end of file diff --git a/schema/appfwk/appinfo.jsonnet b/schema/appfwk/appinfo.jsonnet deleted file mode 100644 index ff2efd4..0000000 --- a/schema/appfwk/appinfo.jsonnet +++ /dev/null @@ -1,24 +0,0 @@ -// This is the application info schema used by the appfwk application. -// It describes the information object structure passed by the application -// for operational monitoring - -local moo = import "moo.jsonnet"; -local s = moo.oschema.schema("dunedaq.appfwk.appinfo"); - -local info = { - state_t : s.string("state_t", moo.re.ident, - doc="A string field"), - busy_t : s.boolean("busy_t", - doc="Busy flag"), - err_t : s.boolean("error_t", - doc="Error flag"), - - info: s.record("Info", [ - s.field("state", self.state_t, doc="State"), - s.field("host", self.state_t, doc="hostname of the application"), - s.field("busy", self.busy_t, 0, doc="Busy flag"), - s.field("error", self.err_t, 0, doc="Error flag") - ], doc="General application information") -}; - -moo.oschema.sort_select(info) diff --git a/src/Application.hpp b/src/Application.hpp index 87cc308..d491c7f 100644 --- a/src/Application.hpp +++ b/src/Application.hpp @@ -10,7 +10,7 @@ #define APPFWK_INCLUDE_APPFWK_APPLICATION_HPP_ #include "appfwk/cmd/Structs.hpp" -#include "rcif/runinfo/InfoStructs.hpp" +#include "rcif/RunInfo.pb.h" #include "utilities/NamedObject.hpp" #include "cmdlib/CommandFacility.hpp" @@ -19,8 +19,7 @@ #include "DAQModuleManager.hpp" #include "appfwk/ConfFacility.hpp" -#include "opmonlib/InfoManager.hpp" -#include "opmonlib/InfoProvider.hpp" +#include "opmonlib/OpMonManager.hpp" #include "ers/Issue.hpp" #include "nlohmann/json.hpp" @@ -58,14 +57,14 @@ namespace appfwk { class Application : public cmdlib::CommandedObject - , public opmonlib::InfoProvider + , public opmonlib::OpMonManager , public utilities::NamedObject { public: using dataobj_t = nlohmann::json; Application(std::string app_name, - std::string partition_name, + std::string session_name, std::string cmdlibimpl, std::string opmonlibimpl, std::string confimpl); @@ -79,15 +78,13 @@ class Application // Execute a properly structured command void execute(const dataobj_t& cmd_data); - // Gether the opmon information - - void gather_stats(opmonlib::InfoCollector& ic, int level); - // Check whether the command can be accepted bool is_cmd_valid(const dataobj_t& cmd_data); + // hook for metric generation + void generate_opmon_data() override; + // State synch getter & setter - void set_state(std::string s) { const std::lock_guard lock(m_mutex); @@ -101,15 +98,12 @@ class Application private: std::mutex m_mutex; - std::string m_partition; - opmonlib::InfoManager m_info_mgr; std::string m_state; std::atomic m_busy; std::atomic m_error; bool m_initialized; std::chrono::time_point m_run_start_time; - dunedaq::rcif::runinfo::Info m_runinfo; - std::string m_fully_qualified_name; + dunedaq::rcif::opmon::RunInfo m_runinfo; DAQModuleManager m_mod_mgr; std::shared_ptr m_cmd_fac; std::shared_ptr m_config_mgr; diff --git a/src/DAQModuleManager.hpp b/src/DAQModuleManager.hpp index fab4d47..8ae8625 100644 --- a/src/DAQModuleManager.hpp +++ b/src/DAQModuleManager.hpp @@ -11,7 +11,6 @@ #include "ers/Issue.hpp" #include "nlohmann/json.hpp" -#include "opmonlib/InfoCollector.hpp" #include "appfwk/ConfigurationManager.hpp" #include "appfwk/ModuleConfiguration.hpp" @@ -86,9 +85,6 @@ class DAQModuleManager // Execute a properly structured command void execute(const std::string& state, const std::string& cmd, const dataobj_t& cmd_data); - // Gather statistics from modules - void gather_stats(opmonlib::InfoCollector& ic, int level); - private: typedef std::map> DAQModuleMap_t; ///< DAQModules indexed by name diff --git a/src/detail/Application.hxx b/src/detail/Application.hxx index 8d96aeb..b769148 100644 --- a/src/detail/Application.hxx +++ b/src/detail/Application.hxx @@ -7,10 +7,9 @@ */ #include "appfwk/Issues.hpp" -#include "appfwk/appinfo/InfoNljs.hpp" +#include "appfwk/AppInfo.pb.h" #include "appfwk/cmd/Nljs.hpp" #include "rcif/cmd/Nljs.hpp" -#include "rcif/runinfo/InfoNljs.hpp" #include "logging/Logging.hpp" @@ -21,24 +20,22 @@ namespace dunedaq { namespace appfwk { Application::Application(std::string appname, - std::string partition, + std::string session, std::string cmdlibimpl, std::string opmonlibimpl, std::string confimpl) - : NamedObject(appname) - , m_partition(partition) - , m_info_mgr(opmonlibimpl) + : OpMonManager(session, appname, opmonlibimpl) + , NamedObject(appname) , m_state("NONE") , m_busy(false) , m_error(false) , m_initialized(false) - , m_config_mgr(std::make_shared(confimpl, appname, partition)) + , m_config_mgr(std::make_shared(confimpl, appname, session)) { - m_runinfo.running = false; - m_runinfo.runno = 0; - m_runinfo.runtime = 0; + m_runinfo.set_running(false); + m_runinfo.set_run_number(0); + m_runinfo.set_run_time(0); - m_fully_qualified_name = partition + "." + appname; m_cmd_fac = cmdlib::make_command_facility(cmdlibimpl); TLOG() << "confimpl=<" << confimpl << ">\n"; @@ -48,10 +45,6 @@ void Application::init() { m_cmd_fac->set_commanded(*this, get_name()); - m_info_mgr.set_provider(*this); - // Add partition id as tag - m_info_mgr.set_tags({ { "partition_id", m_partition } }); - m_mod_mgr.initialize(m_config_mgr); set_state("INITIAL"); m_initialized = true; @@ -70,20 +63,22 @@ Application::run(std::atomic& end_marker) std::stringstream s1(getenv("DUNEDAQ_OPMON_INTERVAL")); std::stringstream s2(getenv("DUNEDAQ_OPMON_LEVEL")); uint32_t interval = 0; // NOLINT(build/unsigned) - uint32_t level = 0; // NOLINT(build/unsigned) + opmonlib::OpMonLevel level = 0; s1 >> interval; s2 >> level; - m_info_mgr.start(interval, level); + set_opmon_level(level); + + start_monitoring(std::chrono::seconds(interval)); m_cmd_fac->run(end_marker); - m_info_mgr.stop(); + + stop_monitoring(); m_mod_mgr.cleanup(); } void Application::execute(const dataobj_t& cmd_data) { - auto rc_cmd = cmd_data.get(); std::string cmdname = rc_cmd.id; if (!is_cmd_valid(cmd_data)) { @@ -94,24 +89,25 @@ Application::execute(const dataobj_t& cmd_data) if (cmdname == "start") { auto cmd_obj = rc_cmd.data.get(); - + for (const auto& addressed : cmd_obj.modules) { dataobj_t startpars = addressed.data; auto rc_startpars = startpars.get(); - m_runinfo.runno = rc_startpars.run; + m_runinfo.set_run_number(rc_startpars.run); break; } - + m_run_start_time = std::chrono::steady_clock::now(); - ; - m_runinfo.running = true; - m_runinfo.runtime = 0; - } else if (cmdname == "stop") { - m_runinfo.running = false; - m_runinfo.runno = 0; - m_runinfo.runtime = 0; + m_runinfo.set_running(true); + m_runinfo.set_run_time(0); } - + else if (cmdname == "stop") { + m_run_start_time = std::chrono::steady_clock::time_point(); + m_runinfo.set_running(false); + m_runinfo.set_run_number(0); + m_runinfo.set_run_time(0); + } + try { m_mod_mgr.execute(get_state(), cmdname, rc_cmd.data); m_busy.store(false); @@ -125,40 +121,29 @@ Application::execute(const dataobj_t& cmd_data) } void -Application::gather_stats(opmonlib::InfoCollector& ci, int level) +Application::generate_opmon_data() { - appinfo::Info ai; - ai.state = get_state(); - ai.busy = m_busy.load(); - ai.error = m_error.load(); + opmon::AppInfo ai; + ai.set_state(get_state()); + ai.set_busy(m_busy.load()); + ai.set_error(m_error.load()); char hostname[256]; auto res = gethostname(hostname, 256); if (res < 0) - ai.host = "Unknown"; + ai.set_host("Unknown"); else - ai.host = std::string(hostname); - - opmonlib::InfoCollector tmp_ci; - - tmp_ci.add(ai); + ai.set_host (std::string(hostname)); - if (ai.state == "RUNNING" || ai.state == "READY") { + publish(std::move(ai)); + + if ( m_run_start_time.time_since_epoch().count() == 0 ) { auto now = std::chrono::steady_clock::now(); - m_runinfo.runtime = std::chrono::duration_cast(now - m_run_start_time).count(); + m_runinfo.set_run_time(std::chrono::duration_cast(now - m_run_start_time).count() ); } - tmp_ci.add(m_runinfo); - - if (level == 0) { - // give only generic application info - } else if (ai.state != "NONE" && ai.state != "INITIAL") { - try { - m_mod_mgr.gather_stats(tmp_ci, level); - } catch (ers::Issue& ex) { - ers::error(ex); - } - } - ci.add(m_fully_qualified_name, tmp_ci); + + + publish( decltype(m_runinfo)(m_runinfo) ); } bool diff --git a/src/detail/DAQModuleManager.hxx b/src/detail/DAQModuleManager.hxx index 78b0531..a3a1900 100644 --- a/src/detail/DAQModuleManager.hxx +++ b/src/detail/DAQModuleManager.hxx @@ -224,32 +224,5 @@ DAQModuleManager::execute(const std::string& state, const std::string& cmd, cons // dispatch(cmd.id, cmd.data); } -void -DAQModuleManager::gather_stats(opmonlib::InfoCollector& ci, int level) -{ - - iomanager::QueueRegistry::get().gather_stats(ci, level); - iomanager::NetworkManager::get().gather_stats(ci, level); - - for (const auto& [mod_name, mod_ptr] : m_module_map) { - try { - opmonlib::InfoCollector tmp_ci; - mod_ptr->get_info(tmp_ci, level); - if (!tmp_ci.is_empty()) { - ci.add(mod_name, tmp_ci); - } - } - catch( ers::Issue & i ) { - ers::warning( FailedInfoGathering(ERS_HERE, mod_name, i) ); - } - catch( std::exception & ex ) { - ers::warning( ExceptionWhileInfoGathering(ERS_HERE, mod_name, ex.what()) ); - } - catch( ... ) { - ers::warning( FailedInfoGathering(ERS_HERE, mod_name) ); - } - } -} - } // namespace appfwk } // namespace dunedaq diff --git a/unittest/Application_test.cxx b/unittest/Application_test.cxx index ab23f05..d62b70e 100644 --- a/unittest/Application_test.cxx +++ b/unittest/Application_test.cxx @@ -226,46 +226,6 @@ BOOST_AUTO_TEST_CASE(CommandThrowsException) dunedaq::iomanager::IOManager::get()->reset(); } -BOOST_AUTO_TEST_CASE(Stats) -{ - dunedaq::get_iomanager()->reset(); - Application app( - "TestApp", "partition_name", "stdin://" + TEST_JSON_FILE, "stdout://flat", "oksconflibs:" + TEST_OKS_DB); - - dunedaq::opmonlib::InfoCollector ic; - app.gather_stats(ic, 0); - BOOST_REQUIRE(!ic.is_empty()); - - app.init(); - dunedaq::rcif::cmd::RCCommand cmd; - nlohmann::json cmd_data; - - dunedaq::appfwk::cmd::CmdObj start; - dunedaq::appfwk::cmd::AddressedCmd addr_cmd; - dunedaq::rcif::cmd::StartParams start_params; - start_params.run = 1010; - nlohmann::json start_param_data; - to_json(start_param_data, start_params); - - addr_cmd.data = start_param_data; - addr_cmd.match = ""; - start.modules.push_back(addr_cmd); - nlohmann::json start_data; - to_json(start_data, start); - - cmd.id = "start"; - cmd.data = start_data; - cmd.exit_state = "RUNNING"; - to_json(cmd_data, cmd); - - bool cmd_valid = app.is_cmd_valid(cmd_data); - BOOST_REQUIRE_EQUAL(cmd_valid, true); - app.execute(cmd_data); - - app.gather_stats(ic, 999); - BOOST_REQUIRE(!ic.is_empty()); - dunedaq::iomanager::IOManager::get()->reset(); -} BOOST_AUTO_TEST_CASE(State) { diff --git a/unittest/DAQModuleManager_test.cxx b/unittest/DAQModuleManager_test.cxx index 0d332f0..ef5411a 100644 --- a/unittest/DAQModuleManager_test.cxx +++ b/unittest/DAQModuleManager_test.cxx @@ -75,12 +75,6 @@ BOOST_AUTO_TEST_CASE(NotInitialized) [&](DAQModuleManagerNotInitialized) { return true; }); } -BOOST_AUTO_TEST_CASE(Stats) -{ - auto mgr = DAQModuleManager(); - dunedaq::opmonlib::InfoCollector ic; - mgr.gather_stats(ic, 0); -} BOOST_AUTO_TEST_CASE(InitializeModules) { @@ -112,8 +106,6 @@ BOOST_AUTO_TEST_CASE(CommandModules) CommandDispatchingFailed, [&](CommandDispatchingFailed) { return true; }); - dunedaq::opmonlib::InfoCollector ic; - mgr.gather_stats(ic, 0); } BOOST_AUTO_TEST_CASE(CommandMatchingModules) From f9b7ad364d4d4bef84b8e8c2e4d99644f101ba47 Mon Sep 17 00:00:00 2001 From: Marco Roda Date: Mon, 29 Jul 2024 18:13:31 +0200 Subject: [PATCH 3/5] Correct opmon_level --- src/detail/Application.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detail/Application.hxx b/src/detail/Application.hxx index b769148..0b40d8c 100644 --- a/src/detail/Application.hxx +++ b/src/detail/Application.hxx @@ -135,7 +135,7 @@ Application::generate_opmon_data() else ai.set_host (std::string(hostname)); - publish(std::move(ai)); + publish(std::move(ai), {}, opmonlib::to_level(opmonlib::EntryOpMonLevel::kTopPriority)); if ( m_run_start_time.time_since_epoch().count() == 0 ) { auto now = std::chrono::steady_clock::now(); From 21c21c923381069329b91d32deba5d801d10bff5 Mon Sep 17 00:00:00 2001 From: Marco Roda Date: Tue, 30 Jul 2024 10:20:51 +0200 Subject: [PATCH 4/5] Working registration of modules --- src/DAQModuleManager.hpp | 5 +++-- src/detail/Application.hxx | 2 +- src/detail/DAQModuleManager.hxx | 7 ++++--- unittest/DAQModuleManager_test.cxx | 14 +++++++++----- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/DAQModuleManager.hpp b/src/DAQModuleManager.hpp index 8ae8625..1d47758 100644 --- a/src/DAQModuleManager.hpp +++ b/src/DAQModuleManager.hpp @@ -19,6 +19,7 @@ #include "appfwk/app/Structs.hpp" #include "cmdlib/cmd/Structs.hpp" +#include "opmonlib/OpMonManager.hpp" #include #include @@ -78,7 +79,7 @@ class DAQModuleManager DAQModuleManager(); - void initialize(std::shared_ptr mgr); + void initialize(std::shared_ptr mgr, opmonlib::OpMonManager & ); bool initialized() const { return m_initialized; } void cleanup(); @@ -88,7 +89,7 @@ class DAQModuleManager private: typedef std::map> DAQModuleMap_t; ///< DAQModules indexed by name - void init_modules(const std::vector& modules); + void init_modules(const std::vector& modules, opmonlib::OpMonManager & ); void dispatch_one_match_only(cmdlib::cmd::CmdId id, const std::string& state, const dataobj_t& data); void dispatch_after_merge(cmdlib::cmd::CmdId id, const std::string& state, const dataobj_t& data); diff --git a/src/detail/Application.hxx b/src/detail/Application.hxx index 0b40d8c..500eace 100644 --- a/src/detail/Application.hxx +++ b/src/detail/Application.hxx @@ -45,7 +45,7 @@ void Application::init() { m_cmd_fac->set_commanded(*this, get_name()); - m_mod_mgr.initialize(m_config_mgr); + m_mod_mgr.initialize(m_config_mgr, *this); set_state("INITIAL"); m_initialized = true; } diff --git a/src/detail/DAQModuleManager.hxx b/src/detail/DAQModuleManager.hxx index a3a1900..043f669 100644 --- a/src/detail/DAQModuleManager.hxx +++ b/src/detail/DAQModuleManager.hxx @@ -35,7 +35,7 @@ DAQModuleManager::DAQModuleManager() } void -DAQModuleManager::initialize(std::shared_ptr cfgMgr) +DAQModuleManager::initialize(std::shared_ptr cfgMgr, opmonlib::OpMonManager & opm) { auto csInterval = cfgMgr->session()->get_connectivity_service_interval_ms(); m_module_configuration = std::make_shared(cfgMgr); @@ -43,17 +43,18 @@ DAQModuleManager::initialize(std::shared_ptr cfgMgr) m_module_configuration->networkconnections(), true, std::chrono::milliseconds(csInterval)); - init_modules(m_module_configuration->modules()); + init_modules(m_module_configuration->modules(), opm); this->m_initialized = true; } void -DAQModuleManager::init_modules(const std::vector& modules) +DAQModuleManager::init_modules(const std::vector& modules, opmonlib::OpMonManager & opm) { for (const auto mod : modules) { TLOG_DEBUG(0) << "construct: " << mod->class_name() << " : " << mod->UID(); auto mptr = make_module(mod->class_name(), mod->UID()); m_module_map.emplace(mod->UID(), mptr); + opm.register_child( mod->UID(), mptr); mptr->init(m_module_configuration); } } diff --git a/unittest/DAQModuleManager_test.cxx b/unittest/DAQModuleManager_test.cxx index ef5411a..2de5fbe 100644 --- a/unittest/DAQModuleManager_test.cxx +++ b/unittest/DAQModuleManager_test.cxx @@ -13,6 +13,7 @@ #include "appfwk/app/Nljs.hpp" #include "appfwk/cmd/Nljs.hpp" #include "iomanager/connection/Nljs.hpp" +#include "opmonlib/OpMonManager.hpp" #include "iomanager/IOManager.hpp" @@ -53,8 +54,9 @@ BOOST_AUTO_TEST_CASE(Initialized) auto mgr = DAQModuleManager(); BOOST_REQUIRE_EQUAL(mgr.initialized(), false); + dunedaq::opmonlib::OpMonManager opmgr(nullptr); auto cfgMgr = make_config_mgr(); - mgr.initialize(cfgMgr); + mgr.initialize(cfgMgr, opmgr); BOOST_REQUIRE_EQUAL(mgr.initialized(), true); } @@ -82,8 +84,9 @@ BOOST_AUTO_TEST_CASE(InitializeModules) auto mgr = DAQModuleManager(); BOOST_REQUIRE_EQUAL(mgr.initialized(), false); + dunedaq::opmonlib::OpMonManager opmgr(nullptr); auto cfgMgr = make_config_mgr(); - mgr.initialize(cfgMgr); + mgr.initialize(cfgMgr, opmgr); BOOST_REQUIRE_EQUAL(mgr.initialized(), true); } @@ -94,9 +97,9 @@ BOOST_AUTO_TEST_CASE(CommandModules) auto mgr = DAQModuleManager(); BOOST_REQUIRE_EQUAL(mgr.initialized(), false); - + dunedaq::opmonlib::OpMonManager opmgr(nullptr); auto cfgMgr = make_config_mgr(); - mgr.initialize(cfgMgr); + mgr.initialize(cfgMgr, opmgr); BOOST_REQUIRE_EQUAL(mgr.initialized(), true); nlohmann::json cmd_data; @@ -114,8 +117,9 @@ BOOST_AUTO_TEST_CASE(CommandMatchingModules) auto mgr = DAQModuleManager(); BOOST_REQUIRE_EQUAL(mgr.initialized(), false); + dunedaq::opmonlib::OpMonManager opmgr(nullptr); auto cfgMgr = make_config_mgr(); - mgr.initialize(cfgMgr); + mgr.initialize(cfgMgr, opmgr); BOOST_REQUIRE_EQUAL(mgr.initialized(), true); From 7183ffcf48af45bfb5ccc3a6fa01effd19b8d564 Mon Sep 17 00:00:00 2001 From: Marco Roda Date: Tue, 30 Jul 2024 11:47:41 +0200 Subject: [PATCH 5/5] Propagate OpMonManager to iomanager --- src/detail/DAQModuleManager.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/detail/DAQModuleManager.hxx b/src/detail/DAQModuleManager.hxx index 043f669..a8f075d 100644 --- a/src/detail/DAQModuleManager.hxx +++ b/src/detail/DAQModuleManager.hxx @@ -42,7 +42,8 @@ DAQModuleManager::initialize(std::shared_ptr cfgMgr, opmon get_iomanager()->configure(m_module_configuration->queues(), m_module_configuration->networkconnections(), true, - std::chrono::milliseconds(csInterval)); + std::chrono::milliseconds(csInterval), + opm); init_modules(m_module_configuration->modules(), opm); this->m_initialized = true; }