DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Protected Member Functions | Protected Attributes
hadaq::RawEvent Struct Reference

Hadaq event structure. More...

#include <hadaq/defines.h>

Inheritance diagram for hadaq::RawEvent:
hadaq::HadTuId hadaq::HadTu

Public Member Functions

uint32_t AllSubeventsSize ()
void Dump ()
RawSubeventFirstSubevent ()
int32_t GetDate () const
int32_t GetRunNr () const
uint32_t GetSeqNr () const
int32_t GetTime () const
void Init (uint32_t evnt, uint32_t run=0, uint32_t id=EvtId_DABC)
RawSubeventNextSubevent (RawSubevent *prev=0)
 RawEvent ()
void SetDate (uint32_t d)
void SetRunNr (uint32_t n)
void SetSeqNr (uint32_t n)
void SetTime (uint32_t t)
- Public Member Functions inherited from hadaq::HadTuId
bool GetDataError () const
uint32_t GetId () const
 HadTuId ()
void SetDataError (bool on)
void SetId (uint32_t id)
- Public Member Functions inherited from hadaq::HadTu
uint32_t GetDecoding () const
uint32_t GetPaddedSize () const
uint32_t GetSize () const
 HadTu ()
bool IsSwapped () const
 msb of decode word is always non zero...? More...
void SetDecoding (uint32_t decod)
void SetDecodingDirect (uint32_t dec)
void SetSize (uint32_t bytes)
void SetValue (uint32_t *member, uint32_t val)
 swapsave method to set value stolen from hadtu.h More...
uint32_t Value (const uint32_t *member) const

Protected Member Functions

void InitHeader (uint32_t evid)
 Method to set initial header value like decoding and date/time. More...

Protected Attributes

uint32_t evtDate
uint32_t evtPad
uint32_t evtRunNr
uint32_t evtSeqNr
uint32_t evtTime
- Protected Attributes inherited from hadaq::HadTuId
uint32_t tuId
- Protected Attributes inherited from hadaq::HadTu
uint32_t tuDecoding
uint32_t tuSize

Detailed Description

Hadaq event structure.

Description of the Event Structure

An event consists of an event header and of varying number of subevents, each with a subevent header. The size of the event header is fixed to 0x20 bytes

Event header evtHeaderc evtSize evtDecoding evtId evtSeqNr evtDate evtTime runNr expId

  evtSize - total size of the event including the event header, it is measured in bytes.
  evtDecoding - event decoding type: Tells the analysis the binary format of the event data, so that it can be handed to a corresponding routine for unpacking into a software usable data structure. For easier decoding of this word, the meaning of some bits is already predefined:
  msB    ---   ---   lsB
  0   alignment   decoding type  nonzero
      o The first (most significant) byte is always zero.
      o The second byte contains the alignment of the subevents in the event. 0 = byte, 1 = 16 bit word, 2 = 32 bit word...
      o The remaining two bytes form the actual decoding type, e.g. fixed length, zero suppressed etc.
      o The last byte must not be zero, so the whole evtDecoding can be used to check for correct or swapped byte order.

It is stated again, that the whole evtDecoding is one 32bit word. The above bit assignments are merely a rule how to select this 32bit numbers.

  evtId - event identifier: Tells the analysis the semantics of the event data, e.g. if this is a run start event, data event, simulated event, slow control data, end file event, etc..
  31  30 - 16  15 - 12  11 - 8   5 - 7    4  3- 0
  error bit    reserved    version  reserved    MU decision    DS flag  ID
      o error bit - set if one of the subsystems has set the error bit
      o version - 0 meaning of event ID before SEP03; 1 event ID after SEP03
      o MU decision - 0 = negative LVL2 decision; >0 positive LVL2 decision
        MU trigger algo result
        1   negative decision
        2   positive decision
        3   positive decision due to too many leptons or dileptons
        4   reserved
        5   reserved
      o DS flag - LVL1 downscaling flag; 1 = this event is written to the tape independent on the LVL2 trigger decision
      o ID - defines the trigger code
        ID before SEP03    description
        0   simulation
        1   real
        2,3,4,5,6,7,8,9    calibration
        13  beginrun
        14  endrun

        ID after SEP03  description
        0   simulation
        1,2,3,4,5    real
        7,9    calibration
        1   real1
        2   real2
        3   real3
        4   real4
        5   real5
        6   special1
        7   offspill
        8   special3
        9   MDCcalibration
        10  special5
        13  beginrun
        14  endrun
  evtSeqNr - event number: This is the sequence number of the event in the file. The pair evtFileNr/evtSeqNr

