BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
eformat::old::RODFragment Class Reference

#include <RODFragment.h>

Public Member Functions

 RODFragment (const uint32_t *it, size_t size_word)
 
virtual ~RODFragment ()
 
virtual bool check () const
 
uint32_t marker () const
 
uint32_t fragment_size_word () const
 
uint32_t header_size_word () const
 
uint32_t trailer_size_word () const
 
uint32_t version () const
 
uint32_t source_id () const
 
uint32_t run_no () const
 
uint32_t lvl1_id () const
 
uint32_t bc_id () const
 
uint32_t lvl1_trigger_type () const
 
uint32_t detev_type () const
 
uint32_t nstatus () const
 
const uint32_t * status (void) const
 
uint32_t ndata () const
 
const uint32_t * data (void) const
 
uint32_t status_position () const
 
 RODFragment (const uint32_t *it, size_t size_word)
 
virtual ~RODFragment ()
 
virtual bool check () const
 
uint32_t marker () const
 
uint32_t fragment_size_word () const
 
uint32_t header_size_word () const
 
uint32_t trailer_size_word () const
 
uint32_t version () const
 
uint32_t source_id () const
 
uint32_t run_no () const
 
uint32_t lvl1_id () const
 
uint32_t bc_id () const
 
uint32_t lvl1_trigger_type () const
 
uint32_t detev_type () const
 
uint32_t nstatus () const
 
const uint32_t * status (void) const
 
uint32_t ndata () const
 
const uint32_t * data (void) const
 
uint32_t status_position () const
 

Detailed Description

Implements the access methods and checking for the ROD header object, present in the event format stream. Manipulating ROD's is a bit different than the other fragments, as one can't know its ending position. There are two ways to solve that: the first being to give a pointer and a size, but the second, a bit more elegant, to indicate the end of the ROD instead of its begin.

Definition at line 32 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

Constructor & Destructor Documentation

◆ RODFragment() [1/2]

eformat::old::RODFragment::RODFragment ( const uint32_t *  it,
size_t  size_word 
)

To build a header given the containing buffer. I need to know where the header starts in order to do that.

Parameters
itThe position pointing the first word of this fragment
size_wordThe size of this fragment, in words

Definition at line 22 of file RODFragment24.cxx.

23 : m_start(it),
24 m_size(size_word)
25{
26 uint32_t m = marker();
28}
#define EFORMAT_WRONG_MARKER(current, expected)

◆ ~RODFragment() [1/2]

virtual eformat::old::RODFragment::~RODFragment ( )
inlinevirtual

Destructor virtualisation

Definition at line 48 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

48{}

◆ RODFragment() [2/2]

eformat::old::RODFragment::RODFragment ( const uint32_t *  it,
size_t  size_word 
)

To build a header given the containing buffer. I need to know where the header starts in order to do that.

Parameters
itThe position pointing the first word of this fragment
size_wordThe size of this fragment, in words

◆ ~RODFragment() [2/2]

virtual eformat::old::RODFragment::~RODFragment ( )
inlinevirtual

Destructor virtualisation

Definition at line 48 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

48{}

Member Function Documentation

◆ bc_id() [1/2]

uint32_t eformat::old::RODFragment::bc_id ( ) const
inline

Returns the bunch crossing identifier

Definition at line 99 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

