CMS 3D CMS Logo

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