CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OmtfName.h
Go to the documentation of this file.
1 #ifndef L1Trigger_L1TMuonOverlap_OmtfName_H
2 #define L1Trigger_L1TMuonOverlap_OmtfName_H
3 
4 #include <string>
5 #include <ostream>
6 
8 
9 class OmtfName {
10 public:
11  enum Board {
12  OMTFn1 = -1,
13  OMTFn2 = -2,
14  OMTFn3 = -3,
15  OMTFn4 = -4,
16  OMTFn5 = -5,
17  OMTFn6 = -6,
18  OMTFp1 = 1,
19  OMTFp2 = 2,
20  OMTFp3 = 3,
21  OMTFp4 = 4,
22  OMTFp5 = 5,
23  OMTFp6 = 6,
24  UNKNOWN = 0
25  };
26 
27 public:
28  OmtfName(Board board = UNKNOWN) : theBoard(board) {}
29 
30  OmtfName(const std::string& name);
31 
32  //by giving procesor id [0,5] and endcap position {+1,-1} as in uGMT.
33  explicit OmtfName(unsigned int iProcesor, int endcap);
34 
35  //by giving procesor id [0,5] and endcap position as l1t::tftype of omtf_pos or omtf_neg.
36  explicit OmtfName(unsigned int iProcesor, l1t::tftype endcap);
37 
38  operator int() const { return theBoard; }
39  bool operator==(const OmtfName& o) const { return theBoard == o.theBoard; }
40  bool operator!=(const OmtfName& o) const { return !(*this == o); }
41 
42  unsigned int processor() const;
43  int position() const;
44  l1t::tftype tftype() const;
45 
46  std::string name() const;
47 
48 private:
50 
51  friend std::ostream& operator<<(std::ostream& out, const OmtfName& n) {
52  out << n.name();
53  return out;
54  }
55 };
56 #endif
Board theBoard
Definition: OmtfName.h:49
l1t::tftype tftype() const
Definition: OmtfName.cc:86
unsigned int processor() const
Definition: OmtfName.cc:84
bool operator!=(const OmtfName &o) const
Definition: OmtfName.h:40
bool operator==(const OmtfName &o) const
Definition: OmtfName.h:39
int position() const
Definition: OmtfName.cc:82
friend std::ostream & operator<<(std::ostream &out, const OmtfName &n)
Definition: OmtfName.h:51
OmtfName(Board board=UNKNOWN)
Definition: OmtfName.h:28
std::string name() const
Definition: OmtfName.cc:51