ATLAS Offline Software
TrackToVtxLink.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  VxTrackAtVertex.cxx - Description
7  -------------------
8  begin : May 2006
9  authors : Giacinto Piacquadio (Freiburg University)
10  email : giacinto.piacquadio@physik.uni-freiburg.de
11  comments:
12  changes : 18/7/07 deleted all references to Track / TrackParticleBase origin
13  since new EDM automatically deals with it... (thanks to Kirill/Andi's new LinkToTrack/
14  LinkToTrackParticle)
15 
16  David Shope <david.richard.shope@cern.ch> (2016-04-19)
17  Vertex objects stored in this class are now xAOD::Vertex (from Trk::VxCandidate)
18 
19  ***************************************************************************/
20 
22 
23 namespace Trk {
24 
25  // TODO: think about if handed vertices with no private store yet
26 
27  TrackToVtxLink::TrackToVtxLink() : m_vertices(nullptr) {}
28 
29  //constructor with pointers to vertices
30  TrackToVtxLink::TrackToVtxLink(std::vector<xAOD::Vertex*>* ptrToVertices)
31  : m_vertices(ptrToVertices) {}
32 
33  TrackToVtxLink::~TrackToVtxLink()
34  {
35  if (m_vertices!=nullptr) {
36  delete m_vertices;
37  m_vertices=nullptr;
38  }
39  }
40 
41 
42  TrackToVtxLink::TrackToVtxLink(const TrackToVtxLink& rhs) :
43  m_vertices(rhs.m_vertices ? new std::vector<xAOD::Vertex*>(*rhs.m_vertices) : nullptr) { }
44 
45 
46  //assignement operator changed
48  {
49  if (this!=&rhs)
50  {
51  delete m_vertices;
52  m_vertices = m_vertices ? new std::vector<xAOD::Vertex*>(*rhs.m_vertices) : nullptr;
53  }
54  return *this;
55  }
56 
57 } // end of namespace
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
vector
Definition: MultiHisto.h:13
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9