CMS 3D CMS Logo

CSCTMBHeader2006.h
Go to the documentation of this file.
1 #ifndef EventFilter_CSCRawToDigi_CSCTMBHeader2006_h
2 #define EventFilter_CSCRawToDigi_CSCTMBHeader2006_h
5 
7  enum { NWORDS = 27 };
9  explicit CSCTMBHeader2006(const unsigned short* buf);
10  void setEventInformation(const CSCDMBHeader& dmbHeader) override;
11 
12  uint16_t BXNCount() const override { return bits.bxnCount; }
13  uint16_t ALCTMatchTime() const override { return bits.alctMatchTime; }
14  void setALCTMatchTime(uint16_t alctmatchtime) override { bits.alctMatchTime = alctmatchtime & 0xF; }
15  uint16_t CLCTOnly() const override { return bits.clctOnly; }
16  uint16_t ALCTOnly() const override { return bits.alctOnly; }
17  uint16_t TMBMatch() const override { return bits.tmbMatch; }
18  uint16_t Bxn0Diff() const override { return bits.bxn0Diff; }
19  uint16_t Bxn1Diff() const override { return bits.bxn1Diff; }
20  uint16_t L1ANumber() const override { return bits.l1aNumber; }
21  uint16_t NTBins() const override { return bits.nTBins; }
22  uint16_t NCFEBs() const override { return bits.nCFEBs; }
23  void setNCFEBs(uint16_t ncfebs) override { bits.nCFEBs = ncfebs & 0x1F; }
24  uint16_t firmwareRevision() const override { return bits.firmRevCode; }
25  uint16_t syncError() const override { return bits.syncError; }
26  uint16_t syncErrorCLCT() const override { return (bits.clct0_sync_err | bits.clct1_sync_err); }
27  uint16_t syncErrorMPC0() const override { return bits.MPC_Muon0_SyncErr_; }
28  uint16_t syncErrorMPC1() const override { return bits.MPC_Muon1_SyncErr_; }
29  uint16_t L1AMatchTime() const override { return bits.pop_l1a_match_win; }
30 
32  uint16_t clct0_ComparatorCode() const override { return 0; }
33  uint16_t clct1_ComparatorCode() const override { return 0; }
34  uint16_t clct0_xky() const override { return 0; }
35  uint16_t clct1_xky() const override { return 0; }
36  uint16_t hmt_nhits() const override { return 0; }
37  uint16_t hmt_ALCTMatchTime() const override { return 0; }
38  uint16_t alctHMT() const override { return 0; }
39  uint16_t clctHMT() const override { return 0; }
40  uint16_t gem_enabled_fibers() const override { return 0; }
41  uint16_t gem_fifo_tbins() const override { return 0; }
42  uint16_t gem_fifo_pretrig() const override { return 0; }
43  uint16_t gem_zero_suppress() const override { return 0; }
44  uint16_t gem_sync_dataword() const override { return 0; }
45  uint16_t gem_timing_dataword() const override { return 0; }
46  uint16_t run3_CLCT_patternID() const override { return 0; }
47 
49  std::vector<CSCCLCTDigi> CLCTDigis(uint32_t idlayer) override;
51  std::vector<CSCCorrelatedLCTDigi> CorrelatedLCTDigis(uint32_t idlayer) const override;
53  CSCShowerDigi showerDigi(uint32_t idlayer) const override { return CSCShowerDigi(); }
55  CSCShowerDigi anodeShowerDigi(uint32_t idlayer) const override { return CSCShowerDigi(); }
57  CSCShowerDigi cathodeShowerDigi(uint32_t idlayer) const override { return CSCShowerDigi(); }
58 
61  unsigned short int sizeInWords() const override { return NWORDS; }
62 
63  unsigned short int NHeaderFrames() const override { return bits.nHeaderFrames; }
65  unsigned short* data() override { return (unsigned short*)(&bits); }
66  bool check() const override { return bits.e0bline == 0x6e0b && NHeaderFrames() + 1 == NWORDS; }
67 
69  void addCLCT0(const CSCCLCTDigi& digi) override;
70  void addCLCT1(const CSCCLCTDigi& digi) override;
71  void addALCT0(const CSCALCTDigi& digi) override;
72  void addALCT1(const CSCALCTDigi& digi) override;
73  void addCorrelatedLCT0(const CSCCorrelatedLCTDigi& digi) override;
74  void addCorrelatedLCT1(const CSCCorrelatedLCTDigi& digi) override;
75  void addShower(const CSCShowerDigi& digi) override {}
76  void addAnodeShower(const CSCShowerDigi& digi) override {}
77  void addCathodeShower(const CSCShowerDigi& digi) override {}
78 
79  void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
80 
81  void print(std::ostream& os) const override;
82  struct {
83  unsigned b0cline : 16;
84  unsigned nTBins : 5, dumpCFEBs : 7, fifoMode : 3, reserved_1 : 1;
85  unsigned l1aNumber : 4, cscID : 4, boardID : 5, l1atype : 2, reserved_2 : 1;
86  unsigned bxnCount : 12, r_type : 2, reserved_3 : 2;
87  unsigned nHeaderFrames : 5, nCFEBs : 3, hasBuf : 1, preTrigTBins : 5, reserved_4 : 2;
88  unsigned l1aTxCounter : 4, trigSourceVect : 8, hasPreTrig : 4;
89  unsigned activeCFEBs : 5, CFEBsInstantiated : 5, runID : 4, reserved_6 : 2;
90  unsigned bxnPreTrigger : 12, syncError : 1, reserved_7 : 3;
91 
92  unsigned clct0_valid : 1;
93  unsigned clct0_quality : 3;
94  unsigned clct0_shape : 3;
95  unsigned clct0_strip_type : 1;
96  unsigned clct0_bend : 1;
97  unsigned clct0_key : 5;
98  unsigned clct0_cfeb_low : 1;
99  unsigned reserved_8 : 1;
100 
101  unsigned clct1_valid : 1;
102  unsigned clct1_quality : 3;
103  unsigned clct1_shape : 3;
104  unsigned clct1_strip_type : 1;
105  unsigned clct1_bend : 1;
106  unsigned clct1_key : 5;
107  unsigned clct1_cfeb_low : 1;
108  unsigned reserved_9 : 1;
109 
110  unsigned clct0_cfeb_high : 2;
111  unsigned clct0_bxn : 2;
112  unsigned clct0_sync_err : 1;
113  unsigned clct0_bx0_local : 1;
114  unsigned clct1_cfeb_high : 2;
115  unsigned clct1_bxn : 2;
116  unsigned clct1_sync_err : 1;
117  unsigned clct1_bx0_local : 1;
118  unsigned invalidPattern : 1;
119  unsigned reserved_10 : 3;
120 
121  unsigned tmbMatch : 1, alctOnly : 1, clctOnly : 1, bxn0Diff : 2, bxn1Diff : 2, alctMatchTime : 4, reserved_11 : 5;
122 
123  unsigned MPC_Muon0_wire_ : 7;
125  unsigned MPC_Muon0_quality_ : 4;
126  unsigned reserved_12 : 1;
127 
129  unsigned MPC_Muon0_bend_ : 1;
130  unsigned MPC_Muon0_SyncErr_ : 1;
131  unsigned MPC_Muon0_bx_ : 1;
132  unsigned MPC_Muon0_bc0_ : 1;
133  unsigned MPC_Muon0_cscid_low : 3;
134  unsigned reserved_13 : 1;
135 
136  unsigned MPC_Muon1_wire_ : 7;
138  unsigned MPC_Muon1_quality_ : 4;
139  unsigned reserved_14 : 1;
140 
142  unsigned MPC_Muon1_bend_ : 1;
143  unsigned MPC_Muon1_SyncErr_ : 1;
144  unsigned MPC_Muon1_bx_ : 1;
145  unsigned MPC_Muon1_bc0_ : 1;
146  unsigned MPC_Muon1_cscid_low : 3;
147  unsigned reserved_15 : 1;
148 
149  unsigned MPC_Muon0_vpf_ : 1;
150  unsigned MPC_Muon0_cscid_bit4 : 1;
151  unsigned MPC_Muon1_vpf_ : 1;
152  unsigned MPC_Muon1_cscid_bit4 : 1;
153  unsigned mpcAcceptLCT0 : 1;
154  unsigned mpcAcceptLCT1 : 1;
155  unsigned reserved_16_1 : 2;
156  unsigned hs_thresh : 3;
157  unsigned ds_thresh : 3;
158  unsigned reserved_16_2 : 2;
159 
160  unsigned buffer_info_0 : 16;
161  unsigned r_buf_nbusy : 4;
162  unsigned buffer_info_1 : 12;
163  unsigned buffer_info_2 : 16;
164  unsigned buffer_info_3 : 16;
165  unsigned alct_delay : 4, clct_width : 4, mpc_tx_delay : 4, reserved_21 : 4;
166 
167  unsigned rpc_exists : 2;
168  unsigned rd_rpc_list : 2;
169  unsigned rd_nrpcs : 2;
170  unsigned rpc_read_enable : 1;
171  unsigned r_nlayers_hit_vec : 3;
172  unsigned pop_l1a_match_win : 4;
173  unsigned reserved_22 : 2;
174 
175  unsigned bd_status : 14;
176  unsigned reserved_23 : 2;
177  unsigned uptime : 14;
178  unsigned reserved_24 : 2;
179  unsigned firmRevCode : 14, reserved_25 : 2;
180  unsigned e0bline : 16;
181  } bits;
182 };
183 
184 #endif
uint16_t hmt_ALCTMatchTime() const override
uint16_t ALCTOnly() const override
unsigned MPC_Muon0_clct_pattern_
void addALCT0(const CSCALCTDigi &digi) override
uint16_t clctHMT() const override
uint16_t TMBMatch() const override
unsigned MPC_Muon0_cscid_bit4
uint16_t clct1_xky() const override
uint16_t gem_sync_dataword() const override
unsigned MPC_Muon1_clct_pattern_
uint16_t syncErrorCLCT() const override
uint16_t Bxn1Diff() const override
unsigned MPC_Muon1_quality_
uint16_t L1ANumber() const override
unsigned CFEBsInstantiated
CSCShowerDigi anodeShowerDigi(uint32_t idlayer) const override
returns anode HMT Shower digi
bool check() const override
unsigned MPC_Muon0_halfstrip_clct_pattern
unsigned clct0_strip_type
uint16_t gem_zero_suppress() const override
unsigned MPC_Muon1_cscid_low
uint16_t ALCTMatchTime() const override
uint16_t gem_enabled_fibers() const override
uint16_t syncError() const override
unsigned MPC_Muon0_cscid_low
uint16_t BXNCount() const override
uint16_t NCFEBs() const override
uint16_t clct0_ComparatorCode() const override
== Run 3 CSC-GEM Trigger Format
uint16_t Bxn0Diff() const override
struct CSCTMBHeader2006::@493 bits
uint16_t firmwareRevision() const override
uint16_t gem_fifo_tbins() const override
uint16_t NTBins() const override
void swapCLCTs(CSCCLCTDigi &digi1, CSCCLCTDigi &digi2)
uint16_t gem_timing_dataword() const override
void addShower(const CSCShowerDigi &digi) override
void addCorrelatedLCT1(const CSCCorrelatedLCTDigi &digi) override
void addCLCT0(const CSCCLCTDigi &digi) override
for data packing
unsigned MPC_Muon0_SyncErr_
void setEventInformation(const CSCDMBHeader &dmbHeader) override
uint16_t CLCTOnly() const override
void setALCTMatchTime(uint16_t alctmatchtime) override
unsigned short int NHeaderFrames() const override
void setNCFEBs(uint16_t ncfebs) override
CSCShowerDigi showerDigi(uint32_t idlayer) const override
returns lct HMT Shower digi
uint16_t alctHMT() const override
void addAnodeShower(const CSCShowerDigi &digi) override
unsigned MPC_Muon1_SyncErr_
std::vector< CSCCorrelatedLCTDigi > CorrelatedLCTDigis(uint32_t idlayer) const override
returns CorrelatedLCT digis
void print(std::ostream &os) const override
uint16_t clct0_xky() const override
uint16_t gem_fifo_pretrig() const override
void addCLCT1(const CSCCLCTDigi &digi) override
unsigned MPC_Muon1_halfstrip_clct_pattern
uint16_t L1AMatchTime() const override
uint16_t run3_CLCT_patternID() const override
CSCShowerDigi cathodeShowerDigi(uint32_t idlayer) const override
returns cathode HMT Shower digi
void addCorrelatedLCT0(const CSCCorrelatedLCTDigi &digi) override
uint16_t syncErrorMPC1() const override
unsigned pop_l1a_match_win
std::vector< CSCCLCTDigi > CLCTDigis(uint32_t idlayer) override
returns CLCT digis
unsigned MPC_Muon0_quality_
uint16_t syncErrorMPC0() const override
void addCathodeShower(const CSCShowerDigi &digi) override
unsigned short * data() override
returns the first data word
void addALCT1(const CSCALCTDigi &digi) override
unsigned r_nlayers_hit_vec
uint16_t hmt_nhits() const override
unsigned MPC_Muon1_cscid_bit4
uint16_t clct1_ComparatorCode() const override
unsigned short int sizeInWords() const override