BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
eformat::ROSFragment< TPointer > Class Template Reference

#include <ROSFragment.h>

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

Public Member Functions

 ROSFragment (const TPointer &it)
 
 ROSFragment ()
 
 ROSFragment (const ROSFragment &other)
 
virtual ~ROSFragment ()
 
ROSFragmentoperator= (const ROSFragment &other)
 
ROSFragmentassign (const TPointer &it)
 
virtual bool check () const
 
bool check_tree () const
 
uint32_t run_no () const
 
uint32_t lvl1_id () const
 
uint32_t bc_id () const
 
 ROSFragment (const TPointer &it)
 
 ROSFragment ()
 
 ROSFragment (const ROSFragment &other)
 
virtual ~ROSFragment ()
 
ROSFragmentoperator= (const ROSFragment &other)
 
ROSFragmentassign (const TPointer &it)
 
virtual bool check () const
 
bool check_tree () const
 
uint32_t run_no () const
 
uint32_t lvl1_id () const
 
uint32_t bc_id () 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::ROSFragment< TPointer >

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

Definition at line 28 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

Constructor & Destructor Documentation

◆ ROSFragment() [1/6]

template<class TPointer >
eformat::ROSFragment< TPointer >::ROSFragment ( 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 114 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

◆ ROSFragment() [2/6]

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

Builds an empty, otherwise useless ROSFragment

Definition at line 43 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

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

◆ ROSFragment() [3/6]

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

Copy constructor

Parameters
otherThe fragment to be copied

Definition at line 50 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

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

◆ ~ROSFragment() [1/2]

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

Destructor virtualisation

Definition at line 56 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

56{}

◆ ROSFragment() [4/6]

template<class TPointer >
eformat::ROSFragment< TPointer >::ROSFragment ( 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.

◆ ROSFragment() [5/6]

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

Builds an empty, otherwise useless ROSFragment

Definition at line 43 of file InstallArea/include/eformat/eformat/ROSFragment.h.

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

◆ ROSFragment() [6/6]

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

Copy constructor

Parameters
otherThe fragment to be copied

Definition at line 50 of file InstallArea/include/eformat/eformat/ROSFragment.h.

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

◆ ~ROSFragment() [2/2]

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

Destructor virtualisation

Definition at line 56 of file InstallArea/include/eformat/eformat/ROSFragment.h.

56{}

Member Function Documentation

◆ assign() [1/2]

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

Manual re-assignment

Parameters
itThe position pointing the first word of this fragment

Definition at line 122 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

123{
124 ERS_DEBUG_3("Re-building ROSFragment from pointer");
126 specific_header(m_start);
127 ERS_DEBUG_1("Initialized header with source identifier = %s",
129 return *this;
130}
Header & assign(const TPointer &it, uint32_t match)
char * c_str(Index i)
Definition: EvtCyclic3.cc:252

◆ assign() [2/2]

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

Manual re-assignment

Parameters
itThe position pointing the first word of this fragment

◆ bc_id() [1/2]

template<class TPointer >
uint32_t eformat::ROSFragment< TPointer >::bc_id ( ) const
inline

Returns the bunch crossing identifier

Definition at line 96 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

96{ return m_start[2]; }

◆ bc_id() [2/2]

template<class TPointer >
uint32_t eformat::ROSFragment< TPointer >::bc_id ( ) const
inline

Returns the bunch crossing identifier

Definition at line 96 of file InstallArea/include/eformat/eformat/ROSFragment.h.

96{ return m_start[2]; }

◆ check() [1/2]

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

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

Reimplemented from eformat::Header< TPointer >.

Definition at line 133 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

134{
135 ERS_DEBUG_2("Checking for consistency of ROSFragment");
136 eformat::Header<TPointer>::check(); //< first do a generic check
137 if (eformat::Header<TPointer>::nspecific() != NSPECIFIC)
138 throw EFORMAT_SIZE_CHECK(NSPECIFIC, this->nspecific());
139 return true;
140}
#define EFORMAT_SIZE_CHECK(actual, informed)

◆ check() [2/2]

template<class TPointer >
virtual bool eformat::ROSFragment< 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::ROSFragment< TPointer >::check_tree

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

Definition at line 143 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

144{
145 ERS_DEBUG_2("Checking recursively for consistency of ROSFragment");
146 check(); // check myself
147 uint32_t total = this->nchildren();
148 for (size_t i=0; i<total; ++i) {
149 TPointer fp;
150 child(fp, i);
152 f.check_tree();
153 }
154 return true;
155}
virtual void child(TPointer &p, size_t n) const
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")

Referenced by main().

◆ check_tree() [2/2]

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

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

◆ lvl1_id() [1/2]

template<class TPointer >
uint32_t eformat::ROSFragment< TPointer >::lvl1_id ( ) const
inline

Returns the lvl1 identifier

Definition at line 91 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

91{ return m_start[1]; }

Referenced by main().

◆ lvl1_id() [2/2]

template<class TPointer >
uint32_t eformat::ROSFragment< TPointer >::lvl1_id ( ) const
inline

Returns the lvl1 identifier

Definition at line 91 of file InstallArea/include/eformat/eformat/ROSFragment.h.

91{ return m_start[1]; }

◆ operator=() [1/2]

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

Copy operator

Parameters
otherThe fragment to be copied

Definition at line 63 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

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

◆ operator=() [2/2]

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

Copy operator

Parameters
otherThe fragment to be copied

Definition at line 63 of file InstallArea/include/eformat/eformat/ROSFragment.h.

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

◆ run_no() [1/2]

template<class TPointer >
uint32_t eformat::ROSFragment< TPointer >::run_no ( ) const
inline

Returns the run number

Definition at line 86 of file Event/eformat/eformat-00-00-04/eformat/ROSFragment.h.

86{ return m_start[0]; }

◆ run_no() [2/2]

template<class TPointer >
uint32_t eformat::ROSFragment< TPointer >::run_no ( ) const
inline

Returns the run number

Definition at line 86 of file InstallArea/include/eformat/eformat/ROSFragment.h.

86{ return m_start[0]; }

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