ATLAS Offline Software
VxSecVertexInfo.h
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 
7  VxSecVertexInfo.h - Description
8  -------------------
9 
10  begin: March 2007
11  authors: CSC vertexing note group members :-)
12  work started by: Giacinto Piacquadio (University of Freiburg)
13  e-mail: giacinto.piacquadio@physik.uni-freiburg.de
14  changes: new!
15 
16 This class represents the base information about secondary vertices, which is
17 given by a vector of VxCandidate*. The class OWNS the VxCandidate. Pointers
18  are used to allow inheritance of the extended classes from the VxCandidate.
19 
20 
21  April 2014: Trk::VxCandidate is replaced by xAOD::Vertex
22 
23  May 2014: VxSecVertexInfo doesn't own the corresponding secondary vertices anymore by default.
24  Beware - this leads to a strong memory leak if SV are not explictly deleted before VxSecVertexInfo destructor.
25  VxSecVertexInfo gets back the SV ownership if setSVOwnership(true) is called.
26 
27 *****************************************/
28 
29 #ifndef VXSECVERTEX_VXSECVERTEXINFO_H
30 #define VXSECVERTEX_VXSECVERTEXINFO_H
31 
33 #include "AthenaKernel/CLASS_DEF.h"
34 #include "xAODTracking/Vertex.h"
35 #include <vector>
37 
38 namespace Trk {
39 
40  class VxSecVertexInfo
41  {
42 
43  public:
44 
45  /* default constructor for persistency */
47 
48  /* constructor with list of VxCandidate. The VxSecVertexInfo takes
49  care of the ownership of the VxCandidate*. Don't delete them
50  afterwards */
51  VxSecVertexInfo(std::vector<xAOD::Vertex*> );
52 
53  /* clone method */
54  virtual VxSecVertexInfo* clone() const;
55 
56  /* Destructor */
57  virtual ~VxSecVertexInfo();
58 
59  /* Copy constructor */
62 
63  /* Assignment operator */
64  VxSecVertexInfo& operator= (const VxSecVertexInfo &);
65  VxSecVertexInfo& operator= (VxSecVertexInfo &&) noexcept = default;
66 
67  /* get the list of Vertices */
68  const std::vector<xAOD::Vertex*> & vertices() const;
69 
70  /* set the list of Vertices */
71  void setVertices(const std::vector<xAOD::Vertex*> &);
72 
73  /* set Ownership */
74  void setSVOwnership (bool Ownership) {
75  m_SVOwnership=Ownership;
76  }
77 
78 
79  protected:
80 
81  std::vector<xAOD::Vertex*> m_vertices;
82  bool m_SVOwnership;
83 
84  };
85 
86 
87 
88  inline VxSecVertexInfo* VxSecVertexInfo::clone() const {
89  return new VxSecVertexInfo(*this);
90  }
91 
92 
93 }//end namespace
94 
95 namespace Trk
96 {
98 }
99 
100 
101 CLASS_DEF( Trk::VxSecVertexInfo , 170608128 , 1 )
102 CLASS_DEF( Trk::VxSecVertexInfoContainer , 1284088780 , 1 )
103 
104 
105 
106 #endif
Trk::VxSecVertexInfo::~VxSecVertexInfo
virtual ~VxSecVertexInfo()
Definition: VxSecVertexInfo.cxx:42
Trk::VxSecVertexInfo::setSVOwnership
void setSVOwnership(bool Ownership)
Definition: VxSecVertexInfo.h:118
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
Trk::VxSecVertexInfo::vertices
const std::vector< xAOD::Vertex * > & vertices() const
Definition: VxSecVertexInfo.cxx:100
Trk::VxSecVertexInfo::m_vertices
std::vector< xAOD::Vertex * > m_vertices
Definition: VxSecVertexInfo.h:125
Trk::VxSecVertexInfo::m_SVOwnership
bool m_SVOwnership
Definition: VxSecVertexInfo.h:126
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Trk::VxSecVertexInfo::VxSecVertexInfo
VxSecVertexInfo()
Definition: VxSecVertexInfo.cxx:36
Trk::VxSecVertexInfo::setVertices
void setVertices(const std::vector< xAOD::Vertex * > &)
Definition: VxSecVertexInfo.cxx:104
vector
Definition: MultiHisto.h:13
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Vertex.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::VxSecVertexInfo
Definition: VxSecVertexInfo.h:63
Trk::VxSecVertexInfoContainer
DataVector< Trk::VxSecVertexInfo > VxSecVertexInfoContainer
Definition: VxSecVertexInfo.h:97
Trk::VxSecVertexInfo::clone
virtual VxSecVertexInfo * clone() const
Definition: VxSecVertexInfo.h:110
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
checker_macros.h
Define macros for attributes used to control the static checker.
CLASS_DEF.h
macros to associate a CLID to a type