CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
eformat::ROBFragment< TPointer > Class Template Reference

#include <ROBFragment.h>

+ Inheritance diagram for eformat::ROBFragment< TPointer >:

Public Member Functions

 ROBFragment (const TPointer &it)
 
 ROBFragment (const ROBFragment &other)
 
 ROBFragment ()
 
virtual ~ROBFragment ()
 
ROBFragmentoperator= (const ROBFragment &other)
 
ROBFragmentassign (const TPointer &it)
 
virtual bool check () const
 
bool check_tree () const
 
uint32_t rod_marker () const
 
uint32_t rod_fragment_size_word () const
 
uint32_t rod_header_size_word () const
 
uint32_t rod_trailer_size_word () const
 
uint32_t rod_version () const
 
uint32_t rod_source_id () const
 
uint32_t rod_run_no () const
 
uint32_t rod_lvl1_id () const
 
uint32_t rod_bc_id () const
 
uint32_t rod_lvl1_trigger_type () const
 
uint32_t rod_detev_type () const
 
uint32_t rod_nstatus () const
 
void rod_status (TPointer &it) const
 
uint32_t rod_ndata () const
 
void rod_data (TPointer &it) const
 
uint32_t rod_status_position () const
 
 ROBFragment (const TPointer &it)
 
 ROBFragment (const ROBFragment &other)
 
 ROBFragment ()
 
virtual ~ROBFragment ()
 
ROBFragmentoperator= (const ROBFragment &other)
 
ROBFragmentassign (const TPointer &it)
 
virtual bool check () const
 
bool check_tree () const
 
uint32_t rod_marker () const
 
uint32_t rod_fragment_size_word () const
 
uint32_t rod_header_size_word () const
 
uint32_t rod_trailer_size_word () const
 
uint32_t rod_version () const
 
uint32_t rod_source_id () const
 
uint32_t rod_run_no () const
 
uint32_t rod_lvl1_id () const
 
uint32_t rod_bc_id () const
 
uint32_t rod_lvl1_trigger_type () const
 
uint32_t rod_detev_type () const
 
uint32_t rod_nstatus () const
 
void rod_status (TPointer &it) const
 
uint32_t rod_ndata () const
 
void rod_data (TPointer &it) const
 
uint32_t rod_status_position () const
 
- Public Member Functions inherited from eformat::Header< TPointer >
 Header (const TPointer &it, uint32_t match)
 
 Header ()
 
 Header (const Header &other)
 
virtual ~Header ()
 
Headeroperator= (const Header &other)
 
Headerassign (const TPointer &it, uint32_t match)
 
virtual bool check () const
 
uint32_t marker () const
 
uint32_t fragment_size_word () const
 
uint32_t header_size_word () const
 
uint32_t version () const
 
uint32_t source_id () const
 
uint32_t nstatus () const
 
void start (TPointer &it) const
 
void payload (TPointer &it) const
 
void end (TPointer &it) const
 
uint32_t payload_size_word (void) const
 
void status (TPointer &it) const
 
uint32_t nspecific () const
 
void specific_header (TPointer &it) const
 
virtual uint32_t nchildren () const
 
virtual void child (TPointer &p, size_t n) const
 
virtual void child_check (TPointer &p, size_t n) const
 
virtual uint32_t children (TPointer *p, size_t max) const
 
 Header (const TPointer &it, uint32_t match)
 
 Header ()
 
 Header (const Header &other)
 
virtual ~Header ()
 
Headeroperator= (const Header &other)
 
Headerassign (const TPointer &it, uint32_t match)
 
virtual bool check () const
 
uint32_t marker () const
 
uint32_t fragment_size_word () const
 
uint32_t header_size_word () const
 
uint32_t version () const
 
uint32_t source_id () const
 
uint32_t nstatus () const
 
void start (TPointer &it) const
 
void payload (TPointer &it) const
 
void end (TPointer &it) const
 
uint32_t payload_size_word (void) const
 
void status (TPointer &it) const
 
uint32_t nspecific () const
 
void specific_header (TPointer &it) const
 
virtual uint32_t nchildren () const
 
virtual void child (TPointer &p, size_t n) const
 
virtual void child_check (TPointer &p, size_t n) const
 
virtual uint32_t children (TPointer *p, size_t max) const
 

Detailed Description

template<class TPointer>
class eformat::ROBFragment< TPointer >

Describes how to access the contents of a subdetector fragment, as prescribed by the event format note.

