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