CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  uint16_t CLCTOnly() const override { return bits.clctOnly; }
15  uint16_t ALCTOnly() const override { return bits.alctOnly; }
16  uint16_t TMBMatch() const override { return bits.tmbMatch; }
17  uint16_t Bxn0Diff() const override { return bits.bxn0Diff; }
18  uint16_t Bxn1Diff() const override { return bits.bxn1Diff; }
19  uint16_t L1ANumber() const override { return bits.l1aNumber; }
20  uint16_t NTBins() const override { return bits.nTBins; }
21  uint16_t NCFEBs() const override { return bits.nCFEBs; }
22  void setNCFEBs(uint16_t ncfebs) override { bits.nCFEBs = ncfebs & 0x1F; }
23  uint16_t firmwareRevision() const override { return bits.firmRevCode; }
24  uint16_t syncError() const override { return bits.syncError; }
25  uint16_t syncErrorCLCT() const override { return (bits.clct0_sync_err | bits.clct1_sync_err); }
26  uint16_t syncErrorMPC0() const override { return bits.MPC_Muon0_SyncErr_; }
27  uint16_t syncErrorMPC1() const override { return bits.MPC_Muon1_SyncErr_; }
28 
30  uint16_t clct0_ComparatorCode() const override { return 0; }
31  uint16_t clct1_ComparatorCode() const override { return 0; }
32  uint16_t clct0_xky() const override { return 0; }
33  uint16_t clct1_xky() const override { return 0; }
34  uint16_t hmt_nhits() const override { return 0; }
35  uint16_t hmt_ALCTMatchTime() const override { return 0; }
36  uint16_t gem_enabled_fibers() const override { return 0; }
37  uint16_t gem_fifo_tbins() const override { return 0; }
38  uint16_t gem_fifo_pretrig() const override { return 0; }
39  uint16_t gem_zero_suppress() const override { return 0; }
40  uint16_t gem_sync_dataword() const override { return 0; }
41  uint16_t gem_timing_dataword() const override { return 0; }
42  uint16_t run3_CLCT_patternID() const override { return 0; }
43 
45  std::vector<CSCCLCTDigi> CLCTDigis(uint32_t idlayer) override;
47  std::vector<CSCCorrelatedLCTDigi> CorrelatedLCTDigis(uint32_t idlayer) const override;
49  CSCShowerDigi showerDigi(uint32_t idlayer) const override { return CSCShowerDigi(); }
50 
53  unsigned short int sizeInWords() const override { return NWORDS; }
54 
55  unsigned short int NHeaderFrames() const override { return bits.nHeaderFrames; }
57  unsigned short* data() override { return (unsigned short*)(&bits); }
58  bool check() const override { return bits.e0bline == 0x6e0b && NHeaderFrames() + 1 == NWORDS; }
59 
61  void addCLCT0(const CSCCLCTDigi& digi) override;
62  void addCLCT1(const CSCCLCTDigi& digi) override;
63  void addALCT0(const CSCALCTDigi& digi) override;
64  void addALCT1(const CSCALCTDigi& digi) override;
65  void addCorrelatedLCT0(const CSCCorrelatedLCTDigi& digi) override;
66  void addCorrelatedLCT1(const CSCCorrelatedLCTDigi& digi) override;
67  void addShower(const CSCShowerDigi& digi) override {}
68 
69  void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
70 
71  void print(std::ostream& os) const override;
72  struct {
73  unsigned b0cline : 16;
74  unsigned nTBins : 5, dumpCFEBs : 7, fifoMode : 3, reserved_1 : 1;
75  unsigned l1aNumber : 4, cscID : 4, boardID : 5, l1atype : 2, reserved_2 : 1;
76  unsigned bxnCount : 12, r_type : 2, reserved_3 : 2;
77  unsigned nHeaderFrames : 5, nCFEBs : 3, hasBuf : 1, preTrigTBins : 5, reserved_4 : 2;
78  unsigned l1aTxCounter : 4, trigSourceVect : 8, hasPreTrig : 4;
79  unsigned activeCFEBs : 5, CFEBsInstantiated : 5, runID : 4, reserved_6 : 2;
80  unsigned bxnPreTrigger : 12, syncError : 1, reserved_7 : 3;
81 
82  unsigned clct0_valid : 1;
83  unsigned clct0_quality : 3;
84  unsigned clct0_shape : 3;
85  unsigned clct0_strip_type : 1;
86  unsigned clct0_bend : 1;
87  unsigned clct0_key : 5;
88  unsigned clct0_cfeb_low : 1;
89  unsigned reserved_8 : 1;
90 
91  unsigned clct1_valid : 1;
92  unsigned clct1_quality : 3;
93  unsigned clct1_shape : 3;
94  unsigned clct1_strip_type : 1;
95  unsigned clct1_bend : 1;
96  unsigned clct1_key : 5;
97  unsigned clct1_cfeb_low : 1;
98  unsigned reserved_9 : 1;
99 
100  unsigned clct0_cfeb_high : 2;
101  unsigned clct0_bxn : 2;
102  unsigned clct0_sync_err : 1;
103  unsigned clct0_bx0_local : 1;
104  unsigned clct1_cfeb_high : 2;
105  unsigned clct1_bxn : 2;
106  unsigned clct1_sync_err : 1;
107  unsigned clct1_bx0_local : 1;
108  unsigned invalidPattern : 1;
109  unsigned reserved_10 : 3;
110 
111  unsigned tmbMatch : 1, alctOnly : 1, clctOnly : 1, bxn0Diff : 2, bxn1Diff : 2, alctMatchTime : 4, reserved_11 : 5;
112 
113  unsigned MPC_Muon0_wire_ : 7;
115  unsigned MPC_Muon0_quality_ : 4;
116  unsigned reserved_12 : 1;
117 
119  unsigned MPC_Muon0_bend_ : 1;
120  unsigned MPC_Muon0_SyncErr_ : 1;
121  unsigned MPC_Muon0_bx_ : 1;
122  unsigned MPC_Muon0_bc0_ : 1;
123  unsigned MPC_Muon0_cscid_low : 3;
124  unsigned reserved_13 : 1;
125 
126  unsigned MPC_Muon1_wire_ : 7;
128  unsigned MPC_Muon1_quality_ : 4;
129  unsigned reserved_14 : 1;
130 
132  unsigned MPC_Muon1_bend_ : 1;
133  unsigned MPC_Muon1_SyncErr_ : 1;
134  unsigned MPC_Muon1_bx_ : 1;
135  unsigned MPC_Muon1_bc0_ : 1;
136  unsigned MPC_Muon1_cscid_low : 3;
137  unsigned reserved_15 : 1;
138 
139  unsigned MPC_Muon0_vpf_ : 1;
140  unsigned MPC_Muon0_cscid_bit4 : 1;
141  unsigned MPC_Muon1_vpf_ : 1;
142  unsigned MPC_Muon1_cscid_bit4 : 1;
143  unsigned mpcAcceptLCT0 : 1;
144  unsigned mpcAcceptLCT1 : 1;
145  unsigned reserved_16_1 : 2;
146  unsigned hs_thresh : 3;
147  unsigned ds_thresh : 3;
148  unsigned reserved_16_2 : 2;
149 
150  unsigned buffer_info_0 : 16;
151  unsigned r_buf_nbusy : 4;
152  unsigned buffer_info_1 : 12;
153  unsigned buffer_info_2 : 16;
154  unsigned buffer_info_3 : 16;
155  unsigned alct_delay : 4, clct_width : 4, mpc_tx_delay : 4, reserved_21 : 4;
156 
157  unsigned rpc_exists : 2;
158  unsigned rd_rpc_list : 2;
159  unsigned rd_nrpcs : 2;
160  unsigned rpc_read_enable : 1;
161  unsigned r_nlayers_hit_vec : 3;
162  unsigned pop_l1a_match_win : 4;
163  unsigned reserved_22 : 2;
164 
165  unsigned bd_status : 14;
166  unsigned reserved_23 : 2;
167  unsigned uptime : 14;
168  unsigned reserved_24 : 2;
169  unsigned firmRevCode : 14, reserved_25 : 2;
170  unsigned e0bline : 16;
171  } bits;
172 };
173 
174 #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 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
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
unsigned clct1_strip_type
void addCLCT0(const CSCCLCTDigi &digi) override
for data packing
unsigned MPC_Muon0_SyncErr_
void setEventInformation(const CSCDMBHeader &dmbHeader) override
uint16_t CLCTOnly() const override
unsigned short int NHeaderFrames() const override
void setNCFEBs(uint16_t ncfebs) override
CSCShowerDigi showerDigi(uint32_t idlayer) const override
returns HMT Shower digi
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 run3_CLCT_patternID() const override
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
struct CSCTMBHeader2006::@477 bits
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