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

auto get_hits () const -> Vec< TofHit >
 Get all hits from all rb_events.
 
auto normalize_hit_times () -> void
 
auto to_string () const -> std::string
 string representation for printing
 
auto get_rbevent (u8 board_id) const -> const RBEvent &
 
auto get_rbids () const -> Vec< u8 >
 

Static Public Member Functions

static auto from_bytestream (const Vec< u8 > &bytestream, u64 &pos) -> r::Result< TofEvent, g::IOError >
 
static auto from_tofpacket (const TofPacket &packet) -> TofEvent
 
static auto get_n_rbmissinghits (u32 mask) -> u32
 
static auto get_n_rbevents (u32 mask) -> u32
 

Public Attributes

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

Static Public Attributes

static constexpr u16 HEAD = 0xAAAA
 
static constexpr 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 auto TofEvent::from_bytestream ( const Vec< u8 > &  bytestream,
u64 &  pos 
) -> r::Result< TofEvent, g::IOError >
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 auto TofEvent::from_tofpacket ( const TofPacket packet) -> TofEvent
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()

auto TofEvent::get_rbevent ( u8  board_id) const -> const RBEvent &

Get the rb event for a specific board id.

◆ get_rbids()

auto TofEvent::get_rbids ( ) const -> Vec< u8 >

Get the rb event for a specific board id.

◆ normalize_hit_times()

auto TofEvent::normalize_hit_times ( ) -> void

normalize all the hit times, taking the global ch9 phase into account

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: