artdaq_core_demo
v1_07_01
|
An artdaq::Fragment overlay class designed to hold string data for pedagogical purposes. More...
#include <artdaq-core-demo/Overlays/AsciiFragment.hh>
Classes | |
struct | Header |
The AsciiFragment::Header contains information about the payload size and the "line number" of the data contained in the AsciiFragment. More... | |
struct | Metadata |
Metadata describing the contents of the AsciiFragment. More... | |
Public Member Functions | |
AsciiFragment (artdaq::Fragment const &f) | |
The AsciiFragment constructor. More... | |
Header::event_size_t | hdr_event_size () const |
Gets the event_size from the AsciiFragment::Header. More... | |
Header::line_number_t | hdr_line_number () const |
Gets the line_number from the AsciiFragment::Header. More... | |
size_t | total_line_characters () const |
The number of characters in the line. | |
char const * | dataBegin () const |
Start of the line, returned as a pointer to the char type. | |
char const * | dataEnd () const |
End of the line, returned as a pointer to the char type. | |
Static Public Member Functions | |
static constexpr size_t | hdr_size_words () |
Gets the size_words variable from the artdaq::Header. More... | |
Protected Member Functions | |
Header const * | header_ () const |
header_() simply takes the address of the start of this overlay's data (i.e., where the AsciiFragment::Header object begins) and casts it as a pointer to AsciiFragment::Header More... | |
Static Protected Member Functions | |
static constexpr size_t | chars_per_word_ () |
Translates between the size of the character type and the artda::Fragment::value_type. More... | |
An artdaq::Fragment overlay class designed to hold string data for pedagogical purposes.
AsciiFragment is an artdaq::Fragment overlay class designed to hold string data. It serves both as an educational tool for showing how Fragment overlays works, and as a way to showcase artdaq's data-handling ability, especially how the input data is replicated bit-for-bit in the output.
Definition at line 33 of file AsciiFragment.hh.
|
inlineexplicit |
The AsciiFragment constructor.
f | The raw artdaq::Fragment object to overlay |
The constructor simply sets its const private member "artdaq_Fragment_" to refer to the artdaq::Fragment object
Definition at line 97 of file AsciiFragment.hh.
|
inlinestaticprotected |
Translates between the size of the character type and the artda::Fragment::value_type.
Definition at line 135 of file AsciiFragment.hh.
|
inline |
Gets the event_size from the AsciiFragment::Header.
Definition at line 106 of file AsciiFragment.hh.
|
inline |
Gets the line_number from the AsciiFragment::Header.
Definition at line 111 of file AsciiFragment.hh.
|
inlinestatic |
Gets the size_words variable from the artdaq::Header.
Definition at line 116 of file AsciiFragment.hh.
|
inlineprotected |
header_() simply takes the address of the start of this overlay's data (i.e., where the AsciiFragment::Header object begins) and casts it as a pointer to AsciiFragment::Header
Definition at line 143 of file AsciiFragment.hh.