ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Analysis::TrackGradesDefinition Class Reference

#include <TrackGradesDefinition.h>

Collaboration diagram for Analysis::TrackGradesDefinition:

Public Member Functions

 TrackGradesDefinition ()
 
 TrackGradesDefinition (std::vector< TrackGrade > &)
 
virtual ~TrackGradesDefinition ()
 
 TrackGradesDefinition (const TrackGradesDefinition &)
 
TrackGradesDefinitionoperator= (const TrackGradesDefinition &rhs)
 assigenment operator More...
 
const std::vector< TrackGrade > & getList () const
 
const TrackGradegetGrade (const std::string &) const
 
const TrackGradegetGrade (const int &) const
 
int grade (const std::string &) const
 
std::string grade (int) const
 
int numberOfGrades () const
 

Private Attributes

std::vector< TrackGradem_gradeList
 

Detailed Description

Definition at line 15 of file TrackGradesDefinition.h.

Constructor & Destructor Documentation

◆ TrackGradesDefinition() [1/3]

Analysis::TrackGradesDefinition::TrackGradesDefinition ( )

Definition at line 12 of file TrackGradesDefinition.cxx.

12 {}

◆ TrackGradesDefinition() [2/3]

Analysis::TrackGradesDefinition::TrackGradesDefinition ( std::vector< TrackGrade > &  trackGradeList)

Definition at line 14 of file TrackGradesDefinition.cxx.

15  : m_gradeList(trackGradeList)
16  {}

◆ ~TrackGradesDefinition()

Analysis::TrackGradesDefinition::~TrackGradesDefinition ( )
virtual

Definition at line 18 of file TrackGradesDefinition.cxx.

18 {}

◆ TrackGradesDefinition() [3/3]

Analysis::TrackGradesDefinition::TrackGradesDefinition ( const TrackGradesDefinition rhs)

Definition at line 20 of file TrackGradesDefinition.cxx.

21  : m_gradeList(rhs.m_gradeList)
22  {}

Member Function Documentation

◆ getGrade() [1/2]

const TrackGrade * Analysis::TrackGradesDefinition::getGrade ( const int &  myNumber) const

Definition at line 73 of file TrackGradesDefinition.cxx.

74  {
75 
76  for (const TrackGrade& grade : m_gradeList) {
77  int gradeNumber=grade.gradeNumber();
78 
79  if (gradeNumber==myNumber) {
80  return &grade;
81  }
82  }
83  return 0;
84  }

◆ getGrade() [2/2]

const TrackGrade * Analysis::TrackGradesDefinition::getGrade ( const std::string &  myString) const

Definition at line 59 of file TrackGradesDefinition.cxx.

60  {
61 
62  for (const TrackGrade& grade : m_gradeList) {
63  const std::string & gradeString=grade.gradeString();
64 
65  if (gradeString==myString) {
66  return &grade;
67  }
68  }
69  return 0;
70  }

◆ getList()

const std::vector< TrackGrade > & Analysis::TrackGradesDefinition::getList ( ) const
inline

Definition at line 46 of file TrackGradesDefinition.h.

47  {
48  return m_gradeList;
49  }

◆ grade() [1/2]

int Analysis::TrackGradesDefinition::grade ( const std::string &  myString) const

Definition at line 33 of file TrackGradesDefinition.cxx.

33  {
34 
35  for (const TrackGrade& grade : m_gradeList) {
36  const std::string & gradeString=grade.gradeString();
37 
38  if (gradeString==myString) {
39  return grade.gradeNumber();
40  }
41  }
42  return -1;
43  }

◆ grade() [2/2]

std::string Analysis::TrackGradesDefinition::grade ( int  myNumber) const

Definition at line 46 of file TrackGradesDefinition.cxx.

46  {
47 
48  for (const TrackGrade& grade : m_gradeList) {
49  int gradeNumber=grade.gradeNumber();
50 
51  if (gradeNumber==myNumber) {
52  return grade.gradeString();
53  }
54  }
55  return std::string("Undefined");
56  }

◆ numberOfGrades()

int Analysis::TrackGradesDefinition::numberOfGrades ( ) const
inline

Definition at line 51 of file TrackGradesDefinition.h.

52  {
53  return m_gradeList.size();
54  }

◆ operator=()

TrackGradesDefinition & Analysis::TrackGradesDefinition::operator= ( const TrackGradesDefinition rhs)

assigenment operator

Definition at line 24 of file TrackGradesDefinition.cxx.

25  {
26  if (this!=&rhs)
27  {
28  m_gradeList=rhs.m_gradeList;
29  }
30  return *this;
31  }

Member Data Documentation

◆ m_gradeList

std::vector<TrackGrade> Analysis::TrackGradesDefinition::m_gradeList
private

Definition at line 43 of file TrackGradesDefinition.h.


The documentation for this class was generated from the following files:
Analysis::TrackGradesDefinition::m_gradeList
std::vector< TrackGrade > m_gradeList
Definition: TrackGradesDefinition.h:43
Analysis::TrackGradesDefinition::grade
int grade(const std::string &) const
Definition: TrackGradesDefinition.cxx:33