NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
DDASBitMasks.h
1 
2 
3 // define bit masks to extract data from specific locations
4 // of pixie16 data
5 static const uint32_t CHANNELIDMASK = 0xF; // Bits 0-3 inclusive
6 static const uint32_t SLOTIDMASK = 0xF0; // Bits 4-7 inclusive
7 static const uint32_t CRATEIDMASK = 0xF00; // Bits 8-11 inclusive
8 static const uint32_t HEADERLENGTHMASK = 0x1F000; // Bits 12-16 inclusive
9 static const uint32_t CHANNELLENGTHMASK = 0x3FFE0000; // Bits 17-29 inclusive
10 static const uint32_t OVERFLOWMASK = 0x40000000; // Bit 30 has overflow information (1 - overflow)
11 static const uint32_t FINISHCODEMASK = 0x80000000; // Bit 31 has pileup information (1 - pileup)
12 static const uint32_t LOWER16BITMASK = 0xFFFF; // Lower 16 bits
13 static const uint32_t UPPER16BITMASK = 0xFFFF0000; // Upper 16 bits
14 static const uint32_t LOWER12BITMASK = 0xFFF; // Lower 12 bits
15 static const uint32_t BIT31MASK = 0x80000000; // Bit 31
16 static const uint32_t BIT30MASK = 0x40000000; // Bit 30
17 static const uint32_t BIT30to29MASK = 0x60000000; // Bits 30 through 29
18 static const uint32_t BIT31to29MASK = 0xE0000000; // Bits 31 through 29
19 static const uint32_t BIT30to16MASK = 0x7FFF0000; // Bits 30 through 16
20 static const uint32_t BIT29to16MASK = 0x3FFF0000; // Bits 29 through 16
21 static const uint32_t BIT28to16MASK = 0x1FFF0000; // Bits 28 through 16
22 
23 // number of words added to pixie16 channel event header when energy sums
24 // and baselines are recorded
25 static const uint32_t SIZEOFESUMS = 4;
26 // number of words added to pixie16 channel event header when QDC sums
27 // are recorded
28 static const uint32_t SIZEOFQDCSUMS = 8;
29