CMS 3D CMS Logo

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