$treeview $search $mathjax $extrastylesheet
artdaq
v3_04_01
$projectbrief
|
$projectbrief
|
$searchbox |
BoardReaderCore implements the state machine for the BoardReader artdaq application. It contains a CommandableFragmentGenerator, which generates Fragments which are then sent to a DataSenderManager by BoardReaderCore. More...
#include <artdaq/Application/BoardReaderCore.hh>
Public Member Functions | |
BoardReaderCore (Commandable &parent_application) | |
BoardReaderCore Constructor. | |
BoardReaderCore (BoardReaderCore const &) | |
Copy Constructor is Deleted. | |
virtual | ~BoardReaderCore () |
BoardReaderCore Destructor. | |
BoardReaderCore & | operator= (BoardReaderCore const &) |
Copy Assignment Operator is deleted. | |
bool | initialize (fhicl::ParameterSet const &pset, uint64_t, uint64_t) |
Initialize the BoardReaderCore. | |
bool | start (art::RunID id, uint64_t timeout, uint64_t timestamp) |
Start the BoardReader, and the CommandableFragmentGenerator. | |
bool | stop (uint64_t timeout, uint64_t timestamp) |
Stop the BoardReader, and the CommandableFragmentGenerator. | |
bool | pause (uint64_t timeout, uint64_t timestamp) |
Pause the BoardReader, and the CommandableFragmentGenerator. | |
bool | resume (uint64_t timeout, uint64_t timestamp) |
Resume the BoardReader, and the CommandableFragmentGenerator. | |
bool | shutdown (uint64_t) |
Shutdown the BoardReader, and the CommandableFragmentGenerator. | |
bool | soft_initialize (fhicl::ParameterSet const &pset, uint64_t, uint64_t) |
Soft-Initialize the BoardReader. No-Op. | |
bool | reinitialize (fhicl::ParameterSet const &pset, uint64_t, uint64_t) |
Reinitialize the BoardReader. No-Op. | |
void | process_fragments () |
Main working loop of the BoardReaderCore. | |
std::string | report (std::string const &which) const |
Send a report on a given run-time quantity. | |
bool | metaCommand (std::string const &command, std::string const &arg) |
Run a user-defined command on the CommandableFragmentGenerator. | |
size_t | GetFragmentsProcessed () |
Get the number of Fragments processed this run. | |
Static Public Member Functions | |
static DataSenderManager * | GetDataSenderManagerPtr () |
Gets a handle to the DataSenderManager. | |
Static Public Attributes | |
static const std::string | FRAGMENTS_PROCESSED_STAT_KEY |
Key for the Fragments Processed MonitoredQuantity. | |
static const std::string | INPUT_WAIT_STAT_KEY |
Key for the Input Wait MonitoredQuantity. | |
static const std::string | BRSYNC_WAIT_STAT_KEY |
Key for the Sync Wait MonitoredQuantity. | |
static const std::string | OUTPUT_WAIT_STAT_KEY |
Key for the Output Wait MonitoredQuantity. | |
static const std::string | FRAGMENTS_PER_READ_STAT_KEY |
Key for the Fragments Per Read MonitoredQuantity. |
BoardReaderCore implements the state machine for the BoardReader artdaq application. It contains a CommandableFragmentGenerator, which generates Fragments which are then sent to a DataSenderManager by BoardReaderCore.
Definition at line 23 of file BoardReaderCore.hh.
artdaq::BoardReaderCore::BoardReaderCore | ( | Commandable & | parent_application | ) |
BoardReaderCore Constructor.
parent_application | Reference to parent Commandable object, for in_run_failure notification |
Definition at line 28 of file BoardReaderCore.cc.
static DataSenderManager* artdaq::BoardReaderCore::GetDataSenderManagerPtr | ( | ) | [inline, static] |
Gets a handle to the DataSenderManager.
Definition at line 157 of file BoardReaderCore.hh.
size_t artdaq::BoardReaderCore::GetFragmentsProcessed | ( | ) | [inline] |
Get the number of Fragments processed this run.
Definition at line 163 of file BoardReaderCore.hh.
bool artdaq::BoardReaderCore::initialize | ( | fhicl::ParameterSet const & | pset, | |
uint64_t | , | |||
uint64_t | ||||
) |
Initialize the BoardReaderCore.
pset | ParameterSet used to configure the BoardReaderCore |
* BoardReaderCore accepts the following Parameters: * "daq" (REQUIRED): FHiCL table containing DAQ configuration. * "fragment_receiver" (REQUIRED): FHiCL table containing Fragment Receiver configruation. * See CommandableFragmentGenerator for configuration options. * "generator" (Default: ""): The plugin name of the generator to load * "rt_priority" (Default: 0): The unix priority to attempt to assign to the process * "verbose" (Default: true): Whether to print transition messages * "metrics": FHiCL table containing MetricManager configuration. * See MetricManager for configuration options. *
Definition at line 48 of file BoardReaderCore.cc.
bool artdaq::BoardReaderCore::metaCommand | ( | std::string const & | command, | |
std::string const & | arg | |||
) |
Run a user-defined command on the CommandableFragmentGenerator.
command | Command name to run | |
arg | Argument(s) for command |
Definition at line 393 of file BoardReaderCore.cc.
BoardReaderCore& artdaq::BoardReaderCore::operator= | ( | BoardReaderCore const & | ) |
Copy Assignment Operator is deleted.
bool artdaq::BoardReaderCore::pause | ( | uint64_t | timeout, | |
uint64_t | timestamp | |||
) |
Pause the BoardReader, and the CommandableFragmentGenerator.
timeout | Timeout for transition | |
timestamp | Timestamp of transition |
Definition at line 195 of file BoardReaderCore.cc.
void artdaq::BoardReaderCore::process_fragments | ( | ) |
Main working loop of the BoardReaderCore.
This loop calls the CommandableFragmentGenerator::getNext method, then sends each Fragment using DataSenderManager.
Definition at line 241 of file BoardReaderCore.cc.
bool artdaq::BoardReaderCore::reinitialize | ( | fhicl::ParameterSet const & | pset, | |
uint64_t | , | |||
uint64_t | ||||
) |
Reinitialize the BoardReader. No-Op.
pset | ParameterSet used to configure the BoardReaderCore |
Definition at line 233 of file BoardReaderCore.cc.
std::string artdaq::BoardReaderCore::report | ( | std::string const & | which | ) | const |
Send a report on a given run-time quantity.
which | Which quantity to report |
If the CommandableFragmentGenerator has been initialized, CommandableFragmentGenerator::report(std::string const& which) will be called. Otherwise, the BoardReaderCore will return the current run number and an error message.
Definition at line 372 of file BoardReaderCore.cc.
bool artdaq::BoardReaderCore::resume | ( | uint64_t | timeout, | |
uint64_t | timestamp | |||
) |
Resume the BoardReader, and the CommandableFragmentGenerator.
timeout | Timeout for transition | |
timestamp | Timestamp of transition |
Definition at line 205 of file BoardReaderCore.cc.
bool artdaq::BoardReaderCore::shutdown | ( | uint64_t | ) |
Shutdown the BoardReader, and the CommandableFragmentGenerator.
Definition at line 215 of file BoardReaderCore.cc.
bool artdaq::BoardReaderCore::soft_initialize | ( | fhicl::ParameterSet const & | pset, | |
uint64_t | , | |||
uint64_t | ||||
) |
Soft-Initialize the BoardReader. No-Op.
pset | ParameterSet used to configure the BoardReaderCore |
Definition at line 225 of file BoardReaderCore.cc.
bool artdaq::BoardReaderCore::start | ( | art::RunID | id, | |
uint64_t | timeout, | |||
uint64_t | timestamp | |||
) |
Start the BoardReader, and the CommandableFragmentGenerator.
id | Run ID of new run | |
timeout | Timeout for transition | |
timestamp | Timestamp of transition |
Definition at line 157 of file BoardReaderCore.cc.
bool artdaq::BoardReaderCore::stop | ( | uint64_t | timeout, | |
uint64_t | timestamp | |||
) |
Stop the BoardReader, and the CommandableFragmentGenerator.
timeout | Timeout for transition | |
timestamp | Timestamp of transition |
Definition at line 178 of file BoardReaderCore.cc.