artdaq  v2_02_03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Attributes | List of all members
artdaq::EventBuilderCore Class Reference

EventBuilderCore implements the state machine for the EventBuilder artdaq application. EventBuilderCore receives Fragment objects from the DataReceiverManager, and sends them to the EventStore. More...

#include <artdaq/Application/EventBuilderCore.hh>

Public Member Functions

 EventBuilderCore (int rank, std::string name)
 EventBuilderCore Constructor. More...
 
 EventBuilderCore (EventBuilderCore const &)=delete
 Copy Constructor is deleted.
 
 ~EventBuilderCore ()
 
EventBuilderCoreoperator= (EventBuilderCore const &)=delete
 Copy Assignment operator is deleted. More...
 
bool initialize (fhicl::ParameterSet const &pset)
 Processes the initialize request. More...
 
bool start (art::RunID id)
 Start the EventBuilderCore. More...
 
bool stop ()
 Stops the EventBuilderCore. More...
 
bool pause ()
 Pauses the EventBuilderCore. More...
 
bool resume ()
 Resumes the EventBuilderCore. More...
 
bool shutdown ()
 Shuts Down the EventBuilderCore. More...
 
bool soft_initialize (fhicl::ParameterSet const &pset)
 Soft-Initializes the EventBuilderCore. No-Op. More...
 
bool reinitialize (fhicl::ParameterSet const &pset)
 Reinitializes the EventBuilderCore. More...
 
size_t process_fragments ()
 The main loop of the EventBuilderCore. Receives Fragment objects from DataReceiverManager and enqueues them on the EventStore, with special processing for EndOfDatafragmentType Fragments. More...
 
std::string report (std::string const &which) const
 Send a report on a given run-time quantity. More...
 

Static Public Attributes

static const std::string INPUT_FRAGMENTS_STAT_KEY
 Key for the Input Fragments MonitoredQuantity.
 
static const std::string INPUT_WAIT_STAT_KEY
 Key for the Input Wait MonitoredQuantity.
 
static const std::string STORE_EVENT_WAIT_STAT_KEY
 Key for the Store Event Wait MonitoredQuantity.
 

Detailed Description

EventBuilderCore implements the state machine for the EventBuilder artdaq application. EventBuilderCore receives Fragment objects from the DataReceiverManager, and sends them to the EventStore.

Definition at line 25 of file EventBuilderCore.hh.

Constructor & Destructor Documentation

artdaq::EventBuilderCore::EventBuilderCore ( int  rank,
std::string  name 
)

EventBuilderCore Constructor.

Parameters
rankRank of the EventBuilder
nameFriendly name for the EventBuilder

Definition at line 19 of file EventBuilderCore.cc.

artdaq::EventBuilderCore::~EventBuilderCore ( )

Destructor.

Definition at line 35 of file EventBuilderCore.cc.

Member Function Documentation

bool artdaq::EventBuilderCore::initialize ( fhicl::ParameterSet const &  pset)

Processes the initialize request.

Parameters
psetParameterSet used to configure the EventBuilderCore
Returns
Whether the initialize attempt succeeded
* EventBuilderCore accepts the following Parameters:
* "daq" (REQUIRED): FHiCL table containing DAQ configuration
*   "event_builder" (REQUIRED): FHiCL table containing Aggregator paramters
*     "expected_fragments_per_event" (REQUIRED): Number of Fragment objects to collect before sending them to art
*     "use_art" (REQUIRED): Whether to start an art thread in the EventStore
*     "inrun_recv_timeout_usec" (Default: 100000): Amount of time to wait for new Fragment objects while running
*     "endrun_recv_timeout_usec" (Default: 20000000): Amount of time to wait for additional Fragment objects at EndOfRun
*     "pause_recv_timeout_usec" (Default: 3000000): Amount of time to wait for additional Fragment objects at PauseRun
*     "verbose" (Default: false): Whether to print more verbose status information
*   "metrics": FHiCL table containing configuration for MetricManager
* 

Note that the "event_builder" ParameterSet is also used to configure the EventStore. See that class' documentation for more information.

Definition at line 60 of file EventBuilderCore.cc.

EventBuilderCore& artdaq::EventBuilderCore::operator= ( EventBuilderCore const &  )
delete

Copy Assignment operator is deleted.

Returns
AggregatorCore copy
bool artdaq::EventBuilderCore::pause ( )

Pauses the EventBuilderCore.

Returns
True if no exception

Definition at line 246 of file EventBuilderCore.cc.

size_t artdaq::EventBuilderCore::process_fragments ( )

The main loop of the EventBuilderCore. Receives Fragment objects from DataReceiverManager and enqueues them on the EventStore, with special processing for EndOfDatafragmentType Fragments.

Returns
0 if shutdown successfully

Definition at line 327 of file EventBuilderCore.cc.

bool artdaq::EventBuilderCore::reinitialize ( fhicl::ParameterSet const &  pset)

Reinitializes the EventBuilderCore.

Parameters
psetParameterSet for configuring EventBuilderCore
Returns
True if no exception

Definition at line 317 of file EventBuilderCore.cc.

std::string artdaq::EventBuilderCore::report ( std::string const &  which) const

Send a report on a given run-time quantity.

Parameters
whichWhich quantity to report
Returns
A string containing the requested quantity.

report accepts the following values of "which": "event_count": The number of events received, or -1 if not initialized "incomplete_event_count": The number of incomplete event bunches in the EventStore, or -1 if not initalized

Anything else will return the run number and an error message.

Definition at line 529 of file EventBuilderCore.cc.

bool artdaq::EventBuilderCore::resume ( )

Resumes the EventBuilderCore.

Returns
True if no exception

Definition at line 273 of file EventBuilderCore.cc.

bool artdaq::EventBuilderCore::shutdown ( )

Shuts Down the EventBuilderCore.

Returns
If the shutdown was successful

Definition at line 285 of file EventBuilderCore.cc.

bool artdaq::EventBuilderCore::soft_initialize ( fhicl::ParameterSet const &  pset)

Soft-Initializes the EventBuilderCore. No-Op.

Parameters
psetParameterSet for configuring EventBuilderCore
Returns
Always returns true

Definition at line 309 of file EventBuilderCore.cc.

bool artdaq::EventBuilderCore::start ( art::RunID  id)

Start the EventBuilderCore.

Parameters
idRun ID of the current run
Returns
True if no exception

Definition at line 177 of file EventBuilderCore.cc.

bool artdaq::EventBuilderCore::stop ( )

Stops the EventBuilderCore.

Returns
True if no exception

Definition at line 194 of file EventBuilderCore.cc.


The documentation for this class was generated from the following files: