artdaq
v2_03_00
|
CommandableFragmentGenerator derived class for testing. More...
Public Member Functions | |
CommandableFragmentGeneratorTest () | |
CommandableFragmentGeneratorTest Constructor. | |
bool | getNext_ (artdaq::FragmentPtrs &frags) override |
Generate data and return it to CommandableFragmentGenerator. More... | |
std::vector < artdaq::Fragment::fragment_id_t > | fragmentIDs () override |
Get the Fragment IDs generated by the CommandableFragmentGenerator. More... | |
void | start () override |
Perform start actions. No-Op. | |
void | stopNoMutex () override |
Perform immediate stop actions. No-Op. | |
void | stop () override |
Perform stop actions. No-Op. | |
void | pause () override |
Perform pause actions. No-Op. | |
void | resume () override |
Perform resume actions. No-Op. | |
![]() | |
CommandableFragmentGenerator () | |
CommandableFragmentGenerator default constructor. More... | |
CommandableFragmentGenerator (const fhicl::ParameterSet &ps) | |
CommandableFragmentGenerator Constructor. More... | |
virtual | ~CommandableFragmentGenerator () |
CommandableFragmentGenerator Destructor. 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... | |
bool | applyRequests (FragmentPtrs &output) |
See if any requests have been received, and add the corresponding data Fragment objects to the output list. More... | |
void | setupRequestListener () |
Opens the socket used to listen for data requests. | |
bool | sendEmptyFragment (FragmentPtrs &frags, size_t sequenceId, std::string desc) |
Send an EmptyFragmentType Fragment. More... | |
void | sendEmptyFragments (FragmentPtrs &frags) |
This function is for Buffered and Single request modes, as they can only respond to one data request at a time If the request message seqID > ev_counter, simply send empties until they're equal. More... | |
void | startDataThread () |
Function that launches the data thread (getDataLoop()) | |
void | startMonitoringThread () |
Function that launches the monitoring thread (getMonitoringDataLoop()) | |
void | startRequestReceiverThread () |
Function that launches the data request receiver thread (receiveRequestsLoop()) | |
void | getDataLoop () |
When separate_data_thread is set to true, this loop repeatedly calls getNext_ and adds returned Fragment objects to the data buffer, blocking when the data buffer is full. | |
bool | dataBufferIsTooLarge () |
Test the configured constraints on the data buffer. More... | |
void | getDataBufferStats () |
Calculate the size of the dataBuffer and report appropriate metrics. More... | |
void | checkDataBuffer () |
Perform data buffer pruning operations. If the RequestMode is Single, removes all but the latest Fragment from the data buffer. In Window and Buffer RequestModes, this function discards the oldest Fragment objects until the data buffer is below its size constraints, then also checks for stale Fragments, based on the timestamp of the most recent Fragment. | |
void | getMonitoringDataLoop () |
This function regularly calls checkHWStatus_(), and sets the isHardwareOK flag accordingly. | |
void | receiveRequestsLoop () |
This function receives data request packets, adding new requests to the request list. | |
std::vector < Fragment::fragment_id_t > | fragmentIDs () override |
Get the list of Fragment IDs handled by this CommandableFragmentGenerator. 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... | |
Additional Inherited Members | |
![]() | |
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... | |
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... | |
int | fragment_id () const |
Get the current Fragment ID, if there is only one. More... | |
size_t | ev_counter () const |
Get the current value of the event counter. More... | |
size_t | ev_counter_inc (size_t step=1, bool force=false) |
Increment the event counter, if the current RequestMode allows it. 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::string | printMode_ () |
Return the string representation of the current RequestMode. More... | |
![]() | |
std::mutex | mutex_ |
Mutex used to ensure that multiple transition commands do not run at the same time. | |
CommandableFragmentGenerator derived class for testing.
Definition at line 15 of file CommandableFragmentGenerator_t.cc.
|
override |
Get the Fragment IDs generated by the CommandableFragmentGenerator.
Definition at line 79 of file CommandableFragmentGenerator_t.cc.
|
override |
Generate data and return it to CommandableFragmentGenerator.
frags | FragmentPtrs list that new Fragments should be added to |
CommandableFragmentGeneratorTest merely default-constructs Fragments, emplacing them on the frags list.
Definition at line 71 of file CommandableFragmentGenerator_t.cc.