1 #ifndef artdaq_demo_Overlays_AsciiFragment_hh
2 #define artdaq_demo_Overlays_AsciiFragment_hh
4 #include "artdaq-core/Data/Fragment.hh"
5 #include "cetlib_except/exception.h"
62 "AsciiFragment::Metadata size changed");
98 : artdaq_Fragment_(f) {}
124 return reinterpret_cast<char const*
>(
header_() + 1);
149 artdaq::Fragment
const& artdaq_Fragment_;
std::ostream & operator<<(std::ostream &, AsciiFragment const &)
Dumps the AsciiFragment's data (text) to given stream.
Header const * header_() const
header_() simply takes the address of the start of this overlay's data (i.e., where the AsciiFragment...
Header::event_size_t hdr_event_size() const
Gets the event_size from the AsciiFragment::Header.
static constexpr size_t hdr_size_words()
Gets the size_words variable from the artdaq::Header.
char const * dataBegin() const
Start of the line, returned as a pointer to the char type.
Header::line_number_t hdr_line_number() const
Gets the line_number from the AsciiFragment::Header.
char const * dataEnd() const
End of the line, returned as a pointer to the char type.
static constexpr size_t chars_per_word_()
Translates between the size of the character type and the artda::Fragment::value_type.
An artdaq::Fragment overlay class designed to hold string data for pedagogical purposes.
size_t total_line_characters() const
The number of characters in the line.
AsciiFragment(artdaq::Fragment const &f)
The AsciiFragment constructor.