Module database

Source
Expand description

Database access & entities of the TOF

A local .sqlite database is shipped with this packet and allows to access all mapping relevant TOF information, e.g. paddle connection to LTBs anr RBs, paddle information, paddle cordinates, panel ids and so on.

Re-exports§

pub use crate::RbChPidMapping;

Structs§

DBLocalTriggerBoard
The DB wrapper for the LocalTriggerBoard, for easy implementation there are no joins, we do them manually in the public implementation of the LocaltriggerBoard
DBPanel
A TOF Panel is a larger unit of paddles next to each other
DBReadoutBoard
A Readoutboard with paddles connected
DSICard
A DSI card which is plugged into one of five slots on the MTB The DSI card provides the connection to RBs and LTBs and has a subdivision, which is called ‘j’
LocalTriggerBoard
MTBChannel
Paddle
A single TOF paddle with 2 ends comnected
Panel
RAT
Representation of a local trigger board.
ReadoutBoard
A Readoutboard with paddles connected
Run
A representation of a run
TrackerStrip
A single Tracker strip

Functions§

connect_to_db
Universal function to connect to the database
get_dsi_j_ch_pid_map
get_linkid_rbid_map
Create a mapping of mtb link ids to rb ids
get_rb_ch_pid_a_map
Create a map for rbid, ch -> paddle id. This is only for the A side and will not have an entry in case the given RB channel is connected to the B side of the paddle
get_rb_ch_pid_b_map
Create a map for rbid, ch -> paddle id. This is only for the B side and will not have an entry in case the given RB channel is connected to the A side of the paddle
get_rb_ch_pid_map
Create a map for rbid, ch -> paddle id. This is for both sides and will always return a paddle id independent of A or B
get_rbid_linkid_map
Create a mapping of rb id to mtb link ids
get_tofpaddles
Get all tof paddles in the database
get_trackerstrips
Get all trackerstrips from the database

Type Aliases§

DsiJChPidMapping