ATLAS Offline Software
TrackGrade.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "GaudiKernel/MsgStream.h"
7 #include <utility>
8 #include <iostream>
9 
10 namespace Analysis {
11 
13  : m_gradeNumber(-1),
14  m_gradeName("Undefined")
15  {
16  }
17 
18  TrackGrade::TrackGrade(int number,const std::string& name)
19  : m_gradeNumber(number),
20  m_gradeName(name)
21  {
22  }
23 
25  : m_gradeNumber(rhs.m_gradeNumber),
26  m_gradeName(rhs.m_gradeName)
27  {
28  }
29 
31  {
32  if (this!=&rhs)
33  {
36  }
37  return *this;
38  }
39 
41  }
42 
43  const std::string & TrackGrade::gradeString() const {
44  return m_gradeName;
45  }
46 
48  return m_gradeNumber;
49  }
50 
51  TrackGrade::operator int () const {
52  return m_gradeNumber;
53  }
54 
55  TrackGrade::operator const std::string () const {
56  return m_gradeName;
57  }
58 
59  bool TrackGrade::operator== (const std::string & rhs) const
60  {
61  return (m_gradeName==rhs);
62  }
63 
64 
65  bool TrackGrade::operator== (const int & rhs) const
66  {
67  return (m_gradeNumber==rhs);
68  }
69 
70  bool TrackGrade::operator== (const TrackGrade& rhs) const
71  {
72  if (&rhs == this) return true;
73 
74  if (rhs.m_gradeNumber == m_gradeNumber &&
75  rhs.m_gradeName == m_gradeName)
76  {
77  return true;
78  }
79  return false;
80  }
81 }
82 
Analysis::TrackGrade
Definition: TrackGrade.h:11
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
Analysis::TrackGrade::TrackGrade
TrackGrade()
Definition: TrackGrade.cxx:12
Analysis::TrackGrade::operator=
TrackGrade & operator=(const TrackGrade &rhs)
Definition: TrackGrade.cxx:30
Analysis::TrackGrade::~TrackGrade
virtual ~TrackGrade()
Definition: TrackGrade.cxx:40
Analysis::TrackGrade::operator==
bool operator==(const std::string &) const
Definition: TrackGrade.cxx:59
Analysis::TrackGrade::gradeString
const std::string & gradeString() const
Definition: TrackGrade.cxx:43
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
Analysis::TrackGrade::m_gradeName
std::string m_gradeName
Definition: TrackGrade.h:40
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrackGrade.h
Analysis::TrackGrade::gradeNumber
int gradeNumber() const
Definition: TrackGrade.cxx:47
Analysis::TrackGrade::m_gradeNumber
int m_gradeNumber
Definition: TrackGrade.h:39