CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCTMBHeader2007.h
Go to the documentation of this file.
1 #ifndef CSCTMBHeader2007_h
2 #define CSCTMBHeader2007_h
5 
6 
8  enum {NWORDS = 43};
10  CSCTMBHeader2007(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.matchWin;}
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 0;}
19  virtual uint16_t Bxn1Diff() const {return 0;}
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 
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;}
39 
41  //void setChamberId(const CSCDetId & detId) {theChamberId = detId;}
42 
44  virtual void addCLCT0(const CSCCLCTDigi & digi);
45  virtual void addCLCT1(const CSCCLCTDigi & digi);
46  virtual void addALCT0(const CSCALCTDigi & digi);
47  virtual void addALCT1(const CSCALCTDigi & digi);
48  virtual void addCorrelatedLCT0(const CSCCorrelatedLCTDigi & digi);
49  virtual void addCorrelatedLCT1(const CSCCorrelatedLCTDigi & digi);
50 
51  void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2);
52 
53  virtual void print(std::ostream & os) const;
54 
55  struct {
56  unsigned b0cline:16;
57  unsigned bxnCount:12, dduCode1:3, flag1:1;
58  unsigned l1aNumber:12, dduCode2:3, flag2:1;
59  unsigned readoutCounter:12, dduCode3:3, flag3:1;
60  unsigned boardID:5, cscID:4, runID:4, stackOvf:1, syncError:1, flag4:1;
61  unsigned nHeaderFrames:6, fifoMode:3, r_type:2, l1atype:2, hasBuf:1, bufFull:1, flag5:1;
62  unsigned bd_status:15, flag6:1;
63  unsigned firmRevCode:15, flag7:1;
64  unsigned bxnPreTrigger:12, reserved:3, flag8:1;
65  unsigned preTrigCounterLow:15, flag9:1;
66  unsigned preTrigCounterHigh:15, flag10:1;
67  unsigned clctCounterLow:15, flag11:1;
68  unsigned clctCounterHigh:15, flag12:1;
69  unsigned trigCounterLow:15, flag13:1;
70  unsigned trigCounterHigh:15, flag14:1;
71  unsigned alctCounterLow:15, flag15:1;
72  unsigned alctCounterHigh:15, flag16:1;
73  unsigned uptimeCounterLow:15, flag17:1;
74  unsigned uptimeCounterHigh:15, flag18:1;
75  unsigned nCFEBs:3, nTBins:5, fifoPretrig:5, scopeExists:1, vmeExists:1, flag19:1;
92  unsigned RPCExists:2, RPCList:2, NRPCs:2, RPCEnable:1, RPCMatch:8, flag36:1;
93  unsigned addrPretrig:12, bufReady:1, reserved5:2, flag37:1;
94  unsigned addrL1a:12, reserved6:3, flag38:1;
95  unsigned reserved7:15, flag39:1;
96  unsigned reserved8:15, flag40:1;
97  unsigned reserved9:15, flag41:1;
98  unsigned e0bline:16;
99  } bits;
100 
101 
102 };
103 
104 #endif
105 
virtual uint16_t Bxn1Diff() const
unsigned uptimeCounterHigh
unsigned trigCounterHigh
virtual void addCLCT1(const CSCCLCTDigi &digi)
virtual uint16_t NCFEBs() const
virtual uint16_t TMBMatch() const
virtual uint16_t firmwareRevision() const
unsigned MPC_Muon0_cscid_bit4
virtual uint16_t BXNCount() const
unsigned MPC_Muon1_SyncErr_
unsigned uptimeCounterLow
unsigned layerTrigEnabled
virtual uint16_t NTBins() const
unsigned MPC_Muon0_quality_
virtual void addCorrelatedLCT0(const CSCCorrelatedLCTDigi &digi)
unsigned MPC_Muon0_bend_
virtual uint16_t L1ANumber() const
virtual bool check() const
virtual void addALCT1(const CSCALCTDigi &digi)
void swapCLCTs(CSCCLCTDigi &digi1, CSCCLCTDigi &digi2)
unsigned MPC_Muon0_clct_pattern_
virtual void addALCT0(const CSCALCTDigi &digi)
virtual std::vector< CSCCorrelatedLCTDigi > CorrelatedLCTDigis(uint32_t idlayer) const
returns CorrelatedLCT digis
unsigned MPC_Muon0_wire_
virtual unsigned short * data()
returns the first data word
virtual void print(std::ostream &os) const
virtual uint16_t ALCTMatchTime() const
virtual uint16_t CLCTOnly() const
unsigned pop_l1a_match_win
unsigned r_nlayers_hit_vec
unsigned alctCounterHigh
unsigned clct0_bx0_local
unsigned MPC_Muon0_cscid_low
unsigned clct0_cfeb_high
virtual unsigned short int NHeaderFrames() const
unsigned short int sizeInWords() const
unsigned MPC_Muon1_halfstrip_clct_pattern
unsigned MPC_Muon1_wire_
unsigned clctCounterHigh
unsigned MPC_Muon1_bend_
unsigned MPC_Muon0_halfstrip_clct_pattern
unsigned MPC_Muon1_clct_pattern_
unsigned preTrigCounterHigh
virtual void addCLCT0(const CSCCLCTDigi &digi)
Needed before data packing.
unsigned clct1_bx0_local
unsigned MPC_Muon0_SyncErr_
unsigned preTrigCounterLow
virtual void addCorrelatedLCT1(const CSCCorrelatedLCTDigi &digi)
virtual uint16_t ALCTOnly() const
unsigned MPC_Muon1_cscid_bit4
virtual std::vector< CSCCLCTDigi > CLCTDigis(uint32_t idlayer)
returns CLCT digis
unsigned MPC_Muon1_cscid_low
virtual void setEventInformation(const CSCDMBHeader &dmbHeader)
struct CSCTMBHeader2007::@279 bits
unsigned clct1_cfeb_high
unsigned MPC_Muon1_quality_
virtual uint16_t Bxn0Diff() const