$treeview $search $mathjax $extrastylesheet
artdaq  v3_04_01
$projectbrief
$projectbrief
$searchbox

artdaq::BoardReaderCore Class Reference

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>

List of all members.

Public Member Functions

 BoardReaderCore (Commandable &parent_application)
 BoardReaderCore Constructor.
 BoardReaderCore (BoardReaderCore const &)
 Copy Constructor is Deleted.
virtual ~BoardReaderCore ()
 BoardReaderCore Destructor.
BoardReaderCoreoperator= (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 DataSenderManagerGetDataSenderManagerPtr ()
 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.

Detailed Description

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.


Constructor & Destructor Documentation

artdaq::BoardReaderCore::BoardReaderCore ( Commandable parent_application  ) 

BoardReaderCore Constructor.

Parameters:
parent_application Reference to parent Commandable object, for in_run_failure notification

Definition at line 28 of file BoardReaderCore.cc.


Member Function Documentation

static DataSenderManager* artdaq::BoardReaderCore::GetDataSenderManagerPtr (  )  [inline, static]

Gets a handle to the DataSenderManager.

Returns:
Pointer 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.

Returns:
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.

Parameters:
pset ParameterSet used to configure the BoardReaderCore
Returns:
True if the initialize attempt succeeded
	 * 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.

Parameters:
command Command name to run
arg Argument(s) for command
Returns:
Whether command completed successfully. (By convention, unsupported commands should return true)

Definition at line 393 of file BoardReaderCore.cc.

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

Copy Assignment Operator is deleted.

Returns:
BoardReaderCore copy
bool artdaq::BoardReaderCore::pause ( uint64_t  timeout,
uint64_t  timestamp 
)

Pause the BoardReader, and the CommandableFragmentGenerator.

Parameters:
timeout Timeout for transition
timestamp Timestamp of transition
Returns:
True unless exception occurred

Definition at line 195 of file BoardReaderCore.cc.

void artdaq::BoardReaderCore::process_fragments (  ) 

Main working loop of the BoardReaderCore.

Returns:
Number of Fragments generated

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.

Parameters:
pset ParameterSet used to configure the BoardReaderCore
Returns:
True unless exception occurred

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.

Parameters:
which Which quantity to report
Returns:
A string containing the requested quantity.

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.

Parameters:
timeout Timeout for transition
timestamp Timestamp of transition
Returns:
True unless exception occurred

Definition at line 205 of file BoardReaderCore.cc.

bool artdaq::BoardReaderCore::shutdown ( uint64_t   ) 

Shutdown the BoardReader, and the CommandableFragmentGenerator.

Returns:
True unless exception occurred

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.

Parameters:
pset ParameterSet used to configure the BoardReaderCore
Returns:
True unless exception occurred

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.

Parameters:
id Run ID of new run
timeout Timeout for transition
timestamp Timestamp of transition
Returns:
True unless exception occurred

Definition at line 157 of file BoardReaderCore.cc.

bool artdaq::BoardReaderCore::stop ( uint64_t  timeout,
uint64_t  timestamp 
)

Stop the BoardReader, and the CommandableFragmentGenerator.

Parameters:
timeout Timeout for transition
timestamp Timestamp of transition
Returns:
True unless exception occurred

Definition at line 178 of file BoardReaderCore.cc.


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

Generated on 29 Mar 2019 for artdaq by  doxygen 1.6.1