Skip to content
Snippets Groups Projects
Commit 4589009d authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'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
parent 8d2f6238
No related branches found
No related tags found
No related merge requests found
################################################################################
# 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 )
...@@ -10,30 +10,14 @@ ...@@ -10,30 +10,14 @@
#include <iostream> #include <iostream>
PlanarClusterContainerCnv::PlanarClusterContainerCnv (ISvcLocator* svcloc) : PlanarClusterContainerCnv::PlanarClusterContainerCnv (ISvcLocator* svcloc) :
PlanarClusterContainerCnvBase(svcloc), PlanarClusterContainerCnvBase(svcloc)
m_msgSvc( msgSvc() ),
m_log( m_msgSvc, "PlanarClusterContainerCnv" )
{} {}
PlanarClusterContainerCnv::~PlanarClusterContainerCnv() {} 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() { 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 p1_guid("E0411C25-64DD-49D9-AC1A-8E32A75C8ABF"); // with PlanarCluster_p1
static pool::Guid p2_guid("8697937F-1E3B-4C80-876E-0D6467C50688"); // with PlanarCluster_p2 static pool::Guid p2_guid("8697937F-1E3B-4C80-876E-0D6467C50688"); // with PlanarCluster_p2
ATH_MSG_DEBUG("createTransient(): main converter"); ATH_MSG_DEBUG("createTransient(): main converter");
...@@ -53,23 +37,9 @@ iFatras::PlanarClusterContainer* PlanarClusterContainerCnv::createTransient() { ...@@ -53,23 +37,9 @@ iFatras::PlanarClusterContainer* PlanarClusterContainerCnv::createTransient() {
return p_collection; return p_collection;
} }
PlanarClusterContainer_PERS* PlanarClusterContainerCnv::createPersistent (iFatras::PlanarClusterContainer* transCont) { PlanarClusterContainer_PERS* PlanarClusterContainerCnv::createPersistent (iFatras::PlanarClusterContainer* transCont)
{
// Message stream handling
m_log.setLevel( m_msgSvc->outputLevel() );
updateLog();
PlanarClusterContainer_PERS *pldc_p= m_converter_p2.createPersistent( transCont, msg() ); PlanarClusterContainer_PERS *pldc_p= m_converter_p2.createPersistent( transCont, msg() );
return pldc_p; 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.
}
...@@ -5,13 +5,9 @@ ...@@ -5,13 +5,9 @@
#ifndef PLANARCLUSTERCONTAINERCNV_H #ifndef PLANARCLUSTERCONTAINERCNV_H
#define PLANARCLUSTERCONTAINERCNV_H #define PLANARCLUSTERCONTAINERCNV_H
#define private public
#define protected public
#include "ISF_FatrasEvent/PlanarClusterCollection.h" #include "ISF_FatrasEvent/PlanarClusterCollection.h"
#include "ISF_FatrasEvent/PlanarClusterContainer.h" #include "ISF_FatrasEvent/PlanarClusterContainer.h"
#include "GaudiKernel/MsgStream.h" #include "GaudiKernel/MsgStream.h"
#undef private
#undef protected
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
#include "ISF_FatrasEventTPCnv/PlanarClusterContainerCnv_p1.h" #include "ISF_FatrasEventTPCnv/PlanarClusterContainerCnv_p1.h"
...@@ -35,21 +31,14 @@ class PlanarClusterContainerCnv : public PlanarClusterContainerCnvBase ...@@ -35,21 +31,14 @@ class PlanarClusterContainerCnv : public PlanarClusterContainerCnvBase
protected: protected:
PlanarClusterContainerCnv (ISvcLocator* svcloc); PlanarClusterContainerCnv (ISvcLocator* svcloc);
~PlanarClusterContainerCnv(); virtual ~PlanarClusterContainerCnv() override;
virtual PlanarClusterContainer_PERS* createPersistent (iFatras::PlanarClusterContainer* transCont); virtual PlanarClusterContainer_PERS* createPersistent (iFatras::PlanarClusterContainer* transCont) override;
virtual iFatras::PlanarClusterContainer* createTransient (); virtual iFatras::PlanarClusterContainer* createTransient () override;
// Must initialize ID helpers
virtual StatusCode initialize();
private: 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_p1 m_converter_p1;
PlanarClusterContainerCnv_p2 m_converter_p2; PlanarClusterContainerCnv_p2 m_converter_p2;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment