1 #ifndef artdaq_core_demo_Overlays_UDPFragment_hh
2 #define artdaq_core_demo_Overlays_UDPFragment_hh
4 #include "artdaq-core/Data/Fragment.hh"
14 std::ostream&
operator<<(std::ostream&, UDPFragment
const&);
42 "UDPFragment::Metadata size changed");
80 : artdaq_Fragment_(f) {}
110 return reinterpret_cast<uint8_t const*
>(
header_() + 1);
143 artdaq::Fragment
const& artdaq_Fragment_;
Header::event_size_t hdr_event_size() const
Get the current value of the Header::event_size field.
std::ostream & operator<<(std::ostream &, AsciiFragment const &)
Dumps the AsciiFragment's data (text) to given stream.
Header const * header_() const
Get a const pointer to the UDPFragment::Header.
A Fragment designed to contain data received from the network in UDP datagrams.
static constexpr size_t bytes_per_word_()
Translates between data words (type Header::data_t) and bytes.
size_t udp_data_words() const
Get the number of words in the UDPFragment payload.
UDPFragment(artdaq::Fragment const &f)
The UDPFragment constructor.
Header::data_type_t hdr_data_type() const
Get the current value of the Header::type field.
static constexpr size_t hdr_size_words()
Gets the size_words variable from the artdaq::Header.
uint8_t const * dataBegin() const
Returns a const pointer to the start of the UDP payload.
uint8_t const * dataEnd() const
Returns a const pointer to the end of the UDP payload.