CMS 3D CMS Logo

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 <cstring>
14 
15 class CSCDMBHeader;
16 
17 struct CSCALCT {
18  CSCALCT();
19  CSCALCT(const CSCALCTDigi& alctDigi);
20 
21  void setFromBuffer(unsigned short const* buf) { memcpy(this, buf, sizeInWords() * 2); }
22 
23  static short unsigned int sizeInWords() { return 1; }
24 
25  unsigned valid : 1;
26  unsigned quality : 2;
27  unsigned accel : 1;
28  unsigned pattern : 1;
29  unsigned keyWire : 7;
30  unsigned reserved : 4;
31 };
32 
35  explicit CSCALCTHeader2007(int chamberType);
36 
37  void setFromBuffer(unsigned short const* buf) { memcpy(this, buf, sizeInWords() * 2); }
38 
39  void setEventInformation(const CSCDMBHeader&);
40 
41  short unsigned int sizeInWords() const {
42  return 8;
43  }
44 
45  unsigned flag1 : 16;
46 
47  unsigned bxnL1A : 12;
48  unsigned reserved1 : 4;
49 
50  unsigned l1aCounter : 12;
51  unsigned reserved2 : 4;
52 
53  unsigned readoutCounter : 12;
54  unsigned reserved3 : 4;
55 
56  unsigned bxnCount : 12;
57  unsigned rawOverflow : 1;
58  unsigned lctOverflow : 1;
59  unsigned configPresent : 1;
60  unsigned flag3 : 1;
61 
62  unsigned bxnBeforeReset : 12;
63  unsigned flag2 : 4;
64 
65  unsigned boardType : 3;
66  unsigned backwardForward : 1;
67  unsigned negativePositive : 1;
68  unsigned mirrored : 1;
69  unsigned qualityCancell : 1;
70  unsigned latencyClocks : 1;
71  unsigned patternB : 1;
72  unsigned widePattern : 1;
73  unsigned reserved0 : 2;
74  unsigned flag0 : 4;
75 
76  unsigned rawBins : 5;
77  unsigned lctBins : 4;
78  unsigned firmwareVersion : 6;
79  unsigned flag4 : 1;
80 };
81 
82 struct CSCVirtexID {
84  bzero(this, sizeInWords() * 2);
85  }
86 
87  void setFromBuffer(unsigned short const* buf) { memcpy(this, buf, sizeInWords() * 2); }
88 
89  short unsigned int sizeInWords() const {
90  return 3;
91  }
92 
93  unsigned virtexIDLow : 15;
94  unsigned flag0 : 1;
95 
96  unsigned virtexIDMed : 15;
97  unsigned flag1 : 1;
98 
99  unsigned virtexIDHigh : 10;
100  unsigned trReg : 3;
101  unsigned reserved : 2;
102  unsigned flag2 : 1;
103 };
104 
106  CSCConfigurationRegister() { bzero(this, sizeInWords() * 2); }
107 
108  void setFromBuffer(unsigned short const* buf) { memcpy(this, buf, sizeInWords() * 2); }
109 
110  short unsigned int sizeInWords() const {
111  return 5;
112  }
113 
114  unsigned configRegister0 : 15;
115  unsigned flag0 : 1;
116 
117  unsigned configRegister1 : 15;
118  unsigned flag1 : 1;
119 
120  unsigned configRegister2 : 15;
121  unsigned flag2 : 1;
122 
123  unsigned configRegister3 : 15;
124  unsigned flag3 : 1;
125 
126  unsigned configRegister4 : 9;
127  unsigned reserved : 6;
128  unsigned flag4 : 1;
129 };
130 
132  CSCCollisionMask() { bzero(this, sizeInWords() * 2); }
133 
134  void setFromBuffer(unsigned short const* buf) { memcpy(this, buf, sizeInWords() * 2); }
135 
136  short unsigned int sizeInWords() const {
137  return 1;
138  }
139 
140  unsigned collisionMaskRegister : 14;
141  unsigned reserved : 1;
142  unsigned flag : 1;
143 };
144 
146  CSCHotChannelMask() { bzero(this, sizeInWords() * 2); }
147 
148  void setFromBuffer(unsigned short const* buf) { memcpy(this, buf, sizeInWords() * 2); }
149 
150  short unsigned int sizeInWords() const {
151  return 1;
152  }
153 
154  unsigned hotChannelMask : 12;
155  unsigned reserved : 3;
156  unsigned flag : 1;
157 };
158 
159 #endif
CSCVirtexID::sizeInWords
short unsigned int sizeInWords() const
Definition: CSCALCTHeader2007.h:89
CSCALCTHeader2007::flag1
unsigned flag1
Definition: CSCALCTHeader2007.h:45
CSCVirtexID::flag1
unsigned flag1
Definition: CSCALCTHeader2007.h:97
CSCConfigurationRegister::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2007.h:108
CSCCollisionMask::flag
unsigned flag
Definition: CSCALCTHeader2007.h:142
CSCALCT::valid
unsigned valid
Definition: CSCALCTHeader2007.h:25
CSCConfigurationRegister::configRegister3
unsigned configRegister3
==0
Definition: CSCALCTHeader2007.h:123
CSCConfigurationRegister::configRegister4
unsigned configRegister4
==0
Definition: CSCALCTHeader2007.h:126
CSCALCTHeader2007::lctOverflow
unsigned lctOverflow
Definition: CSCALCTHeader2007.h:58
CSCALCTHeader2007::readoutCounter
unsigned readoutCounter
Definition: CSCALCTHeader2007.h:53
CSCVirtexID::flag2
unsigned flag2
Definition: CSCALCTHeader2007.h:102
CSCALCTHeader2007::backwardForward
unsigned backwardForward
Definition: CSCALCTHeader2007.h:66
CSCHotChannelMask::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2007.h:148
CSCVirtexID::virtexIDHigh
unsigned virtexIDHigh
==0
Definition: CSCALCTHeader2007.h:99
CSCVirtexID::trReg
unsigned trReg
Definition: CSCALCTHeader2007.h:100
CSCALCT::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2007.h:21
CSCALCTHeader2007::bxnBeforeReset
unsigned bxnBeforeReset
Definition: CSCALCTHeader2007.h:62
CSCConfigurationRegister::CSCConfigurationRegister
CSCConfigurationRegister()
Definition: CSCALCTHeader2007.h:106
CSCALCTHeader2007::rawBins
unsigned rawBins
Definition: CSCALCTHeader2007.h:76
CSCVirtexID
Definition: CSCALCTHeader2007.h:82
CSCConfigurationRegister::flag1
unsigned flag1
Definition: CSCALCTHeader2007.h:118
CSCALCTHeader2007::patternB
unsigned patternB
Definition: CSCALCTHeader2007.h:71
CSCCollisionMask
Definition: CSCALCTHeader2007.h:131
CSCConfigurationRegister::configRegister2
unsigned configRegister2
==0
Definition: CSCALCTHeader2007.h:120
CSCConfigurationRegister
Definition: CSCALCTHeader2007.h:105
CSCALCTHeader2007::mirrored
unsigned mirrored
Definition: CSCALCTHeader2007.h:68
CSCALCT
Definition: CSCALCTHeader2007.h:17
CSCALCTHeader2007::latencyClocks
unsigned latencyClocks
Definition: CSCALCTHeader2007.h:70
CSCALCTDigi.h
CSCALCTHeader2007::qualityCancell
unsigned qualityCancell
Definition: CSCALCTHeader2007.h:69
CSCCollisionMask::collisionMaskRegister
unsigned collisionMaskRegister
Definition: CSCALCTHeader2007.h:140
CSCVirtexID::virtexIDLow
unsigned virtexIDLow
Definition: CSCALCTHeader2007.h:93
CSCALCT::keyWire
unsigned keyWire
Definition: CSCALCTHeader2007.h:29
CSCHotChannelMask::sizeInWords
short unsigned int sizeInWords() const
Definition: CSCALCTHeader2007.h:150
CSCALCTHeader2007::setEventInformation
void setEventInformation(const CSCDMBHeader &)
Definition: CSCALCTHeader2007.cc:38
CSCHotChannelMask::CSCHotChannelMask
CSCHotChannelMask()
Definition: CSCALCTHeader2007.h:146
CSCVirtexID::flag0
unsigned flag0
Definition: CSCALCTHeader2007.h:94
CSCVirtexID::reserved
unsigned reserved
Definition: CSCALCTHeader2007.h:101
CSCALCTHeader2007::negativePositive
unsigned negativePositive
Definition: CSCALCTHeader2007.h:67
CSCConfigurationRegister::sizeInWords
short unsigned int sizeInWords() const
Definition: CSCALCTHeader2007.h:110
CSCALCTHeader2007::bxnCount
unsigned bxnCount
Definition: CSCALCTHeader2007.h:56
CSCALCTHeader2007::flag4
unsigned flag4
Definition: CSCALCTHeader2007.h:79
CSCALCTHeader2007::reserved2
unsigned reserved2
Definition: CSCALCTHeader2007.h:51
CSCALCTHeader2007
Definition: CSCALCTHeader2007.h:33
CSCConfigurationRegister::flag2
unsigned flag2
Definition: CSCALCTHeader2007.h:121
CSCConfigurationRegister::flag3
unsigned flag3
Definition: CSCALCTHeader2007.h:124
CSCHotChannelMask::flag
unsigned flag
Definition: CSCALCTHeader2007.h:156
CSCConfigurationRegister::configRegister0
unsigned configRegister0
Definition: CSCALCTHeader2007.h:114
CSCALCTHeader2007::CSCALCTHeader2007
CSCALCTHeader2007()
Definition: CSCALCTHeader2007.cc:17
CSCConfigurationRegister::configRegister1
unsigned configRegister1
==0
Definition: CSCALCTHeader2007.h:117
CSCVirtexID::virtexIDMed
unsigned virtexIDMed
==0
Definition: CSCALCTHeader2007.h:96
CSCALCT::quality
unsigned quality
Definition: CSCALCTHeader2007.h:26
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCHotChannelMask::hotChannelMask
unsigned hotChannelMask
Definition: CSCALCTHeader2007.h:154
CSCALCTHeader2007::lctBins
unsigned lctBins
Definition: CSCALCTHeader2007.h:77
CSCALCTHeader2007::firmwareVersion
unsigned firmwareVersion
Definition: CSCALCTHeader2007.h:78
CSCConfigurationRegister::flag4
unsigned flag4
Definition: CSCALCTHeader2007.h:128
CSCALCTHeader2007::flag0
unsigned flag0
Definition: CSCALCTHeader2007.h:74
CSCHotChannelMask::reserved
unsigned reserved
Definition: CSCALCTHeader2007.h:155
CSCDMBHeader
Definition: CSCDMBHeader.h:15
CSCALCTHeader2007::l1aCounter
unsigned l1aCounter
Definition: CSCALCTHeader2007.h:50
CSCALCTHeader2007::boardType
unsigned boardType
Definition: CSCALCTHeader2007.h:65
CSCCollisionMask::sizeInWords
short unsigned int sizeInWords() const
Definition: CSCALCTHeader2007.h:136
CSCALCT::CSCALCT
CSCALCT()
Definition: CSCALCTHeader2007.cc:4
CSCALCTHeader2007::reserved3
unsigned reserved3
Definition: CSCALCTHeader2007.h:54
CSCALCTHeader2007::reserved1
unsigned reserved1
Definition: CSCALCTHeader2007.h:48
CSCALCT::reserved
unsigned reserved
Definition: CSCALCTHeader2007.h:30
CSCCollisionMask::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2007.h:134
CSCALCTDigi
Definition: CSCALCTDigi.h:16
CSCVirtexID::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2007.h:87
CSCALCTHeader2007::setFromBuffer
void setFromBuffer(unsigned short const *buf)
Definition: CSCALCTHeader2007.h:37
CSCConfigurationRegister::flag0
unsigned flag0
Definition: CSCALCTHeader2007.h:115
CSCALCTHeader2007::widePattern
unsigned widePattern
Definition: CSCALCTHeader2007.h:72
CSCALCTHeader2007::reserved0
unsigned reserved0
Definition: CSCALCTHeader2007.h:73
CSCHotChannelMask
Definition: CSCALCTHeader2007.h:145
CSCALCTHeader2007::rawOverflow
unsigned rawOverflow
Definition: CSCALCTHeader2007.h:57
CSCConfigurationRegister::reserved
unsigned reserved
Definition: CSCALCTHeader2007.h:127
CSCVirtexID::CSCVirtexID
CSCVirtexID()
Definition: CSCALCTHeader2007.h:83
CSCCollisionMask::CSCCollisionMask
CSCCollisionMask()
Definition: CSCALCTHeader2007.h:132
CSCALCTHeader2007::flag3
unsigned flag3
Definition: CSCALCTHeader2007.h:60
CSCALCTHeader2007::bxnL1A
unsigned bxnL1A
=0xDB0A
Definition: CSCALCTHeader2007.h:47
CSCALCT::sizeInWords
static short unsigned int sizeInWords()
Definition: CSCALCTHeader2007.h:23
CSCCollisionMask::reserved
unsigned reserved
Definition: CSCALCTHeader2007.h:141
CSCALCT::accel
unsigned accel
Definition: CSCALCTHeader2007.h:27
CSCALCTHeader2007::flag2
unsigned flag2
Definition: CSCALCTHeader2007.h:63
CSCALCTHeader2007::configPresent
unsigned configPresent
Definition: CSCALCTHeader2007.h:59
CSCALCTHeader2007::sizeInWords
short unsigned int sizeInWords() const
for packing
Definition: CSCALCTHeader2007.h:41
CSCALCT::pattern
unsigned pattern
Definition: CSCALCTHeader2007.h:28