artdaq
v3_00_01
|
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>
Public Member Functions | |
DataReceiverCore (int rank, std::string name) | |
DataReceiverCore Constructor. More... | |
DataReceiverCore (DataReceiverCore const &)=delete | |
Copy Constructor is deleted. | |
virtual | ~DataReceiverCore () |
DataReceiverCore & | operator= (DataReceiverCore const &)=delete |
Copy Assignment operator is deleted. More... | |
virtual bool | initialize (fhicl::ParameterSet const &pset)=0 |
Processes the initialize request. More... | |
bool | start (art::RunID id) |
Start the DataReceiverCore. More... | |
bool | stop () |
Stops the DataReceiverCore. More... | |
bool | pause () |
Pauses the DataReceiverCore. More... | |
bool | resume () |
Resumes the DataReceiverCore. More... | |
bool | shutdown () |
Shuts Down the DataReceiverCore. More... | |
bool | soft_initialize (fhicl::ParameterSet const &pset) |
Soft-Initializes the DataReceiverCore. No-Op. More... | |
bool | reinitialize (fhicl::ParameterSet const &pset) |
Reinitializes the DataReceiverCore. More... | |
std::string | report (std::string const &which) const |
Send a report on a given run-time quantity. More... | |
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. More... | |
void | logMessage_ (std::string const &text) |
Log a message, setting severity based on verbosity flag. More... | |
Protected Attributes | |
std::string | name_ |
Name of this DataReceiverCore instance. | |
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 verbosely. | |
MetricManager | metricMan_ |
MetricManager concrete instance (for Globals.hh::metricMan) | |
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.
artdaq::DataReceiverCore::DataReceiverCore | ( | int | rank, |
std::string | name | ||
) |
DataReceiverCore Constructor.
rank | Rank of the DataReceiver |
name | Friendly name for the DataReceiver |
Definition at line 14 of file DataReceiverCore.cc.
|
virtual |
Destructor.
Definition at line 25 of file DataReceiverCore.cc.
|
pure virtual |
Processes the initialize request.
pset | ParameterSet used to configure the DataReceiverCore |
* 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: 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 SharedMemoryEventManager. See that class' documentation for more information.
Implemented in artdaq::DispatcherCore, artdaq::DataLoggerCore, and artdaq::EventBuilderCore.
|
protected |
Initialize the DataReceiverCore (should be called from initialize() overrides.
pset | ParameterSet for art configuration |
data_pset | ParameterSet for DataReceiverManager and SharedMemoryEventManager configuration |
metric_pset | ParameterSet for MetricManager |
Definition at line 30 of file DataReceiverCore.cc.
|
protected |
Log a message, setting severity based on verbosity flag.
text | Message to log |
Definition at line 243 of file DataReceiverCore.cc.
|
delete |
Copy Assignment operator is deleted.
bool artdaq::DataReceiverCore::pause | ( | ) |
Pauses the DataReceiverCore.
Definition at line 128 of file DataReceiverCore.cc.
bool artdaq::DataReceiverCore::reinitialize | ( | fhicl::ParameterSet const & | pset | ) |
Reinitializes the DataReceiverCore.
pset | ParameterSet for configuring DataReceiverCore |
Definition at line 202 of file DataReceiverCore.cc.
std::string artdaq::DataReceiverCore::report | ( | std::string const & | which | ) | const |
Send a report on a given run-time quantity.
which | Which quantity to report |
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 211 of file DataReceiverCore.cc.
bool artdaq::DataReceiverCore::resume | ( | ) |
Resumes the DataReceiverCore.
Definition at line 153 of file DataReceiverCore.cc.
bool artdaq::DataReceiverCore::shutdown | ( | ) |
Shuts Down the DataReceiverCore.
Definition at line 163 of file DataReceiverCore.cc.
bool artdaq::DataReceiverCore::soft_initialize | ( | fhicl::ParameterSet const & | pset | ) |
Soft-Initializes the DataReceiverCore. No-Op.
pset | ParameterSet for configuring DataReceiverCore |
Definition at line 194 of file DataReceiverCore.cc.
bool artdaq::DataReceiverCore::start | ( | art::RunID | id | ) |
Start the DataReceiverCore.
id | Run ID of the current run |
Definition at line 65 of file DataReceiverCore.cc.
bool artdaq::DataReceiverCore::stop | ( | ) |
Stops the DataReceiverCore.
Definition at line 78 of file DataReceiverCore.cc.