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 
31  uint16_t clct0_ComparatorCode() const override { return 0; }
32  uint16_t clct1_ComparatorCode() const override { return 0; }
33  uint16_t clct0_xky() const override { return 0; }
34  uint16_t clct1_xky() const override { return 0; }
35  uint16_t hmt_nhits() const override { return 0; }
36  uint16_t hmt_ALCTMatchTime() const override { return 0; }
37  uint16_t alctHMT() const override { return 0; }
38  uint16_t clctHMT() const override { return 0; }
39  uint16_t gem_enabled_fibers() const override { return 0; }
40  uint16_t gem_fifo_tbins() const override { return 0; }
41  uint16_t gem_fifo_pretrig() const override { return 0; }
42  uint16_t gem_zero_suppress() const override { return 0; }
43  uint16_t gem_sync_dataword() const override { return 0; }
44  uint16_t gem_timing_dataword() const override { return 0; }
45  uint16_t run3_CLCT_patternID() const override { return 0; }
46 
48  std::vector<CSCCLCTDigi> CLCTDigis(uint32_t idlayer) override;
50  std::vector<CSCCorrelatedLCTDigi> CorrelatedLCTDigis(uint32_t idlayer) const override;
52  CSCShowerDigi showerDigi(uint32_t idlayer) const override { return CSCShowerDigi(); }
54  CSCShowerDigi anodeShowerDigi(uint32_t idlayer) const override { return CSCShowerDigi(); }
56  CSCShowerDigi cathodeShowerDigi(uint32_t idlayer) const override { return CSCShowerDigi(); }
57 
60  unsigned short int sizeInWords() const override { return NWORDS; }
61 
62  unsigned short int NHeaderFrames() const override { return bits.nHeaderFrames; }
64  unsigned short* data() override { return (unsigned short*)(&bits); }
65  bool check() const override { return bits.e0bline == 0x6e0b && NHeaderFrames() + 1 == NWORDS; }
66 
68  void addCLCT0(const CSCCLCTDigi& digi) override;
69  void addCLCT1(const CSCCLCTDigi& digi) override;
70  void addALCT0(const CSCALCTDigi& digi) override;
71  void addALCT1(const CSCALCTDigi& digi) override;
72  void addCorrelatedLCT0(const CSCCorrelatedLCTDigi& digi) override;
73  void addCorrelatedLCT1(const CSCCorrelatedLCTDigi& digi) override;
74  void addShower(const CSCShowerDigi& digi) override {}
75  void addAnodeShower(const CSCShowerDigi& digi) override {}
76  void addCathodeShower(const CSCShowerDigi& digi) override {}
77 
78  void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
79 
80  void print(std::ostream& os) const override;
81  struct {
82  unsigned b0cline : 16;
83  unsigned nTBins : 5, dumpCFEBs : 7, fifoMode : 3, reserved_1 : 1;
84  unsigned l1aNumber : 4, cscID : 4, boardID : 5, l1atype : 2, reserved_2 : 1;
85  unsigned bxnCount : 12, r_type : 2, reserved_3 : 2;
86  unsigned nHeaderFrames : 5, nCFEBs : 3, hasBuf : 1, preTrigTBins : 5, reserved_4 : 2;
87  unsigned l1aTxCounter : 4, trigSourceVect : 8, hasPreTrig : 4;
88  unsigned activeCFEBs : 5, CFEBsInstantiated : 5, runID : 4, reserved_6 : 2;
89  unsigned bxnPreTrigger : 12, syncError : 1, reserved_7 : 3;
90 
91  unsigned clct0_valid : 1;
92  unsigned clct0_quality : 3;
93  unsigned clct0_shape : 3;
94  unsigned clct0_strip_type : 1;
95  unsigned clct0_bend : 1;
96  unsigned clct0_key : 5;
97  unsigned clct0_cfeb_low : 1;
98  unsigned reserved_8 : 1;
99 
100  unsigned clct1_valid : 1;
101  unsigned clct1_quality : 3;
102  unsigned clct1_shape : 3;
103  unsigned clct1_strip_type : 1;
104  unsigned clct1_bend : 1;
105  unsigned clct1_key : 5;
106  unsigned clct1_cfeb_low : 1;
107  unsigned reserved_9 : 1;
108 
109  unsigned clct0_cfeb_high : 2;
110  unsigned clct0_bxn : 2;
111  unsigned clct0_sync_err : 1;
112  unsigned clct0_bx0_local : 1;
113  unsigned clct1_cfeb_high : 2;
114  unsigned clct1_bxn : 2;
115  unsigned clct1_sync_err : 1;
116  unsigned clct1_bx0_local : 1;
117  unsigned invalidPattern : 1;
118  unsigned reserved_10 : 3;
119 
120  unsigned tmbMatch : 1, alctOnly : 1, clctOnly : 1, bxn0Diff : 2, bxn1Diff : 2, alctMatchTime : 4, reserved_11 : 5;
121 
122  unsigned MPC_Muon0_wire_ : 7;
124  unsigned MPC_Muon0_quality_ : 4;
125  unsigned reserved_12 : 1;
126 
128  unsigned MPC_Muon0_bend_ : 1;
129  unsigned MPC_Muon0_SyncErr_ : 1;
130  unsigned MPC_Muon0_bx_ : 1;
131  unsigned MPC_Muon0_bc0_ : 1;
132  unsigned MPC_Muon0_cscid_low : 3;
133  unsigned reserved_13 : 1;
134 
135  unsigned MPC_Muon1_wire_ : 7;
137  unsigned MPC_Muon1_quality_ : 4;
138  unsigned reserved_14 : 1;
139 
141  unsigned MPC_Muon1_bend_ : 1;
142  unsigned MPC_Muon1_SyncErr_ : 1;
143  unsigned MPC_Muon1_bx_ : 1;
144  unsigned MPC_Muon1_bc0_ : 1;
145  unsigned MPC_Muon1_cscid_low : 3;
146  unsigned reserved_15 : 1;
147 
148  unsigned MPC_Muon0_vpf_ : 1;
149  unsigned MPC_Muon0_cscid_bit4 : 1;
150  unsigned MPC_Muon1_vpf_ : 1;
151  unsigned MPC_Muon1_cscid_bit4 : 1;
152  unsigned mpcAcceptLCT0 : 1;
153  unsigned mpcAcceptLCT1 : 1;
154  unsigned reserved_16_1 : 2;
155  unsigned hs_thresh : 3;
156  unsigned ds_thresh : 3;
157  unsigned reserved_16_2 : 2;
158 
159  unsigned buffer_info_0 : 16;
160  unsigned r_buf_nbusy : 4;
161  unsigned buffer_info_1 : 12;
162  unsigned buffer_info_2 : 16;
163  unsigned buffer_info_3 : 16;
164  unsigned alct_delay : 4, clct_width : 4, mpc_tx_delay : 4, reserved_21 : 4;
165 
166  unsigned rpc_exists : 2;
167  unsigned rd_rpc_list : 2;
168  unsigned rd_nrpcs : 2;
169  unsigned rpc_read_enable : 1;
170  unsigned r_nlayers_hit_vec : 3;
171  unsigned pop_l1a_match_win : 4;
172  unsigned reserved_22 : 2;
173 
174  unsigned bd_status : 14;
175  unsigned reserved_23 : 2;
176  unsigned uptime : 14;
177  unsigned reserved_24 : 2;
178  unsigned firmRevCode : 14, reserved_25 : 2;
179  unsigned e0bline : 16;
180  } bits;
181 };
182 
183 #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
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
struct CSCTMBHeader2006::@488 bits
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 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