CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCTMBHeader2013.h
Go to the documentation of this file.
1 #ifndef EventFilter_CSCRawToDigi_CSCTMBHeader2013_h
2 #define EventFilter_CSCRawToDigi_CSCTMBHeader2013_h
5 
7  enum { NWORDS = 43 };
9  CSCTMBHeader2013(const unsigned short* buf);
10  void setEventInformation(const CSCDMBHeader& dmbHeader) override;
11 
12  uint16_t BXNCount() const override { return bits.bxnCount; }
13  uint16_t ALCTMatchTime() const override { return bits.matchWin; }
14  uint16_t CLCTOnly() const override { return bits.clctOnly; }
15  uint16_t ALCTOnly() const override { return bits.alctOnly; }
16  uint16_t TMBMatch() const override { return bits.tmbMatch; }
17  uint16_t Bxn0Diff() const override { return 0; }
18  uint16_t Bxn1Diff() const override { return 0; }
19  uint16_t L1ANumber() const override { return bits.l1aNumber; }
20  uint16_t NTBins() const override { return bits.nTBins; }
21  uint16_t NCFEBs() const override { return bits.nCFEBs; }
22  void setNCFEBs(uint16_t ncfebs) override { bits.nCFEBs = ncfebs & 0x7F; }
23  uint16_t firmwareRevision() const override { return bits.firmRevCode; }
24  uint16_t syncError() const override { return bits.syncError; }
25  uint16_t syncErrorCLCT() const override { return bits.clct_sync_err; }
26  uint16_t syncErrorMPC0() const override { return bits.MPC_Muon0_SyncErr_; }
27  uint16_t syncErrorMPC1() const override { return bits.MPC_Muon1_SyncErr_; }
28 
30  uint16_t clct0_ComparatorCode() const override { return 0; }
31  uint16_t clct1_ComparatorCode() const override { return 0; }
32  uint16_t clct0_xky() const override { return 0; }
33  uint16_t clct1_xky() const override { return 0; }
34  uint16_t hmt_nhits() const override { return 0; }
35  uint16_t hmt_ALCTMatchTime() const override { return 0; }
36  uint16_t gem_enabled_fibers() const override { return 0; }
37  uint16_t gem_fifo_tbins() const override { return 0; }
38  uint16_t gem_fifo_pretrig() const override { return 0; }
39  uint16_t gem_zero_suppress() const override { return 0; }
40  uint16_t gem_sync_dataword() const override { return 0; }
41  uint16_t gem_timing_dataword() const override { return 0; }
42  uint16_t run3_CLCT_patternID() const override { return 0; }
43 
45  std::vector<CSCCLCTDigi> CLCTDigis(uint32_t idlayer) override;
47  std::vector<CSCCorrelatedLCTDigi> CorrelatedLCTDigis(uint32_t idlayer) const override;
49  CSCShowerDigi showerDigi(uint32_t idlayer) const override { return CSCShowerDigi(); }
50 
53  unsigned short int sizeInWords() const override { return NWORDS; }
54 
55  unsigned short int NHeaderFrames() const override { return bits.nHeaderFrames; }
57  unsigned short* data() override { return (unsigned short*)(&bits); }
58  bool check() const override { return bits.e0bline == 0x6e0b; }
59 
61  void addCLCT0(const CSCCLCTDigi& digi) override;
62  void addCLCT1(const CSCCLCTDigi& digi) override;
63  void addALCT0(const CSCALCTDigi& digi) override;
64  void addALCT1(const CSCALCTDigi& digi) override;
65  void addCorrelatedLCT0(const CSCCorrelatedLCTDigi& digi) override;
66  void addCorrelatedLCT1(const CSCCorrelatedLCTDigi& digi) override;
67  void addShower(const CSCShowerDigi& digi) override {}
68 
69  void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
70 
71  void print(std::ostream& os) const override;
72 
73  struct {
74  // 0
75  unsigned b0cline : 16;
76  unsigned bxnCount : 12, dduCode1 : 3, flag1 : 1;
77  unsigned l1aNumber : 12, dduCode2 : 3, flag2 : 1;
78  unsigned readoutCounter : 12, dduCode3 : 3, flag3 : 1;
79  // 4
80  unsigned boardID : 5, cscID : 4, runID : 4, stackOvf : 1, syncError : 1, flag4 : 1;
81  unsigned nHeaderFrames : 6, fifoMode : 3, r_type : 2, l1atype : 2, hasBuf : 1, bufFull : 1, flag5 : 1;
82  unsigned bd_status : 15, flag6 : 1;
83  unsigned firmRevCode : 15, flag7 : 1;
84  // 8
86  unsigned preTrigCounterLow : 15, flag9 : 1;
87  unsigned preTrigCounterHigh : 15, flag10 : 1;
88  unsigned clctCounterLow : 15, flag11 : 1;
89  // 12
90  unsigned clctCounterHigh : 15, flag12 : 1;
91  unsigned trigCounterLow : 15, flag13 : 1;
92  unsigned trigCounterHigh : 15, flag14 : 1;
93  unsigned alctCounterLow : 15, flag15 : 1;
94  // 16
95  unsigned alctCounterHigh : 15, flag16 : 1;
96  unsigned uptimeCounterLow : 15, flag17 : 1;
97  unsigned uptimeCounterHigh : 15, flag18 : 1;
98  unsigned nCFEBs : 3, nTBins : 5, fifoPretrig : 5, scopeExists : 1, vmeExists : 1, flag19 : 1;
99  // 20
100  unsigned hitThresh : 3, pidThresh : 4, nphThresh : 3, pid_thresh_postdrift : 4, staggerCSC : 1, flag20 : 1;
101  unsigned triadPersist : 4, dmbThresh : 3, alct_delay : 4, clct_width : 4, flag21 : 1;
102  unsigned trigSourceVect : 9, r_nlayers_hit_vec : 6, flag22 : 1;
103  unsigned activeCFEBs : 5, readCFEBs : 5, pop_l1a_match_win : 4, aff_source : 1, flag23 : 1;
104  // 24
105  unsigned tmbMatch : 1, alctOnly : 1, clctOnly : 1, matchWin : 4, noALCT : 1, oneALCT : 1, oneCLCT : 1, twoALCT : 1,
106  twoCLCT : 1, dupeALCT : 1, dupeCLCT : 1, lctRankErr : 1, flag24 : 1;
107  unsigned clct0_valid : 1, clct0_quality : 3, clct0_shape : 4, clct0_key_low : 7, flag25 : 1;
108  unsigned clct1_valid : 1, clct1_quality : 3, clct1_shape : 4, clct1_key_low : 7, flag26 : 1;
111  flag27 : 1;
112  // 28
113  unsigned alct0Valid : 1, alct0Quality : 2, alct0Amu : 1, alct0Key : 7, alct_pretrig_win : 4, flag28 : 1;
114  unsigned alct1Valid : 1, alct1Quality : 2, alct1Amu : 1, alct1Key : 7, drift_delay : 2, bcb_read_enable : 1,
115  hs_layer_trig : 1, flag29 : 1;
117  bx0_match : 1, flag30 : 1;
119  // 32
126  MPCAccept : 2, CFEBsEnabled : 5, flag35 : 1;
127  // 36
128  unsigned RPCList : 2, NRPCs : 2, RPCEnable : 1, fifo_tbins_rpc : 5, fifo_pretrig_rpc : 5, flag36 : 1;
129  unsigned r_wr_buf_adr : 11, r_wr_buf_ready : 1, wr_buf_ready : 1, buf_q_full : 1, buf_q_empty : 1, flag37 : 1;
131  flag38 : 1;
133  // 40
139  unsigned e0bline : 16;
140  } bits;
141 };
142 
143 #endif
unsigned trigCounterHigh
struct CSCTMBHeader2013::@483 bits
unsigned parity_err_cfeb_ram
unsigned MPC_Muon1_halfstrip_clct_pattern
uint16_t run3_CLCT_patternID() const override
uint16_t syncError() const override
unsigned cfeb_badbits_found
uint16_t syncErrorCLCT() const override
uint16_t L1ANumber() const override
unsigned tmb_allow_alct_ro
void addCLCT1(const CSCCLCTDigi &digi) override
unsigned MPC_Muon1_cscid_bit4
unsigned preTrigCounterHigh
uint16_t hmt_nhits() const override
unsigned buf_fence_cnt_is_peak
void addCorrelatedLCT1(const CSCCorrelatedLCTDigi &digi) override
unsigned alctCounterHigh
uint16_t BXNCount() const override
uint16_t gem_fifo_tbins() const override
unsigned MPC_Muon0_quality_
uint16_t gem_fifo_pretrig() const override
unsigned short int NHeaderFrames() const override
uint16_t NCFEBs() const override
unsigned MPC_Muon0_SyncErr_
unsigned parity_err_cfeb_ram_2
uint16_t ALCTOnly() const override
uint16_t TMBMatch() const override
CSCShowerDigi showerDigi(uint32_t idlayer) const override
returns HMT Shower digi
unsigned MPC_Muon0_clct_pattern_
uint16_t syncErrorMPC0() const override
void print(std::ostream &os) const override
unsigned uptimeCounterLow
uint16_t hmt_ALCTMatchTime() const override
unsigned lyr_thresh_pretrig
unsigned MPC_Muon1_clct_pattern_
void addALCT1(const CSCALCTDigi &digi) override
void swapCLCTs(CSCCLCTDigi &digi1, CSCCLCTDigi &digi2)
bool check() const override
uint16_t syncErrorMPC1() const override
unsigned pop_l1a_match_win
unsigned MPC_Muon0_cscid_low
uint16_t CLCTOnly() const override
unsigned tmb_non_trig_keep
void addCLCT0(const CSCCLCTDigi &digi) override
for data packing
unsigned tmb_clct1_discard
uint16_t gem_timing_dataword() const override
unsigned pid_thresh_postdrift
uint16_t Bxn1Diff() const override
unsigned short * data() override
returns the first data word
uint16_t gem_sync_dataword() const override
uint16_t clct0_xky() const override
uint16_t clct0_ComparatorCode() const override
== Run 3 CSC-GEM Trigger Format
void addCorrelatedLCT0(const CSCCorrelatedLCTDigi &digi) override
unsigned MPC_Muon0_halfstrip_clct_pattern
uint16_t NTBins() const override
unsigned uptimeCounterHigh
uint16_t firmwareRevision() const override
void setNCFEBs(uint16_t ncfebs) override
std::vector< CSCCLCTDigi > CLCTDigis(uint32_t idlayer) override
returns CLCT digis
unsigned MPC_Muon1_SyncErr_
unsigned parity_err_summary
unsigned r_nlayers_hit_vec
unsigned tmb_allow_clct_ro
unsigned short int sizeInWords() const override
uint16_t gem_zero_suppress() const override
uint16_t Bxn0Diff() const override
unsigned clctCounterHigh
unsigned cfeb_badbits_blocked
void setEventInformation(const CSCDMBHeader &dmbHeader) override
void addShower(const CSCShowerDigi &digi) override
unsigned cfeb_badbits_found_2
unsigned MPC_Muon0_cscid_bit4
uint16_t clct1_xky() const override
unsigned MPC_Muon1_quality_
unsigned clock_lock_lost
void addALCT0(const CSCALCTDigi &digi) override
unsigned preTrigCounterLow
std::vector< CSCCorrelatedLCTDigi > CorrelatedLCTDigis(uint32_t idlayer) const override
returns CorrelatedLCT digis
unsigned tmb_clct0_discard
uint16_t gem_enabled_fibers() const override
unsigned MPC_Muon1_cscid_low
uint16_t ALCTMatchTime() const override
unsigned tmb_allow_match_ro
uint16_t clct1_ComparatorCode() const override