Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
dune::SSPFragment Class Reference

#include <SSPFragment.hh>

Inheritance diagram for dune::SSPFragment:
dune::SSPFragmentWriter

Classes

struct  Header
 
struct  Metadata
 

Public Types

typedef unsigned int adc_t
 

Public Member Functions

 SSPFragment (artdaq::Fragment const &f)
 
Header::event_size_t hdr_event_size () const
 
Header::run_number_t hdr_run_number () const
 
size_t total_adc_values () const
 
adc_t const * dataBegin () const
 
adc_t const * dataEnd () const
 

Static Public Member Functions

static constexpr size_t hdr_size_words ()
 

Protected Member Functions

Header const * header_ () const
 

Static Protected Member Functions

static constexpr size_t adcs_per_word_ ()
 

Private Attributes

artdaq::Fragment const & artdaq_Fragment_
 

Detailed Description

Definition at line 23 of file SSPFragment.hh.

Member Typedef Documentation

typedef unsigned int dune::SSPFragment::adc_t

Definition at line 28 of file SSPFragment.hh.

Constructor & Destructor Documentation

dune::SSPFragment::SSPFragment ( artdaq::Fragment const &  f)
inline

Definition at line 83 of file SSPFragment.hh.

83 : artdaq_Fragment_(f) {}
artdaq::Fragment const & artdaq_Fragment_
Definition: SSPFragment.hh:127

Member Function Documentation

static constexpr size_t dune::SSPFragment::adcs_per_word_ ( )
inlinestaticprotected

Definition at line 113 of file SSPFragment.hh.

113  {
114  return sizeof(Header::data_t) / sizeof(adc_t);
115  }
unsigned int adc_t
Definition: SSPFragment.hh:28
adc_t const* dune::SSPFragment::dataBegin ( ) const
inline

Definition at line 97 of file SSPFragment.hh.

97  {
98  return reinterpret_cast<adc_t const *>(header_() + 1);
99  }
unsigned int adc_t
Definition: SSPFragment.hh:28
Header const * header_() const
Definition: SSPFragment.hh:121
adc_t const* dune::SSPFragment::dataEnd ( ) const
inline

Definition at line 102 of file SSPFragment.hh.

102  {
103  return dataBegin() + total_adc_values();
104  }
adc_t const * dataBegin() const
Definition: SSPFragment.hh:97
size_t total_adc_values() const
Definition: SSPFragment.hh:92
Header::event_size_t dune::SSPFragment::hdr_event_size ( ) const
inline

Definition at line 87 of file SSPFragment.hh.

87 { return header_()->event_size; }
Header const * header_() const
Definition: SSPFragment.hh:121
Header::run_number_t dune::SSPFragment::hdr_run_number ( ) const
inline

Definition at line 88 of file SSPFragment.hh.

88 { return header_()->run_number; }
Header const * header_() const
Definition: SSPFragment.hh:121
static constexpr size_t dune::SSPFragment::hdr_size_words ( )
inlinestatic

Definition at line 89 of file SSPFragment.hh.

89 { return Header::size_words; }
static size_t const size_words
Definition: SSPFragment.hh:75
Header const* dune::SSPFragment::header_ ( ) const
inlineprotected

Definition at line 121 of file SSPFragment.hh.

121  {
122  return reinterpret_cast<SSPFragment::Header const *>(artdaq_Fragment_.dataBeginBytes());
123  }
artdaq::Fragment const & artdaq_Fragment_
Definition: SSPFragment.hh:127
size_t dune::SSPFragment::total_adc_values ( ) const
inline

Definition at line 92 of file SSPFragment.hh.

92  {
93  return (hdr_event_size() - hdr_size_words()) * adcs_per_word_();
94  }
static constexpr size_t hdr_size_words()
Definition: SSPFragment.hh:89
Header::event_size_t hdr_event_size() const
Definition: SSPFragment.hh:87
static constexpr size_t adcs_per_word_()
Definition: SSPFragment.hh:113

Member Data Documentation

artdaq::Fragment const& dune::SSPFragment::artdaq_Fragment_
private

Definition at line 127 of file SSPFragment.hh.


The documentation for this class was generated from the following file: