CMS 3D CMS Logo

CSCALCTDigi.h
Go to the documentation of this file.
1 #ifndef CSCDigi_CSCALCTDigi_h
2 #define CSCDigi_CSCALCTDigi_h
3 
12 #include <cstdint>
13 #include <iosfwd>
14 
15 class CSCALCTDigi {
16 public:
18  CSCALCTDigi(const int valid,
19  const int quality,
20  const int accel,
21  const int patternb,
22  const int keywire,
23  const int bx,
24  const int trknmb = 0);
26  CSCALCTDigi();
27 
29  void clear();
30 
32  bool isValid() const { return valid_; }
33 
35  void setValid(const int valid) { valid_ = valid; }
36 
38  int getQuality() const { return quality_; }
39 
41  void setQuality(const int quality) { quality_ = quality; }
42 
45  int getAccelerator() const { return accel_; }
46 
48  void setAccelerator(const int accelerator) { accel_ = accelerator; }
49 
53  int getCollisionB() const { return patternb_; }
54 
56  void setCollisionB(const int collision) { patternb_ = collision; }
57 
59  int getKeyWG() const { return keywire_; }
60 
62  void setKeyWG(const int keyWG) { keywire_ = keyWG; }
63 
65  int getBX() const { return bx_; }
66 
68  void setBX(const int BX) { bx_ = BX; }
69 
71  int getTrknmb() const { return trknmb_; }
72 
74  void setTrknmb(const uint16_t number) { trknmb_ = number; }
75 
77  int getFullBX() const { return fullbx_; }
78 
80  void setFullBX(const uint16_t fullbx) { fullbx_ = fullbx; }
81 
84  bool operator>(const CSCALCTDigi&) const;
85 
87  bool operator==(const CSCALCTDigi&) const;
88 
90  bool operator!=(const CSCALCTDigi&) const;
91 
93  void print() const;
94 
96  void setWireGroup(unsigned int wiregroup) { keywire_ = wiregroup; }
97 
98 private:
99  uint16_t valid_;
100  uint16_t quality_;
101  uint16_t accel_;
102  uint16_t patternb_; // not used since 2007
103  uint16_t keywire_;
104  uint16_t bx_;
105  uint16_t trknmb_;
106  uint16_t fullbx_;
107 };
108 
109 std::ostream& operator<<(std::ostream& o, const CSCALCTDigi& digi);
110 #endif
uint16_t bx_
Definition: CSCALCTDigi.h:104
void setKeyWG(const int keyWG)
set key wire group
Definition: CSCALCTDigi.h:62
uint16_t trknmb_
Definition: CSCALCTDigi.h:105
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:32
void setCollisionB(const int collision)
set Collision Pattern B bit
Definition: CSCALCTDigi.h:56
uint16_t patternb_
Definition: CSCALCTDigi.h:102
void clear()
clear this ALCT
Definition: CSCALCTDigi.cc:39
uint16_t keywire_
Definition: CSCALCTDigi.h:103
void setWireGroup(unsigned int wiregroup)
set wiregroup number
Definition: CSCALCTDigi.h:96
bool operator!=(const CSCALCTDigi &) const
True if the preceding one is false.
Definition: CSCALCTDigi.cc:84
uint16_t valid_
Definition: CSCALCTDigi.h:99
bool operator>(const CSCALCTDigi &) const
Definition: CSCALCTDigi.cc:50
int getFullBX() const
return 12-bit full BX.
Definition: CSCALCTDigi.h:77
void setQuality(const int quality)
set quality
Definition: CSCALCTDigi.h:41
int getTrknmb() const
return track number (1,2)
Definition: CSCALCTDigi.h:71
CSCALCTDigi()
default
Definition: CSCALCTDigi.cc:34
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:65
uint16_t fullbx_
Definition: CSCALCTDigi.h:106
void setAccelerator(const int accelerator)
set accelerator bit
Definition: CSCALCTDigi.h:48
bool operator==(const CSCALCTDigi &) const
True if all members (except the number) of both ALCTs are equal.
Definition: CSCALCTDigi.cc:74
int getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:38
int getAccelerator() const
Definition: CSCALCTDigi.h:45
uint16_t accel_
Definition: CSCALCTDigi.h:101
std::ostream & operator<<(std::ostream &o, const CSCALCTDigi &digi)
Definition: CSCALCTDigi.cc:105
uint16_t quality_
Definition: CSCALCTDigi.h:100
void print() const
Print content of digi.
Definition: CSCALCTDigi.cc:93
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting ALCTs.
Definition: CSCALCTDigi.h:74
void setFullBX(const uint16_t fullbx)
Set 12-bit full BX.
Definition: CSCALCTDigi.h:80
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:59
void setBX(const int BX)
set BX
Definition: CSCALCTDigi.h:68
int getCollisionB() const
Definition: CSCALCTDigi.h:53
void setValid(const int valid)
set valid
Definition: CSCALCTDigi.h:35