AlcapDAQ  1
mucap_structures.h
Go to the documentation of this file.
1 typedef struct tdc400_word {
2 
3  unsigned char bytes1[4];
4  unsigned short time;
5  unsigned char bytes2[2];
6 
8 
9 static inline unsigned char & tdc400_byte(tdc400_word & w, int i) {
10  if(i < 4) {
11  return w.bytes1[3-i];
12  } else {
13  return w.bytes2[5-i];
14  }
15 }
16 
17 typedef struct caen_word {
18  unsigned int time:20, edge:1, r2:2, start:1, channel:7, r1:1;
19 } caen_word;
20 
21 typedef struct channel_hit {
22  double time;
23  int parameter;
24 } channel_hit;
25 
26 typedef union comp_word {
27  struct {
28  unsigned int time:24, fpga:6, a:1, b:1;
29  } r1;
30 
31  unsigned char bytes[4];
32 
33  unsigned int word;
34 } comp_word;
35 
36 typedef struct fadc_word {
37  unsigned char channel[4];
38 } fadc_word;
39 
40 typedef struct td_elt {
41  double time;
42  unsigned short word[3];
43 } td_elt;
44 
45 typedef struct track_elt {
46  double time;
47  unsigned short word[6];
48 } track_elt;
49 
50 typedef struct sniff_elt {
56 } sniff_elt;
57 
58 typedef struct TPC_Anode_Map_elt {
59  int tdc400;
60  int word;
61  unsigned short bitmask;
62  int bitshift;
64 
65 typedef struct thresh_bits {
66  unsigned short Aword[6]; // anode sections
67  unsigned short Sword[3]; // strip sections
68 } thresh_bits;
69 
70 typedef struct stack_elt {
71  double time;
72  bool thrbits[3];
74 } stack_elt;