CMS 3D CMS Logo

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