CMS 3D CMS Logo

CSCALCTHeader2006.h
Go to the documentation of this file.
1 #ifndef CSCRawToDigi_CSCALCTHeader2006_h
2 #define CSCRawToDigi_CSCALCTHeader2006_h
3 
4 #include <vector>
5 #include <cstring>
6 #include <strings.h>
8 class CSCDMBHeader;
9 
13  init();
14  }
15 
16  explicit CSCALCTHeader2006(int chamberType);
17 
18  void setFromBuffer(unsigned short const* buf) {
19  memcpy(this, buf, sizeInWords()*2);
20  }
21 
22  void init() {
23  bzero(this, sizeInWords()*2);
24  }
25 
26  short unsigned int sizeInWords() const {
27  return 4;
28  }
29 
30  unsigned short int BXNCount() const { return bxnCount;}
31 
32  unsigned short nLCTChipRead() const;
33 
34  void setEventInformation(const CSCDMBHeader &);
35 
36  void setDAV(int afebBoard) {activeFEBs |= 1 << afebBoard;}
37 
39  unsigned l1Acc : 4;
41  unsigned cscID : 4;
43  unsigned boardID : 3;
45  unsigned flag_0 : 5;
46 
48  unsigned fifoMode : 2;
50  unsigned nTBins : 5;
52  unsigned l1aMatch : 1;
54  unsigned extTrig : 1;
56  unsigned promote1 : 1;
58  unsigned promote2 : 1;
60  unsigned reserved_1 : 3;
62  unsigned flag_1 : 2;
63 
65  unsigned bxnCount : 12;
67  unsigned reserved_2 : 2;
69  unsigned flag_2 : 2;
70 
72  unsigned lctChipRead : 7;
74  unsigned activeFEBs : 7;
76  unsigned flag_3 : 2;
77 
78 };
79 
80 
81 struct CSCALCTs2006 {
83  bzero(this, 8);
84  }
85 
86  void setFromBuffer(unsigned short const* buf) {
87  memcpy(this, buf, sizeInWords()*2);
88  }
89 
90  short unsigned int sizeInWords() const {
91  return 4;
92  }
93 
94  std::vector<CSCALCTDigi> ALCTDigis() const;
95 
97  void add(const std::vector<CSCALCTDigi> & digis);
98  void addALCT0(const CSCALCTDigi & digi);
99  void addALCT1(const CSCALCTDigi & digi);
100 
103  unsigned alct0_valid : 1;
104  unsigned alct0_quality : 2;
105  unsigned alct0_accel : 1;
106  unsigned alct0_pattern : 1;
107  unsigned alct0_key_wire: 7;
108  unsigned alct0_bxn_low : 3;
110  unsigned flag_4 : 1;
111 
112  unsigned alct0_bxn_high :2;
113  unsigned alct0_reserved :13;
115  unsigned flag_5 : 1;
116 
118  unsigned alct1_valid : 1;
119  unsigned alct1_quality : 2;
120  unsigned alct1_accel : 1;
121  unsigned alct1_pattern : 1;
122  unsigned alct1_key_wire: 7;
123  unsigned alct1_bxn_low : 3;
124  unsigned flag_6 : 1;
125 
126  unsigned alct1_bxn_high :2;
127  unsigned alct1_reserved :13;
128  unsigned flag_7 : 1;
129 };
130 
131 
132 
133 
134 
135 #endif
unsigned flag_3
DDU+LCT special word flags.
unsigned bxnCount
full bunch crossing number
unsigned fifoMode
see the FIFO_MODE enum
unsigned promote1
promotion bit for 1st LCT pattern
unsigned reserved_2
reserved, set to 0
short unsigned int sizeInWords() const
short unsigned int sizeInWords() const
void setEventInformation(const CSCDMBHeader &)
unsigned extTrig
trigger source was external
unsigned short int BXNCount() const
void setFromBuffer(unsigned short const *buf)
unsigned flag_1
DDU+LCT special word flags.
ALCT Header consists of several modular units that are defined as structs below.
unsigned nTBins
of 25 ns time bins in the raw dump
unsigned reserved_1
reserved, set to 0
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
unsigned l1Acc
l1 accept counter
unsigned promote2
promotion bit for 2nd LCT pattern
unsigned boardID
ALCT2000 board ID.
unsigned lctChipRead
LCT chips read out in raw hit dump.
unsigned activeFEBs
LCT chips with ADB hits.
unsigned flag_2
DDU+LCT special word flags.
unsigned cscID
chamber ID number
void setDAV(int afebBoard)
for packing
void setFromBuffer(unsigned short const *buf)
unsigned l1aMatch
exteran L1A arrived in L1A window
unsigned flag_0
should be &#39;01100&#39;, so it&#39;ll be a 6xxx in the ASCII dump
unsigned short nLCTChipRead() const
CSCALCTHeader2006()
this struct contains all 2006 ALCT Header words except ALCTs