Go to the documentation of this file.
27 #define PFX_14_BIT_CONTENT_MASK 0xC000 // Mask to select 2 MSB's of prefix
28 #define PFX_CARD_CHIP_CHAN_HIT_IX 0xC000 // Index of Card, Chip and Channel Hit
29 #define PFX_CARD_CHIP_CHAN_HIT_CNT 0x8000 // Nb of Channel hit for given Card and Chip
30 #define PFX_CARD_CHIP_CHAN_HISTO 0x4000 // Pedestal Histogram for given Card and Chip
32 #define PUT_CARD_CHIP_CHAN_HISTO(ca, as, ch) (PFX_CARD_CHIP_CHAN_HISTO | (((ca) & 0x1F) <<9) | (((as) & 0x3) <<7) | (((ch) & 0x7F) <<0))
36 #define PFX_12_BIT_CONTENT_MASK 0xF000 // Mask to select 4 MSB's of prefix
37 #define PFX_ADC_SAMPLE 0x3000 // ADC sample
38 #define PFX_LAT_HISTO_BIN 0x2000 // latency or inter event time histogram bin
39 #define PFX_CHIP_LAST_CELL_READ 0x1000 // Chip index and last cell read
44 #define PFX_9_BIT_CONTENT_MASK 0xFE00 // Mask to select 7 MSB's of prefix
45 #define PFX_TIME_BIN_IX 0x0E00 // Time-bin Index
46 #define PFX_HISTO_BIN_IX 0x0C00 // Histogram bin Index
47 #define PFX_PEDTHR_LIST 0x0A00 // List of pedestal or thresholds
48 #define PFX_START_OF_DFRAME 0x0800 // Start of Data Frame + 5 bit source + 4 bit Version
49 #define PFX_START_OF_MFRAME 0x0600 // Start of Monitoring Frame + 4 bit Version + 5 bit source
50 #define PFX_START_OF_CFRAME 0x0400 // Start of Configuration Frame + 4 bit Version + 5 bit source
53 #define PUT_HISTO_BIN_IX(bi) (PFX_HISTO_BIN_IX | ((bi) & 0x1FF))
54 #define PUT_PEDTHR_LIST(f, a, m, t) (PFX_PEDTHR_LIST | (((f) & 0x1F)<<4) | (((a) & 0x3)<<2) | (((m) & 0x1)<<1) | (((t) & 0x1)<<0))
59 #define PFX_8_BIT_CONTENT_MASK 0xFF00 // Mask to select 8 MSB's of prefix
60 #define PFX_ASCII_MSG_LEN 0x0100 // ASCII message length
65 #define PFX_4_BIT_CONTENT_MASK 0xFFF0 // Mask to select 12 MSB's of prefix
66 #define PFX_START_OF_EVENT 0x00F0 // Start of Event + 1 bit free + Event Trigger Type
67 #define PFX_END_OF_EVENT 0x00E0 // End of Event + 4 MSB of size
78 #define PFX_2_BIT_CONTENT_MASK 0xFFFC // Mask to select 14 MSB's of prefix
79 #define PFX_CH_HIT_CNT_HISTO 0x007C // Channel Hit Count Histogram
90 #define PFX_1_BIT_CONTENT_MASK 0xFFFE // Mask to select 15 MSB's of prefix
107 #define PFX_0_BIT_CONTENT_MASK 0xFFFF // Mask to select 16 MSB's of prefix
108 #define PFX_END_OF_FRAME 0x000F // End of Frame (any type)
109 #define PFX_DEADTIME_HSTAT_BINS 0x000E // Deadtime statistics and histogram
110 #define PFX_PEDESTAL_HSTAT 0x000D // Pedestal histogram statistics
111 #define PFX_PEDESTAL_H_MD 0x000C // Pedestal histogram Mean and Deviation
112 #define PFX_SHISTO_BINS 0x000B // Hit S-curve histogram
113 #define PFX_CMD_STATISTICS 0x000A // Command server statistics
114 #define PFX_START_OF_BUILT_EVENT 0x0009 // Start of built event
115 #define PFX_END_OF_BUILT_EVENT 0x0008 // End of built event
116 #define PFX_EVPERIOD_HSTAT_BINS 0x0007 // Inter Event Time statistics and histogram
117 #define PFX_SOBE_SIZE 0x0006 // Start of built event + Size
123 #define PFX_NULL_CONTENT 0x0000 // Null content
128 #define GET_CARD_IX(w) (((w) & 0x3E00) >> 9)
129 #define GET_CHIP_IX(w) (((w) & 0x0180) >> 7)
130 #define GET_CHAN_IX(w) (((w) & 0x007F) >> 0)
135 #define GET_ADC_DATA(w) (((w) & 0x0FFF) >> 0)
136 #define GET_LAT_HISTO_BIN(w) (((w) & 0x0FFF) >> 0)
137 #define PUT_LAT_HISTO_BIN(w) (PFX_LAT_HISTO_BIN | (((w) & 0x0FFF) >> 0))
138 #define GET_LST_READ_CELL(w) (((w) & 0x03FF) >> 0)
139 #define GET_LST_READ_CELL_CHIP_IX(w) (((w) & 0x0C00) >> 10)
144 #define GET_TIME_BIN(w) (((w) & 0x01FF) >> 0)
145 #define GET_HISTO_BIN(w) (((w) & 0x01FF) >> 0)
146 #define GET_PEDTHR_LIST_FEM(w) (((w) & 0x01F0) >> 4)
147 #define GET_PEDTHR_LIST_ASIC(w) (((w) & 0x000C) >> 2)
148 #define GET_PEDTHR_LIST_MODE(w) (((w) & 0x0002) >> 1)
149 #define GET_PEDTHR_LIST_TYPE(w) (((w) & 0x0001) >> 0)
150 #define PUT_FVERSION_FEMID(w, fv, id) (((w) & 0xFE00) | (((fv) & 0x0003) << 7) | (((id) & 0x001F) << 0))
151 #define GET_FRAMING_VERSION(w) (((w) & 0x0180) >> 7)
152 #define GET_FEMID(w) (((w) & 0x001F) >> 0)
157 #define GET_ASCII_LEN(w) (((w) & 0x00FF) >> 0)
158 #define PUT_ASCII_LEN(w) (PFX_ASCII_MSG_LEN | ((w) & 0x00FF))
163 #define GET_EVENT_TYPE(w) (((w) & 0x0007) >> 0)
164 #define GET_EOE_SIZE(w) (((w) & 0x000F) >> 0)
169 #define GET_CH_HIT_CNT_HISTO_CHIP_IX(w) (((w) & 0x0003) >> 0)
170 #define PUT_CH_HIT_CNT_HISTO_CHIP_IX(w) (PFX_CH_HIT_CNT_HISTO | ((w) & 0x0003))
173 #define CURRENT_FRAMING_VERSION 0
177 #define FRAME_PRINT_ALL 0x00000001
178 #define FRAME_PRINT_SIZE 0x00000002
179 #define FRAME_PRINT_HIT_CH 0x00000004
180 #define FRAME_PRINT_HIT_CNT 0x00000008
181 #define FRAME_PRINT_CHAN_DATA 0x00000010
182 #define FRAME_PRINT_HISTO_BINS 0x00000020
183 #define FRAME_PRINT_ASCII 0x00000040
184 #define FRAME_PRINT_FRBND 0x00000080
185 #define FRAME_PRINT_EVBND 0x00000100
186 #define FRAME_PRINT_NULLW 0x00000200
187 #define FRAME_PRINT_HISTO_STAT 0x00000400
188 #define FRAME_PRINT_LISTS 0x00000800
189 #define FRAME_PRINT_LAST_CELL_READ_0 0x00001000
190 #define FRAME_PRINT_LAST_CELL_READ_1 0x00002000
191 #define FRAME_PRINT_LAST_CELL_READ_2 0x00004000
192 #define FRAME_PRINT_LAST_CELL_READ_3 0x00008000
193 #define FRAME_PRINT_EBBND 0x00010000