CMS 3D CMS Logo

CSCTMBHeader2006.h
Go to the documentation of this file.
1 #ifndef CSCTMBHeader2006_h
2 #define 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  std::vector<CSCCLCTDigi> CLCTDigis(uint32_t idlayer) override;
32  std::vector<CSCCorrelatedLCTDigi> CorrelatedLCTDigis(uint32_t idlayer) const override;
33 
36  unsigned short int sizeInWords() const override { return NWORDS; }
37 
38  unsigned short int NHeaderFrames() const override { return bits.nHeaderFrames; }
40  unsigned short* data() override { return (unsigned short*)(&bits); }
41  bool check() const override { return bits.e0bline == 0x6e0b && NHeaderFrames() + 1 == NWORDS; }
42 
44  void addCLCT0(const CSCCLCTDigi& digi) override;
45  void addCLCT1(const CSCCLCTDigi& digi) override;
46  void addALCT0(const CSCALCTDigi& digi) override;
47  void addALCT1(const CSCALCTDigi& digi) override;
48  void addCorrelatedLCT0(const CSCCorrelatedLCTDigi& digi) override;
49  void addCorrelatedLCT1(const CSCCorrelatedLCTDigi& digi) override;
50 
51  void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
52 
53  void print(std::ostream& os) const override;
54  struct {
55  unsigned b0cline : 16;
56  unsigned nTBins : 5, dumpCFEBs : 7, fifoMode : 3, reserved_1 : 1;
57  unsigned l1aNumber : 4, cscID : 4, boardID : 5, l1atype : 2, reserved_2 : 1;
58  unsigned bxnCount : 12, r_type : 2, reserved_3 : 2;
59  unsigned nHeaderFrames : 5, nCFEBs : 3, hasBuf : 1, preTrigTBins : 5, reserved_4 : 2;
60  unsigned l1aTxCounter : 4, trigSourceVect : 8, hasPreTrig : 4;
61  unsigned activeCFEBs : 5, CFEBsInstantiated : 5, runID : 4, reserved_6 : 2;
62  unsigned bxnPreTrigger : 12, syncError : 1, reserved_7 : 3;
63 
64  unsigned clct0_valid : 1;
65  unsigned clct0_quality : 3;
66  unsigned clct0_shape : 3;
67  unsigned clct0_strip_type : 1;
68  unsigned clct0_bend : 1;
69  unsigned clct0_key : 5;
70  unsigned clct0_cfeb_low : 1;
71  unsigned reserved_8 : 1;
72 
73  unsigned clct1_valid : 1;
74  unsigned clct1_quality : 3;
75  unsigned clct1_shape : 3;
76  unsigned clct1_strip_type : 1;
77  unsigned clct1_bend : 1;
78  unsigned clct1_key : 5;
79  unsigned clct1_cfeb_low : 1;
80  unsigned reserved_9 : 1;
81 
82  unsigned clct0_cfeb_high : 2;
83  unsigned clct0_bxn : 2;
84  unsigned clct0_sync_err : 1;
85  unsigned clct0_bx0_local : 1;
86  unsigned clct1_cfeb_high : 2;
87  unsigned clct1_bxn : 2;
88  unsigned clct1_sync_err : 1;
89  unsigned clct1_bx0_local : 1;
90  unsigned invalidPattern : 1;
91  unsigned reserved_10 : 3;
92 
93  unsigned tmbMatch : 1, alctOnly : 1, clctOnly : 1, bxn0Diff : 2, bxn1Diff : 2, alctMatchTime : 4, reserved_11 : 5;
94 
95  unsigned MPC_Muon0_wire_ : 7;
97  unsigned MPC_Muon0_quality_ : 4;
98  unsigned reserved_12 : 1;
99 
101  unsigned MPC_Muon0_bend_ : 1;
102  unsigned MPC_Muon0_SyncErr_ : 1;
103  unsigned MPC_Muon0_bx_ : 1;
104  unsigned MPC_Muon0_bc0_ : 1;
105  unsigned MPC_Muon0_cscid_low : 3;
106  unsigned reserved_13 : 1;
107 
108  unsigned MPC_Muon1_wire_ : 7;
110  unsigned MPC_Muon1_quality_ : 4;
111  unsigned reserved_14 : 1;
112 
114  unsigned MPC_Muon1_bend_ : 1;
115  unsigned MPC_Muon1_SyncErr_ : 1;
116  unsigned MPC_Muon1_bx_ : 1;
117  unsigned MPC_Muon1_bc0_ : 1;
118  unsigned MPC_Muon1_cscid_low : 3;
119  unsigned reserved_15 : 1;
120 
121  unsigned MPC_Muon0_vpf_ : 1;
122  unsigned MPC_Muon0_cscid_bit4 : 1;
123  unsigned MPC_Muon1_vpf_ : 1;
124  unsigned MPC_Muon1_cscid_bit4 : 1;
125  unsigned mpcAcceptLCT0 : 1;
126  unsigned mpcAcceptLCT1 : 1;
127  unsigned reserved_16_1 : 2;
128  unsigned hs_thresh : 3;
129  unsigned ds_thresh : 3;
130  unsigned reserved_16_2 : 2;
131 
132  unsigned buffer_info_0 : 16;
133  unsigned r_buf_nbusy : 4;
134  unsigned buffer_info_1 : 12;
135  unsigned buffer_info_2 : 16;
136  unsigned buffer_info_3 : 16;
137  unsigned alct_delay : 4, clct_width : 4, mpc_tx_delay : 4, reserved_21 : 4;
138 
139  unsigned rpc_exists : 2;
140  unsigned rd_rpc_list : 2;
141  unsigned rd_nrpcs : 2;
142  unsigned rpc_read_enable : 1;
143  unsigned r_nlayers_hit_vec : 3;
144  unsigned pop_l1a_match_win : 4;
145  unsigned reserved_22 : 2;
146 
147  unsigned bd_status : 14;
148  unsigned reserved_23 : 2;
149  unsigned uptime : 14;
150  unsigned reserved_24 : 2;
151  unsigned firmRevCode : 14, reserved_25 : 2;
152  unsigned e0bline : 16;
153  } bits;
154 };
155 
156 #endif
uint16_t ALCTMatchTime() const override
unsigned MPC_Muon0_clct_pattern_
void addALCT0(const CSCALCTDigi &digi) override
unsigned clct1_cfeb_high
struct CSCTMBHeader2006::@417 bits
unsigned MPC_Muon0_cscid_bit4
unsigned MPC_Muon1_clct_pattern_
unsigned MPC_Muon1_quality_
uint16_t L1ANumber() const override
unsigned CFEBsInstantiated
uint16_t NCFEBs() const override
unsigned MPC_Muon0_halfstrip_clct_pattern
unsigned clct0_strip_type
uint16_t syncError() const override
unsigned MPC_Muon1_cscid_low
uint16_t CLCTOnly() const override
unsigned MPC_Muon0_cscid_low
uint16_t ALCTOnly() const override
bool check() const override
void swapCLCTs(CSCCLCTDigi &digi1, CSCCLCTDigi &digi2)
void addCorrelatedLCT1(const CSCCorrelatedLCTDigi &digi) override
unsigned clct0_bx0_local
unsigned short int NHeaderFrames() const override
unsigned clct1_strip_type
uint16_t TMBMatch() const override
unsigned short int sizeInWords() const override
unsigned clct1_bx0_local
uint16_t syncErrorCLCT() const override
void addCLCT0(const CSCCLCTDigi &digi) override
for data packing
unsigned MPC_Muon0_SyncErr_
void setEventInformation(const CSCDMBHeader &dmbHeader) override
uint16_t Bxn1Diff() const override
void setNCFEBs(uint16_t ncfebs) override
std::vector< CSCCorrelatedLCTDigi > CorrelatedLCTDigis(uint32_t idlayer) const override
returns CorrelatedLCT digis
uint16_t Bxn0Diff() const override
unsigned MPC_Muon1_SyncErr_
unsigned MPC_Muon0_wire_
void addCLCT1(const CSCCLCTDigi &digi) override
uint16_t syncErrorMPC1() const override
uint16_t firmwareRevision() const override
unsigned MPC_Muon1_halfstrip_clct_pattern
uint16_t NTBins() const override
uint16_t BXNCount() const override
void addCorrelatedLCT0(const CSCCorrelatedLCTDigi &digi) override
unsigned pop_l1a_match_win
std::vector< CSCCLCTDigi > CLCTDigis(uint32_t idlayer) override
returns CLCT digis
unsigned MPC_Muon0_quality_
unsigned clct0_cfeb_high
unsigned short * data() override
returns the first data word
void addALCT1(const CSCALCTDigi &digi) override
unsigned r_nlayers_hit_vec
void print(std::ostream &os) const override
unsigned MPC_Muon1_cscid_bit4
uint16_t syncErrorMPC0() const override