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