CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCCLCTPreTriggerDigi.h
Go to the documentation of this file.
1 #ifndef CSCDigi_CSCCLCTPreTriggerDigi_h
2 #define CSCDigi_CSCCLCTPreTriggerDigi_h
3 
12 #include <cstdint>
13 #include <iosfwd>
14 
16 public:
18  CSCCLCTPreTriggerDigi(const int valid,
19  const int quality,
20  const int pattern,
21  const int striptype,
22  const int bend,
23  const int strip,
24  const int cfeb,
25  const int bx,
26  const int trknmb = 0,
27  const int fullbx = 0);
30 
32  void clear();
33 
35  bool isValid() const { return valid_; }
36 
38  int getQuality() const { return quality_; }
39 
41  int getPattern() const { return pattern_; }
42 
44  int getStripType() const { return striptype_; }
45 
47  int getBend() const { return bend_; }
48 
50  int getStrip() const { return strip_; }
51 
53  int getCFEB() const { return cfeb_; }
54 
56  int getBX() const { return bx_; }
57 
59  int getTrknmb() const { return trknmb_; }
60 
70  int getKeyStrip() const {
71  int keyStrip = cfeb_ * 32 + strip_;
72  return keyStrip;
73  }
74 
76  void setTrknmb(const uint16_t number) { trknmb_ = number; }
77 
79  int getFullBX() const { return fullbx_; }
80 
82  void setFullBX(const uint16_t fullbx) { fullbx_ = fullbx; }
83 
87  bool operator>(const CSCCLCTPreTriggerDigi&) const;
88 
90  bool operator==(const CSCCLCTPreTriggerDigi&) const;
91 
93  bool operator!=(const CSCCLCTPreTriggerDigi&) const;
94 
96  void print() const;
97 
98 private:
99  uint16_t valid_;
100  uint16_t quality_;
101  uint16_t pattern_;
102  uint16_t striptype_; // not used since mid-2008
103  uint16_t bend_;
104  uint16_t strip_;
105  uint16_t cfeb_;
106  uint16_t bx_;
107  uint16_t trknmb_;
108  uint16_t fullbx_;
109 };
110 
111 std::ostream& operator<<(std::ostream& o, const CSCCLCTPreTriggerDigi& digi);
112 
113 #endif
void print() const
Print content of digi.
int getCFEB() const
return Key CFEB ID
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting CLCTs.
int getStripType() const
return striptype
int getPattern() const
return pattern
string quality
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
bool operator!=(const CSCCLCTPreTriggerDigi &) const
True if the preceding one is false.
void setFullBX(const uint16_t fullbx)
Set 12-bit full BX.
bool operator==(const CSCCLCTPreTriggerDigi &) const
True if the two LCTs have exactly the same members (except the number).
void clear()
clear this CLCT
bool operator>(const CSCCLCTPreTriggerDigi &) const
int getTrknmb() const
return track number (1,2)
int getBend() const
return bend
int getQuality() const
return quality of a pattern (number of layers hit!)
int getBX() const
return BX
int getFullBX() const
return 12-bit full BX.
int getStrip() const
return halfstrip that goes from 0 to 31
bool isValid() const
check CLCT validity (1 - valid CLCT)