CMS 3D CMS Logo

CSCTMBHeader2007.h
Go to the documentation of this file.
1 #ifndef EventFilter_CSCRawToDigi_CSCTMBHeader2007_h
2 #define EventFilter_CSCRawToDigi_CSCTMBHeader2007_h
5 
7  enum { NWORDS = 43 };
9  CSCTMBHeader2007(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  void setALCTMatchTime(uint16_t alctmatchtime) override { bits.matchWin = alctmatchtime & 0xF; }
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 & 0x1F; }
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.clct0_sync_err | bits.clct1_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  uint16_t L1AMatchTime() const override { return bits.pop_l1a_match_win; }
30 
32  uint16_t clct0_ComparatorCode() const override { return 0; }
33  uint16_t clct1_ComparatorCode() const override { return 0; }
34  uint16_t clct0_xky() const override { return 0; }
35  uint16_t clct1_xky() const override { return 0; }
36  uint16_t hmt_nhits() const override { return 0; }
37  uint16_t hmt_ALCTMatchTime() const override { return 0; }
38  uint16_t alctHMT() const override { return 0; }
39  uint16_t clctHMT() const override { return 0; }
40  uint16_t gem_enabled_fibers() const override { return 0; }
41  uint16_t gem_fifo_tbins() const override { return 0; }
42  uint16_t gem_fifo_pretrig() const override { return 0; }
43  uint16_t gem_zero_suppress() const override { return 0; }
44  uint16_t gem_sync_dataword() const override { return 0; }
45  uint16_t gem_timing_dataword() const override { return 0; }
46  uint16_t run3_CLCT_patternID() const override { return 0; }
47 
49  std::vector<CSCCLCTDigi> CLCTDigis(uint32_t idlayer) override;
51  std::vector<CSCCorrelatedLCTDigi> CorrelatedLCTDigis(uint32_t idlayer) const override;
53  CSCShowerDigi showerDigi(uint32_t idlayer) const override { return CSCShowerDigi(); }
55  CSCShowerDigi anodeShowerDigi(uint32_t idlayer) const override { return CSCShowerDigi(); }
57  CSCShowerDigi cathodeShowerDigi(uint32_t idlayer) const override { return CSCShowerDigi(); }
58 
61  unsigned short int sizeInWords() const override { return NWORDS; }
62 
63  unsigned short int NHeaderFrames() const override { return bits.nHeaderFrames; }
65  unsigned short* data() override { return (unsigned short*)(&bits); }
66  bool check() const override { return bits.e0bline == 0x6e0b; }
67 
69  void addCLCT0(const CSCCLCTDigi& digi) override;
70  void addCLCT1(const CSCCLCTDigi& digi) override;
71  void addALCT0(const CSCALCTDigi& digi) override;
72  void addALCT1(const CSCALCTDigi& digi) override;
73  void addCorrelatedLCT0(const CSCCorrelatedLCTDigi& digi) override;
74  void addCorrelatedLCT1(const CSCCorrelatedLCTDigi& digi) override;
75  void addShower(const CSCShowerDigi& digi) override {}
76  void addAnodeShower(const CSCShowerDigi& digi) override {}
77  void addCathodeShower(const CSCShowerDigi& digi) override {}
78 
79  void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
80 
81  void print(std::ostream& os) const override;
82 
83  struct {
84  unsigned b0cline : 16;
85  unsigned bxnCount : 12, dduCode1 : 3, flag1 : 1;
86  unsigned l1aNumber : 12, dduCode2 : 3, flag2 : 1;
87  unsigned readoutCounter : 12, dduCode3 : 3, flag3 : 1;
88  unsigned boardID : 5, cscID : 4, runID : 4, stackOvf : 1, syncError : 1, flag4 : 1;
89  unsigned nHeaderFrames : 6, fifoMode : 3, r_type : 2, l1atype : 2, hasBuf : 1, bufFull : 1, flag5 : 1;
90  unsigned bd_status : 15, flag6 : 1;
91  unsigned firmRevCode : 15, flag7 : 1;
92  unsigned bxnPreTrigger : 12, reserved : 3, flag8 : 1;
93  unsigned preTrigCounterLow : 15, flag9 : 1;
94  unsigned preTrigCounterHigh : 15, flag10 : 1;
95  unsigned clctCounterLow : 15, flag11 : 1;
96  unsigned clctCounterHigh : 15, flag12 : 1;
97  unsigned trigCounterLow : 15, flag13 : 1;
98  unsigned trigCounterHigh : 15, flag14 : 1;
99  unsigned alctCounterLow : 15, flag15 : 1;
100  unsigned alctCounterHigh : 15, flag16 : 1;
101  unsigned uptimeCounterLow : 15, flag17 : 1;
102  unsigned uptimeCounterHigh : 15, flag18 : 1;
103  unsigned nCFEBs : 3, nTBins : 5, fifoPretrig : 5, scopeExists : 1, vmeExists : 1, flag19 : 1;
104  unsigned hitThresh : 3, pidThresh : 4, nphThresh : 3, lyrThresh : 3, layerTrigEnabled : 1, staggerCSC : 1,
105  flag20 : 1;
106  unsigned triadPersist : 4, dmbThresh : 3, alct_delay : 4, clct_width : 4, flag21 : 1;
107  unsigned trigSourceVect : 9, r_nlayers_hit_vec : 6, flag22 : 1;
108  unsigned activeCFEBs : 5, readCFEBs : 5, pop_l1a_match_win : 4, layerTriggered : 1, flag23 : 1;
109  unsigned tmbMatch : 1, alctOnly : 1, clctOnly : 1, matchWin : 4, noTMBTrig : 1, noMPCFrame : 1, noMPCResponse : 1,
110  reserved1 : 5, flag24 : 1;
112  flag25 : 1;
114  flag26 : 1;
117  flag27 : 1;
118  unsigned alct0Valid : 1, alct0Quality : 2, alct0Amu : 1, alct0Key : 7, reserved2 : 4, flag28 : 1;
119  unsigned alct1Valid : 1, alct1Quality : 2, alct1Amu : 1, alct1Key : 7, reserved3 : 4, flag29 : 1;
120  unsigned alctBXN : 5, alctSeqStatus : 2, alctSEUStatus : 2, alctReserved : 4, alctCfg : 1, reserved4 : 1,
121  flag30 : 1;
129  MPCAccept : 2, CFEBsEnabled : 5, flag35 : 1;
130  unsigned RPCExists : 2, RPCList : 2, NRPCs : 2, RPCEnable : 1, RPCMatch : 8, flag36 : 1;
131  unsigned addrPretrig : 12, bufReady : 1, reserved5 : 2, flag37 : 1;
132  unsigned addrL1a : 12, reserved6 : 3, flag38 : 1;
133  unsigned reserved7 : 15, flag39 : 1;
134  unsigned reserved8 : 15, flag40 : 1;
135  unsigned reserved9 : 15, flag41 : 1;
136  unsigned e0bline : 16;
137  } bits;
138 };
139 
140 #endif
unsigned uptimeCounterHigh
unsigned trigCounterHigh
uint16_t syncError() const override
void addCorrelatedLCT1(const CSCCorrelatedLCTDigi &digi) override
uint16_t gem_sync_dataword() const override
struct CSCTMBHeader2007::@494 bits
unsigned short int sizeInWords() const override
uint16_t alctHMT() const override
void addCathodeShower(const CSCShowerDigi &digi) override
std::vector< CSCCorrelatedLCTDigi > CorrelatedLCTDigis(uint32_t idlayer) const override
returns CorrelatedLCT digis
bool check() const override
uint16_t run3_CLCT_patternID() const override
void setNCFEBs(uint16_t ncfebs) override
void addALCT0(const CSCALCTDigi &digi) override
unsigned MPC_Muon0_cscid_bit4
unsigned MPC_Muon1_SyncErr_
uint16_t ALCTOnly() const override
uint16_t clct0_ComparatorCode() const override
== Run 3 CSC-GEM Trigger Format
uint16_t gem_zero_suppress() const override
unsigned MPC_Muon0_quality_
uint16_t CLCTOnly() const override
void addCLCT1(const CSCCLCTDigi &digi) override
uint16_t hmt_nhits() const override
uint16_t gem_fifo_pretrig() const override
void swapCLCTs(CSCCLCTDigi &digi1, CSCCLCTDigi &digi2)
unsigned MPC_Muon0_clct_pattern_
uint16_t clct1_ComparatorCode() const override
uint16_t firmwareRevision() const override
uint16_t L1AMatchTime() const override
uint16_t TMBMatch() const override
unsigned short * data() override
returns the first data word
unsigned pop_l1a_match_win
uint16_t clct0_xky() const override
unsigned r_nlayers_hit_vec
std::vector< CSCCLCTDigi > CLCTDigis(uint32_t idlayer) override
returns CLCT digis
void print(std::ostream &os) const override
uint16_t NTBins() const override
unsigned MPC_Muon0_cscid_low
uint16_t hmt_ALCTMatchTime() const override
void addShower(const CSCShowerDigi &digi) override
uint16_t BXNCount() const override
void addALCT1(const CSCALCTDigi &digi) override
void setALCTMatchTime(uint16_t alctmatchtime) override
unsigned short int NHeaderFrames() const override
uint16_t syncErrorCLCT() const override
uint16_t L1ANumber() const override
CSCShowerDigi cathodeShowerDigi(uint32_t idlayer) const override
returns cathode HMT Shower digi
unsigned MPC_Muon1_halfstrip_clct_pattern
unsigned clctCounterHigh
uint16_t Bxn0Diff() const override
void setEventInformation(const CSCDMBHeader &dmbHeader) override
unsigned MPC_Muon0_halfstrip_clct_pattern
unsigned MPC_Muon1_clct_pattern_
unsigned preTrigCounterHigh
uint16_t ALCTMatchTime() const override
uint16_t gem_timing_dataword() const override
CSCShowerDigi anodeShowerDigi(uint32_t idlayer) const override
returns anode HMT Shower digi
uint16_t gem_fifo_tbins() const override
unsigned MPC_Muon0_SyncErr_
void addAnodeShower(const CSCShowerDigi &digi) override
uint16_t clct1_xky() const override
unsigned preTrigCounterLow
CSCShowerDigi showerDigi(uint32_t idlayer) const override
returns lct HMT Shower digi
void addCLCT0(const CSCCLCTDigi &digi) override
for data packing
unsigned MPC_Muon1_cscid_bit4
uint16_t syncErrorMPC1() const override
uint16_t NCFEBs() const override
uint16_t clctHMT() const override
uint16_t Bxn1Diff() const override
uint16_t gem_enabled_fibers() const override
unsigned MPC_Muon1_cscid_low
void addCorrelatedLCT0(const CSCCorrelatedLCTDigi &digi) override
uint16_t syncErrorMPC0() const override
unsigned MPC_Muon1_quality_