diff --git a/include/appfwk/ConfigurationManager.hpp b/include/appfwk/ConfigurationManager.hpp index b16c610..9f0e56b 100644 --- a/include/appfwk/ConfigurationManager.hpp +++ b/include/appfwk/ConfigurationManager.hpp @@ -14,6 +14,7 @@ #include "appfwk/ValidationReport.hpp" +#include "appmodel/ConfigurationHelper.hpp" #include "conffwk/Configuration.hpp" #include "confmodel/ActionPlan.hpp" #include "confmodel/DaqApplication.hpp" @@ -96,6 +97,7 @@ class ConfigurationManager private: std::shared_ptr m_confdb; + std::shared_ptr m_helper; std::string m_app_name; std::string m_session_name; diff --git a/src/ConfigurationManager.cpp b/src/ConfigurationManager.cpp index 56b37bf..65d457b 100644 --- a/src/ConfigurationManager.cpp +++ b/src/ConfigurationManager.cpp @@ -51,6 +51,7 @@ ConfigurationManager::ConfigurationManager(std::string const& config_spec, TLOG() << "Failed to get session " << session_name; throw MissingComponent(ERS_HERE, "Session " + session_name); } + m_helper = std::make_shared(m_session); } std::vector @@ -68,14 +69,14 @@ ConfigurationManager::initialize(bool throw_on_fatal) } TLOG_DBG(TLVL_APP) << "getting modules for app " << m_app_name; - auto smart_daq_app = m_application->cast(); auto daq_app = m_application->cast(); - if(!daq_app && !smart_daq_app) { + if(daq_app == nullptr) { throw(NotADaqApplication(ERS_HERE, m_application->UID())); } - if (smart_daq_app) { - smart_daq_app->generate_modules(m_session); + auto smart_daq_app = m_application->cast(); + if (smart_daq_app != nullptr) { + smart_daq_app->generate_modules(m_helper); } m_modules = m_application->get_modules();