CMS 3D CMS Logo

CSCTMBHeader2013.h
Go to the documentation of this file.
1 #ifndef CSCTMBHeader2013_h
2 #define CSCTMBHeader2013_h
5 
6 
8  enum {NWORDS = 43};
10  CSCTMBHeader2013(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.matchWin;}
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 0;}
19  uint16_t Bxn1Diff() const override {return 0;}
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 & 0x7F;}
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.clct_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 
35 
38  unsigned short int sizeInWords() const override {return NWORDS;}
39 
40  unsigned short int NHeaderFrames() const override {return bits.nHeaderFrames;}
42  unsigned short * data() override {return (unsigned short *)(&bits);}
43  bool check() const override {return bits.e0bline==0x6e0b;}
44 
46  //void setChamberId(const CSCDetId & detId) {theChamberId = detId;}
47 
49  void addCLCT0(const CSCCLCTDigi & digi) override;
50  void addCLCT1(const CSCCLCTDigi & digi) override;
51  void addALCT0(const CSCALCTDigi & digi) override;
52  void addALCT1(const CSCALCTDigi & digi) override;
53  void addCorrelatedLCT0(const CSCCorrelatedLCTDigi & digi) override;
54  void addCorrelatedLCT1(const CSCCorrelatedLCTDigi & digi) override;
55 
56  void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
57 
58  void print(std::ostream & os) const override;
59 
60  struct {
61  // 0
62  unsigned b0cline:16;
63  unsigned bxnCount:12, dduCode1:3, flag1:1;
64  unsigned l1aNumber:12, dduCode2:3, flag2:1;
65  unsigned readoutCounter:12, dduCode3:3, flag3:1;
66  // 4
67  unsigned boardID:5, cscID:4, runID:4, stackOvf:1, syncError:1, flag4:1;
68  unsigned nHeaderFrames:6, fifoMode:3, r_type:2, l1atype:2, hasBuf:1, bufFull:1, flag5:1;
69  unsigned bd_status:15, flag6:1;
70  unsigned firmRevCode:15, flag7:1;
71  // 8
73  unsigned preTrigCounterLow:15, flag9:1;
74  unsigned preTrigCounterHigh:15, flag10:1;
75  unsigned clctCounterLow:15, flag11:1;
76  // 12
77  unsigned clctCounterHigh:15, flag12:1;
78  unsigned trigCounterLow:15, flag13:1;
79  unsigned trigCounterHigh:15, flag14:1;
80  unsigned alctCounterLow:15, flag15:1;
81  // 16
82  unsigned alctCounterHigh:15, flag16:1;
83  unsigned uptimeCounterLow:15, flag17:1;
84  unsigned uptimeCounterHigh:15, flag18:1;
85  unsigned nCFEBs:3, nTBins:5, fifoPretrig:5, scopeExists:1, vmeExists:1, flag19:1;
86  // 20
91  // 24
96  // 28
101  // 32
106  // 36
111  // 40
112  // unsigned buf_fence_cnt_peak:12, reserved8:3, flag40:1;
115  unsigned e0bline:16;
116  } bits;
117 
118 
119 };
120 
121 #endif
122 
unsigned trigCounterHigh
uint16_t CLCTOnly() const override
unsigned parity_err_cfeb_ram
uint16_t ALCTOnly() const override
unsigned MPC_Muon1_halfstrip_clct_pattern
unsigned cfeb_badbits_found
unsigned tmb_allow_alct_ro
void addCLCT1(const CSCCLCTDigi &digi) override
unsigned MPC_Muon1_cscid_bit4
unsigned preTrigCounterHigh
unsigned buf_fence_cnt_is_peak
uint16_t Bxn1Diff() const override
void addCorrelatedLCT1(const CSCCorrelatedLCTDigi &digi) override
unsigned alctCounterHigh
uint16_t syncErrorCLCT() const override
unsigned MPC_Muon0_quality_
unsigned bcb_read_enable
unsigned MPC_Muon0_SyncErr_
uint16_t NTBins() const override
unsigned parity_err_cfeb_ram_2
uint16_t Bxn0Diff() const override
unsigned MPC_Muon0_clct_pattern_
uint16_t syncError() const override
unsigned uptimeCounterLow
unsigned lyr_thresh_pretrig
unsigned MPC_Muon1_clct_pattern_
void addALCT1(const CSCALCTDigi &digi) override
void swapCLCTs(CSCCLCTDigi &digi1, CSCCLCTDigi &digi2)
uint16_t firmwareRevision() const override
uint16_t syncErrorMPC1() const override
unsigned pop_l1a_match_win
unsigned MPC_Muon0_cscid_low
unsigned tmb_non_trig_keep
unsigned short int sizeInWords() const override
void addCLCT0(const CSCCLCTDigi &digi) override
Needed before data packing.
unsigned tmb_clct1_discard
unsigned pid_thresh_postdrift
unsigned short int NHeaderFrames() const override
unsigned short * data() override
returns the first data word
struct CSCTMBHeader2013::@434 bits
void addCorrelatedLCT0(const CSCCorrelatedLCTDigi &digi) override
unsigned MPC_Muon0_halfstrip_clct_pattern
uint16_t L1ANumber() const override
bool check() const override
unsigned uptimeCounterHigh
void setNCFEBs(uint16_t ncfebs) override
std::vector< CSCCLCTDigi > CLCTDigis(uint32_t idlayer) override
returns CLCT digis
unsigned MPC_Muon1_SyncErr_
std::vector< CSCCorrelatedLCTDigi > CorrelatedLCTDigis(uint32_t idlayer) const override
returns CorrelatedLCT digis
uint16_t TMBMatch() const override
unsigned parity_err_summary
unsigned r_nlayers_hit_vec
unsigned tmb_allow_clct_ro
unsigned clctCounterHigh
uint16_t ALCTMatchTime() const override
unsigned cfeb_badbits_blocked
uint16_t NCFEBs() const override
void setEventInformation(const CSCDMBHeader &dmbHeader) override
unsigned cfeb_badbits_found_2
unsigned alct_pretrig_win
unsigned MPC_Muon0_cscid_bit4
uint16_t BXNCount() const override
unsigned MPC_Muon1_quality_
unsigned clock_lock_lost
void addALCT0(const CSCALCTDigi &digi) override
unsigned preTrigCounterLow
unsigned tmb_clct0_discard
uint16_t syncErrorMPC0() const override
unsigned MPC_Muon1_cscid_low
void print(std::ostream &os) const override
unsigned tmb_allow_match_ro