CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCALCTHeader2007.h
Go to the documentation of this file.
1 #ifndef CSCRawToDigi_CSCALCTHeader2007_h
2 #define CSCRawToDigi_CSCALCTHeader2007_h
3 
9 #include <bitset>
10 #include <vector>
12 #include <boost/dynamic_bitset.hpp>
13 #include <string.h>
14 
15 class CSCDMBHeader;
16 
17 struct CSCALCT {
18  CSCALCT();
19  CSCALCT(const CSCALCTDigi & alctDigi);
20  static short unsigned int sizeInWords() {return 1; }
21 
22  unsigned valid : 1;
23  unsigned quality : 2;
24  unsigned accel : 1;
25  unsigned pattern : 1;
26  unsigned keyWire : 7;
27  unsigned reserved: 4;
28 };
29 
30 
33  explicit CSCALCTHeader2007(int chamberType);
34 
35  void setEventInformation(const CSCDMBHeader &);
36 
37  short unsigned int sizeInWords() const {
38  return 8;
39  }
40 
41  unsigned flag1 : 16;
42 
43  unsigned bxnL1A : 12;
44  unsigned reserved1 : 4;
45 
46  unsigned l1aCounter : 12;
47  unsigned reserved2 : 4;
48 
49  unsigned readoutCounter : 12;
50  unsigned reserved3 : 4;
51 
52  unsigned bxnCount : 12;
53  unsigned rawOverflow : 1;
54  unsigned lctOverflow : 1;
55  unsigned configPresent : 1;
56  unsigned flag3 : 1;
57 
58  unsigned bxnBeforeReset : 12;
59  unsigned flag2 : 4;
60 
61  unsigned boardType : 3;
62  unsigned backwardForward : 1;
63  unsigned negativePositive : 1;
64  unsigned mirrored : 1;
65  unsigned qualityCancell : 1;
66  unsigned latencyClocks : 1;
67  unsigned patternB : 1;
68  unsigned widePattern : 1;
69  unsigned reserved0 : 2;
70  unsigned flag0 : 4;
71 
72  unsigned rawBins : 5;
73  unsigned lctBins : 4;
74  unsigned firmwareVersion : 6;
75  unsigned flag4 : 1;
76 };
77 
78 struct CSCVirtexID {
80  bzero(this, sizeInWords()*2);
81  }
82 
83  short unsigned int sizeInWords() const {
84  return 3;
85  }
86 
87  unsigned virtexIDLow : 15;
88  unsigned flag0 : 1;
89 
90  unsigned virtexIDMed : 15;
91  unsigned flag1 : 1;
92 
93  unsigned virtexIDHigh : 10;
94  unsigned trReg : 3;
95  unsigned reserved : 2;
96  unsigned flag2 : 1;
97 };
98 
101  bzero(this, sizeInWords()*2);
102  }
103 
104  short unsigned int sizeInWords() const {
105  return 5;
106  }
107 
108 
109  unsigned configRegister0 : 15;
110  unsigned flag0 : 1;
111 
112  unsigned configRegister1 : 15;
113  unsigned flag1 : 1;
114 
115  unsigned configRegister2 : 15;
116  unsigned flag2 : 1;
117 
118  unsigned configRegister3 : 15;
119  unsigned flag3 : 1;
120 
121  unsigned configRegister4 : 9;
122  unsigned reserved : 6;
123  unsigned flag4 : 1;
124 };
125 
128  bzero(this, sizeInWords()*2);
129  }
130 
131  short unsigned int sizeInWords() const {
132  return 1;
133  }
134 
135  unsigned collisionMaskRegister : 14;
136  unsigned reserved : 1;
137  unsigned flag : 1;
138 };
139 
142  bzero(this, sizeInWords()*2);
143  }
144 
145  short unsigned int sizeInWords() const {
146  return 1;
147  }
148 
149  unsigned hotChannelMask : 12;
150  unsigned reserved : 3;
151  unsigned flag : 1;
152 };
153 
154 #endif
short unsigned int sizeInWords() const
unsigned collisionMaskRegister
short unsigned int sizeInWords() const
static short unsigned int sizeInWords()
unsigned virtexIDHigh
==0
unsigned valid
unsigned pattern
void setEventInformation(const CSCDMBHeader &)
unsigned reserved
unsigned virtexIDMed
==0
unsigned accel
short unsigned int sizeInWords() const
unsigned quality
short unsigned int sizeInWords() const
unsigned reserved
unsigned bxnL1A
=0xDB0A
short unsigned int sizeInWords() const
for packing
unsigned keyWire
unsigned virtexIDLow