artdaq_core_demo
v1_07_01
|
Class derived from AsciiFragment which allows writes to the data (for simulation purposes). More...
#include <artdaq-core-demo/Overlays/AsciiFragmentWriter.hh>
Public Member Functions | |
AsciiFragmentWriter (artdaq::Fragment &f) | |
The constructor will expect the artdaq::Fragment object it's been passed to contain the artdaq::Fragment header + the AsciiFragment::Metadata object, otherwise it throws. More... | |
char * | dataBegin () |
Return a non-const (for writing) pointer to the beginning of the Fragment payload. More... | |
char * | dataEnd () |
Return a non-const (for writing) pointer to the end of the Fragment payload. More... | |
Header * | header_ () |
Returns a pointer to the AsciiFragment::Header object, non-const for writing. More... | |
void | set_hdr_line_number (Header::line_number_t line_number) |
Sets the line number in the AsciiFragment::Header to the given (ASCII-encoded) value. More... | |
void | resize (size_t nChars) |
Resize the Fragment so that it can contain nChars characters. More... | |
![]() | |
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. | |
Additional Inherited Members | |
![]() | |
static constexpr size_t | hdr_size_words () |
Gets the size_words variable from the artdaq::Header. More... | |
![]() | |
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 constexpr size_t | chars_per_word_ () |
Translates between the size of the character type and the artda::Fragment::value_type. More... | |
Class derived from AsciiFragment which allows writes to the data (for simulation purposes).
Class derived from AsciiFragment which allows writes to the data (for simulation purposes). Note that for this reason it contains non-const members which hide the const members in its parent class, AsciiFragment, including its reference to the artdaq::Fragment object, artdaq_Fragment_, as well as its functions pointing to the beginning and end of the line in the fragment, dataBegin() and dataEnd()
Definition at line 22 of file AsciiFragmentWriter.hh.
|
inlineexplicit |
The constructor will expect the artdaq::Fragment object it's been passed to contain the artdaq::Fragment header + the AsciiFragment::Metadata object, otherwise it throws.
f | artdaq::Fragment object to overlay |
cet::exception | if input Fragment does not contain an AsciiFragment::Metadata object |
Definition at line 84 of file AsciiFragmentWriter.hh.
|
inline |
Return a non-const (for writing) pointer to the beginning of the Fragment payload.
Definition at line 98 of file AsciiFragmentWriter.hh.
|
inline |
Return a non-const (for writing) pointer to the end of the Fragment payload.
Definition at line 105 of file AsciiFragmentWriter.hh.
|
inline |
Returns a pointer to the AsciiFragment::Header object, non-const for writing.
Definition at line 53 of file AsciiFragmentWriter.hh.
|
inline |
Resize the Fragment so that it can contain nChars characters.
nChars | Number of characters in resized Fragment |
Definition at line 110 of file AsciiFragmentWriter.hh.
|
inline |
Sets the line number in the AsciiFragment::Header to the given (ASCII-encoded) value.
line_number | Set the line number (ASCII-encoded) to this value |
Definition at line 63 of file AsciiFragmentWriter.hh.