BOSS 7.0.9
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
 
- 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
 

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 FullEventFragment.h.

Constructor & Destructor Documentation

◆ FullEventFragment() [1/3]

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 FullEventFragment.h.

151 m_start()
152{
153 specific_header(m_start);
154}
void specific_header(TPointer &it) const
Definition: Header.h:172
@ FULL_EVENT
Definition: HeaderMarker.h:30

◆ FullEventFragment() [2/3]

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

Builds an empty, otherwise useless FullEventFragment

Definition at line 44 of file FullEventFragment.h.

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

◆ FullEventFragment() [3/3]

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 FullEventFragment.h.

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

◆ ~FullEventFragment()

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

Destructor virtualisation

Definition at line 57 of file FullEventFragment.h.

57{}

Member Function Documentation

◆ assign()

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 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}
#define ERS_DEBUG_1(...)
#define ERS_DEBUG_3(...)
uint32_t source_id() const
Definition: Header.h:116
Header & assign(const TPointer &it, uint32_t match)
Definition: Header.h:236

◆ check()

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 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)
#define ERS_DEBUG_2(...)
uint32_t nspecific() const
Definition: Header.h:164
virtual bool check() const
Definition: Header.h:249

◆ check_tree()

template<class TPointer >
bool eformat::FullEventFragment< TPointer >::check_tree

Says if the Fragment and all children are valid.

Definition at line 187 of file 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}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
virtual bool check() const
virtual uint32_t nchildren() const
Definition: Header.h:263
virtual void child(TPointer &p, size_t n) const
Definition: Header.h:272

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

◆ event_filter_info()

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 FullEventFragment.h.

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

◆ global_id()

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

Returns the global identifier

Definition at line 94 of file FullEventFragment.h.

95 { return m_start[1]; }

Referenced by EFEventLoopMgr::executeEvent().

◆ lvl1_id()

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

Returns the lvl1 identifier

Definition at line 106 of file FullEventFragment.h.

107 { return m_start[3]; }

Referenced by main().

◆ lvl1_trigger_type()

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

Retursn the lvl1 trigger type

Definition at line 112 of file FullEventFragment.h.

113 { return m_start[4]; }

◆ lvl2_trigger_info()

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

Returns the lvl2 trigger info

Definition at line 118 of file FullEventFragment.h.

119 { return m_start[5]; }

◆ nevent_filter_info()

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 FullEventFragment.h.

124{ return 4; }

◆ operator=()

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 FullEventFragment.h.

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

◆ run_no()

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

Returns the run number

Definition at line 100 of file FullEventFragment.h.

101 { return m_start[2]; }

Referenced by EFEventLoopMgr::executeEvent().

◆ time()

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 FullEventFragment.h.

89 { return m_start[0]; }

Referenced by EFEventLoopMgr::executeEvent().


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