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