artdaq::DataReceiverCore Class Reference

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

#include <artdaq/Application/DataReceiverCore.hh>

Inheritance diagram for artdaq::DataReceiverCore:
artdaq::DataLoggerCore artdaq::DispatcherCore artdaq::EventBuilderCore

List of all members.

Public Member Functions

 DataReceiverCore ()
 DataReceiverCore Constructor.
 DataReceiverCore (DataReceiverCore const &)
 Copy Constructor is deleted.
virtual ~DataReceiverCore ()
DataReceiverCoreoperator= (DataReceiverCore const &)
 Copy Assignment operator is deleted.
virtual bool initialize (fhicl::ParameterSet const &pset)=0
 Processes the initialize request.
bool start (art::RunID id)
 Start the DataReceiverCore.
bool stop ()
 Stops the DataReceiverCore.
bool pause ()
 Pauses the DataReceiverCore.
bool resume ()
 Resumes the DataReceiverCore.
bool shutdown ()
 Shuts Down the DataReceiverCore.
bool soft_initialize (fhicl::ParameterSet const &pset)
 Soft-Initializes the DataReceiverCore. No-Op.
bool reinitialize (fhicl::ParameterSet const &pset)
 Reinitializes the DataReceiverCore.
std::string report (std::string const &which) const
 Send a report on a given run-time quantity.

Protected Member Functions

bool initializeDataReceiver (fhicl::ParameterSet const &pset, fhicl::ParameterSet const &data_pset, fhicl::ParameterSet const &metric_pset)
 Initialize the DataReceiverCore (should be called from initialize() overrides.
void logMessage_ (std::string const &text)
 Log a message, setting severity based on verbosity flag.

Protected Attributes

std::unique_ptr
< DataReceiverManager
receiver_ptr_
 Pointer to the DataReceiverManager.
std::shared_ptr
< SharedMemoryEventManager
event_store_ptr_
 Pointer to the SharedMemoryEventManager.
std::atomic< bool > stop_requested_
 Stop has been requested?
std::atomic< bool > pause_requested_
 Pause has been requested?
std::atomic< bool > run_is_paused_
 Pause has been successfully completed?
bool verbose_
 Whether to log transition messages.
MetricManager metricMan_
 MetricManager concrete instance (for Globals.hh::metricMan).

Detailed Description

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

Definition at line 24 of file DataReceiverCore.hh.


Constructor & Destructor Documentation

artdaq::DataReceiverCore::~DataReceiverCore (  )  [virtual]

Destructor.

Definition at line 23 of file DataReceiverCore.cc.


Member Function Documentation

virtual bool artdaq::DataReceiverCore::initialize ( fhicl::ParameterSet const &  pset  )  [pure virtual]

Processes the initialize request.

Parameters:
pset ParameterSet used to configure the DataReceiverCore
Returns:
Whether the initialize attempt succeeded
	* DataReceiverCore accepts the following Parameters:
	* "daq" (REQUIRED): FHiCL table containing DAQ configuration
	*   "event_builder" (REQUIRED): FHiCL table containing Aggregator paramters
	*     "fragment_count" (REQUIRED): Number of Fragment objects to collect before sending them to art
	*     "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: true): Whether to print transition messages
	*   "metrics": FHiCL table containing configuration for MetricManager
	* 

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

Implemented in artdaq::DataLoggerCore, artdaq::DispatcherCore, and artdaq::EventBuilderCore.

bool artdaq::DataReceiverCore::initializeDataReceiver ( fhicl::ParameterSet const &  pset,
fhicl::ParameterSet const &  data_pset,
fhicl::ParameterSet const &  metric_pset 
) [protected]

Initialize the DataReceiverCore (should be called from initialize() overrides.

Parameters:
pset ParameterSet for art configuration
data_pset ParameterSet for DataReceiverManager and SharedMemoryEventManager configuration
metric_pset ParameterSet for MetricManager
Returns:
Whether the initialize succeeded

Definition at line 28 of file DataReceiverCore.cc.

void artdaq::DataReceiverCore::logMessage_ ( std::string const &  text  )  [protected]

Log a message, setting severity based on verbosity flag.

Parameters:
text Message to log

Definition at line 280 of file DataReceiverCore.cc.

DataReceiverCore& artdaq::DataReceiverCore::operator= ( DataReceiverCore const &   ) 

Copy Assignment operator is deleted.

Returns:
AggregatorCore copy

Reimplemented in artdaq::DataLoggerCore, artdaq::DispatcherCore, and artdaq::EventBuilderCore.

bool artdaq::DataReceiverCore::pause (  ) 

Pauses the DataReceiverCore.

Returns:
True if no exception

Definition at line 160 of file DataReceiverCore.cc.

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

Reinitializes the DataReceiverCore.

Parameters:
pset ParameterSet for configuring DataReceiverCore
Returns:
True if no exception

Definition at line 239 of file DataReceiverCore.cc.

std::string artdaq::DataReceiverCore::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 248 of file DataReceiverCore.cc.

bool artdaq::DataReceiverCore::resume (  ) 

Resumes the DataReceiverCore.

Returns:
True if no exception

Definition at line 186 of file DataReceiverCore.cc.

bool artdaq::DataReceiverCore::shutdown (  ) 

Shuts Down the DataReceiverCore.

Returns:
If the shutdown was successful

Definition at line 197 of file DataReceiverCore.cc.

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

Soft-Initializes the DataReceiverCore. No-Op.

Parameters:
pset ParameterSet for configuring DataReceiverCore
Returns:
Always returns true

Definition at line 231 of file DataReceiverCore.cc.

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

Start the DataReceiverCore.

Parameters:
id Run ID of the current run
Returns:
True if no exception

Definition at line 79 of file DataReceiverCore.cc.

bool artdaq::DataReceiverCore::stop (  ) 

Stops the DataReceiverCore.

Returns:
True if no exception

Definition at line 93 of file DataReceiverCore.cc.


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

Generated on 15 Apr 2018 for artdaq by  doxygen 1.6.1