gaps-online-software 0.10
online software for the TOF system for the GAPS experiment
Loading...
Searching...
No Matches
TofEvent Struct Reference

#include <events.h>

Collaboration diagram for TofEvent:

Public Member Functions

std::string to_string () const
 string representation for printing
 
const RBEventget_rbevent (u8 board_id) const
 
Vec< u8 > get_rbids () const
 

Static Public Member Functions

static TofEvent from_bytestream (const Vec< u8 > &bytestream, u64 &pos)
 
static TofEvent from_tofpacket (const TofPacket &packet)
 
static u32 get_n_rbmissinghits (u32 mask)
 
static u32 get_n_rbevents (u32 mask)
 

Public Attributes

EventStatus status
 
TofEventHeader header
 
MasterTriggerEvent mt_event
 
Vec< RBEventrb_events
 
Vec< RBMissingHitmissing_hits
 

Static Public Attributes

static const u16 HEAD = 0xAAAA
 
static const u16 TAIL = 0x5555
 

Detailed Description

A container accounting for a "complete" event of the Tof including:

  • A MasterTriggerEvent
  • Possible monitoring data for readoutboards
  • A number of Readoutboardevents (each with header and the number of active channels)
  • A number of MissingHits. These are such where the MTB claims we should see data in one of the RBs, but we do not have any.

Member Function Documentation

◆ from_bytestream()

static TofEvent TofEvent::from_bytestream ( const Vec< u8 > &  bytestream,
u64 &  pos 
)
static

Factory function for TofEvents.

Deserialize a TofEvetn from a vector of of bytes

Parameters
bytestreamByte representation of a TofEvent, or including such a representation at pos
pos: Expected position of TofEvent::HEAD in the stream

◆ from_tofpacket()

static TofEvent TofEvent::from_tofpacket ( const TofPacket packet)
static

Factory function for TofEvents.

Unpack the TofPacket, return an empty event in case the packet is not of PacketType::TofPacket

Parameters
packetTofPacket with PacketType::TofPacket

◆ get_rbevent()

const RBEvent & TofEvent::get_rbevent ( u8  board_id) const

Get the rb event for a specific board id.

◆ get_rbids()

Vec< u8 > TofEvent::get_rbids ( ) const

Get the rb event for a specific board id.

Member Data Documentation

◆ missing_hits

Vec<RBMissingHit> TofEvent::missing_hits

A container holding information about missing rbevents. That is events where we know the board triggered, but we did not get an associated RBEvent within a timeout

◆ rb_events

Vec<RBEvent> TofEvent::rb_events

A container holding the individual events from all RBs with triggers in this event


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