From 4589009dfd87599e2a672ce5bc699146bbdbfba5 Mon Sep 17 00:00:00 2001 From: Atlas-Software Librarian <Atlas-Software.Librarian@cern.ch> Date: Fri, 8 Apr 2016 17:18:39 +0200 Subject: [PATCH] 'CMakeLists.txt' (ISF_FatrasEventAthenaPool-00-00-03) * Tagging ISF_FatrasEventAthenaPool-00-00-03. * Remove #define private. 2015-07-10 Peter van Gemmeren < Peter.van.Gemmeren -at- cern.ch > * small change to Converter::updateLog() to get const DataObject* * tag ISF_FatrasEventAthenaPool-00-00-02 --- .../ISF_FatrasEventAthenaPool/CMakeLists.txt | 27 ++++++++++++++ .../src/PlanarClusterContainerCnv.cxx | 36 ++----------------- .../src/PlanarClusterContainerCnv.h | 17 ++------- 3 files changed, 33 insertions(+), 47 deletions(-) create mode 100644 Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/CMakeLists.txt diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/CMakeLists.txt new file mode 100644 index 00000000000..dc81f08787e --- /dev/null +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################################################ +# Package: ISF_FatrasEventAthenaPool +################################################################################ + +# Declare the package name: +atlas_subdir( ISF_FatrasEventAthenaPool ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + Database/AthenaPOOL/AthenaPoolUtilities + PRIVATE + Database/AthenaPOOL/AthenaPoolCnvSvc + Database/AtlasSealCLHEP + GaudiKernel + Simulation/ISF/ISF_Fatras/ISF_FatrasEvent + Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv ) + +# Component(s) in the package: +atlas_add_poolcnv_library( ISF_FatrasEventAthenaPoolPoolCnv + src/*.cxx + FILES ISF_FatrasEvent/PlanarClusterContainer.h + TYPES_WITH_NAMESPACE iFatras::PlanarClusterContainer + LINK_LIBRARIES AthenaPoolUtilities AthenaPoolCnvSvcLib AtlasSealCLHEP GaudiKernel ISF_FatrasEvent ISF_FatrasEventTPCnv ) + +# Install files from the package: +atlas_install_headers( ISF_FatrasEventAthenaPool ) + diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.cxx index 890d970a626..4d5866f65d3 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.cxx @@ -10,30 +10,14 @@ #include <iostream> PlanarClusterContainerCnv::PlanarClusterContainerCnv (ISvcLocator* svcloc) : - PlanarClusterContainerCnvBase(svcloc), - m_msgSvc( msgSvc() ), - m_log( m_msgSvc, "PlanarClusterContainerCnv" ) + PlanarClusterContainerCnvBase(svcloc) {} PlanarClusterContainerCnv::~PlanarClusterContainerCnv() {} -StatusCode PlanarClusterContainerCnv::initialize() -{ - if (PlanarClusterContainerCnvBase::initialize().isFailure() ) - { - m_log << MSG::FATAL << "Could not initialize PlanarClusterContainerCnvBase" << endreq; - return StatusCode::FAILURE; - } - return StatusCode::SUCCESS; -} - iFatras::PlanarClusterContainer* PlanarClusterContainerCnv::createTransient() { - // Message stream handling - m_log.setLevel( m_msgSvc->outputLevel() ); - updateLog(); - static pool::Guid p1_guid("E0411C25-64DD-49D9-AC1A-8E32A75C8ABF"); // with PlanarCluster_p1 static pool::Guid p2_guid("8697937F-1E3B-4C80-876E-0D6467C50688"); // with PlanarCluster_p2 ATH_MSG_DEBUG("createTransient(): main converter"); @@ -53,23 +37,9 @@ iFatras::PlanarClusterContainer* PlanarClusterContainerCnv::createTransient() { return p_collection; } -PlanarClusterContainer_PERS* PlanarClusterContainerCnv::createPersistent (iFatras::PlanarClusterContainer* transCont) { - - // Message stream handling - m_log.setLevel( m_msgSvc->outputLevel() ); - updateLog(); - +PlanarClusterContainer_PERS* PlanarClusterContainerCnv::createPersistent (iFatras::PlanarClusterContainer* transCont) +{ PlanarClusterContainer_PERS *pldc_p= m_converter_p2.createPersistent( transCont, msg() ); return pldc_p; } - - -void PlanarClusterContainerCnv::updateLog(){ - - DataObject* dObj = getDataObject(); - if (dObj==0) return; // Can't do much if this fails. - const std::string key = (dObj->name()); - - m_log.m_source="PlanarClusterContainerCnv: "+key; // A hack - relies on getting access to private data of MsgStream via #define trick. EJWM. -} diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.h index b4765c88570..96d8e25a9fd 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/src/PlanarClusterContainerCnv.h @@ -5,13 +5,9 @@ #ifndef PLANARCLUSTERCONTAINERCNV_H #define PLANARCLUSTERCONTAINERCNV_H -#define private public -#define protected public #include "ISF_FatrasEvent/PlanarClusterCollection.h" #include "ISF_FatrasEvent/PlanarClusterContainer.h" #include "GaudiKernel/MsgStream.h" -#undef private -#undef protected #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" #include "ISF_FatrasEventTPCnv/PlanarClusterContainerCnv_p1.h" @@ -35,21 +31,14 @@ class PlanarClusterContainerCnv : public PlanarClusterContainerCnvBase protected: PlanarClusterContainerCnv (ISvcLocator* svcloc); - ~PlanarClusterContainerCnv(); - virtual PlanarClusterContainer_PERS* createPersistent (iFatras::PlanarClusterContainer* transCont); - virtual iFatras::PlanarClusterContainer* createTransient (); + virtual ~PlanarClusterContainerCnv() override; + virtual PlanarClusterContainer_PERS* createPersistent (iFatras::PlanarClusterContainer* transCont) override; + virtual iFatras::PlanarClusterContainer* createTransient () override; - // Must initialize ID helpers - virtual StatusCode initialize(); private: - void updateLog(); //!< This method modifies m_log to indicate the current key being converted - IMessageSvc* m_msgSvc; //!< MsgStream svc - MsgStream m_log; //!< MsgStream - PlanarClusterContainerCnv_p1 m_converter_p1; PlanarClusterContainerCnv_p2 m_converter_p2; - }; -- GitLab