CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual void setEventInformation(const CSCDMBHeader & dmbHeader);
12 
13  virtual uint16_t BXNCount() const {return bits.bxnCount;}
14  virtual uint16_t ALCTMatchTime() const {return bits.alctMatchTime;}
15  virtual uint16_t CLCTOnly() const {return bits.clctOnly;}
16  virtual uint16_t ALCTOnly() const {return bits.alctOnly;}
17  virtual uint16_t TMBMatch() const {return bits.tmbMatch;}
18  virtual uint16_t Bxn0Diff() const {return bits.bxn0Diff;}
19  virtual uint16_t Bxn1Diff() const {return bits.bxn1Diff;}
20  virtual uint16_t L1ANumber() const {return bits.l1aNumber;}
21  virtual uint16_t NTBins() const {return bits.nTBins;}
22  virtual uint16_t NCFEBs() const {return bits.nCFEBs;}
23  virtual void setNCFEBs(uint16_t ncfebs) {bits.nCFEBs = ncfebs & 0x1F;}
24  virtual uint16_t firmwareRevision() const {return bits.firmRevCode;}
25  virtual uint16_t syncError() const {return bits.syncError;}
26  virtual uint16_t syncErrorCLCT() const {return (bits.clct0_sync_err | bits.clct1_sync_err);}
27  virtual uint16_t syncErrorMPC0() const {return bits.MPC_Muon0_SyncErr_;}
28  virtual uint16_t syncErrorMPC1() const {return bits.MPC_Muon1_SyncErr_;}
29 
31  virtual std::vector<CSCCLCTDigi> CLCTDigis(uint32_t idlayer);
33  virtual std::vector<CSCCorrelatedLCTDigi> CorrelatedLCTDigis(uint32_t idlayer) const;
34 
37  unsigned short int sizeInWords() const {return NWORDS;}
38 
39  virtual unsigned short int NHeaderFrames() const {return bits.nHeaderFrames;}
41  virtual unsigned short * data() {return (unsigned short *)(&bits);}
42  virtual bool check() const {return bits.e0bline==0x6e0b && NHeaderFrames()+1 == NWORDS;}
43 
45  virtual void addCLCT0(const CSCCLCTDigi & digi);
46  virtual void addCLCT1(const CSCCLCTDigi & digi);
47  virtual void addALCT0(const CSCALCTDigi & digi);
48  virtual void addALCT1(const CSCALCTDigi & digi);
49  virtual void addCorrelatedLCT0(const CSCCorrelatedLCTDigi & digi);
50  virtual void addCorrelatedLCT1(const CSCCorrelatedLCTDigi & digi);
51 
52  void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
53 
54  virtual void print(std::ostream & os) const;
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 
unsigned MPC_Muon0_clct_pattern_
unsigned clct1_cfeb_high
virtual uint16_t Bxn1Diff() const
unsigned MPC_Muon0_cscid_bit4
unsigned MPC_Muon1_clct_pattern_
virtual bool check() const
unsigned MPC_Muon1_quality_
virtual void addCorrelatedLCT1(const CSCCorrelatedLCTDigi &digi)
virtual void addCorrelatedLCT0(const CSCCorrelatedLCTDigi &digi)
virtual uint16_t syncErrorMPC0() const
unsigned CFEBsInstantiated
virtual unsigned short * data()
returns the first data word
virtual uint16_t BXNCount() const
unsigned MPC_Muon0_halfstrip_clct_pattern
unsigned clct0_strip_type
virtual void setEventInformation(const CSCDMBHeader &dmbHeader)
virtual uint16_t syncErrorMPC1() const
virtual void addCLCT1(const CSCCLCTDigi &digi)
unsigned MPC_Muon1_cscid_low
unsigned short int sizeInWords() const
unsigned MPC_Muon0_cscid_low
virtual uint16_t TMBMatch() const
struct CSCTMBHeader2006::@311 bits
virtual uint16_t ALCTOnly() const
virtual uint16_t Bxn0Diff() const
void swapCLCTs(CSCCLCTDigi &digi1, CSCCLCTDigi &digi2)
virtual uint16_t firmwareRevision() const
virtual uint16_t L1ANumber() const
unsigned clct0_bx0_local
unsigned clct1_strip_type
unsigned clct1_bx0_local
unsigned MPC_Muon0_SyncErr_
virtual uint16_t NTBins() const
virtual std::vector< CSCCLCTDigi > CLCTDigis(uint32_t idlayer)
returns CLCT digis
virtual void addCLCT0(const CSCCLCTDigi &digi)
for data packing
virtual uint16_t syncError() const
virtual void print(std::ostream &os) const
unsigned MPC_Muon1_SyncErr_
virtual std::vector< CSCCorrelatedLCTDigi > CorrelatedLCTDigis(uint32_t idlayer) const
returns CorrelatedLCT digis
virtual void addALCT1(const CSCALCTDigi &digi)
virtual uint16_t CLCTOnly() const
unsigned MPC_Muon0_wire_
virtual uint16_t NCFEBs() const
unsigned MPC_Muon1_halfstrip_clct_pattern
virtual uint16_t syncErrorCLCT() const
virtual void addALCT0(const CSCALCTDigi &digi)
virtual unsigned short int NHeaderFrames() const
unsigned pop_l1a_match_win
unsigned MPC_Muon0_quality_
unsigned clct0_cfeb_high
unsigned r_nlayers_hit_vec
virtual uint16_t ALCTMatchTime() const
unsigned MPC_Muon1_cscid_bit4
virtual void setNCFEBs(uint16_t ncfebs)