MilliSliceFragment.cc
Go to the documentation of this file.
2 
4 MilliSliceFragment(artdaq::Fragment const& frag) :
5  MilliSlice(reinterpret_cast<uint8_t*>(const_cast<artdaq::Fragment::byte_t*>(frag.dataBeginBytes()))),
6  artdaq_fragment_(frag)
7 {
8 }
9 
11 {
12  return reinterpret_cast<Header const*>(artdaq_fragment_.dataBeginBytes());
13 }
14 
16 {
17  uint8_t* ms_ptr = reinterpret_cast<uint8_t*>(const_cast<artdaq::Fragment::byte_t*>(artdaq_fragment_.dataBeginBytes()))
18  + sizeof(Header);
19  for (int idx = 0; idx < index; ++idx) {
20  MicroSlice tmp_ms(ms_ptr);
21  ms_ptr += tmp_ms.size();
22  }
23  return ms_ptr;
24 }
artdaq::Fragment const & artdaq_fragment_
Header::microslice_size_t size() const
Definition: MicroSlice.cc:7
Header const * header_() const
MilliSliceFragment(artdaq::Fragment const &frag)
uint8_t * data_(int index) const