is unique throughout all events ever acquired by the system.

  evtDate - date of event assembly (filled by the event builder, rough precision):
  evtDate   ISO-C date format
  msB    ---   ---   lsB
  0   year  month    day
  1. The first (most significant) byte is zero
  2. The second byte contains the years since 1900
  3. The third the months since January [0-11]
  4. The last the day of the month [1-31]

    evtTime - time of assembly (filled by the event builder, rough precision): evtTime ISO-C time format msB — — lsB 0 hour minute second

  1. The first (most significant) byte is zero
  2. The second byte contains the hours since midnight [0-23]
  3. The third the minutes after the hour [0-59]
  4. The last the seconds after the minute [0-60]

    runNr - file number: A unique number assigned to the file. The runNr is used as key for the RTDB. evtPad - padding: Makes the event header a multiple of 64 bits long.

Definition at line 443 of file defines.h.

Constructor & Destructor Documentation

◆ RawEvent()

hadaq::RawEvent::RawEvent ( )

Definition at line 458 of file defines.h.

Member Function Documentation

◆ InitHeader()

void hadaq::RawEvent::InitHeader ( uint32_t  evid)

Method to set initial header value like decoding and date/time.

Definition at line 34 of file defines.cxx.

◆ GetSeqNr()

uint32_t hadaq::RawEvent::GetSeqNr ( ) const

Definition at line 460 of file defines.h.

◆ SetSeqNr()

void hadaq::RawEvent::SetSeqNr ( uint32_t  n)

Definition at line 461 of file defines.h.

◆ GetRunNr()

int32_t hadaq::RawEvent::GetRunNr ( ) const

Definition at line 463 of file defines.h.

◆ SetRunNr()

void hadaq::RawEvent::SetRunNr ( uint32_t  n)

Definition at line 464 of file defines.h.

◆ GetDate()

int32_t hadaq::RawEvent::GetDate ( ) const

Definition at line 466 of file defines.h.

◆ SetDate()

void hadaq::RawEvent::SetDate ( uint32_t  d)

Definition at line 467 of file defines.h.

◆ GetTime()

int32_t hadaq::RawEvent::GetTime ( ) const

Definition at line 469 of file defines.h.

◆ SetTime()

void hadaq::RawEvent::SetTime ( uint32_t  t)

Definition at line 470 of file defines.h.

◆ Init()

void hadaq::RawEvent::Init ( uint32_t  evnt,
uint32_t  run = 0,
uint32_t  id = EvtId_DABC 

Definition at line 472 of file defines.h.

◆ Dump()

void hadaq::RawEvent::Dump ( )

Definition at line 22 of file defines.cxx.

◆ NextSubevent()

hadaq::RawSubevent * hadaq::RawEvent::NextSubevent ( RawSubevent prev = 0)

Definition at line 66 of file defines.cxx.

◆ FirstSubevent()

hadaq::RawSubevent * hadaq::RawEvent::FirstSubevent ( )

Definition at line 53 of file defines.cxx.

◆ AllSubeventsSize()

uint32_t hadaq::RawEvent::AllSubeventsSize ( )

Definition at line 60 of file defines.cxx.

Field Documentation

◆ evtSeqNr

uint32_t hadaq::RawEvent::evtSeqNr

Definition at line 446 of file defines.h.

◆ evtDate

uint32_t hadaq::RawEvent::evtDate

Definition at line 447 of file defines.h.

◆ evtTime

uint32_t hadaq::RawEvent::evtTime

Definition at line 448 of file defines.h.

◆ evtRunNr

uint32_t hadaq::RawEvent::evtRunNr

Definition at line 449 of file defines.h.

◆ evtPad

uint32_t hadaq::RawEvent::evtPad

Definition at line 450 of file defines.h.

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