LCOV - code coverage report
Current view: top level - iomanager/src - IOManager.cpp (source / functions) Coverage Total Hit
Test: code.result Lines: 76.0 % 25 19
Test Date: 2025-12-21 13:07:08 Functions: 75.0 % 4 3

            Line data    Source code
       1              : /**
       2              :  * @file IOManager.cpp
       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              : #include "iomanager/IOManager.hpp"
      10              : 
      11              : #include <memory>
      12              : #include <set>
      13              : #include <string>
      14              : #include <vector>
      15              : 
      16              : namespace dunedaq::iomanager {
      17              : 
      18              : std::shared_ptr<IOManager> IOManager::s_instance = nullptr;
      19              : 
      20              : void
      21           53 : IOManager::configure(std::string session,
      22              :                      std::vector<const confmodel::Queue*> queues,
      23              :                      std::vector<const confmodel::NetworkConnection*> connections,
      24              :                      const confmodel::ConnectivityService* connection_service,
      25              :                      dunedaq::opmonlib::OpMonManager& opmgr)
      26              : {
      27           53 :   m_session = session;
      28              : 
      29           53 :   QueueRegistry::get().configure(queues, opmgr);
      30           53 :   NetworkManager::get().configure(session, connections, connection_service, opmgr);
      31           53 : }
      32              : 
      33              : void
      34            0 : IOManager::shutdown()
      35              : {
      36            0 :   QueueRegistry::get().shutdown();
      37            0 :   NetworkManager::get().shutdown();
      38            0 :   m_senders.clear();
      39            0 :   m_receivers.clear();
      40            0 : }
      41              : 
      42              : void
      43           66 : IOManager::reset()
      44              : {
      45           66 :   QueueRegistry::get().reset();
      46           66 :   NetworkManager::get().reset();
      47           66 :   m_senders.clear();
      48           66 :   m_receivers.clear();
      49           66 :   s_instance = nullptr;
      50           66 : }
      51              : 
      52              : std::set<std::string>
      53            4 : IOManager::get_datatypes(std::string const& uid)
      54              : {
      55            4 :   auto output = QueueRegistry::get().get_datatypes(uid);
      56            4 :   auto networks = NetworkManager::get().get_datatypes(uid);
      57            6 :   for (auto& dt : networks) {
      58            2 :     output.insert(dt);
      59              :   }
      60            4 :   return output;
      61            4 : }
      62              : 
      63              : } // namespace dunedaq::iomanager
        

Generated by: LCOV version 2.0-1