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

#include <FullEventFragment.h>

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

Public Member Functions

 FullEventFragment (const TPointer &it)
 
 FullEventFragment ()
 
 FullEventFragment (const FullEventFragment &other)
 
virtual ~FullEventFragment ()
 
FullEventFragmentoperator= (const FullEventFragment &other)
 
FullEventFragmentassign (const TPointer &it)
 
virtual bool check () const
 
bool check_tree () const
 
uint32_t time () const
 
uint32_t global_id () const
 
uint32_t run_no () const
 
uint32_t lvl1_id () const
 
uint32_t lvl1_trigger_type () const
 
uint32_t lvl2_trigger_info () const
 
uint32_t nevent_filter_info () const
 
void event_filter_info (TPointer &it) const
 
 FullEventFragment (const TPointer &it)
 
 FullEventFragment ()
 
 FullEventFragment (const FullEventFragment &other)
 
virtual ~FullEventFragment ()
 
FullEventFragmentoperator= (const FullEventFragment &other)
 
FullEventFragmentassign (const TPointer &it)
 
virtual bool check () const
 
bool check_tree () const
 
uint32_t time () const
 
uint32_t global_id () const
 
uint32_t run_no () const
 
uint32_t lvl1_id () const
 
uint32_t lvl1_trigger_type () const
 
uint32_t lvl2_trigger_info () const
 
uint32_t nevent_filter_info () const
 
void event_filter_info (TPointer &it) 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::FullEventFragment< TPointer >

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

Definition at line 29 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

Constructor & Destructor Documentation

◆ FullEventFragment() [1/6]

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

◆ FullEventFragment() [2/6]

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

Builds an empty, otherwise useless FullEventFragment

Definition at line 44 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

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

◆ FullEventFragment() [3/6]

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

Copy constructor

Parameters
otherThe fragment to be copied

Definition at line 51 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

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

◆ ~FullEventFragment() [1/2]

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

Destructor virtualisation

Definition at line 57 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

57{}

◆ FullEventFragment() [4/6]

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

◆ FullEventFragment() [5/6]

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

Builds an empty, otherwise useless FullEventFragment

Definition at line 44 of file InstallArea/include/eformat/eformat/FullEventFragment.h.

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

◆ FullEventFragment() [6/6]

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

Copy constructor

Parameters
otherThe fragment to be copied

Definition at line 51 of file InstallArea/include/eformat/eformat/FullEventFragment.h.

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

◆ ~FullEventFragment() [2/2]

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

Destructor virtualisation

Definition at line 57 of file InstallArea/include/eformat/eformat/FullEventFragment.h.

57{}

Member Function Documentation

◆ assign() [1/2]

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

Manual re-assignment

Parameters
itThe position pointing the first word of this fragment

Definition at line 157 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

