![]() |
gaps-online-software 0.10
online software for the TOF system for the GAPS experiment
|
#include <events.h>
Public Member Functions | |
u64 | get_timestamp_gps48 () const |
u64 | get_timestamp_abs48 () const |
Get absolute timestamp as sent by the GPS. | |
Vec< u8 > | get_rb_link_ids () const |
Vec< std::tuple< u8, u8, u8, LTBThreshold > > | get_trigger_hits () const |
Vec< TriggerType > | get_trigger_sources () const |
Get the trigger sources from trigger source byte. | |
std::string | to_string () const |
String representation of the struct. | |
Static Public Member Functions | |
static MasterTriggerEvent | from_bytestream (const Vec< u8 > &bytestream, u64 &pos) |
Static Public Attributes | |
static const u16 | HEAD = 0xAAAA |
begin struct marker | |
static const u16 | TAIL = 0x5555 |
end struct marker | |
static const usize | SIZE = 45 |
the struct has a fixed size of SIZE | |
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
|
static |
Factory function for MasterTriggerEvent
Deserialize a MasterTriggerEvent from a vector of of bytes
bytestream | Byte representation of a MasterTriggerEvent, or including one at pos |
pos | : Expected position of MasterTriggerEvent::HEAD in the stream |
u64 MasterTriggerEvent::get_timestamp_gps48 | ( | ) | const |
The combined GPS 48bit timestamp into a 48bit timestamp
Vec< std::tuple< u8, u8, u8, LTBThreshold > > MasterTriggerEvent::get_trigger_hits | ( | ) | const |
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.
Vec<(hit)> where hit is (DSI, J, CH)