diff --git a/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/TrkVertexFitterInterfaces/IVertexStoringTool.h b/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/TrkVertexFitterInterfaces/IVertexStoringTool.h deleted file mode 100644 index ff6528258fc0c789ee611d3d49a13940e8d3c86d..0000000000000000000000000000000000000000 --- a/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/TrkVertexFitterInterfaces/IVertexStoringTool.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/////////////////////////////////////////////////////////////////// -// IVertexStoringTool.h, (c) ATLAS Detector software 2016 -/////////////////////////////////////////////////////////////////// - -#ifndef TRK_IVERTEXSTORINGTOOL_H -#define TRK_IVERTEXSTORINGTOOL_H - -#include "GaudiKernel/IAlgTool.h" - -//xAOD includes -#include "xAODTracking/VertexFwd.h" -#include "xAODTracking/VertexContainerFwd.h" -#include "xAODTracking/VertexAuxContainer.h" - -namespace Trk -{ - - static const InterfaceID IID_IVertexStoringTool("IVertexStoringTool", 1, 0); - - /** - @class IVertexStoringTool - @brief Interface class for storing vertices in a named xAOD::VertexContainer in StoreGate. - - A given instance of this tool manages a single, named VertexContainer in the event store. - - Caller must check validity of returned ElementLink. - */ - - class IVertexStoringTool : virtual public IAlgTool { - - public: - /** Virtual destructor */ - virtual ~IVertexStoringTool(){}; - - /** AlgTool interface methods */ - static const InterfaceID& interfaceID() { return IID_IVertexStoringTool; }; - - /** Interface for null (caller can set properties using pointer returned) */ - virtual xAOD::Vertex* storeVertex() = 0; - - /** Interface for xAOD::Vertex */ - virtual xAOD::Vertex* storeVertex(const xAOD::Vertex& myVertex) = 0; - - /** Interface for 3-vector **/ - virtual xAOD::Vertex* storeVertex(const Amg::Vector3D& myVector) = 0; - - /** Interface for 3-vector and covariance matrix **/ - virtual xAOD::Vertex* storeVertex(const Amg::Vector3D& myVector, const AmgSymMatrix(3)& myMatrix) = 0; - - }; -} - -#endif diff --git a/Tracking/TrkVertexFitter/TrkVertexTools/CMakeLists.txt b/Tracking/TrkVertexFitter/TrkVertexTools/CMakeLists.txt index 7a951cf6937fa857205c6dcea4461381eb9b7644..91fb15ae9639dfc0832ef1b6062ca5486ea8160d 100644 --- a/Tracking/TrkVertexFitter/TrkVertexTools/CMakeLists.txt +++ b/Tracking/TrkVertexFitter/TrkVertexTools/CMakeLists.txt @@ -28,7 +28,8 @@ atlas_add_component( TrkVertexTools src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel xAODTracking GaudiKernel TrkVertexFitterInterfaces EventPrimitives GeneratorObjects TrkEventPrimitives VxVertex BeamSpotConditionsData ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel xAODTracking GaudiKernel TrkVertexFitterInterfaces EventPrimitives + GeneratorObjects TrkEventPrimitives VxVertex BeamSpotConditionsData ) # Install files from the package: atlas_install_headers( TrkVertexTools ) diff --git a/Tracking/TrkVertexFitter/TrkVertexTools/TrkVertexTools/VertexStoringTool.h b/Tracking/TrkVertexFitter/TrkVertexTools/TrkVertexTools/VertexStoringTool.h deleted file mode 100644 index ed9b0cddec8465a1aadfac80cf5e5e5763aab467..0000000000000000000000000000000000000000 --- a/Tracking/TrkVertexFitter/TrkVertexTools/TrkVertexTools/VertexStoringTool.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef TrkVertexTools_VertexStoringTool_H -#define TrkVertexTools_VertexStoringTool_H - -#include "AthenaBaseComps/AthAlgTool.h" -#include "TrkVertexFitterInterfaces/IVertexStoringTool.h" - -//xAOD include -#include "xAODTracking/VertexFwd.h" -#include "xAODTracking/VertexContainerFwd.h" -#include "xAODTracking/VertexAuxContainer.h" - - /** - * @class Trk::VertexStoringTool - * - * @author Dave Casper, February 2016 - */ - - namespace Trk - { - - class VertexStoringTool : public AthAlgTool, virtual public IVertexStoringTool - { - public: - StatusCode initialize(); - StatusCode finalize(); - - /** - * constructor - */ - VertexStoringTool(const std::string& t, const std::string& n, const IInterface* p); - - /** - * destructor - */ - virtual ~VertexStoringTool(); - - /** - *Storing - */ - virtual xAOD::Vertex* storeVertex(); - virtual xAOD::Vertex* storeVertex(const xAOD::Vertex& myVertex); - virtual xAOD::Vertex* storeVertex(const Amg::Vector3D& myVector); - virtual xAOD::Vertex* storeVertex(const Amg::Vector3D& myVector, const AmgSymMatrix(3)& myMatrix); - - - private: - StatusCode registerContainer(); - - std::string m_key; - SG::WriteHandle<xAOD::VertexContainer> m_container; - SG::WriteHandle<xAOD::VertexAuxContainer> m_aux; - - }; //end of class description - }//end of namespace definition - - #endif diff --git a/Tracking/TrkVertexFitter/TrkVertexTools/src/VertexStoringTool.cxx b/Tracking/TrkVertexFitter/TrkVertexTools/src/VertexStoringTool.cxx deleted file mode 100644 index c7b006a81174d558b41497cc3f5ca4923798c95a..0000000000000000000000000000000000000000 --- a/Tracking/TrkVertexFitter/TrkVertexTools/src/VertexStoringTool.cxx +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -#include "TrkVertexTools/VertexStoringTool.h" -#include "xAODTracking/Vertex.h" -#include "xAODTracking/VertexContainer.h" - -namespace Trk{ - - //constructor - VertexStoringTool::VertexStoringTool ( const std::string& t, const std::string& n, const IInterface* p ) - : AthAlgTool ( t,n,p ), - m_key("Unspecified"), - m_container("Unspecified"), - m_aux("Unspecified") - { - declareInterface<IVertexStoringTool> ( this ); - declareProperty("Key", m_key); - } - - //destructor - VertexStoringTool::~VertexStoringTool(){} - -//initialize - StatusCode VertexStoringTool::initialize() - { - // finalize the names of the two StoreGate entries - m_container = SG::WriteHandle<xAOD::VertexContainer>(m_key); - m_aux = SG::WriteHandle<xAOD::VertexAuxContainer>(m_key + "Aux."); - - ATH_MSG_DEBUG("Vertex storing tool initialization successful"); - return StatusCode::SUCCESS; - }///EndOfInitialize - - StatusCode VertexStoringTool::finalize() - { - return StatusCode::SUCCESS; - } - - xAOD::Vertex* VertexStoringTool::storeVertex() - { - if (registerContainer().isFailure()) return NULL; - xAOD::Vertex* s = new xAOD::Vertex(); - m_container->push_back(s); - return s; - } - - xAOD::Vertex* VertexStoringTool::storeVertex(const xAOD::Vertex& myVertex) - { - if (registerContainer().isFailure()) return NULL; - xAOD::Vertex* s = new xAOD::Vertex(myVertex); - m_container->push_back(s); - return s; - } - - xAOD::Vertex* VertexStoringTool::storeVertex(const Amg::Vector3D& myVector) - { - xAOD::Vertex* s = NULL; - if (!(s = storeVertex())) return NULL; - s->setPosition(myVector); - return s; - } - - xAOD::Vertex* VertexStoringTool::storeVertex(const Amg::Vector3D& myVector, const AmgSymMatrix(3)& myMatrix) - { - xAOD::Vertex* s = NULL; - if (!(s = storeVertex(myVector))) return NULL; - s->setCovariancePosition(myMatrix); - return s; - } - - StatusCode VertexStoringTool::registerContainer() - { - if (m_container.isValid() && m_aux.isValid()) return StatusCode::SUCCESS; - m_container = std::make_unique<xAOD::VertexContainer>(); - m_aux = std::make_unique<xAOD::VertexAuxContainer>(); - if (!(m_container.isValid() && m_aux.isValid())) - { - ATH_MSG_ERROR("Unable to initialize " << m_container.key() << " and " << m_aux.key()); - return StatusCode::FAILURE; - } - m_container->setNonConstStore(&(*m_aux)); - ATH_MSG_VERBOSE( m_container.key() << " and " << m_aux.key() << " initialized and linked"); - - return StatusCode::SUCCESS; - } - -}///End trk namespace diff --git a/Tracking/TrkVertexFitter/TrkVertexTools/src/components/TrkVertexTools_entries.cxx b/Tracking/TrkVertexFitter/TrkVertexTools/src/components/TrkVertexTools_entries.cxx index 6dfcbcce1717935f56414417684f48742315bf7f..e13a13eab02b5a72f29ea6297b5070135893b0fc 100644 --- a/Tracking/TrkVertexFitter/TrkVertexTools/src/components/TrkVertexTools_entries.cxx +++ b/Tracking/TrkVertexFitter/TrkVertexTools/src/components/TrkVertexTools_entries.cxx @@ -2,7 +2,6 @@ #include "TrkVertexTools/VertexMergingTool.h" #include "TrkVertexTools/DummyVertexSelectionTool.h" #include "TrkVertexTools/TruthVertexSelectionTool.h" -#include "TrkVertexTools/VertexStoringTool.h" #include "TrkVertexTools/SecVertexMergingTool.h" using namespace Trk; @@ -11,7 +10,6 @@ DECLARE_COMPONENT( VertexCollectionSortingTool ) DECLARE_COMPONENT( VertexMergingTool ) DECLARE_COMPONENT( DummyVertexSelectionTool ) DECLARE_COMPONENT( TruthVertexSelectionTool ) -DECLARE_COMPONENT( VertexStoringTool ) DECLARE_COMPONENT( SecVertexMergingTool )