CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCComparatorDigi.h
Go to the documentation of this file.
1 #ifndef CSCComparatorDigi_CSCComparatorDigi_h
2 #define CSCComparatorDigi_CSCComparatorDigi_h
3 
14 #include <iosfwd>
15 #include <vector>
16 #include <stdint.h>
17 
19 
20 public:
21 
23  CSCComparatorDigi (int strip, int comparator, int timeBinWord);
25 
28 
29 
31  bool operator==(const CSCComparatorDigi& digi) const;
32 
34  bool operator<(const CSCComparatorDigi& digi) const;
35 
37  int getStrip() const { return strip_; }
38 
40  int getComparator() const { return comparator_; }
41 
43  int getTimeBinWord() const { return timeBinWord_; }
44 
46  int getTimeBin() const;
47 
51  std::vector<int> getTimeBinsOn() const;
52 
54  void setStrip(int strip);
55 
57  void setComparator (int comparator);
58 
60  void print() const;
61 
62 
63 private:
64 
65  uint16_t strip_;
66  uint16_t comparator_;
67  uint16_t timeBinWord_;
68 
69 };
70 
72 std::ostream & operator<<(std::ostream & o, const CSCComparatorDigi& digi);
73 
74 #endif
75 
76 
int getStrip() const
Get the strip number.
void setComparator(int comparator)
Set Comparator data.
void print() const
Print content of digi.
void setStrip(int strip)
Set the strip number.
CSCComparatorDigi()
comparator here can be either 0 or 1 for left or right halfstrip of given strip
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
int getComparator() const
Get Comparator readings.
bool operator==(const CSCComparatorDigi &digi) const
Digis are equal if they are on the same strip and have same Comparator data.
int getTimeBin() const
Return bin number of first time bin which is ON. Counts from 0.
bool operator<(const CSCComparatorDigi &digi) const
sort by time first, then by strip
std::vector< int > getTimeBinsOn() const
int getTimeBinWord() const
Return the word with each bit corresponding to a time bin.