eformat::old::FullEventFragment Class Reference

#include <FullEventFragment.h>

Inheritance diagram for eformat::old::FullEventFragment:

eformat::old::Header List of all members.

Public Member Functions

 FullEventFragment (const uint32_t *it)
virtual ~FullEventFragment ()
virtual bool check () const
bool check_tree () const
uint32_t date () const
uint32_t global_id () const
uint32_t lvl1_id () const
uint32_t lvl1_trigger_type () const
uint32_t lvl2_trigger_info () const
uint32_t nevent_filter_info () const
const uint32_t * event_filter_info (void) 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 run_no () const
uint32_t nstatus () const
const uint32_t * status () const
uint32_t noffset () const
const uint32_t * offset (void) const
uint32_t nspecific () const
const uint32_t * specific_header (void) const
const uint32_t * child (size_t n) const

Private Attributes

const uint32_t * m_start
 my start word

Detailed Description

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

Definition at line 27 of file FullEventFragment.h.


Constructor & Destructor Documentation

eformat::old::FullEventFragment::FullEventFragment ( const uint32_t *  it  ) 

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

Parameters:
it The exact position where this fragment should start.

Definition at line 18 of file FullEventFragment24.cxx.

00019   : eformat::old::Header(it, eformat::FULL_EVENT),
00020     m_start(specific_header())
00021 {
00022 }

virtual eformat::old::FullEventFragment::~FullEventFragment (  )  [inline, virtual]

Destructor virtualisation

Definition at line 42 of file FullEventFragment.h.

00042 {}


Member Function Documentation

bool eformat::old::FullEventFragment::check (  )  const [virtual]

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

Reimplemented from eformat::old::Header.

Definition at line 24 of file FullEventFragment24.cxx.

References eformat::old::Header::check(), EFORMAT_SIZE_CHECK, and eformat::old::Header::nspecific().

Referenced by check_tree().

00025 {
00026   eformat::old::Header::check(); //< first do a generic check
00027   if (nspecific() != 10) { //@warning THIS IS WRONG!!! It should be 9
00028     throw EFORMAT_SIZE_CHECK(10, nspecific());
00029   }
00030   return true;
00031 }

bool eformat::old::FullEventFragment::check_tree (  )  const

Says if the Fragment and all children are valid.

Definition at line 33 of file FullEventFragment24.cxx.

References check(), eformat::old::Header::child(), genRecEmupikp::i, and eformat::old::Header::noffset().

Referenced by eformat::old::convert().

00034 {
00035   check(); // check myself
00036   for (size_t i=0; i<noffset(); ++i) {
00037     eformat::old::SubDetectorFragment sd(child(i));
00038     sd.check_tree();
00039   }
00040   return true;
00041 }

const uint32_t * eformat::old::Header::child ( size_t  n  )  const [inherited]

Returns the nth child fragment. If the nth fragment doesn't exist, an exception is thrown.

Parameters:
n The fragment position, starting at zero, of the child fragment you would like to get.

Definition at line 39 of file Header24.cxx.

References EFORMAT_NO_SUCH_CHILD, eformat::old::Header::m_start, eformat::old::Header::noffset(), and eformat::old::Header::offset().

Referenced by eformat::old::SubDetectorFragment::check_tree(), eformat::old::ROSFragment::check_tree(), eformat::old::ROBFragment::check_tree(), check_tree(), eformat::old::convert(), and eformat::old::ROBFragment::rod().

00040 {
00041   if (n >= noffset()) throw EFORMAT_NO_SUCH_CHILD(n, noffset());
00042   return &m_start[0xffffff & offset()[n]];
00043 }

uint32_t eformat::old::FullEventFragment::date (  )  const [inline]

Returns the date, in seconds elapsed since the 1st. January, 1970. The timezone is fixed to UTC.

Definition at line 58 of file FullEventFragment.h.

References m_start.

Referenced by eformat::old::convert().

00058 { return m_start[0]; }

const uint32_t* eformat::old::FullEventFragment::event_filter_info ( void   )  const [inline]

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

Definition at line 88 of file FullEventFragment.h.

References m_start.

Referenced by eformat::old::convert().

00089       { return &m_start[5]; }

uint32_t eformat::old::Header::fragment_size_word (  )  const [inline, inherited]

Returns the size, in words, of the current fragment.

Definition at line 72 of file Header.h.

References eformat::old::Header::m_start.

Referenced by eformat::old::ROBFragment::check_tree(), and eformat::old::ROBFragment::rod().

00072 { return m_start[1]; }

uint32_t eformat::old::FullEventFragment::global_id (  )  const [inline]

Returns the global identifier

Definition at line 63 of file FullEventFragment.h.

References m_start.

Referenced by eformat::old::convert().

00063 { return m_start[1]; }

uint32_t eformat::old::Header::header_size_word (  )  const [inline, inherited]

Returns the size, in words, of the current header. That does include the specific part of the header.

Definition at line 78 of file Header.h.

References eformat::old::Header::m_start.

Referenced by eformat::old::Header::check(), eformat::old::ROBFragment::check_tree(), and eformat::old::ROBFragment::rod().

00078 { return m_start[2]; }

