liftof_cc/constants.rs
1pub const NCHN : usize = 9; // even though this is well in range of u8,
2 // we need it to be u16 so it can be multiplied
3pub const NWORDS : usize = 1024;
4// the maximum number or readout boards
5pub const MAX_NBOARDS : usize = 4;
6
7pub const MAX_NUM_PEAKS : usize = 50;
8
9///! Expected maximum trigger rate
10///
11/// This impacts the cache sizes, the
12/// frequnecy we can poll the master
13/// trigger, etc.
14/// Value in Hz
15///
16pub const MAX_TRIGGER_RATE : usize = 200;
17
18///! How long to wait for paddles packets for each event
19/// in microseconds. This does highly depend on the
20/// frequency with which the readoutboards are emitting
21/// For now, lets use 30s.
22/// This will impact also the size of the caches
23/// (see below)
24pub const EVENT_TIMEOUT : u128 = 30000000;
25
26
27///! Limit the size of the internal paddle packet cache
28/// - all packets abvoe this value will be dropped
29pub const PADDLE_PACKET_CACHE_SIZE : usize = 20000;
30
31///! This should be rate dependent
32pub const EVENT_CACHE_SIZE : usize = 30000;
33
34///! Limit the size of the evids the event builder
35/// is currently waiting to get paddles for
36/// (this shoudl be rate*event_timeout
37pub const EVENT_BUILDER_EVID_CACHE_SIZE : usize = 10000;
38
39///! Average number of paddle packets per event
40pub const EXP_N_PADDLES_PER_EVENT : usize = 10;