158{
159 ERS_DEBUG_3("Re-building FullEventFragment from pointer");
161 specific_header(m_start);
162 ERS_DEBUG_1("Initialized header with source identifier = %s",
164 return *this;
165}
Header & assign(const TPointer &it, uint32_t match)
char * c_str(Index i)
Definition: EvtCyclic3.cc:252

◆ assign() [2/2]

template<class TPointer >
FullEventFragment & eformat::FullEventFragment< 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::FullEventFragment< TPointer >::check
virtual

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

Reimplemented from eformat::Header< TPointer >.

Definition at line 176 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

177{
178 ERS_DEBUG_2("Checking for consistency of FullEventFragment");
179 eformat::Header<TPointer>::check(); //< first do a generic check
180 if (this->nspecific() != NSPECIFIC) {
181 throw EFORMAT_SIZE_CHECK(NSPECIFIC, this->nspecific());
182 }
183 return true;
184}
#define EFORMAT_SIZE_CHECK(actual, informed)

◆ check() [2/2]

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

Says if the Fragment and all children are valid.

Definition at line 187 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

188{
189 ERS_DEBUG_2("Checking recursively for consistency of FullEventFragment");
190 check(); // check myself
191 uint32_t total = this->nchildren();
192 for (size_t i=0; i<total; ++i) {
193 TPointer fp;
194 child(fp, i);
196 f.check_tree();
197 }
198 return true;
199}
virtual void child(TPointer &p, size_t n) const
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")

Referenced by EFEventLoopMgr::executeEvent(), main(), and RawDataOutputSvc::putEvent().

◆ check_tree() [2/2]

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

Says if the Fragment and all children are valid.

◆ event_filter_info() [1/2]

template<class TPointer >
void eformat::FullEventFragment< TPointer >::event_filter_info ( TPointer &  it) const

Returns an iterator to the first of the (4) EF words

Parameters
itAn updateable iterator you should provide.

Definition at line 168 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

170{
171 it = m_start;
172 it += 6;
173}

◆ event_filter_info() [2/2]

template<class TPointer >
void eformat::FullEventFragment< TPointer >::event_filter_info ( TPointer &  it) const

Returns an iterator to the first of the (4) EF words

Parameters
itAn updateable iterator you should provide.

◆ global_id() [1/2]

template<class TPointer >
uint32_t eformat::FullEventFragment< TPointer >::global_id ( ) const
inline

Returns the global identifier

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

95 { return m_start[1]; }

Referenced by EFEventLoopMgr::executeEvent().

◆ global_id() [2/2]

template<class TPointer >
uint32_t eformat::FullEventFragment< TPointer >::global_id ( ) const
inline

Returns the global identifier

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

95 { return m_start[1]; }

◆ lvl1_id() [1/2]

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

Returns the lvl1 identifier

Definition at line 106 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

107 { return m_start[3]; }

Referenced by main().

◆ lvl1_id() [2/2]

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

Returns the lvl1 identifier

Definition at line 106 of file InstallArea/include/eformat/eformat/FullEventFragment.h.

107 { return m_start[3]; }

◆ lvl1_trigger_type() [1/2]

template<class TPointer >
uint32_t eformat::FullEventFragment< TPointer >::lvl1_trigger_type ( ) const
inline

Retursn the lvl1 trigger type

Definition at line 112 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

113 { return m_start[4]; }

◆ lvl1_trigger_type() [2/2]

template<class TPointer >
uint32_t eformat::FullEventFragment< TPointer >::lvl1_trigger_type ( ) const
inline

Retursn the lvl1 trigger type

Definition at line 112 of file InstallArea/include/eformat/eformat/FullEventFragment.h.

113 { return m_start[4]; }

◆ lvl2_trigger_info() [1/2]

template<class TPointer >
uint32_t eformat::FullEventFragment< TPointer >::lvl2_trigger_info ( ) const
inline

Returns the lvl2 trigger info

Definition at line 118 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

119 { return m_start[5]; }

◆ lvl2_trigger_info() [2/2]

template<class TPointer >
uint32_t eformat::FullEventFragment< TPointer >::lvl2_trigger_info ( ) const
inline

Returns the lvl2 trigger info

Definition at line 118 of file InstallArea/include/eformat/eformat/FullEventFragment.h.

119 { return m_start[5]; }

◆ nevent_filter_info() [1/2]

template<class TPointer >
uint32_t eformat::FullEventFragment< TPointer >::nevent_filter_info ( ) const
inline

Returns the number of Event Filter words (constant = 4)

Definition at line 124 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

124{ return 4; }

◆ nevent_filter_info() [2/2]

template<class TPointer >
uint32_t eformat::FullEventFragment< TPointer >::nevent_filter_info ( ) const
inline

Returns the number of Event Filter words (constant = 4)

Definition at line 124 of file InstallArea/include/eformat/eformat/FullEventFragment.h.

124{ return 4; }

◆ operator=() [1/2]

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

Copy operator

Parameters
otherThe fragment to be copied

Definition at line 64 of file Event/eformat/eformat-00-00-04/eformat/FullEventFragment.h.

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

◆ operator=() [2/2]

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

Copy operator

Parameters
otherThe fragment to be copied

Definition at line 64 of file InstallArea/include/eformat/eformat/FullEventFragment.h.

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

◆ run_no() [1/2]

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

Returns the run number

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

101 { return m_start[2]; }

Referenced by EFEventLoopMgr::executeEvent().

◆ run_no() [2/2]

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

Returns the run number

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

101 { return m_start[2]; }

◆ time() [1/2]

template<class TPointer >
uint32_t eformat::FullEventFragment< TPointer >::time ( ) const
inline

Returns the date, in seconds elapsed since the 1st. January,

  1. The timezone is fixed to UTC.

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

89 { return m_start[0]; }

Referenced by EFEventLoopMgr::executeEvent().

◆ time() [2/2]

template<class TPointer >
uint32_t eformat::FullEventFragment< TPointer >::time ( ) const
inline

Returns the date, in seconds elapsed since the 1st. January,

  1. The timezone is fixed to UTC.

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

89 { return m_start[0]; }

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