BOSS 8.0.0
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
 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/include/eformat/old/RODFragment.h.

Constructor & Destructor Documentation

◆ RODFragment() [1/3]

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 ), m_size( size_word ) {
24 uint32_t m = marker();
25 if ( m != eformat::ROD ) throw EFORMAT_WRONG_MARKER( m, eformat::ROD );
26}
#define EFORMAT_WRONG_MARKER(current, expected)

◆ ~RODFragment() [1/3]

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

Destructor virtualisation

Definition at line 47 of file Event/eformat/include/eformat/old/RODFragment.h.

47{}

◆ RODFragment() [2/3]

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/3]

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

Destructor virtualisation

Definition at line 47 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

47{}

◆ RODFragment() [3/3]

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() [3/3]

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

Destructor virtualisation

Definition at line 47 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

47{}

Member Function Documentation

◆ bc_id() [1/3]

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

Returns the bunch crossing identifier

Definition at line 98 of file Event/eformat/include/eformat/old/RODFragment.h.

98{ return m_start[6]; }

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

◆ bc_id() [2/3]

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

Returns the bunch crossing identifier

Definition at line 98 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

98{ return m_start[6]; }

◆ bc_id() [3/3]

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

Returns the bunch crossing identifier

Definition at line 98 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

98{ return m_start[6]; }

◆ check() [1/3]

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

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

Definition at line 42 of file RODFragment24.cxx.

42 {
43 if ( version() >> 16 != eformat::MAJOR_OLD_VERSION )
45 if ( header_size_word() != 9 ) throw EFORMAT_SIZE_CHECK( 9, header_size_word() );
46 if ( m_size != 12 + nstatus() + ndata() )
47 throw EFORMAT_SIZE_CHECK( m_size, ( 12 + nstatus() + ndata() ) );
48 return true;
49}
#define EFORMAT_BAD_VERSION(current, supported)
#define EFORMAT_SIZE_CHECK(actual, informed)

◆ check() [2/3]

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

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

◆ check() [3/3]

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

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

◆ data() [1/3]

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

Returns a pointer to the first data word

Definition at line 37 of file RODFragment24.cxx.

37 {
38 if ( status_position() == eformat::STATUS_BACK ) return &m_start[9];
39 return &m_start[9 + nstatus()];
40}
const uint32_t STATUS_BACK
status goes after data block

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

◆ data() [2/3]

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

Returns a pointer to the first data word

◆ data() [3/3]

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

Returns a pointer to the first data word

◆ detev_type() [1/3]

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

Returns the detector event type

Definition at line 108 of file Event/eformat/include/eformat/old/RODFragment.h.

108{ return m_start[8]; }

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

◆ detev_type() [2/3]

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

Returns the detector event type

Definition at line 108 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

108{ return m_start[8]; }

◆ detev_type() [3/3]

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

Returns the detector event type

Definition at line 108 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

108{ return m_start[8]; }

◆ fragment_size_word() [1/3]

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

Returns the total fragment size

Definition at line 28 of file RODFragment24.cxx.

◆ fragment_size_word() [2/3]

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

Returns the total fragment size

◆ fragment_size_word() [3/3]

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

Returns the total fragment size

◆ header_size_word() [1/3]

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 68 of file Event/eformat/include/eformat/old/RODFragment.h.

68{ return m_start[1]; }

Referenced by check(), and fragment_size_word().

◆ header_size_word() [2/3]

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 68 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

68{ return m_start[1]; }

◆ header_size_word() [3/3]

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 68 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

68{ return m_start[1]; }

◆ lvl1_id() [1/3]

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

Returns the lvl1 identifier

Definition at line 93 of file Event/eformat/include/eformat/old/RODFragment.h.

93{ return m_start[5]; }

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

◆ lvl1_id() [2/3]

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

Returns the lvl1 identifier

Definition at line 93 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

93{ return m_start[5]; }

◆ lvl1_id() [3/3]

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

Returns the lvl1 identifier

Definition at line 93 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

93{ return m_start[5]; }

◆ lvl1_trigger_type() [1/3]

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

Returns the lvl1 trigger type

Definition at line 103 of file Event/eformat/include/eformat/old/RODFragment.h.

103{ return m_start[7]; }

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

