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 
12 #include <iosfwd>
13 #include <vector>
14 #include <stdint.h>
15 
17 
18 public:
19 
21  CSCComparatorDigi (int strip, int comparator, int timeBinWord);
23 
26 
27 
29  bool operator==(const CSCComparatorDigi& digi) const;
30 
32  bool operator<(const CSCComparatorDigi& digi) const;
33 
35  int getStrip() const { return strip_; }
36 
38  int getComparator() const { return comparator_; }
39 
41  int getTimeBinWord() const { return timeBinWord_; }
42 
44  int getTimeBin() const;
45 
49  std::vector<int> getTimeBinsOn() const;
50 
52  void setStrip(int strip);
53 
55  void setComparator (int comparator);
56 
58  void print() const;
59 
60 
61 private:
62 
63  uint16_t strip_;
64  uint16_t comparator_;
65  uint16_t timeBinWord_;
66 
67 };
68 
70 std::ostream & operator<<(std::ostream & o, const CSCComparatorDigi& digi);
71 
72 #endif
73 
74 
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.