Bit mask

From EUDET-type beam telescopes
Jump to: navigation, search

EUDAQ conf-files use bit masks for the options DutMask, OrMask and AndMask, see User manual#Configuring EUDAQ . The value indicates which channels are activated (ON) or deactivated (OFF). Channels are represented by bit digits: channel 0 bit 1 (ON = 1, OFF = 0), channel 1 by bit 2 (ON = 2, OFF = 0), channel 2 by bit 3 (ON = 4, OFF = 0), channel 3 by bit 3 (ON = 8, OFF = 0), etc. The value is generated by the sum of activated channels. The table shows the possible values for up to 4 channels:

value ch 0 ch 1 ch 2 ch 3
0 OFF OFF OFF OFF
1 ON OFF OFF OFF
2 OFF ON OFF OFF
3 ON ON OFF OFF
4 OFF OFF ON OFF
5 ON OFF ON OFF
6 OFF ON ON OFF
7 ON ON ON OFF
8 OFF OFF OFF ON
9 ON OFF OFF ON
10 OFF ON OFF ON
11 ON ON OFF ON
12 OFF OFF ON ON
13 ON OFF ON ON
14 OFF ON ON ON
15 ON ON ON ON