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 
17  public:
18 
20  CSCALCTDigi(const int valid, const int quality, const int accel,
21  const int patternb, const int keywire, const int bx,
22  const int trknmb = 0);
24  CSCALCTDigi();
25 
27  void clear();
28 
30  bool isValid() const {return valid_ ;}
31 
33  void setValid(const int valid) {valid_ = valid;}
34 
36  int getQuality() const {return quality_ ;}
37 
39  void setQuality(const int quality) {quality_ = quality;}
40 
43  int getAccelerator() const {return accel_ ;}
44 
46  void setAccelerator(const int accelerator) {accel_ = accelerator;}
47 
51  int getCollisionB() const {return patternb_ ;}
52 
54  void setCollisionB(const int collision) {patternb_ = collision;}
55 
57  int getKeyWG() const {return keywire_ ;}
58 
60  void setKeyWG(const int keyWG) {keywire_ = keyWG;}
61 
63  int getBX() const {return bx_ ;}
64 
66  void setBX(const int BX) {bx_ = BX;}
67 
69  int getTrknmb() const {return trknmb_ ;}
70 
72  void setTrknmb(const uint16_t number) {trknmb_ = number;}
73 
75  int getFullBX() const {return fullbx_ ;}
76 
78  void setFullBX(const uint16_t fullbx) {fullbx_ = fullbx;}
79 
82  bool operator > (const CSCALCTDigi&) const;
83 
85  bool operator == (const CSCALCTDigi&) const;
86 
88  bool operator != (const CSCALCTDigi&) const;
89 
91  void print() const;
92 
94  void setWireGroup(unsigned int wiregroup) {keywire_= wiregroup;}
95 
96  private:
97 
98  uint16_t valid_ ;
99  uint16_t quality_ ;
100  uint16_t accel_ ;
101  uint16_t patternb_ ; // not used since 2007
102  uint16_t keywire_ ;
103  uint16_t bx_ ;
104  uint16_t trknmb_ ;
105  uint16_t fullbx_ ;
106 };
107 
108 std::ostream & operator<<(std::ostream & o, const CSCALCTDigi& digi);
109 #endif
uint16_t bx_
Definition: CSCALCTDigi.h:103
void setKeyWG(const int keyWG)
set key wire group
Definition: CSCALCTDigi.h:60
uint16_t trknmb_
Definition: CSCALCTDigi.h:104
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:30
void setCollisionB(const int collision)
set Collision Pattern B bit
Definition: CSCALCTDigi.h:54
uint16_t patternb_
Definition: CSCALCTDigi.h:101
void clear()
clear this ALCT
Definition: CSCALCTDigi.cc:35
uint16_t keywire_
Definition: CSCALCTDigi.h:102
void setWireGroup(unsigned int wiregroup)
set wiregroup number
Definition: CSCALCTDigi.h:94
bool operator!=(const CSCALCTDigi &) const
True if the preceding one is false.
Definition: CSCALCTDigi.cc:76
uint16_t valid_
Definition: CSCALCTDigi.h:98
bool operator>(const CSCALCTDigi &) const
Definition: CSCALCTDigi.cc:46
int getFullBX() const
return 12-bit full BX.
Definition: CSCALCTDigi.h:75
void setQuality(const int quality)
set quality
Definition: CSCALCTDigi.h:39
int getTrknmb() const
return track number (1,2)
Definition: CSCALCTDigi.h:69
CSCALCTDigi()
default
Definition: CSCALCTDigi.cc:30
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:63
uint16_t fullbx_
Definition: CSCALCTDigi.h:105
void setAccelerator(const int accelerator)
set accelerator bit
Definition: CSCALCTDigi.h:46
bool operator==(const CSCALCTDigi &) const
True if all members (except the number) of both ALCTs are equal.
Definition: CSCALCTDigi.cc:64
int getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:36
int getAccelerator() const
Definition: CSCALCTDigi.h:43
uint16_t accel_
Definition: CSCALCTDigi.h:100
std::ostream & operator<<(std::ostream &o, const CSCALCTDigi &digi)
Definition: CSCALCTDigi.cc:101
uint16_t quality_
Definition: CSCALCTDigi.h:99
void print() const
Print content of digi.
Definition: CSCALCTDigi.cc:84
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting ALCTs.
Definition: CSCALCTDigi.h:72
void setFullBX(const uint16_t fullbx)
Set 12-bit full BX.
Definition: CSCALCTDigi.h:78
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:57
void setBX(const int BX)
set BX
Definition: CSCALCTDigi.h:66
int getCollisionB() const
Definition: CSCALCTDigi.h:51
void setValid(const int valid)
set valid
Definition: CSCALCTDigi.h:33