pub struct MasterTriggerEvent {
pub event_status: EventStatus,
pub event_id: u32,
pub timestamp: u32,
pub tiu_timestamp: u32,
pub tiu_gps32: u32,
pub tiu_gps16: u16,
pub crc: u32,
pub trigger_source: u16,
pub dsi_j_mask: u32,
pub channel_mask: Vec<u16>,
pub mtb_link_mask: u64,
}
Expand description
An event as observed by the MTB
This is condensed to the most crucial information
FIXME : implementation of absolute time
Fields§
§event_status: EventStatus
§event_id: u32
§timestamp: u32
Internal timestamp at the time of trigger (1 unit = 10 ns) Free running counter, rolling over every ~42 seconds
tiu_timestamp: u32
Timestamp at the edge of the TIU GPS (1 unit = 10 ns)
tiu_gps32: u32
Second received from the TIU (format?)
tiu_gps16: u16
§crc: u32
§trigger_source: u16
Trigger source:
dsi_j_mask: u32
§channel_mask: Vec<u16>
§mtb_link_mask: u64
Implementations§
Source§impl MasterTriggerEvent
impl MasterTriggerEvent
pub fn new() -> Self
Sourcepub fn get_rb_link_ids(&self) -> Vec<u8>
pub fn get_rb_link_ids(&self) -> Vec<u8>
Get the RB link IDs according to the mask
Sourcepub fn get_trigger_hits(&self) -> Vec<(u8, u8, (u8, u8), LTBThreshold)>
pub fn get_trigger_hits(&self) -> Vec<(u8, 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,CH), threshold)
Sourcepub fn get_timestamp_gps48(&self) -> u64
👎Deprecated since 0.10.3: The timestamp of the gs is simply only 32 bits
pub fn get_timestamp_gps48(&self) -> u64
combine the tiu gps 16 and 32bit timestamps into a 48bit timestamp
pub fn get_timestamp_gps(&self) -> u32
Sourcepub fn get_timestamp_abs48(&self) -> u64
pub fn get_timestamp_abs48(&self) -> u64
Get absolute timestamp as sent by the GPS
Sourcepub fn get_trigger_sources(&self) -> Vec<TriggerType>
pub fn get_trigger_sources(&self) -> Vec<TriggerType>
Get the trigger sources from trigger source byte In case of the custom (configurable triggers, this
will only return “ConfigurableTrigger” since the MTB does not know about these triggers as individual types
Sourcepub fn get_global_trigger_soures(&self) -> Vec<TriggerType>
pub fn get_global_trigger_soures(&self) -> Vec<TriggerType>
Returns the trigger types which have to be defined as “global”
Global triggers will force a readout of all panels and can be operated in conjuction with the set trigger
pub fn is_trace_suppressed(&self) -> bool
Trait Implementations§
Source§impl Clone for MasterTriggerEvent
impl Clone for MasterTriggerEvent
Source§fn clone(&self) -> MasterTriggerEvent
fn clone(&self) -> MasterTriggerEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MasterTriggerEvent
impl Debug for MasterTriggerEvent
Source§impl Default for MasterTriggerEvent
impl Default for MasterTriggerEvent
Source§impl Display for MasterTriggerEvent
impl Display for MasterTriggerEvent
Source§impl From<&MasterTriggerEvent> for TofEventHeader
impl From<&MasterTriggerEvent> for TofEventHeader
Source§fn from(mte: &MasterTriggerEvent) -> Self
fn from(mte: &MasterTriggerEvent) -> Self
Source§impl From<&MasterTriggerEvent> for TofPacket
impl From<&MasterTriggerEvent> for TofPacket
Source§fn from(mt: &MasterTriggerEvent) -> TofPacket
fn from(mt: &MasterTriggerEvent) -> TofPacket
Source§impl From<&TofEventSummary> for MasterTriggerEvent
impl From<&TofEventSummary> for MasterTriggerEvent
Source§fn from(tes: &TofEventSummary) -> Self
fn from(tes: &TofEventSummary) -> Self
Source§impl From<MasterTriggerEvent> for TofEvent
impl From<MasterTriggerEvent> for TofEvent
Source§fn from(mte: MasterTriggerEvent) -> Self
fn from(mte: MasterTriggerEvent) -> Self
Source§impl FromRandom for MasterTriggerEvent
impl FromRandom for MasterTriggerEvent
fn from_random() -> Self
Source§impl Packable for MasterTriggerEvent
impl Packable for MasterTriggerEvent
const PACKET_TYPE: PacketType = PacketType::MasterTrigger
Source§fn pack(&self) -> TofPacketwhere
Self: Serialization,
fn pack(&self) -> TofPacketwhere
Self: Serialization,
Source§impl PartialEq for MasterTriggerEvent
impl PartialEq for MasterTriggerEvent
Source§impl Serialization for MasterTriggerEvent
impl Serialization for MasterTriggerEvent
const TAIL: u16 = 21_845u16
const HEAD: u16 = 43_690u16
Source§fn to_bytestream(&self) -> Vec<u8>
fn to_bytestream(&self) -> Vec<u8>
Source§fn from_bytestream(
stream: &Vec<u8>,
pos: &mut usize,
) -> Result<Self, SerializationError>
fn from_bytestream( stream: &Vec<u8>, pos: &mut usize, ) -> Result<Self, SerializationError>
Source§fn verify_fixed(
stream: &Vec<u8>,
pos: &mut usize,
) -> Result<(), SerializationError>
fn verify_fixed( stream: &Vec<u8>, pos: &mut usize, ) -> Result<(), SerializationError>
Source§fn from_tofpacket(packet: &TofPacket) -> Result<Self, SerializationError>where
Self: Sized,
fn from_tofpacket(packet: &TofPacket) -> Result<Self, SerializationError>where
Self: Sized,
fn from_slice(
_slice: &[u8],
_start_pos: usize,
) -> Result<Self, SerializationError>where
Self: Sized,
impl StructuralPartialEq for MasterTriggerEvent
Auto Trait Implementations§
impl Freeze for MasterTriggerEvent
impl RefUnwindSafe for MasterTriggerEvent
impl Send for MasterTriggerEvent
impl Sync for MasterTriggerEvent
impl Unpin for MasterTriggerEvent
impl UnwindSafe for MasterTriggerEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self
to an expression for Diesel’s query builder. Read more