tof_dataclasses/constants.rs
1//! Global constants for TOF operations
2//!
3//! ISSUES:
4//! * there might be constants defined elsewhere,
5//! also we are defining constants in .toml files
6//! now. There is an active issue #18
7//!
8
9/// The TimeStamp format for Human readable timestamps
10pub static HUMAN_TIMESTAMP_FORMAT : &str = "%y%m%d_%H%M%S%Z";
11
12/// Speed of light in the scintillator paddles
13/// (divine number from the TOF team)
14/// This value is in cm/ns
15pub const C_LIGHT_PADDLE : f32 = 15.4;
16
17/// Speed of light in the harting cables
18/// (divine number from the TOF team)
19/// This value is in cm/ns
20pub const C_LIGHT_CABLE : f32 = 24.6;
21
22/// Number of AVAILABLE slots for LocalTriggerBoards
23pub const N_LTBS : usize = 25;
24
25/// Number of AVAILABLE channels per each LocalTriggerBoard
26pub const N_CHN_PER_LTB : usize = 16;
27
28/// Number of Channels on the readoutboards
29pub const NCHN : usize = 9;
30
31/// Number of entries for each waveform (voltage and timing each)
32pub const NWORDS : usize = 1024;
33
34/// Masks for 32 bits commands (byte packets)
35///
36pub const MASK_CMD_8BIT : u32 = 0x000000FF;
37pub const MASK_CMD_16BIT : u32 = 0x0000FFFF;
38pub const MASK_CMD_24BIT : u32 = 0x00FFFFFF;
39pub const MASK_CMD_32BIT : u32 = 0xFFFFFFFF;
40/// Padding for 32 bits commands (byte packets)
41///
42pub const PAD_CMD_32BIT : u32 = 0x00000000;