uint32_t eformat::old::FullEventFragment::lvl1_id (  )  const [inline]

Returns the lvl1 identifier

Definition at line 68 of file FullEventFragment.h.

References m_start.

Referenced by eformat::old::convert().

00068 { return m_start[2]; }

uint32_t eformat::old::FullEventFragment::lvl1_trigger_type (  )  const [inline]

Retursn the lvl1 trigger type

Definition at line 73 of file FullEventFragment.h.

References m_start.

Referenced by eformat::old::convert().

00073 { return m_start[3]; }

uint32_t eformat::old::FullEventFragment::lvl2_trigger_info (  )  const [inline]

Returns the lvl2 trigger info

Definition at line 78 of file FullEventFragment.h.

References m_start.

Referenced by eformat::old::convert().

00078 { return m_start[4]; }

uint32_t eformat::old::Header::marker (  )  const [inline, inherited]

Returns the fragment type.

Definition at line 67 of file Header.h.

References eformat::old::Header::m_start.

Referenced by eformat::old::Header::Header().

00067 { return m_start[0]; }

uint32_t eformat::old::FullEventFragment::nevent_filter_info (  )  const [inline]

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

Definition at line 83 of file FullEventFragment.h.

00083 { return 5; }

uint32_t eformat::old::Header::noffset (  )  const [inline, inherited]

Returns the number of offset words available. This will also determine the number of child fragments available to this super-fragment.

Definition at line 110 of file Header.h.

References eformat::old::Header::m_start, and eformat::old::Header::nstatus().

Referenced by eformat::old::Header::check(), eformat::old::SubDetectorFragment::check_tree(), eformat::old::ROSFragment::check_tree(), eformat::old::ROBFragment::check_tree(), check_tree(), eformat::old::Header::child(), eformat::old::convert(), eformat::old::Header::nspecific(), eformat::old::ROBFragment::rod(), and eformat::old::Header::specific_header().

00110 { return m_start[7 + nstatus()]; }

uint32_t eformat::old::Header::nspecific (  )  const [inline, inherited]

Returns the number of specific words available in the specific header part

Definition at line 123 of file Header.h.

References eformat::old::Header::m_start, eformat::old::Header::noffset(), and eformat::old::Header::nstatus().

Referenced by eformat::old::SubDetectorFragment::check(), eformat::old::ROSFragment::check(), eformat::old::ROBFragment::check(), eformat::old::Header::check(), and check().

00124       { return m_start[8 + nstatus() + noffset()]; }

uint32_t eformat::old::Header::nstatus (  )  const [inline, inherited]

Returns the number of status words available

Definition at line 98 of file Header.h.

References eformat::old::Header::m_start.

Referenced by eformat::old::Header::check(), eformat::old::convert(), eformat::old::Header::noffset(), eformat::old::Header::nspecific(), eformat::old::Header::offset(), and eformat::old::Header::specific_header().

00098 { return m_start[6]; }

const uint32_t* eformat::old::Header::offset ( void   )  const [inline, inherited]

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

Definition at line 116 of file Header.h.

References eformat::old::Header::m_start, and eformat::old::Header::nstatus().

Referenced by eformat::old::ROBFragment::check_tree(), eformat::old::Header::child(), and eformat::old::ROBFragment::rod().

00117       { return &m_start[8 + nstatus()]; }

uint32_t eformat::old::Header::run_no (  )  const [inline, inherited]

Returns the current run number.

Definition at line 93 of file Header.h.

References eformat::old::Header::m_start.

Referenced by eformat::old::convert().

00093 { return m_start[5]; }

uint32_t eformat::old::Header::source_id (  )  const [inline, inherited]

Returns the full source identifier.

Definition at line 88 of file Header.h.

References eformat::old::Header::m_start.

Referenced by eformat::old::convert().

00088 { return m_start[4]; }

const uint32_t* eformat::old::Header::specific_header ( void   )  const [inline, inherited]

Returns an iterator to the start of the specific header part (this includes the number of specific header fragments)

Definition at line 130 of file Header.h.

References eformat::old::Header::m_start, eformat::old::Header::noffset(), and eformat::old::Header::nstatus().

00131       { return &m_start[9 + nstatus() + noffset()]; }

const uint32_t* eformat::old::Header::status (  )  const [inline, inherited]

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

Definition at line 104 of file Header.h.

References eformat::old::Header::m_start.

Referenced by eformat::old::convert().

00104 { return &m_start[7]; }

uint32_t eformat::old::Header::version (  )  const [inline, inherited]

Returns the formatting version.

Definition at line 83 of file Header.h.

References eformat::old::Header::m_start.

Referenced by eformat::old::Header::check().

00083 { return m_start[3]; }


Member Data Documentation

const uint32_t* eformat::old::FullEventFragment::m_start [private]

my start word

Reimplemented from eformat::old::Header.

Definition at line 93 of file FullEventFragment.h.

Referenced by date(), event_filter_info(), global_id(), lvl1_id(), lvl1_trigger_type(), and lvl2_trigger_info().


Generated on Tue Nov 29 23:36:30 2016 for BOSS_7.0.2 by  doxygen 1.4.7