ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::V0Candidate Class Reference

#include <V0Candidate.h>

Collaboration diagram for Trk::V0Candidate:

Public Member Functions

 V0Candidate ()
 Default constructor.
 V0Candidate (const std::vector< Trk::V0Hypothesis * > &v0Hyp)
 Constructor, using a vector of Trk::V0Hypothesis.
 V0Candidate (std::vector< Trk::V0Hypothesis * > &&v0Hyp)
 V0Candidate (const V0Candidate &rhs)
 Copy constructor.
V0Candidateoperator= (const V0Candidate &rhs)
 Assignement constructor.
V0Candidateoperator= (V0Candidate &&rhs) noexcept
virtual V0Candidateclone () const
 Clone method.
virtual ~V0Candidate ()
 Destructor.
std::vector< Trk::V0Hypothesis * > * v0Hypothesis (void)
 Unconst access to the vector of V0Hypothesis Required by the finder to set the element links properly.
const std::vector< Trk::V0Hypothesis * > * v0Hypothesis (void) const
 Const access to the vector of V0Hypothesis.

Private Attributes

std::vector< Trk::V0Hypothesis * > m_v0Hyp

Detailed Description

Definition at line 32 of file V0Candidate.h.

Constructor & Destructor Documentation

◆ V0Candidate() [1/4]

Trk::V0Candidate::V0Candidate ( )

Default constructor.

Definition at line 22 of file V0Candidate.cxx.

22: m_v0Hyp() {}
std::vector< Trk::V0Hypothesis * > m_v0Hyp
Definition V0Candidate.h:82

◆ V0Candidate() [2/4]

Trk::V0Candidate::V0Candidate ( const std::vector< Trk::V0Hypothesis * > & v0Hyp)

Constructor, using a vector of Trk::V0Hypothesis.

Definition at line 24 of file V0Candidate.cxx.

24: m_v0Hyp(v0Hyp) {}

◆ V0Candidate() [3/4]

Trk::V0Candidate::V0Candidate ( std::vector< Trk::V0Hypothesis * > && v0Hyp)

Definition at line 26 of file V0Candidate.cxx.

27 : m_v0Hyp(std::move(v0Hyp))
28 {}

◆ V0Candidate() [4/4]

Trk::V0Candidate::V0Candidate ( const V0Candidate & rhs)

Copy constructor.

Definition at line 30 of file V0Candidate.cxx.

30 : m_v0Hyp(std::vector<Trk::V0Hypothesis *>())
31 {
32 std::vector<Trk::V0Hypothesis *>::const_iterator itr = rhs.m_v0Hyp.begin();
33 std::vector<Trk::V0Hypothesis *>::const_iterator itre = rhs.m_v0Hyp.end();
34 for(;itr!=itre;++itr) m_v0Hyp.push_back((*itr)->clone());
35 }

◆ ~V0Candidate()

Trk::V0Candidate::~V0Candidate ( )
virtual

Destructor.

Definition at line 38 of file V0Candidate.cxx.

39 {
40 std::vector<Trk::V0Hypothesis *>::iterator i = m_v0Hyp.begin();
41 std::vector<Trk::V0Hypothesis *>::iterator ie = m_v0Hyp.end();
42 for(;i!=ie;++i)
43 {
44 if(0!=(*i)) delete (*i);
45 (*i)=0;
46 }
47 m_v0Hyp.clear();
48 }

Member Function Documentation

◆ clone()

V0Candidate * Trk::V0Candidate::clone ( ) const
inlinevirtual

Clone method.

Definition at line 96 of file V0Candidate.h.

97 {
98 return new V0Candidate(*this);
99 }
V0Candidate()
Default constructor.

◆ operator=() [1/2]

V0Candidate & Trk::V0Candidate::operator= ( const V0Candidate & rhs)

Assignement constructor.

Definition at line 50 of file V0Candidate.cxx.

51 {
52 if (this!=&rhs)
53 {
54
55//cleaning the local vector before assignement
56 std::vector<Trk::V0Hypothesis *>::iterator i = m_v0Hyp.begin();
57 std::vector<Trk::V0Hypothesis *>::iterator ie = m_v0Hyp.end();
58 for(;i!=ie;++i)
59 {
60 if(0!=(*i)) delete (*i);
61 (*i)=0;
62 }
63 m_v0Hyp.clear();
64
65//now copying the rhs content over
66 std::vector<Trk::V0Hypothesis *>::const_iterator itr = rhs.m_v0Hyp.begin();
67 std::vector<Trk::V0Hypothesis *>::const_iterator itre = rhs.m_v0Hyp.end();
68 for(;itr!=itre;++itr) m_v0Hyp.push_back((*itr)->clone());
69 }
70 return *this;
71 }

◆ operator=() [2/2]

V0Candidate & Trk::V0Candidate::operator= ( V0Candidate && rhs)
noexcept

Definition at line 74 of file V0Candidate.cxx.

75 {
76 if (this != &rhs) {
77 m_v0Hyp = std::move(rhs.m_v0Hyp);
78 }
79 return *this;
80 }

◆ v0Hypothesis() [1/2]

std::vector< Trk::V0Hypothesis * > * Trk::V0Candidate::v0Hypothesis ( void )
inline

Unconst access to the vector of V0Hypothesis Required by the finder to set the element links properly.

Definition at line 91 of file V0Candidate.h.

92 {
93 return &m_v0Hyp;
94 }

◆ v0Hypothesis() [2/2]

const std::vector< Trk::V0Hypothesis * > * Trk::V0Candidate::v0Hypothesis ( void ) const
inline

Const access to the vector of V0Hypothesis.

Definition at line 86 of file V0Candidate.h.

87 {
88 return &m_v0Hyp;
89 }

Member Data Documentation

◆ m_v0Hyp

std::vector<Trk::V0Hypothesis * > Trk::V0Candidate::m_v0Hyp
private

Definition at line 82 of file V0Candidate.h.


The documentation for this class was generated from the following files: