Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/appfwk/ConfigurationManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "appfwk/ValidationReport.hpp"

#include "appmodel/ConfigurationHelper.hpp"
#include "conffwk/Configuration.hpp"
#include "confmodel/ActionPlan.hpp"
#include "confmodel/DaqApplication.hpp"
Expand Down Expand Up @@ -96,6 +97,7 @@ class ConfigurationManager

private:
std::shared_ptr<conffwk::Configuration> m_confdb;
std::shared_ptr<appmodel::ConfigurationHelper> m_helper;
std::string m_app_name;
std::string m_session_name;

Expand Down
9 changes: 5 additions & 4 deletions src/ConfigurationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<appmodel::ConfigurationHelper>(m_session);
}

std::vector<ValidationReport>
Expand All @@ -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<appmodel::SmartDaqApplication>();
auto daq_app = m_application->cast<confmodel::DaqApplication>();
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<appmodel::SmartDaqApplication>();
if (smart_daq_app != nullptr) {
smart_daq_app->generate_modules(m_helper);
}

m_modules = m_application->get_modules();
Expand Down