LCOV - code coverage report
Current view: top level - test/TransferPlugins - transfer_driver.cc (source / functions) Coverage Total Hit
Test: artdaq.info.cleaned Lines: 0.0 % 25 0
Test Date: 2025-09-04 00:45:34 Functions: 0.0 % 3 0

            Line data    Source code
       1              : #define TRACE_NAME "transfer_driver"
       2              : 
       3              : #include "artdaq-core/Utilities/configureMessageFacility.hh"
       4              : #include "artdaq/DAQdata/Globals.hh"
       5              : #include "artdaq/DAQrate/TransferTest.hh"
       6              : 
       7            0 : int main(int argc, char* argv[])
       8              : try
       9              : {
      10            0 :         artdaq::configureMessageFacility("transfer_driver");
      11            0 :         TLOG(TLVL_INFO) << "BEGIN";
      12              : 
      13            0 :         std::cout << "argc:" << argc << std::endl;
      14            0 :         for (int i = 0; i < argc; ++i)
      15              :         {
      16            0 :                 std::cout << "argv[" << i << "]: " << argv[i] << std::endl;  // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
      17              :         }
      18              : 
      19            0 :         if (argc != 3)
      20              :         {
      21            0 :                 std::cerr << *argv << " requires 2 arguments, " << argc - 1 << " provided" << std::endl;
      22            0 :                 std::cerr << "Usage: " << *argv << " <my_rank> <fhicl_document>" << std::endl;
      23            0 :                 return 1;
      24              :         }
      25              : 
      26            0 :         std::string rankString(argv[1]);  // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
      27            0 :         my_rank = std::stoi(rankString);
      28              : 
      29            0 :         cet::filepath_lookup lookup_policy("FHICL_FILE_PATH");
      30              : 
      31            0 :         auto fhicl = std::string(argv[2]);  // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
      32            0 :         auto ps = fhicl::ParameterSet::make(fhicl, lookup_policy);
      33              : 
      34            0 :         if (ps.has_key("partition_number"))
      35              :         {
      36            0 :                 artdaq::Globals::partition_number_ = ps.get<int>("partition_number");
      37              :         }
      38              : 
      39            0 :         artdaq::TransferTest theTest(ps);
      40            0 :         auto ret = theTest.runTest();
      41              : 
      42            0 :         TLOG(TLVL_INFO) << "END: retcode=" << ret;
      43            0 :         return ret;
      44            0 : }
      45            0 : catch (...)
      46              : {
      47            0 :         return -1;
      48            0 : }
        

Generated by: LCOV version 2.0-1