LCOV - code coverage report
Current view: top level - detchannelmaps/test/plugins - DummyTPCChannelMap.cpp (source / functions) Coverage Total Hit
Test: code.result Lines: 0.0 % 12 0
Test Date: 2025-12-21 13:07:08 Functions: 0.0 % 7 0

            Line data    Source code
       1              : /**
       2              :  * @file DummyModule.hpp
       3              :  *
       4              :  * DummyModule is a simple ChannelMap implementation that responds to a "stuff" command with a log message.
       5              :  *
       6              :  * This is part of the DUNE DAQ Application Framework, copyright 2020.
       7              :  * Licensing/copyright details are in the COPYING file that you should have
       8              :  * received with this code.
       9              :  */
      10              : 
      11              : #ifndef DETCHANNELMAPS_TEST_PLUGINS_DummyTPCChannelMap_HPP_
      12              : #define DETCHANNELMAPS_TEST_PLUGINS_DummyTPCChannelMap_HPP_
      13              : 
      14              : #include "detchannelmaps/TPCChannelMap.hpp"
      15              : 
      16              : #include "ers/Issue.hpp"
      17              : #include "logging/Logging.hpp" // NOTE: if ISSUES ARE DECLARED BEFORE include logging/Logging.hpp, TLOG_DEBUG<<issue wont work.
      18              : 
      19              : #include <string>
      20              : #include <vector>
      21              : 
      22              : namespace dunedaq {
      23              : 
      24              : // Disable coverage collection LCOV_EXCL_START
      25              : // ERS_DECLARE_ISSUE_BASE(detchannelmaps,
      26              : //                        DummyModuleUpdate,
      27              : //                        detchannelmaps::GeneralChannelMapIssue,
      28              : //                        message,
      29              : //                        ((std::string)name),
      30              : //                        ((std::string)message))
      31              : // Re-enable coverage collection LCOV_EXCL_STOP
      32              : 
      33              : namespace detchannelmaps {
      34              : 
      35              : class DummyTPCChannelMap : public TPCChannelMap
      36              : {
      37              : public:
      38            0 :   explicit DummyTPCChannelMap() {}
      39              :   DummyTPCChannelMap(const DummyTPCChannelMap&) = delete;            ///< DummyTPCChannelMap is not copy-constructible
      40              :   DummyTPCChannelMap& operator=(const DummyTPCChannelMap&) = delete; ///< DummyTPCChannelMap is not copy-assignable
      41              :   DummyTPCChannelMap(DummyTPCChannelMap&&) = delete;                 ///< DummyTPCChannelMap is not move-constructible
      42              :   DummyTPCChannelMap& operator=(DummyTPCChannelMap&&) = delete;      ///< DummyTPCChannelMap is not move-assignable
      43              : 
      44              :   uint
      45            0 :   get_offline_channel_from_det_crate_slot_stream_chan(uint /*det*/, uint /*crate*/, uint /*slot*/, uint /*stream*/, uint /*fembchannel*/) final {
      46            0 :     return 5678;
      47              :   }
      48              : 
      49              :   uint
      50            0 :   get_plane_from_offline_channel(uint /*offchannel*/) final {
      51            0 :     return 2;
      52              :   }
      53              : 
      54              :   uint
      55            0 :   get_element_id_from_offline_channel(uint /*offchannel*/) final {
      56            0 :     return 0;
      57              :   }
      58              : 
      59              :   std::string
      60            0 :   get_element_name_from_offline_channel(uint /*offchannel*/) final {
      61            0 :     return "Dummy0";
      62              :   }
      63              : 
      64              :   std::optional<TPCChannelInfo> 
      65            0 :   get_channel_info_from_offline_channel(uint offchannel) {
      66            0 :     return TPCChannelInfo{1, 2, 3, 4, 5, 6};
      67              :   }
      68              : 
      69              : };
      70              : 
      71              : } // namespace detchannelmaps
      72              : } // namespace dunedaq
      73              : 
      74              : #endif // DETCHANNELMAPS_TEST_PLUGINS_DummyTPCChannelMap_HPP_
      75              : 
      76              : 
      77            0 : DEFINE_DUNE_DET_TPCCHANNEL_MAP(dunedaq::detchannelmaps::DummyTPCChannelMap)
        

Generated by: LCOV version 2.0-1