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>

List of all members.

Public Member Functions

 EventBuilderCore (int rank, std::string name)
 EventBuilderCore Constructor.
 EventBuilderCore (EventBuilderCore const &)
 Copy Constructor is deleted.
 ~EventBuilderCore ()
EventBuilderCoreoperator= (EventBuilderCore const &)
 Copy Assignment operator is deleted.
bool initialize (fhicl::ParameterSet const &pset)
 Processes the initialize request.
bool start (art::RunID id)
 Start the EventBuilderCore.
bool stop ()
 Stops the EventBuilderCore.
bool pause ()
 Pauses the EventBuilderCore.
bool resume ()
 Resumes the EventBuilderCore.
bool shutdown ()
 Shuts Down the EventBuilderCore.
bool soft_initialize (fhicl::ParameterSet const &pset)
 Soft-Initializes the EventBuilderCore. No-Op.
bool reinitialize (fhicl::ParameterSet const &pset)
 Reinitializes the EventBuilderCore.
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.
std::string report (std::string const &which) const
 Send a report on a given run-time quantity.

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:
rank Rank of the EventBuilder
name Friendly 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:
pset ParameterSet 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 &   ) 

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:
pset ParameterSet 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:
which Which 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:
pset ParameterSet 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:
id Run 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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator

Generated on 23 May 2017 for artdaq by  doxygen 1.6.1