CMS 3D CMS Logo

TotemT2Digi.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * This is a part of TOTEM offline software.
4  * Author:
5  * Laurent Forthomme
6  *
7  ****************************************************************************/
8 
9 #ifndef DataFormats_TotemReco_TotemT2Digi_h
10 #define DataFormats_TotemReco_TotemT2Digi_h
11 
12 class TotemT2Digi {
13 public:
14  TotemT2Digi() = default;
15  TotemT2Digi(unsigned short id, unsigned char marker, unsigned short le, unsigned short te, unsigned char status);
16 
17  void setLeadingEdge(unsigned short le) { lead_edge_ = le; }
18  unsigned short leadingEdge() const { return lead_edge_; }
19  void setTrailingEdge(unsigned short te) { trail_edge_ = te; }
20  unsigned short trailingEdge() const { return trail_edge_; }
21  unsigned char status() const { return status_ & 0xF; }
22  bool hasLE() const { return marker_ & 0x1; }
23  bool hasTE() const { return marker_ & 0x2; }
24  bool hasManyLE() const { return marker_ & 0x4; }
25  bool hasManyTE() const { return marker_ & 0x8; }
26 
27 private:
29  unsigned short id_{0};
31  unsigned char marker_{0};
33  unsigned short lead_edge_{0};
35  unsigned short trail_edge_{0};
37  unsigned char status_{0};
38 };
39 
40 bool operator<(const TotemT2Digi& lhs, const TotemT2Digi& rhs);
41 
42 #endif
unsigned short trail_edge_
Trailing edge time.
Definition: TotemT2Digi.h:35
void setTrailingEdge(unsigned short te)
Definition: TotemT2Digi.h:19
bool operator<(const TotemT2Digi &lhs, const TotemT2Digi &rhs)
Definition: TotemT2Digi.cc:7
bool hasLE() const
Definition: TotemT2Digi.h:22
unsigned short lead_edge_
Leading edge time.
Definition: TotemT2Digi.h:33
bool hasManyTE() const
Definition: TotemT2Digi.h:25
unsigned char status() const
Definition: TotemT2Digi.h:21
bool hasManyLE() const
Definition: TotemT2Digi.h:24
unsigned short id_
New HW ID in ver 2.2.
Definition: TotemT2Digi.h:29
void setLeadingEdge(unsigned short le)
Definition: TotemT2Digi.h:17
TotemT2Digi()=default
unsigned char marker_
Channel marker.
Definition: TotemT2Digi.h:31
unsigned short trailingEdge() const
Definition: TotemT2Digi.h:20
bool hasTE() const
Definition: TotemT2Digi.h:23
unsigned char status_
Header status flags.
Definition: TotemT2Digi.h:37
unsigned short leadingEdge() const
Definition: TotemT2Digi.h:18