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