artdaq_core_demo  v1_07_01
AsciiFragment.cc
1 #include "artdaq-core-demo/Overlays/AsciiFragment.hh"
2 
3 #if 0
4 namespace {
5  unsigned int pop_count (unsigned int n) {
6  unsigned int c;
7  for (c = 0; n; c++) n &= n - 1;
8  return c;
9  }
10 }
11 #endif
12 
13 std::ostream& demo::operator<<(std::ostream& os, AsciiFragment const& f)
14 {
15  os << "AsciiFragment event size: " << f.hdr_event_size() << ", line number: " << f.hdr_line_number() << "\n";
16 
17  return os;
18 }
std::ostream & operator<<(std::ostream &, AsciiFragment const &)
Dumps the AsciiFragment&#39;s data (text) to given stream.
Header::event_size_t hdr_event_size() const
Gets the event_size from the AsciiFragment::Header.
Header::line_number_t hdr_line_number() const
Gets the line_number from the AsciiFragment::Header.
An artdaq::Fragment overlay class designed to hold string data for pedagogical purposes.