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