ATLAS Offline Software
ISvxConstituent.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  ISvxConstituents.h - Description
7  -------------------
8  begin : March, 2007
9  authors : CSC b-tagging vertexing note group members
10  worked started by: Giacinto Piacquadio
11  email : giacinto.piacquadio@physik.uni-freiburg.de
12 
13  changes : new!
14 
15 ***************************************************************************/
16 
19 
20 namespace Analysis
21 {
22 
23 
25  m_vertexInfo(0) {}
26 
28  m_name(name),
29  m_vertexInfo(0)
30  { }
31 
33  {
34 
35  //delete the vertexInfo (if there)
36  if (m_vertexInfo) {
37  delete m_vertexInfo;
38  m_vertexInfo=0;
39  }
40  }
41 
43  INavigable(rhs),
44  IConstituent(rhs),
45  m_vertexInfo(rhs.m_vertexInfo!=0 ? rhs.m_vertexInfo->clone() : 0)
46  { }
47 
49  IConstituent(rhs),
50  m_name(name),
51  m_vertexInfo(rhs.m_vertexInfo!=0 ? rhs.m_vertexInfo->clone() : 0)
52  { }
53 
54 
56 
57  NameType ISvxConstituent::name() const { return m_name;}
58 
60  { return new ISvxConstituent( *this );}
61 
63  {
64  if (this!=&rhs) {
66  if (m_vertexInfo) {
67  delete m_vertexInfo;
68  m_vertexInfo=0;
69  }
70  if (rhs.m_vertexInfo) {
72  }
73  }
74  return *this;
75  }
76 
78  return m_vertexInfo;
79  }
80 
81  //PAY ATTENTION!
82  // Set function (OWNERSHIP of the object is taken by THIS class, so don't delete
83  // the pointer you are providing afterwards)
85  if (m_vertexInfo) {
86  delete m_vertexInfo;
88  }
90  }
91 
92 }//end namespace Analysis
Analysis::NameType
std::string NameType
string to identify the constituent
Definition: IConstituent.h:39
Analysis::IConstituent
Class IConstituent: This is the abstract base class for additional jet constituents to be put into th...
Definition: IConstituent.h:52
Analysis::ISvxConstituent::ISvxConstituent
ISvxConstituent()
constructor
Definition: ISvxConstituent.cxx:34
Analysis::ISvxConstituent::m_name
std::string m_name
Definition: ISvxConstituent.h:83
python.Utilities.clone
clone
Definition: Utilities.py:134
Analysis::ISvxConstituent::setVertexInfo
void setVertexInfo(const Trk::VxSecVertexInfo *)
Definition: ISvxConstituent.cxx:94
VxSecVertexInfo.h
Analysis::ISvxConstituent::operator=
ISvxConstituent & operator=(const ISvxConstituent &)
Definition: ISvxConstituent.cxx:72
ISvxConstituent.h
INavigable
Definition: INavigable.h:18
Analysis::ISvxConstituent::m_vertexInfo
const Trk::VxSecVertexInfo * m_vertexInfo
Definition: ISvxConstituent.h:84
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Analysis::ISvxConstituent::clone
virtual ISvxConstituent * clone() const
a clone method for the proper workings of the copy constructor
Definition: ISvxConstituent.cxx:69
Trk::VxSecVertexInfo
Definition: VxSecVertexInfo.h:63
Trk::VxSecVertexInfo::clone
virtual VxSecVertexInfo * clone() const
Definition: VxSecVertexInfo.h:110
Analysis::ISvxConstituent::setName
virtual void setName(NameType &name)
to set the name
Definition: ISvxConstituent.cxx:65
Analysis::ISvxConstituent::name
virtual NameType name() const
returns the infoType of the info objects.
Definition: ISvxConstituent.cxx:67
Analysis::ISvxConstituent::vertexInfo
const Trk::VxSecVertexInfo * vertexInfo() const
Definition: ISvxConstituent.cxx:87
Analysis::ISvxConstituent::~ISvxConstituent
~ISvxConstituent()
destructor
Definition: ISvxConstituent.cxx:42
NameType
std::string NameType
Definition: JetINav4MomAssociation.h:29
Analysis::ISvxConstituent
Definition: ISvxConstituent.h:41