diff --git a/DataFormats/TotemReco/interface/TotemT2Digi.h b/DataFormats/TotemReco/interface/TotemT2Digi.h index ff1f7bec7f529..2eec5134a7f10 100644 --- a/DataFormats/TotemReco/interface/TotemT2Digi.h +++ b/DataFormats/TotemReco/interface/TotemT2Digi.h @@ -9,34 +9,36 @@ #ifndef DataFormats_TotemReco_TotemT2Digi_h #define DataFormats_TotemReco_TotemT2Digi_h -class TotemT2Digi { -public: - TotemT2Digi() = default; - TotemT2Digi(unsigned short id, unsigned char marker, unsigned short le, unsigned short te, unsigned char status); +namespace io_v1 { + class TotemT2Digi { + public: + TotemT2Digi() = default; + TotemT2Digi(unsigned short id, unsigned char marker, unsigned short le, unsigned short te, unsigned char status); - void setLeadingEdge(unsigned short le) { lead_edge_ = le; } - unsigned short leadingEdge() const { return lead_edge_; } - void setTrailingEdge(unsigned short te) { trail_edge_ = te; } - unsigned short trailingEdge() const { return trail_edge_; } - unsigned char status() const { return status_ & 0xF; } - bool hasLE() const { return marker_ & 0x1; } - bool hasTE() const { return marker_ & 0x2; } - bool hasManyLE() const { return marker_ & 0x4; } - bool hasManyTE() const { return marker_ & 0x8; } + void setLeadingEdge(unsigned short le) { lead_edge_ = le; } + unsigned short leadingEdge() const { return lead_edge_; } + void setTrailingEdge(unsigned short te) { trail_edge_ = te; } + unsigned short trailingEdge() const { return trail_edge_; } + unsigned char status() const { return status_ & 0xF; } + bool hasLE() const { return marker_ & 0x1; } + bool hasTE() const { return marker_ & 0x2; } + bool hasManyLE() const { return marker_ & 0x4; } + bool hasManyTE() const { return marker_ & 0x8; } -private: - /// New HW ID in ver 2.2 - unsigned short id_{0}; - /// Channel marker - unsigned char marker_{0}; - /// Leading edge time - unsigned short lead_edge_{0}; - /// Trailing edge time - unsigned short trail_edge_{0}; - /// Header status flags - unsigned char status_{0}; -}; - -bool operator<(const TotemT2Digi& lhs, const TotemT2Digi& rhs); + private: + /// New HW ID in ver 2.2 + unsigned short id_{0}; + /// Channel marker + unsigned char marker_{0}; + /// Leading edge time + unsigned short lead_edge_{0}; + /// Trailing edge time + unsigned short trail_edge_{0}; + /// Header status flags + unsigned char status_{0}; + }; + bool operator<(const TotemT2Digi& lhs, const TotemT2Digi& rhs); +} // namespace io_v1 +using TotemT2Digi = io_v1::TotemT2Digi; #endif diff --git a/DataFormats/TotemReco/src/TotemT2Digi.cc b/DataFormats/TotemReco/src/TotemT2Digi.cc index 47ffd2076e42c..4cf1733eb3096 100644 --- a/DataFormats/TotemReco/src/TotemT2Digi.cc +++ b/DataFormats/TotemReco/src/TotemT2Digi.cc @@ -1,17 +1,19 @@ #include "DataFormats/TotemReco/interface/TotemT2Digi.h" -TotemT2Digi::TotemT2Digi( - unsigned short id, unsigned char marker, unsigned short le, unsigned short te, unsigned char status) - : id_(id), marker_(marker), lead_edge_(le), trail_edge_(te), status_(status) {} +namespace io_v1 { + TotemT2Digi::TotemT2Digi( + unsigned short id, unsigned char marker, unsigned short le, unsigned short te, unsigned char status) + : id_(id), marker_(marker), lead_edge_(le), trail_edge_(te), status_(status) {} -bool operator<(const TotemT2Digi& lhs, const TotemT2Digi& rhs) { - if (lhs.leadingEdge() < rhs.leadingEdge()) - return true; - if (lhs.leadingEdge() > rhs.leadingEdge()) + bool operator<(const TotemT2Digi& lhs, const TotemT2Digi& rhs) { + if (lhs.leadingEdge() < rhs.leadingEdge()) + return true; + if (lhs.leadingEdge() > rhs.leadingEdge()) + return false; + if (lhs.trailingEdge() < rhs.trailingEdge()) + return true; + if (lhs.trailingEdge() > rhs.trailingEdge()) + return false; return false; - if (lhs.trailingEdge() < rhs.trailingEdge()) - return true; - if (lhs.trailingEdge() > rhs.trailingEdge()) - return false; - return false; -} + } +} // namespace io_v1 diff --git a/DataFormats/TotemReco/src/classes_def.xml b/DataFormats/TotemReco/src/classes_def.xml index 2f35479c49d5f..58ced04c1c785 100644 --- a/DataFormats/TotemReco/src/classes_def.xml +++ b/DataFormats/TotemReco/src/classes_def.xml @@ -1,14 +1,12 @@ - - - - + + - - - - - + + + + +