Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

eformat::old::RODFragment Class Reference

#include <RODFragment.h>

List of all members.

Public Member Functions

uint32_t bc_id () const
uint32_t bc_id () const
virtual bool check () const
virtual bool check () const
const uint32_t * data (void) const
const uint32_t * data (void) const
uint32_t detev_type () const
uint32_t detev_type () const
uint32_t fragment_size_word () const
uint32_t fragment_size_word () const
uint32_t header_size_word () const
uint32_t header_size_word () const
uint32_t lvl1_id () const
uint32_t lvl1_id () const
uint32_t lvl1_trigger_type () const
uint32_t lvl1_trigger_type () const
uint32_t marker () const
uint32_t marker () const
uint32_t ndata () const
uint32_t ndata () const
uint32_t nstatus () const
uint32_t nstatus () const
 RODFragment (const uint32_t *it, size_t size_word)
 RODFragment (const uint32_t *it, size_t size_word)
uint32_t run_no () const
uint32_t run_no () const
uint32_t source_id () const
uint32_t source_id () const
const uint32_t * status (void) const
const uint32_t * status (void) const
uint32_t status_position () const
uint32_t status_position () const
uint32_t trailer_size_word () const
uint32_t trailer_size_word () const
uint32_t version () const
uint32_t version () const
virtual ~RODFragment ()
virtual ~RODFragment ()

Private Attributes

size_t m_size
 my total size, in number of words
const uint32_t * m_start
 my end word
const uint32_t * m_start
 my end word


Detailed Description

Implements the access methods and checking for the ROD header object, present in the event format stream. Manipulating ROD's is a bit different than the other fragments, as one can't know its ending position. There are two ways to solve that: the first being to give a pointer and a size, but the second, a bit more elegant, to indicate the end of the ROD instead of its begin.


Constructor & Destructor Documentation

eformat::old::RODFragment::RODFragment const uint32_t *  it,
size_t  size_word
 

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

Parameters:
it The position pointing the first word of this fragment
size_word The size of this fragment, in words
00023   : m_start(it),
00024     m_size(size_word)
00025 {
00026   uint32_t m = marker();
00027   if (m != eformat::ROD) throw EFORMAT_WRONG_MARKER(m, eformat::ROD);
00028 }

virtual eformat::old::RODFragment::~RODFragment  )  [inline, virtual]
 

Destructor virtualisation

00048 {}

eformat::old::RODFragment::RODFragment const uint32_t *  it,
size_t  size_word
 

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

Parameters:
it The position pointing the first word of this fragment
size_word The size of this fragment, in words

virtual eformat::old::RODFragment::~RODFragment  )  [inline, virtual]
 

Destructor virtualisation

00048 {}


Member Function Documentation

uint32_t eformat::old::RODFragment::bc_id  )  const [inline]
 

Returns the bunch crossing identifier

00099 { return m_start[6]; }

uint32_t eformat::old::RODFragment::bc_id  )  const [inline]
 

Returns the bunch crossing identifier

00099 { return m_start[6]; }

virtual bool eformat::old::RODFragment::check  )  const [virtual]
 

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

bool eformat::old::RODFragment::check  )  const [virtual]
 

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

00048 {
00049   if ( version() >> 16 != eformat::MAJOR_OLD_VERSION )
00050     throw EFORMAT_BAD_VERSION(version() >> 16, eformat::MAJOR_OLD_VERSION);
00051   if ( header_size_word() != 9 )
00052     throw EFORMAT_SIZE_CHECK(9, header_size_word());
00053   if ( m_size != 12 + nstatus() + ndata() )
00054     throw EFORMAT_SIZE_CHECK(m_size, (12 + nstatus() + ndata()));
00055   return true;
00056 }

const uint32_t* eformat::old::RODFragment::data void   )  const
 

Returns a pointer to the first data word

const uint32_t * eformat::old::RODFragment::data void   )  const
 

Returns a pointer to the first data word

00042 {
00043   if (status_position() == eformat::STATUS_BACK) return &m_start[9];
00044   return &m_start[9 + nstatus()];
00045 }

uint32_t eformat::old::RODFragment::detev_type  )  const [inline]
 