◆ lvl1_trigger_type() [2/3]

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

Returns the lvl1 trigger type

Definition at line 103 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

103{ return m_start[7]; }

◆ lvl1_trigger_type() [3/3]

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

Returns the lvl1 trigger type

Definition at line 103 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

103{ return m_start[7]; }

◆ marker() [1/3]

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

Returns the fragment type.

Definition at line 57 of file Event/eformat/include/eformat/old/RODFragment.h.

57{ return m_start[0]; }

Referenced by RODFragment().

◆ marker() [2/3]

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

Returns the fragment type.

Definition at line 57 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

57{ return m_start[0]; }

◆ marker() [3/3]

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

Returns the fragment type.

Definition at line 57 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

57{ return m_start[0]; }

◆ ndata() [1/3]

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

Returns the number of data words available

Definition at line 124 of file Event/eformat/include/eformat/old/RODFragment.h.

124{ return m_start[m_size - 2]; }

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

◆ ndata() [2/3]

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

Returns the number of data words available

Definition at line 124 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

124{ return m_start[m_size - 2]; }

◆ ndata() [3/3]

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

Returns the number of data words available

Definition at line 124 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

124{ return m_start[m_size - 2]; }

◆ nstatus() [1/3]

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

Returns the number of status words available

Definition at line 113 of file Event/eformat/include/eformat/old/RODFragment.h.

113{ return m_start[m_size - 3]; }

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

◆ nstatus() [2/3]

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

Returns the number of status words available

Definition at line 113 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

113{ return m_start[m_size - 3]; }

◆ nstatus() [3/3]

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

Returns the number of status words available

Definition at line 113 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

113{ return m_start[m_size - 3]; }

◆ run_no() [1/3]

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

Returns the current run number.

Definition at line 88 of file Event/eformat/include/eformat/old/RODFragment.h.

88{ return m_start[4]; }

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

◆ run_no() [2/3]

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

Returns the current run number.

Definition at line 88 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

88{ return m_start[4]; }

◆ run_no() [3/3]

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

Returns the current run number.

Definition at line 88 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

88{ return m_start[4]; }

◆ source_id() [1/3]

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

Returns the full source identifier.

Definition at line 83 of file Event/eformat/include/eformat/old/RODFragment.h.

83{ return m_start[3]; }

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

◆ source_id() [2/3]

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

Returns the full source identifier.

Definition at line 83 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

83{ return m_start[3]; }

◆ source_id() [3/3]

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

Returns the full source identifier.

Definition at line 83 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

83{ return m_start[3]; }

◆ status() [1/3]

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

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

Definition at line 32 of file RODFragment24.cxx.

32 {
33 if ( status_position() == eformat::STATUS_FRONT ) return &m_start[9];
34 return &m_start[9 + ndata()];
35}
const uint32_t STATUS_FRONT
status goes in front of data block

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

◆ status() [2/3]

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

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

◆ status() [3/3]

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

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

◆ status_position() [1/3]

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 136 of file Event/eformat/include/eformat/old/RODFragment.h.

136{ return m_start[m_size - 1]; }

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

◆ status_position() [2/3]

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 136 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

136{ return m_start[m_size - 1]; }

◆ status_position() [3/3]

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 136 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

136{ return m_start[m_size - 1]; }

◆ trailer_size_word() [1/3]

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

Returns the size, in words, of the trailer

Definition at line 73 of file Event/eformat/include/eformat/old/RODFragment.h.

73{ return 3; }

Referenced by fragment_size_word().

◆ trailer_size_word() [2/3]

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

Returns the size, in words, of the trailer

Definition at line 73 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

73{ return 3; }

◆ trailer_size_word() [3/3]

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

Returns the size, in words, of the trailer

Definition at line 73 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

73{ return 3; }

◆ version() [1/3]

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

Returns the formatting version.

Definition at line 78 of file Event/eformat/include/eformat/old/RODFragment.h.

78{ return m_start[2]; }

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

◆ version() [2/3]

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

Returns the formatting version.

Definition at line 78 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/old/RODFragment.h.

78{ return m_start[2]; }

◆ version() [3/3]

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

Returns the formatting version.

Definition at line 78 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/old/RODFragment.h.

78{ return m_start[2]; }

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