liftof_cc::threads::event_builder

Function event_builder

Source
pub fn event_builder(
    m_trig_ev: &Receiver<MasterTriggerEvent>,
    ev_from_rb: &Receiver<RBEvent>,
    data_sink: &Sender<TofPacket>,
    mtb_link_map: HashMap<u8, u8>,
    thread_control: Arc<Mutex<ThreadControl>>,
)
Expand description

Events … assemble!

The event_builder collects all available event information, beginning with the MasterTriggerEvent defining the event id. It collects the requested number of RBEvents. The final product then will be a TofEvent

The event_builder is the heart of this software and crucial to all operations.

§Arguments

  • m_trig_ev : Receive a MasterTriggerEvent over this channel. The event will be either build immediatly, or cached.
  • ev_from_rb : Receive a number of RBEvents over this channel. The events here shall be associated with the MasterTriggerEvent
  • data_sink : Send assembled events (and everything else in the form of TofPackets to the data sink/
  • mtb_link_map : Map of MTB Link ID - RB ID. Maybe in the future RBs will know their link id themselves? This is currently only needed for the build strategy “AdaptiveThorough”
  • settings : Configure the event builder