artdaq  v3_02_01
transfer_driver.cc
1 #define TRACE_NAME "transfer_driver"
2 
3 #include "artdaq/DAQrate/TransferTest.hh"
4 #include "artdaq/DAQdata/Globals.hh"
5 #include "fhiclcpp/make_ParameterSet.h"
6 
7 
8 int main(int argc, char* argv[])
9 {
10  artdaq::configureMessageFacility("transfer_driver");
11  TLOG(TLVL_INFO) << "BEGIN" ;
12 
13  std::cout << "argc:" << argc << std::endl;
14  for (int i = 0; i < argc; ++i)
15  {
16  std::cout << "argv[" << i << "]: " << argv[i] << std::endl;
17  }
18 
19  if (argc != 3)
20  {
21  std::cerr << argv[0] << " requires 2 arguments, " << argc - 1 << " provided" << std::endl;
22  std::cerr << "Usage: " << argv[0] << " <my_rank> <fhicl_document>" << std::endl;
23  return 1;
24  }
25 
26  my_rank = atoi(argv[1]);
27 
28  cet::filepath_lookup lookup_policy("FHICL_FILE_PATH");
29  fhicl::ParameterSet ps;
30 
31  auto fhicl = std::string(argv[2]);
32  make_ParameterSet(fhicl, lookup_policy, ps);
33 
34  artdaq::TransferTest theTest(ps);
35  theTest.runTest();
36 
37  TLOG(TLVL_INFO) << "END" ;
38  return 0;
39 }
Test a set of TransferInterface plugins.
Definition: TransferTest.hh:17