File indexing completed on 2024-04-06 12:05:18
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef DataFormats_TotemReco_TotemT2Digi_h
0010 #define DataFormats_TotemReco_TotemT2Digi_h
0011
0012 class TotemT2Digi {
0013 public:
0014 TotemT2Digi() = default;
0015 TotemT2Digi(unsigned short id, unsigned char marker, unsigned short le, unsigned short te, unsigned char status);
0016
0017 void setLeadingEdge(unsigned short le) { lead_edge_ = le; }
0018 unsigned short leadingEdge() const { return lead_edge_; }
0019 void setTrailingEdge(unsigned short te) { trail_edge_ = te; }
0020 unsigned short trailingEdge() const { return trail_edge_; }
0021 unsigned char status() const { return status_ & 0xF; }
0022 bool hasLE() const { return marker_ & 0x1; }
0023 bool hasTE() const { return marker_ & 0x2; }
0024 bool hasManyLE() const { return marker_ & 0x4; }
0025 bool hasManyTE() const { return marker_ & 0x8; }
0026
0027 private:
0028
0029 unsigned short id_{0};
0030
0031 unsigned char marker_{0};
0032
0033 unsigned short lead_edge_{0};
0034
0035 unsigned short trail_edge_{0};
0036
0037 unsigned char status_{0};
0038 };
0039
0040 bool operator<(const TotemT2Digi& lhs, const TotemT2Digi& rhs);
0041
0042 #endif