artdaq  v2_03_02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
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  TRACE(10, "s_r_handles main enter");
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 != 3)
18  {
19  std::cerr << argv[0] << " requires 2 arguments, " << argc - 1 << " provided" << std::endl;
20  std::cerr << "Usage: " << argv[0] << " <my_rank> <fhicl_document>" << std::endl;
21  return 1;
22  }
23 
24  my_rank = atoi(argv[1]);
25 
26  cet::filepath_lookup lookup_policy("FHICL_FILE_PATH");
27  fhicl::ParameterSet ps;
28 
29  auto fhicl = std::string(argv[2]);
30  make_ParameterSet(fhicl, lookup_policy, ps);
31 
32  artdaq::TransferTest theTest(ps);
33  theTest.runTest();
34 
35  TRACE(11, "s_r_handles main return");
36  return 0;
37 }
void configureMessageFacility(char const *progname, bool useConsole=true)
Configure and start the message facility. Provide the program name so that messages will be appropria...
Test a set of TransferInterface plugins.
Definition: TransferTest.hh:17