From a000213e563b8a169981095976f5c7fe5859c132 Mon Sep 17 00:00:00 2001 From: Gordon Crone Date: Thu, 20 Feb 2025 16:08:54 +0000 Subject: [PATCH] Pass appmodel::ConfigurationHelper pointer to generate_modules instead of Session --- include/appfwk/ConfigurationManager.hpp | 2 ++ src/ConfigurationManager.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/appfwk/ConfigurationManager.hpp b/include/appfwk/ConfigurationManager.hpp index 8e4264b0..eae6d7e6 100644 --- a/include/appfwk/ConfigurationManager.hpp +++ b/include/appfwk/ConfigurationManager.hpp @@ -11,6 +11,7 @@ #ifndef APPFWK_INCLUDE_CONFIGURATIONMANAGER_HPP_ #define APPFWK_INCLUDE_CONFIGURATIONMANAGER_HPP_ +#include "appmodel/ConfigurationHelper.hpp" #include "conffwk/Configuration.hpp" #include "confmodel/ActionPlan.hpp" #include "confmodel/DaqModule.hpp" @@ -43,6 +44,7 @@ namespace appfwk { class ConfigurationManager { std::shared_ptr m_confdb; + std::shared_ptr m_helper; std::string m_app_name; std::string m_session_name; std::string m_oks_config_spec; diff --git a/src/ConfigurationManager.cpp b/src/ConfigurationManager.cpp index 523c80c0..bda3c900 100644 --- a/src/ConfigurationManager.cpp +++ b/src/ConfigurationManager.cpp @@ -39,6 +39,7 @@ ConfigurationManager::ConfigurationManager(std::string& config_spec, std::string TLOG() << "Failed to get session"; throw MissingComponent(ERS_HERE, "Session " + session_name); } + m_helper = std::make_shared(m_session); } void @@ -59,7 +60,7 @@ ConfigurationManager::initialize() if (smartDaqApp) { auto cpos = m_oks_config_spec.find(":") + 1; std::string oksFile = m_oks_config_spec.substr(cpos); // Strip off "oksconflibs:" - m_modules = smartDaqApp->generate_modules(m_confdb.get(), oksFile, m_session); + m_modules = smartDaqApp->generate_modules(m_confdb.get(), oksFile, m_helper); for (auto& plan : smartDaqApp->get_action_plans()) { auto cmd = plan->get_command()->get_cmd();