24 namespace {
void dumpFragmentImpl(std::ostream&, artdaq::Fragment
const&); }
28 std::ostream& sbndaq::details::operator<<
30 { ::dumpFragmentImpl(out, wrap.frag);
return out; }
41 void dumpFragmentImpl(std::ostream& out, artdaq::Fragment
const& frag) {
43 out <<
"Fragment summary: " << frag;
45 artdaq::Fragment::byte_t
const* headerData = frag.headerBeginBytes();
46 std::size_t
const headerSize = frag.headerSizeBytes();
48 artdaq::Fragment::byte_t
const* payloadData = frag.dataBeginBytes();
49 std::size_t
const payloadSize = frag.dataSizeBytes();
50 artdaq::Fragment::byte_t
const* metaData
51 = frag.metadata<artdaq::Fragment::byte_t>();
52 std::size_t
const metadataSize = metaData? (payloadData - metaData): 0;
54 out <<
" - header (" << headerSize <<
" bytes):";
57 else out <<
" n/a" <<
"\n";
58 out <<
" - metadata (" << metadataSize <<
" bytes):";
61 else out <<
" n/a" <<
"\n";
62 out <<
" - data (" << payloadSize <<
" bytes):";
65 else out <<
" n/a" <<
"\n";
details::HexDumper< Atom > hexdump(Atom const *data, std::size_t size, unsigned int columns=16U)
Returns a wrapper to print the specified data in hex dump format.
Utility to dump a artDAQ fragment on screen.
details::DumpFragWrap dumpFragment(artdaq::Fragment const &frag)
Dump a artDAQ fragment into an output stream.
Functions to dump the content of binary data chunks to console.