artdaq
v3_09_00
|
CompositeDriver handles a set of lower-level generators. More...
#include <artdaq/Generators/CompositeDriver.hh>
Public Member Functions | |
CompositeDriver (fhicl::ParameterSet const &ps) | |
CompositeDriver Constructor. More... | |
virtual | ~CompositeDriver () noexcept |
Destructor. Calls the destructors for each configured CommandableFragmentGenerator. | |
void | start () override |
Start all configured CommandableFragmentGenerators. | |
void | stopNoMutex () override |
Call non-locked stop methods for all configured CommandableFragmentGenerators. | |
void | stop () override |
Call stop methods for all configured CommandableFragmentGenerators. Currently handled by stopNoMutex. | |
void | pause () override |
Pause all configured CommandableFragmentGenerators. | |
void | resume () override |
Resume all configured CommandableFragmentGenerators. | |
![]() | |
CommandableFragmentGenerator (const fhicl::ParameterSet &ps) | |
CommandableFragmentGenerator Constructor. More... | |
virtual | ~CommandableFragmentGenerator () |
CommandableFragmentGenerator Destructor. More... | |
void | joinThreads () |
Join any data-taking threads. Should be called when destructing CommandableFragmentGenerator. More... | |
bool | getNext (FragmentPtrs &output) overridefinal |
getNext calls either applyRequests or getNext_ to get any data that is ready to be sent to the EventBuilders More... | |
void | startMonitoringThread () |
Function that launches the monitoring thread (getMonitoringDataLoop()) | |
void | getMonitoringDataLoop () |
This function regularly calls checkHWStatus_(), and sets the isHardwareOK flag accordingly. | |
std::vector < Fragment::fragment_id_t > | fragmentIDs () override |
Get the list of Fragment IDs handled by this CommandableFragmentGenerator. More... | |
size_t | ev_counter () const |
Get the current value of the event counter. More... | |
void | StartCmd (int run, uint64_t timeout, uint64_t timestamp) |
Start the CommandableFragmentGenerator. More... | |
void | StopCmd (uint64_t timeout, uint64_t timestamp) |
Stop the CommandableFragmentGenerator. More... | |
void | PauseCmd (uint64_t timeout, uint64_t timestamp) |
Pause the CommandableFragmentGenerator. More... | |
void | ResumeCmd (uint64_t timeout, uint64_t timestamp) |
Resume the CommandableFragmentGenerator. More... | |
std::string | ReportCmd (std::string const &which="") |
Get a report about a user-specified run-time quantity. More... | |
virtual std::string | metricsReportingInstanceName () const |
Get the name used when reporting metrics. More... | |
bool | exception () const |
Get the current value of the exception flag. More... | |
virtual bool | metaCommand (std::string const &command, std::string const &arg) |
The meta-command is used for implementing user-specific commands in a CommandableFragmentGenerator. More... | |
void | SetRequestBuffer (std::shared_ptr< RequestBuffer > buffer) |
Additional Inherited Members | |
![]() | |
using | Parameters = fhicl::WrappedTable< Config > |
Used for ParameterSet validation (if desired) | |
![]() | |
int | run_number () const |
Get the current Run number. More... | |
int | subrun_number () const |
Get the current Subrun number. More... | |
uint64_t | timeout () const |
Timeout of last command. More... | |
uint64_t | timestamp () const |
Timestamp of last command. More... | |
artdaq::Fragment::fragment_id_t | fragment_id () const |
Get the Fragment ID of this Fragment generator. More... | |
bool | should_stop () const |
Get the current value of the should_stop flag. More... | |
bool | check_stop () |
Routine used by applyRequests to make sure that all outstanding requests have been fulfilled before returning. More... | |
int | board_id () const |
Gets the current board_id. More... | |
size_t | ev_counter_inc (size_t step=1) |
Increment the event counter. More... | |
void | set_exception (bool exception) |
Control the exception flag. More... | |
void | metricsReportingInstanceName (std::string const &name) |
Sets the name for metrics reporting. More... | |
std::shared_ptr< RequestBuffer > | GetRequestBuffer () |
virtual bool | getNext_ (FragmentPtrs &output)=0 |
Obtain the next group of Fragments, if any are available. Return false if readout cannot continue, if we are 'stopped', or if we are not running in state-machine mode. Note that getNext_() must return n of each fragmentID declared by fragmentIDs_(). More... | |
virtual bool | checkHWStatus_ () |
Check any relavent hardware status registers. Return false if an error condition exists that should halt data-taking. This function should probably make MetricManager calls. More... | |
virtual void | pauseNoMutex () |
On call to PauseCmd, pauseNoMutex() is called prior to PauseCmd acquiring the mutex More... | |
virtual std::string | report () |
Let's say that the contract with the report() functions is that they return a non-empty string if they have something useful to report, but if they don't know how to handle a given request, they simply return an empty string and the ReportCmd() takes care of saying "the xyz command is not currently supported". For backward compatibility, we keep the report function that takes no arguments and add one that takes a "which" argument. In the ReportCmd function, we'll call the more specific one first. More... | |
virtual std::string | reportSpecific (std::string const &what) |
Report the status of a specific quantity More... | |
![]() | |
std::mutex | mutex_ |
Mutex used to ensure that multiple transition commands do not run at the same time. | |
CompositeDriver handles a set of lower-level generators.
When multiple CommandableFragmentGenerators are needed by a single BoardReader, CompositeDriver may be used to provide a single interface to all of them.
Definition at line 16 of file CompositeDriver.hh.
|
explicit |
CompositeDriver Constructor.
ps | ParameterSet used to configure CompositeDriver |
* CompositeDriver accepts the following Parameters: * "generator_config_list" (REQUIRED): A FHiCL sequence of FHiCL tables, each one configuring * a CommandableFragmentGenerator instance. *