Returns the detector event type

00109 { return m_start[8]; }

uint32_t eformat::old::RODFragment::detev_type  )  const [inline]
 

Returns the detector event type

00109 { return m_start[8]; }

uint32_t eformat::old::RODFragment::fragment_size_word  )  const
 

Returns the total fragment size

uint32_t eformat::old::RODFragment::fragment_size_word  )  const
 

Returns the total fragment size

00031 {
00032   return header_size_word() + trailer_size_word() + nstatus() + ndata();
00033 }

uint32_t eformat::old::RODFragment::header_size_word  )  const [inline]
 

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

00069 { return m_start[1]; }

uint32_t eformat::old::RODFragment::header_size_word  )  const [inline]
 

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

00069 { return m_start[1]; }

uint32_t eformat::old::RODFragment::lvl1_id  )  const [inline]
 

Returns the lvl1 identifier

00094 { return m_start[5]; }

uint32_t eformat::old::RODFragment::lvl1_id  )  const [inline]
 

Returns the lvl1 identifier

00094 { return m_start[5]; }

uint32_t eformat::old::RODFragment::lvl1_trigger_type  )  const [inline]
 

Returns the lvl1 trigger type

00104 { return m_start[7]; }

uint32_t eformat::old::RODFragment::lvl1_trigger_type  )  const [inline]
 

Returns the lvl1 trigger type

00104 { return m_start[7]; }

uint32_t eformat::old::RODFragment::marker  )  const [inline]
 

Returns the fragment type.

00058 { return m_start[0]; }

uint32_t eformat::old::RODFragment::marker  )  const [inline]
 

Returns the fragment type.

00058 { return m_start[0]; }

uint32_t eformat::old::RODFragment::ndata  )  const [inline]
 

Returns the number of data words available

00125 { return m_start[m_size-2]; }

uint32_t eformat::old::RODFragment::ndata  )  const [inline]
 

Returns the number of data words available

00125 { return m_start[m_size-2]; }

uint32_t eformat::old::RODFragment::nstatus void   )  const [inline]
 

Returns the number of status words available

00114 { return m_start[m_size-3]; }

uint32_t eformat::old::RODFragment::nstatus  )  const [inline]
 

Returns the number of status words available

00114 { return m_start[m_size-3]; }

uint32_t eformat::old::RODFragment::run_no  )  const [inline]
 

Returns the current run number.

00089 { return m_start[4]; }

uint32_t eformat::old::RODFragment::run_no  )  const [inline]
 

Returns the current run number.

00089 { return m_start[4]; }

uint32_t eformat::old::RODFragment::source_id void   )  const [inline]
 

Returns the full source identifier.

00084 { return m_start[3]; }

uint32_t eformat::old::RODFragment::source_id  )  const [inline]
 

Returns the full source identifier.

00084 { return m_start[3]; }

const uint32_t* eformat::old::RODFragment::status void   )  const
 

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

const uint32_t * eformat::old::RODFragment::status void   )  const
 

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

00036 {
00037   if (status_position() == eformat::STATUS_FRONT) return &m_start[9];
00038   return &m_start[9 + ndata()];
00039 }

uint32_t eformat::old::RODFragment::status_position void   )  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.

00137 { return m_start[m_size-1]; }

uint32_t eformat::old::RODFragment::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.

00137 { return m_start[m_size-1]; }

uint32_t eformat::old::RODFragment::trailer_size_word  )  const [inline]
 

Returns the size, in words, of the trailer

00074 { return 3; }

uint32_t eformat::old::RODFragment::trailer_size_word  )  const [inline]
 

Returns the size, in words, of the trailer

00074 { return 3; }

uint32_t eformat::old::RODFragment::version  )  const [inline]
 

Returns the formatting version.

00079 { return m_start[2]; }

uint32_t eformat::old::RODFragment::version  )  const [inline]
 

Returns the formatting version.

00079 { return m_start[2]; }


Member Data Documentation

size_t eformat::old::RODFragment::m_size [private]
 

my total size, in number of words

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

my end word

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

my end word


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 19:18:54 2011 for BOSS6.5.5 by  doxygen 1.3.9.1