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

#include <events.h>

Public Member Functions

auto get_timestamp_gps48 () const -> u64
 
auto get_timestamp_gps () const -> u32
 Get the timestamp as sent by the GPS.
 
auto get_timestamp_abs48 () const -> u64
 
auto get_rb_link_ids () const -> Vec< u8 >
 
auto get_trigger_hits () const -> Vec< std::tuple< u8, u8, u8, LTBThreshold > >
 
auto get_trigger_sources () const -> Vec< TriggerType >
 Get the trigger sources from trigger source byte.
 
auto to_string () const -> std::string
 String representation of the struct.
 

Static Public Member Functions

static auto from_bytestream (const Vec< u8 > &bytestream, u64 &pos) -> MasterTriggerEvent
 

Public Attributes

EventStatus event_status = EventStatus::Unknown
 
u32 event_id = 0
 event_id as assigned by the MasterTriggerBoard
 
u32 timestamp = 0
 MTB timestamp.
 
u32 tiu_timestamp = 0
 Tracker (?) timestamp.
 
u32 tiu_gps32 = 0
 GAPS GPS clock value (slow)
 
u32 tiu_gps16 = 0
 GAPS GPS clock value (fast)
 
u32 crc = 0
 triggered paddles as seen by the MTB
 
u16 trigger_source = 0
 
u32 dsi_j_mask = 0
 
Vec< u16 > channel_mask = Vec<u16>()
 
u64 mtb_link_mask = 0
 

Static Public Attributes

static constexpr u16 HEAD = 0xAAAA
 begin struct marker
 
static constexpr u16 TAIL = 0x5555
 end struct marker
 
static constexpr usize SIZE = 0
 Variable size for MasterTriggerEvent.
 

Detailed Description

The MasterTriggerEvent represesnts the information provided by the MTB for this one specific event. Most notably, it includes a board mask, which is the DSI/J connections which triggered, and a hit mask. The hit mask gives hit channels per DSI/J, which correspond to hit channels on a LTB.

FIXME -compatibiltiy. Reading older data, we have 2 scenarios - either 113 bytes of fixed size for 20 LTBs, or 133 bytes for 25 LTBs. We can modify from_bytestream to at least not throw an error when reading older data, but this would currently be a todo of lower priority

Member Function Documentation

◆ from_bytestream()

static auto MasterTriggerEvent::from_bytestream ( const Vec< u8 > &  bytestream,
u64 &  pos 
) -> MasterTriggerEvent
static

Factory function for MasterTriggerEvent

Deserialize a MasterTriggerEvent from a vector of of bytes

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

◆ get_timestamp_abs48()

auto MasterTriggerEvent::get_timestamp_abs48 ( ) const -> u64

Get absolute timestamp which is calculated with the help of the 1pps pulse from the GPS

◆ get_timestamp_gps48()

auto MasterTriggerEvent::get_timestamp_gps48 ( ) const -> u64

The combined GPS 48bit timestamp into a 48bit timestamp

◆ get_trigger_hits()

auto MasterTriggerEvent::get_trigger_hits ( ) const -> Vec< std::tuple< u8, u8, u8, LTBThreshold > >

Get the combination of triggered DSI/J/CH on the MTB which formed the trigger. This does not include further hits which fall into the integration window. For those, se rb_link_mask

The returned values follow the TOF convention to start with 1, so that we can use them to look up LTB ids in the db.

Returns

Vec<(hit)> where hit is (DSI, J, CH)


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