artdaq  v3_00_03
EventBuilderCore.cc
1 #include "canvas/Utilities/Exception.h"
2 #include "art/Framework/Art/artapp.h"
3 
4 #define TRACE_NAME "EventBuilderCore"
5 #include "artdaq/DAQdata/Globals.hh"
6 #include "artdaq-core/Core/SimpleMemoryReader.hh"
7 #include "artdaq-core/Utilities/ExceptionHandler.hh"
8 
9 #include "artdaq/Application/EventBuilderCore.hh"
10 #include "artdaq/TransferPlugins/TransferInterface.hh"
11 
12 #include <iomanip>
13 
16 {
17 }
18 
20 {
21  TLOG_DEBUG(app_name) << "Destructor" << TLOG_ENDL;
22 }
23 
24 bool artdaq::EventBuilderCore::initialize(fhicl::ParameterSet const& pset)
25 {
26  TLOG_DEBUG(app_name) << "initialize method called with DAQ "
27  << "ParameterSet = \"" << pset.to_string() << "\"." << TLOG_ENDL;
28 
29  // pull out the relevant parts of the ParameterSet
30  fhicl::ParameterSet daq_pset;
31  try
32  {
33  daq_pset = pset.get<fhicl::ParameterSet>("daq");
34  }
35  catch (...)
36  {
37  TLOG_ERROR(app_name)
38  << "Unable to find the DAQ parameters in the initialization "
39  << "ParameterSet: \"" + pset.to_string() + "\"." << TLOG_ENDL;
40  return false;
41  }
42  fhicl::ParameterSet evb_pset;
43  try
44  {
45  evb_pset = daq_pset.get<fhicl::ParameterSet>("event_builder");
46  }
47  catch (...)
48  {
49  TLOG_ERROR(app_name)
50  << "Unable to find the event_builder parameters in the DAQ "
51  << "initialization ParameterSet: \"" + daq_pset.to_string() + "\"." << TLOG_ENDL;
52  return false;
53  }
54 
55  fhicl::ParameterSet metric_pset;
56  try
57  {
58  metric_pset = daq_pset.get<fhicl::ParameterSet>("metrics");
59  }
60  catch (...) {} // OK if there's no metrics table defined in the FHiCL
61 
62  return initializeDataReceiver(pset,evb_pset, metric_pset);
63 }
bool initialize(fhicl::ParameterSet const &pset) override
Processes the initialize request.
DataReceiverCore implements the state machine for the DataReceiver artdaq application. DataReceiverCore receives Fragment objects from the DataReceiverManager, and sends them to the EventStore.
EventBuilderCore()
EventBuilderCore Constructor.