99{ return m_start[6]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ bc_id() [2/2]

uint32_t eformat::old::RODFragment::bc_id ( ) const
inline

Returns the bunch crossing identifier

Definition at line 99 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

99{ return m_start[6]; }

◆ check() [1/2]

bool eformat::old::RODFragment::check ( ) const
virtual

Says if the the header is valid. This may throw exceptions.

Definition at line 47 of file RODFragment24.cxx.

◆ check() [2/2]

virtual bool eformat::old::RODFragment::check ( ) const
virtual

Says if the the header is valid. This may throw exceptions.

◆ data() [1/2]

const uint32_t * eformat::old::RODFragment::data ( void  ) const

Returns a pointer to the first data word

Definition at line 41 of file RODFragment24.cxx.

42{
43 if (status_position() == eformat::STATUS_BACK) return &m_start[9];
44 return &m_start[9 + nstatus()];
45}
const uint32_t STATUS_BACK
status goes after data block

Referenced by eformat::old::convert(), and convert_ros().

◆ data() [2/2]

const uint32_t * eformat::old::RODFragment::data ( void  ) const

Returns a pointer to the first data word

◆ detev_type() [1/2]

uint32_t eformat::old::RODFragment::detev_type ( ) const
inline

Returns the detector event type

Definition at line 109 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

109{ return m_start[8]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ detev_type() [2/2]

uint32_t eformat::old::RODFragment::detev_type ( ) const
inline

Returns the detector event type

Definition at line 109 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

109{ return m_start[8]; }

◆ fragment_size_word() [1/2]

uint32_t eformat::old::RODFragment::fragment_size_word ( ) const

Returns the total fragment size

Definition at line 30 of file RODFragment24.cxx.

◆ fragment_size_word() [2/2]

uint32_t eformat::old::RODFragment::fragment_size_word ( ) const

Returns the total fragment size

◆ header_size_word() [1/2]

uint32_t eformat::old::RODFragment::header_size_word ( ) const
inline

Returns the size, in words, of the current header. That does not include the trailer.

Definition at line 69 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

69{ return m_start[1]; }

◆ header_size_word() [2/2]

uint32_t eformat::old::RODFragment::header_size_word ( ) const
inline

Returns the size, in words, of the current header. That does not include the trailer.

Definition at line 69 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

69{ return m_start[1]; }

◆ lvl1_id() [1/2]

uint32_t eformat::old::RODFragment::lvl1_id ( ) const
inline

Returns the lvl1 identifier

Definition at line 94 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

94{ return m_start[5]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ lvl1_id() [2/2]

uint32_t eformat::old::RODFragment::lvl1_id ( ) const
inline

Returns the lvl1 identifier

Definition at line 94 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

94{ return m_start[5]; }

◆ lvl1_trigger_type() [1/2]

uint32_t eformat::old::RODFragment::lvl1_trigger_type ( ) const
inline

Returns the lvl1 trigger type

Definition at line 104 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

104{ return m_start[7]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ lvl1_trigger_type() [2/2]

uint32_t eformat::old::RODFragment::lvl1_trigger_type ( ) const
inline

Returns the lvl1 trigger type

Definition at line 104 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

104{ return m_start[7]; }

◆ marker() [1/2]

uint32_t eformat::old::RODFragment::marker ( ) const
inline

Returns the fragment type.

Definition at line 58 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

58{ return m_start[0]; }

Referenced by RODFragment().

◆ marker() [2/2]

uint32_t eformat::old::RODFragment::marker ( ) const
inline

Returns the fragment type.

Definition at line 58 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

58{ return m_start[0]; }

◆ ndata() [1/2]

uint32_t eformat::old::RODFragment::ndata ( ) const
inline

Returns the number of data words available

Definition at line 125 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

125{ return m_start[m_size-2]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ ndata() [2/2]

uint32_t eformat::old::RODFragment::ndata ( ) const
inline

Returns the number of data words available

Definition at line 125 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

125{ return m_start[m_size-2]; }

◆ nstatus() [1/2]

uint32_t eformat::old::RODFragment::nstatus ( ) const
inline

Returns the number of status words available

Definition at line 114 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

114{ return m_start[m_size-3]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ nstatus() [2/2]

uint32_t eformat::old::RODFragment::nstatus ( ) const
inline

Returns the number of status words available

Definition at line 114 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

114{ return m_start[m_size-3]; }

◆ run_no() [1/2]

uint32_t eformat::old::RODFragment::run_no ( ) const
inline

Returns the current run number.

Definition at line 89 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

89{ return m_start[4]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ run_no() [2/2]

uint32_t eformat::old::RODFragment::run_no ( ) const
inline

Returns the current run number.

Definition at line 89 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

89{ return m_start[4]; }

◆ source_id() [1/2]

uint32_t eformat::old::RODFragment::source_id ( ) const
inline

Returns the full source identifier.

Definition at line 84 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

84{ return m_start[3]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ source_id() [2/2]

uint32_t eformat::old::RODFragment::source_id ( ) const
inline

Returns the full source identifier.

Definition at line 84 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

84{ return m_start[3]; }

◆ status() [1/2]

const uint32_t * eformat::old::RODFragment::status ( void  ) const

Returns the status words, as an iterator to the status words available.

Definition at line 35 of file RODFragment24.cxx.

36{
37 if (status_position() == eformat::STATUS_FRONT) return &m_start[9];
38 return &m_start[9 + ndata()];
39}
const uint32_t STATUS_FRONT
status goes in front of data block

Referenced by eformat::old::convert(), and convert_ros().

◆ status() [2/2]

const uint32_t * eformat::old::RODFragment::status ( void  ) const

Returns the status words, as an iterator to the status words available.

◆ status_position() [1/2]

uint32_t eformat::old::RODFragment::status_position ( ) const
inline

Returns the status block position. A value of zero indicates that the status block preceeds the data block. A value of one means the contrary.

Definition at line 137 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

137{ return m_start[m_size-1]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ status_position() [2/2]

uint32_t eformat::old::RODFragment::status_position ( ) const
inline

Returns the status block position. A value of zero indicates that the status block preceeds the data block. A value of one means the contrary.

Definition at line 137 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

137{ return m_start[m_size-1]; }

◆ trailer_size_word() [1/2]

uint32_t eformat::old::RODFragment::trailer_size_word ( ) const
inline

Returns the size, in words, of the trailer

Definition at line 74 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

74{ return 3; }

◆ trailer_size_word() [2/2]

uint32_t eformat::old::RODFragment::trailer_size_word ( ) const
inline

Returns the size, in words, of the trailer

Definition at line 74 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

74{ return 3; }

◆ version() [1/2]

uint32_t eformat::old::RODFragment::version ( ) const
inline

Returns the formatting version.

Definition at line 79 of file Event/eformat/eformat-00-00-04/eformat/old/RODFragment.h.

79{ return m_start[2]; }

Referenced by eformat::old::convert(), and convert_ros().

◆ version() [2/2]

uint32_t eformat::old::RODFragment::version ( ) const
inline

Returns the formatting version.

Definition at line 79 of file InstallArea/include/eformat/eformat/old/RODFragment.h.

79{ return m_start[2]; }

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