LCOV - code coverage report
Current view: top level - appfwk/src - ConfigurationManagerOwner.hpp (source / functions) Coverage Total Hit
Test: code.result Lines: 100.0 % 4 4
Test Date: 2025-12-21 13:07:08 Functions: 100.0 % 2 2

            Line data    Source code
       1              : /**
       2              :  * @file ConfigurationManagerOwner.hpp Instantiates and owns a ConfigurationManager
       3              :  *
       4              :  * This is part of the DUNE DAQ Application Framework, copyright 2020.
       5              :  * Licensing/copyright details are in the COPYING file that you should have
       6              :  * received with this code.
       7              :  */
       8              : 
       9              : #ifndef APPFWK_SRC_CONFIGURATIONMANAGEROWNER_HPP_
      10              : #define APPFWK_SRC_CONFIGURATIONMANAGEROWNER_HPP_
      11              : 
      12              : #include "appfwk/ConfigurationManager.hpp"
      13              : 
      14              : #include <memory>
      15              : #include <string>
      16              : 
      17              : namespace dunedaq::appfwk {
      18              : 
      19              : /**
      20              :  * This class exists to be a base class of Application, so that the ConfigurationManager can be initialized once and
      21              :  * used to initialize the OpMonManager (which is also a base class of Application).
      22              :  *
      23              :  * @todo ELF April 3, 2025: Determine how the ConfigurationManager should be exposed by this class to those using it
      24              :  */
      25              : class ConfigurationManagerOwner
      26              : {
      27              : public:
      28           11 :   ConfigurationManagerOwner(std::string confimpl, std::string app_name, std::string session_name)
      29           11 :     : m_config_mgr(std::make_shared<ConfigurationManager>(confimpl, app_name, session_name))
      30              :   {
      31           10 :   }
      32              : 
      33           36 :   std::shared_ptr<ConfigurationManager> get_config_manager() const { return m_config_mgr; }
      34              : 
      35              : private:
      36              :   std::shared_ptr<ConfigurationManager> m_config_mgr;
      37              : };
      38              : 
      39              : } // namespace dunedaq::appfwk
      40              : 
      41              : #endif // APPFWK_SRC_CONFIGURATIONMANAGEROWNER_HPP_
        

Generated by: LCOV version 2.0-1