artdaq_core_demo
v1_07_01
|
Class derived from UDPFragment which allows writes to the data. More...
#include <artdaq-core-demo/Overlays/UDPFragmentWriter.hh>
Public Member Functions | |
UDPFragmentWriter (artdaq::Fragment &f) | |
UDPFragmentWriter constructor. More... | |
uint8_t * | dataBegin () |
Get a pointer to the start of the UDP payload. More... | |
uint8_t * | dataEnd () |
Get a pointer to the end of the UDP payload. More... | |
Header * | header_ () |
Get a pointer to the UDPFragment::Header object for writing. More... | |
void | set_hdr_type (Header::data_type_t dataType) |
Setter for the Header::type field. More... | |
void | resize (size_t nBytes) |
Resize the UDP payload to the given number of bytes. More... | |
![]() | |
UDPFragment (artdaq::Fragment const &f) | |
The UDPFragment constructor. More... | |
Header::event_size_t | hdr_event_size () const |
Get the current value of the Header::event_size field. More... | |
Header::data_type_t | hdr_data_type () const |
Get the current value of the Header::type field. More... | |
size_t | udp_data_words () const |
Get the number of words in the UDPFragment payload. More... | |
uint8_t const * | dataBegin () const |
Returns a const pointer to the start of the UDP payload. More... | |
uint8_t const * | dataEnd () const |
Returns a const pointer to the end of the UDP payload. More... | |
Additional Inherited Members | |
![]() | |
static constexpr size_t | hdr_size_words () |
Gets the size_words variable from the artdaq::Header. More... | |
![]() | |
Header const * | header_ () const |
Get a const pointer to the UDPFragment::Header. More... | |
![]() | |
static constexpr size_t | bytes_per_word_ () |
Translates between data words (type Header::data_t) and bytes. More... | |
Class derived from UDPFragment which allows writes to the data.
Class derived from UDPFragment which allows writes to the data. Note that for this reason it contains non-const members which hide the const members in its parent class, UDPFragment, 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(). This is necessary as the UDP data is not coming from "hardware" but the UDP stack.
Definition at line 23 of file UDPFragmentWriter.hh.
|
inlineexplicit |
UDPFragmentWriter constructor.
f | The artdaq::Fragment to overlay |
cet::exception | if the Fragment does not contain UDPFragment::Metadata and nothing else |
Definition at line 86 of file UDPFragmentWriter.hh.
|
inline |
Get a pointer to the start of the UDP payload.
Definition at line 100 of file UDPFragmentWriter.hh.
|
inline |
Get a pointer to the end of the UDP payload.
Definition at line 107 of file UDPFragmentWriter.hh.
|
inline |
Get a pointer to the UDPFragment::Header object for writing.
Definition at line 49 of file UDPFragmentWriter.hh.
|
inline |
Resize the UDP payload to the given number of bytes.
nBytes | Number of bytes to request for the UDP payload |
Definition at line 112 of file UDPFragmentWriter.hh.
|
inline |
Setter for the Header::type field.
dataType | Value to set to Header::type |
Definition at line 59 of file UDPFragmentWriter.hh.