Definition at line 30 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

Constructor & Destructor Documentation

◆ ROBFragment() [1/6]

template<class TPointer >
eformat::ROBFragment< TPointer >::ROBFragment ( const TPointer &  it)

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

Parameters
itThe exact position where this fragment should start.

Definition at line 193 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

195 m_start()
196{
197 ERS_DEBUG_3("Building ROBFragment from pointer");
198 specific_header(m_start);
199 ERS_DEBUG_1("Initialized header with source identifier = %s",
201 ERS_DEBUG_3("Building underlying RODFragment");
202 if (rod_marker() != eformat::ROD)
204 ERS_DEBUG_1("Initialized ROD header with source identifier = %s",
206}
#define EFORMAT_WRONG_MARKER(current, expected)
char * c_str(Index i)
Definition: EvtCyclic3.cc:252

◆ ROBFragment() [2/6]

template<class TPointer >
eformat::ROBFragment< TPointer >::ROBFragment ( const ROBFragment< TPointer > &  other)
inline

Copy constructor

Parameters
otherThe fragment to be copied

Definition at line 47 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

48 : Header<TPointer>(other), m_start(other.m_start) {}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ROBFragment() [3/6]

template<class TPointer >
eformat::ROBFragment< TPointer >::ROBFragment ( )
inline

Builds an empty, otherwise useless ROBFragment

Definition at line 53 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

53: Header<TPointer>(), m_start() {}

◆ ~ROBFragment() [1/2]

template<class TPointer >
virtual eformat::ROBFragment< TPointer >::~ROBFragment ( )
inlinevirtual

Destructor virtualisation

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

58{}

◆ ROBFragment() [4/6]

template<class TPointer >
eformat::ROBFragment< TPointer >::ROBFragment ( const TPointer &  it)

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

Parameters
itThe exact position where this fragment should start.

◆ ROBFragment() [5/6]

template<class TPointer >
eformat::ROBFragment< TPointer >::ROBFragment ( const ROBFragment< TPointer > &  other)
inline

Copy constructor

Parameters
otherThe fragment to be copied

Definition at line 47 of file InstallArea/include/eformat/eformat/ROBFragment.h.

48 : Header<TPointer>(other), m_start(other.m_start) {}

◆ ROBFragment() [6/6]

template<class TPointer >
eformat::ROBFragment< TPointer >::ROBFragment ( )
inline

Builds an empty, otherwise useless ROBFragment

Definition at line 53 of file InstallArea/include/eformat/eformat/ROBFragment.h.

53: Header<TPointer>(), m_start() {}

◆ ~ROBFragment() [2/2]

template<class TPointer >
virtual eformat::ROBFragment< TPointer >::~ROBFragment ( )
inlinevirtual

Destructor virtualisation

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

58{}

Member Function Documentation

◆ assign() [1/2]

template<class TPointer >
eformat::ROBFragment< TPointer > & eformat::ROBFragment< TPointer >::assign ( const TPointer &  it)

Manual re-assignment

Parameters
itThe position pointing the first word of this fragment

Definition at line 209 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

210{
211 ERS_DEBUG_3("Re-building ROBFragment from pointer");
213 specific_header(m_start);
214 ERS_DEBUG_1("Initialized header with source identifier = %s",
216 ERS_DEBUG_3("Re-building underlying RODFragment");
217 if (rod_marker() != eformat::ROD)
219 ERS_DEBUG_1("Reinitialized header with source identifier = %s",
221 return *this;
222}
Header & assign(const TPointer &it, uint32_t match)

◆ assign() [2/2]

template<class TPointer >
ROBFragment & eformat::ROBFragment< TPointer >::assign ( const TPointer &  it)

Manual re-assignment

Parameters
itThe position pointing the first word of this fragment

◆ check() [1/2]

template<class TPointer >
bool eformat::ROBFragment< TPointer >::check
virtual

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

Reimplemented from eformat::Header< TPointer >.

Definition at line 225 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

226{
227 //ROB checking
228 ERS_DEBUG_2("Checking for consistency of ROBFragment [%s]",
230 eformat::Header<TPointer>::check(); //< first do a generic check
231 if (eformat::Header<TPointer>::nspecific() != NSPECIFIC)
232 throw EFORMAT_SIZE_CHECK(NSPECIFIC, this->nspecific());
233
234 //ROD checking
235 ERS_DEBUG_2("Checking for consistency of RODFragment [%s]",
238 throw EFORMAT_BAD_VERSION(rod_version() >> 16,
240 if ( rod_header_size_word() != 9 )
242 if ( rod_fragment_size_word() != 12 + rod_nstatus() + rod_ndata() )
244 (12 + rod_nstatus() + rod_ndata()));
245 return true;
246}
#define EFORMAT_BAD_VERSION(current, supported)
#define EFORMAT_SIZE_CHECK(actual, informed)

Referenced by eformat::ROBFragment< TPointer >::check_tree().

◆ check() [2/2]

template<class TPointer >
virtual bool eformat::ROBFragment< TPointer >::check ( ) const
virtual

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

Reimplemented from eformat::Header< TPointer >.

◆ check_tree() [1/2]

template<class TPointer >
bool eformat::ROBFragment< TPointer >::check_tree ( ) const
inline

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

Definition at line 83 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

83{ check(); return true; }

Referenced by eformat::ROSFragment< TPointer >::check_tree().

◆ check_tree() [2/2]

template<class TPointer >
bool eformat::ROBFragment< TPointer >::check_tree ( ) const
inline

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

Definition at line 83 of file InstallArea/include/eformat/eformat/ROBFragment.h.

83{ check(); return true; }

◆ operator=() [1/2]

template<class TPointer >
ROBFragment & eformat::ROBFragment< TPointer >::operator= ( const ROBFragment< TPointer > &  other)
inline

Assignment

Parameters
otherThe fragment to be copied

Definition at line 65 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

66 { Header<TPointer>::operator=(other); m_start=other.m_start; return *this; }
Header & operator=(const Header &other)

◆ operator=() [2/2]

template<class TPointer >
ROBFragment & eformat::ROBFragment< TPointer >::operator= ( const ROBFragment< TPointer > &  other)
inline

Assignment

Parameters
otherThe fragment to be copied

Definition at line 65 of file InstallArea/include/eformat/eformat/ROBFragment.h.

66 { Header<TPointer>::operator=(other); m_start=other.m_start; return *this; }

◆ rod_bc_id() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_bc_id ( ) const
inline

Returns the bunch crossing identifier

Definition at line 130 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

130{ return m_start[6]; }

◆ rod_bc_id() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_bc_id ( ) const
inline

Returns the bunch crossing identifier

Definition at line 130 of file InstallArea/include/eformat/eformat/ROBFragment.h.

130{ return m_start[6]; }

◆ rod_data() [1/2]

template<class TPointer >
void eformat::ROBFragment< TPointer >::rod_data ( TPointer &  it) const

Returns a pointer to the first data word

Parameters
itAn updateable iterator you should provide.

Definition at line 257 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

258{
259 it = m_start;
260 it += 9;
261 if (!rod_status_position()) it += rod_nstatus();
262}

Referenced by EFEventLoopMgr::executeEvent(), main(), RawDataInputSvc::nextEvent(), and MixerAlg::nextEvent().

◆ rod_data() [2/2]

template<class TPointer >
void eformat::ROBFragment< TPointer >::rod_data ( TPointer &  it) const

Returns a pointer to the first data word

Parameters
itAn updateable iterator you should provide.

◆ rod_detev_type() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_detev_type ( ) const
inline

Returns the detector event type

Definition at line 140 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

140{ return m_start[8]; }

Referenced by EFEventLoopMgr::executeEvent(), RawDataInputSvc::nextEvent(), and MixerAlg::nextEvent().

◆ rod_detev_type() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_detev_type ( ) const
inline

Returns the detector event type

Definition at line 140 of file InstallArea/include/eformat/eformat/ROBFragment.h.

140{ return m_start[8]; }

◆ rod_fragment_size_word() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_fragment_size_word ( ) const
inline

Returns the total fragment size

Definition at line 93 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

94 { return this->payload_size_word(); }

◆ rod_fragment_size_word() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_fragment_size_word ( ) const
inline

Returns the total fragment size

Definition at line 93 of file InstallArea/include/eformat/eformat/ROBFragment.h.

94 { return this->payload_size_word(); }

◆ rod_header_size_word() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_header_size_word ( ) const
inline

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

Definition at line 100 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

100{ return m_start[1]; }

◆ rod_header_size_word() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_header_size_word ( ) const
inline

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

Definition at line 100 of file InstallArea/include/eformat/eformat/ROBFragment.h.

100{ return m_start[1]; }

◆ rod_lvl1_id() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_lvl1_id ( ) const
inline

Returns the lvl1 identifier

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

125{ return m_start[5]; }

Referenced by main().

◆ rod_lvl1_id() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_lvl1_id ( ) const
inline

Returns the lvl1 identifier

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

125{ return m_start[5]; }

◆ rod_lvl1_trigger_type() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_lvl1_trigger_type ( ) const
inline

Returns the lvl1 trigger type

Definition at line 135 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

135{ return m_start[7]; }

◆ rod_lvl1_trigger_type() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_lvl1_trigger_type ( ) const
inline

Returns the lvl1 trigger type

Definition at line 135 of file InstallArea/include/eformat/eformat/ROBFragment.h.

135{ return m_start[7]; }

◆ rod_marker() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_marker ( ) const
inline

Returns the fragment type.

Definition at line 88 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

88{ return m_start[0]; }

Referenced by eformat::ROBFragment< TPointer >::ROBFragment().

◆ rod_marker() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_marker ( ) const
inline

Returns the fragment type.

Definition at line 88 of file InstallArea/include/eformat/eformat/ROBFragment.h.

88{ return m_start[0]; }

◆ rod_ndata() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_ndata ( ) const
inline

Returns the number of data words available

Definition at line 159 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

160 { return m_start[this->payload_size_word()-2]; }

Referenced by EFEventLoopMgr::executeEvent(), main(), RawDataInputSvc::nextEvent(), and MixerAlg::nextEvent().

◆ rod_ndata() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_ndata ( ) const
inline

Returns the number of data words available

Definition at line 159 of file InstallArea/include/eformat/eformat/ROBFragment.h.

160 { return m_start[this->payload_size_word()-2]; }

◆ rod_nstatus() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_nstatus ( ) const
inline

Returns the number of status words available

Definition at line 145 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

146 { return m_start[this->payload_size_word()-3]; }

◆ rod_nstatus() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_nstatus ( ) const
inline

Returns the number of status words available

Definition at line 145 of file InstallArea/include/eformat/eformat/ROBFragment.h.

146 { return m_start[this->payload_size_word()-3]; }

◆ rod_run_no() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_run_no ( ) const
inline

Returns the current run number.

Definition at line 120 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

120{ return m_start[4]; }

◆ rod_run_no() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_run_no ( ) const
inline

Returns the current run number.

Definition at line 120 of file InstallArea/include/eformat/eformat/ROBFragment.h.

120{ return m_start[4]; }

◆ rod_source_id() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_source_id ( ) const
inline

◆ rod_source_id() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_source_id ( ) const
inline

Returns the full source identifier.

Definition at line 115 of file InstallArea/include/eformat/eformat/ROBFragment.h.

115{ return m_start[3]; }

◆ rod_status() [1/2]

template<class TPointer >
void eformat::ROBFragment< TPointer >::rod_status ( TPointer &  it) const

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

Parameters
itAn updateable iterator you should provide.

Definition at line 249 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

250{
251 it = m_start;
252 it += 9;
253 if (rod_status_position()) it += rod_ndata();
254}

◆ rod_status() [2/2]

template<class TPointer >
void eformat::ROBFragment< TPointer >::rod_status ( TPointer &  it) const

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

Parameters
itAn updateable iterator you should provide.

◆ rod_status_position() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_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 174 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

175 { return m_start[this->payload_size_word()-1]; }

◆ rod_status_position() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_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 174 of file InstallArea/include/eformat/eformat/ROBFragment.h.

175 { return m_start[this->payload_size_word()-1]; }

◆ rod_trailer_size_word() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_trailer_size_word ( ) const
inline

Returns the size, in words, of the trailer

Definition at line 105 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

105{ return 3; }

◆ rod_trailer_size_word() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_trailer_size_word ( ) const
inline

Returns the size, in words, of the trailer

Definition at line 105 of file InstallArea/include/eformat/eformat/ROBFragment.h.

105{ return 3; }

◆ rod_version() [1/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_version ( ) const
inline

Returns the formatting version.

Definition at line 110 of file Event/eformat/eformat-00-00-04/eformat/ROBFragment.h.

110{ return m_start[2]; }

◆ rod_version() [2/2]

template<class TPointer >
uint32_t eformat::ROBFragment< TPointer >::rod_version ( ) const
inline

Returns the formatting version.

Definition at line 110 of file InstallArea/include/eformat/eformat/ROBFragment.h.

110{ return m_start[2]; }

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