test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EncodedTruthId.h
Go to the documentation of this file.
1 #ifndef TrackingAnalysis_EncodedTruthId_h
2 #define TrackingAnalysis_EncodedTruthId_h
3 
4 #include <iosfwd>
6 
8 {
9 
10  friend std::ostream& operator<< (std::ostream& os, const EncodedTruthId & id);
11 
12 public:
13 
14 // Constructors
17 
18 // Getters
19  int index() const
20  {
21  return index_;
22  }
23 
24 // Operators
25  int operator==(const EncodedTruthId& id) const
26  {
27  if (EncodedEventId::operator==(id))
28  {
29  return index_ == id.index_;
30  }
31  else
32  {
33  return EncodedEventId::operator==(id);
34  }
35  }
36 
37  int operator!=(const EncodedTruthId& id) const
38  {
39  return !(operator==(id));
40  }
41 
42  int operator<( const EncodedTruthId& id) const
43  {
44  if (EncodedEventId::operator==(id))
45  {
46  return index_ < id.index_;
47  }
48  else
49  {
50  return (EncodedEventId::operator<(id));
51  }
52  }
53 
54 private:
55  int index_;
56 };
57 
58 std::ostream& operator<<(std::ostream & os , EncodedTruthId& id);
59 
60 #endif
int operator==(const EncodedTruthId &id) const
friend std::ostream & operator<<(std::ostream &os, const EncodedTruthId &id)
int index() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
int operator<(const EncodedTruthId &id) const
int operator!=(const EncodedTruthId &id) const
int operator==(const EncodedEventId &id) const
equality