00001 #define TRACE_NAME "transfer_driver"
00002
00003 #include "artdaq/DAQrate/TransferTest.hh"
00004 #include "artdaq/DAQdata/Globals.hh"
00005 #include "fhiclcpp/make_ParameterSet.h"
00006
00007
00008 int main(int argc, char* argv[])
00009 {
00010 artdaq::configureMessageFacility("transfer_driver");
00011 TLOG(TLVL_INFO) << "BEGIN" ;
00012
00013 std::cout << "argc:" << argc << std::endl;
00014 for (int i = 0; i < argc; ++i)
00015 {
00016 std::cout << "argv[" << i << "]: " << argv[i] << std::endl;
00017 }
00018
00019 if (argc != 3)
00020 {
00021 std::cerr << argv[0] << " requires 2 arguments, " << argc - 1 << " provided" << std::endl;
00022 std::cerr << "Usage: " << argv[0] << " <my_rank> <fhicl_document>" << std::endl;
00023 return 1;
00024 }
00025
00026 my_rank = atoi(argv[1]);
00027
00028 cet::filepath_lookup lookup_policy("FHICL_FILE_PATH");
00029 fhicl::ParameterSet ps;
00030
00031 auto fhicl = std::string(argv[2]);
00032 make_ParameterSet(fhicl, lookup_policy, ps);
00033
00034 if (ps.has_key("partition_number")) artdaq::Globals::partition_number_ = ps.get<int>("partition_number");
00035
00036 artdaq::TransferTest theTest(ps);
00037 theTest.runTest();
00038
00039 TLOG(TLVL_INFO) << "END" ;
00040 return 0;
00041 }