File indexing completed on 2023-03-17 11:12:51
0001 #ifndef L1Trigger_L1TMuonOverlapP1_OmtfName_H
0002 #define L1Trigger_L1TMuonOverlapP1_OmtfName_H
0003
0004 #include <string>
0005 #include <ostream>
0006
0007 #include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h"
0008
0009 class OmtfName {
0010 public:
0011 enum Board {
0012 OMTFn1 = -1,
0013 OMTFn2 = -2,
0014 OMTFn3 = -3,
0015 OMTFn4 = -4,
0016 OMTFn5 = -5,
0017 OMTFn6 = -6,
0018 OMTFp1 = 1,
0019 OMTFp2 = 2,
0020 OMTFp3 = 3,
0021 OMTFp4 = 4,
0022 OMTFp5 = 5,
0023 OMTFp6 = 6,
0024 UNKNOWN = 0
0025 };
0026
0027 public:
0028 OmtfName(Board board = UNKNOWN) : theBoard(board) {}
0029
0030 OmtfName(const std::string& name);
0031
0032
0033 explicit OmtfName(unsigned int iProcesor, int endcap);
0034
0035
0036 explicit OmtfName(unsigned int iProcesor, l1t::tftype endcap);
0037
0038
0039 explicit OmtfName(unsigned int iProcesor);
0040
0041 operator int() const { return theBoard; }
0042 bool operator==(const OmtfName& o) const { return theBoard == o.theBoard; }
0043 bool operator!=(const OmtfName& o) const { return !(*this == o); }
0044
0045 unsigned int processor() const;
0046 int position() const;
0047 l1t::tftype tftype() const;
0048
0049 std::string name() const;
0050
0051 private:
0052 Board theBoard;
0053
0054 friend std::ostream& operator<<(std::ostream& out, const OmtfName& n) {
0055 out << n.name();
0056 return out;
0057 }
0058 };
0059 #endif