|
DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
C++ representation of a TriggerRecordHeader, which wraps a flat array that is the TriggerRecordHeader's "actual" form. More...
#include <TriggerRecordHeader.hpp>
Public Member Functions | |
| TriggerRecordHeader (const std::vector< ComponentRequest > &components) | |
| Construct a TriggerRecordHeader using a vector of ComponentRequest objects. | |
| TriggerRecordHeader (void *existing_trigger_record_header_buffer, bool copy_from_buffer=false) | |
| Construct a TriggerRecordHeader using an existing TriggerRecordHeader data array. | |
| TriggerRecordHeader (TriggerRecordHeader const &other) | |
| TriggerRecordHeader Copy Constructor. | |
| TriggerRecordHeader & | operator= (TriggerRecordHeader const &other) |
| TriggerRecordHeader copy assignment operator. | |
| TriggerRecordHeader (TriggerRecordHeader &&other) | |
| TriggerRecordHeader & | operator= (TriggerRecordHeader &&other) |
| ~TriggerRecordHeader () | |
| TriggerRecordHeader destructor. | |
| TriggerRecordHeaderData | get_header () const |
| Get a copy of the TriggerRecordHeaderData struct. | |
| trigger_number_t | get_trigger_number () const |
| Get the trigger number for this TriggerRecordHeader. | |
| void | set_trigger_number (trigger_number_t trigger_number) |
| Set the trigger number for this TriggerRecordHeader. | |
| timestamp_t | get_trigger_timestamp () const |
| Get the trigger_timestamp stored in this TriggerRecordHeader. | |
| void | set_trigger_timestamp (timestamp_t trigger_timestamp) |
| Set the trigger timestamp for this TriggerRecordHeader. | |
| uint64_t | get_num_requested_components () const |
| Get the number of ComponentRequest objects stored in this TriggerRecordHeader. | |
| run_number_t | get_run_number () const |
| Get the run_number stored in this TriggerRecordHeader. | |
| void | set_run_number (run_number_t run_number) |
| Set the run number for this TriggerRecordHeader. | |
| std::bitset< 32 > | get_error_bits () const |
| Get the error_bits header field as a bitset. | |
| void | set_error_bits (std::bitset< 32 > bits) |
| Overwrite error bits using the given bitset. | |
| bool | get_error_bit (TriggerRecordErrorBits bit) const |
| Get the value of the given error bit. | |
| void | set_error_bit (TriggerRecordErrorBits bit, bool value) |
| Set the given error bit to the given value. | |
| trigger_type_t | get_trigger_type () const |
| Get the trigger_type field from the data struct. | |
| void | set_trigger_type (trigger_type_t trigger_type) |
| Set the trigger_type header field to the given value. | |
| trigger_number_t | get_sequence_number () const |
| Get the sequence number for this TriggerRecordHeader. | |
| void | set_sequence_number (sequence_number_t number) |
| Set the sequence number for this TriggerRecordHeader. | |
| trigger_number_t | get_max_sequence_number () const |
| Get the maximum sequence number for this TriggerRecordHeader. | |
| void | set_max_sequence_number (sequence_number_t number) |
| Set the maxiumum sequence number for this TriggerRecordHeader. | |
| SourceID | get_element_id () const |
| Get the SourceID for this TriggerRecordHeader. | |
| void | set_element_id (SourceID source_id) |
| Set the SourceID for this TriggerRecordHeader. | |
| size_t | get_total_size_bytes () const |
| Get the total size of the TriggerRecordHeader. | |
| const void * | get_storage_location () const |
| Get the location of the flat data array for output. | |
| ComponentRequest | at (size_t idx) const |
| Access ComponentRequest and copy result. | |
| ComponentRequest & | operator[] (size_t idx) |
| Operator[] to access ComponentRequests by index. | |
| ComponentRequest const & | get_component_for_source_id (SourceID const &source_id) const |
| Access ComponentRequest by SourceID. | |
Private Member Functions | |
| TriggerRecordHeaderData * | header_ () const |
| Get the TriggerRecordHeaderData from the m_data_arr array. | |
Private Attributes | |
| void * | m_data_arr |
| Flat memory containing a TriggerRecordHeaderData header and an array of ComponentRequests. | |
| bool | m_alloc { false } |
| Whether the TriggerRecordHeader owns the memory pointed by m_data_arr. | |
C++ representation of a TriggerRecordHeader, which wraps a flat array that is the TriggerRecordHeader's "actual" form.
Definition at line 32 of file TriggerRecordHeader.hpp.
|
inlineexplicit |
Construct a TriggerRecordHeader using a vector of ComponentRequest objects.
| components | Vector of ComponentRequests to copy into TriggerRecordHeader |
Definition at line 257 of file TriggerRecordHeader.hpp.
|
inlineexplicit |
Construct a TriggerRecordHeader using an existing TriggerRecordHeader data array.
| existing_trigger_record_header_buffer | Pointer to existing TriggerRecordHeader array |
| copy_from_buffer | Whether to create a copy of the exiting buffer (true) or use that memory without taking ownership (false) |
Definition at line 278 of file TriggerRecordHeader.hpp.
|
inline |
TriggerRecordHeader Copy Constructor.
| other | TriggerRecordHeader to copy |
Definition at line 295 of file TriggerRecordHeader.hpp.
|
inline |
Definition at line 61 of file TriggerRecordHeader.hpp.
|
inline |
TriggerRecordHeader destructor.
Definition at line 78 of file TriggerRecordHeader.hpp.
|
inline |
Access ComponentRequest and copy result.
| idx | Index to access |
| std::range_error | exception if idx is outside of allowable range |
Definition at line 318 of file TriggerRecordHeader.hpp.
|
inline |
Access ComponentRequest by SourceID.
| source_id | SourceID to access |
| std::invalid_argument | exception if source_id is not in ComponentRequest list |
Definition at line 338 of file TriggerRecordHeader.hpp.
|
inline |
Get the SourceID for this TriggerRecordHeader.
Definition at line 196 of file TriggerRecordHeader.hpp.
|
inline |
Get the value of the given error bit.
| bit | Bit to get |
Definition at line 146 of file TriggerRecordHeader.hpp.
|
inline |
Get the error_bits header field as a bitset.
Definition at line 135 of file TriggerRecordHeader.hpp.
|
inline |
Get a copy of the TriggerRecordHeaderData struct.
Definition at line 88 of file TriggerRecordHeader.hpp.
|
inline |
Get the maximum sequence number for this TriggerRecordHeader.
Definition at line 185 of file TriggerRecordHeader.hpp.
|
inline |
Get the number of ComponentRequest objects stored in this TriggerRecordHeader.
Definition at line 115 of file TriggerRecordHeader.hpp.
|
inline |
Get the run_number stored in this TriggerRecordHeader.
Definition at line 124 of file TriggerRecordHeader.hpp.
|
inline |
Get the sequence number for this TriggerRecordHeader.
Definition at line 174 of file TriggerRecordHeader.hpp.
|
inline |
Get the location of the flat data array for output.
Definition at line 216 of file TriggerRecordHeader.hpp.
|
inline |
Get the total size of the TriggerRecordHeader.
Definition at line 207 of file TriggerRecordHeader.hpp.
|
inline |
Get the trigger number for this TriggerRecordHeader.
Definition at line 94 of file TriggerRecordHeader.hpp.
|
inline |
Get the trigger_timestamp stored in this TriggerRecordHeader.
Definition at line 104 of file TriggerRecordHeader.hpp.
|
inline |
Get the trigger_type field from the data struct.
Definition at line 163 of file TriggerRecordHeader.hpp.
|
inlineprivate |
Get the TriggerRecordHeaderData from the m_data_arr array.
Definition at line 247 of file TriggerRecordHeader.hpp.
|
inline |
Definition at line 67 of file TriggerRecordHeader.hpp.
|
inline |
TriggerRecordHeader copy assignment operator.
| other | TriggerRecordHeader to copy |
Definition at line 300 of file TriggerRecordHeader.hpp.
|
inline |
Operator[] to access ComponentRequests by index.
| idx | Index to access |
| std::range_error | exception if idx is outside of allowable range |
Definition at line 328 of file TriggerRecordHeader.hpp.
|
inline |
Set the SourceID for this TriggerRecordHeader.
| source_id | SourceID value to set |
Definition at line 201 of file TriggerRecordHeader.hpp.
|
inline |
Set the given error bit to the given value.
| bit | Bit to set |
| value | Value to set (true/false) |
Definition at line 152 of file TriggerRecordHeader.hpp.
|
inline |
Overwrite error bits using the given bitset.
| bits | Bitset of error bits to set |
Definition at line 140 of file TriggerRecordHeader.hpp.
|
inline |
Set the maxiumum sequence number for this TriggerRecordHeader.
| max_sequence_number | Maximum sequence number to set |
Definition at line 190 of file TriggerRecordHeader.hpp.
|
inline |
Set the run number for this TriggerRecordHeader.
| run_number | Run number to set |
Definition at line 129 of file TriggerRecordHeader.hpp.
|
inline |
Set the sequence number for this TriggerRecordHeader.
| sequence_number | Sequence number to set |
Definition at line 179 of file TriggerRecordHeader.hpp.
|
inline |
Set the trigger number for this TriggerRecordHeader.
| trigger_number | Trigger nunmber to set |
Definition at line 99 of file TriggerRecordHeader.hpp.
|
inline |
Set the trigger timestamp for this TriggerRecordHeader.
| trigger_timestamp | Trigger timestamp to set |
Definition at line 109 of file TriggerRecordHeader.hpp.
|
inline |
Set the trigger_type header field to the given value.
| trigger_type | Value of trigger_type to set |
Definition at line 168 of file TriggerRecordHeader.hpp.
|
private |
Whether the TriggerRecordHeader owns the memory pointed by m_data_arr.
Definition at line 252 of file TriggerRecordHeader.hpp.
|
private |
Flat memory containing a TriggerRecordHeaderData header and an array of ComponentRequests.
Definition at line 249 of file TriggerRecordHeader.hpp.