Commit d8bb33c7 authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (CaloSimEventAthenaPool-00-00-00)

parent f9220238
################################################################################
# Package: CaloSimEventAthenaPool
################################################################################
# Declare the package name:
atlas_subdir( CaloSimEventAthenaPool )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Database/AthenaPOOL/AthenaPoolUtilities
PRIVATE
Calorimeter/CaloCnv/CaloSimEventTPCnv
Calorimeter/CaloSimEvent
Database/AthenaPOOL/AthenaPoolCnvSvc )
# Component(s) in the package:
atlas_add_poolcnv_library( CaloSimEventAthenaPoolPoolCnv
src/*.cxx
FILES CaloSimEvent/CaloCalibrationHitContainer.h
LINK_LIBRARIES AthenaPoolUtilities CaloSimEventTPCnv CaloSimEvent AthenaPoolCnvSvcLib )
# Install files from the package:
atlas_install_headers( CaloSimEventAthenaPool )
package CaloSimEventAthenaPool
author Walter Lampl <walter.lampl@cern.ch>
use AtlasPolicy AtlasPolicy-*
use AthenaPoolUtilities AthenaPoolUtilities-* Database/AthenaPOOL
private
use CaloSimEvent CaloSimEvent-* Calorimeter
use CaloSimEventTPCnv CaloSimEventTPCnv-* Calorimeter/CaloCnv
end_private
macro converters "-s=${CaloSimEvent_root}/CaloSimEvent CaloCalibrationHitContainer.h "
apply_pattern poolcnv files=${converters}
#private
#macro cppdebugflags '$(cppdebugflags_s)'
#macro_remove componentshr_linkopts "-Wl,-s"
#end_private
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "CaloSimEventTPCnv/CaloCalibrationHitContainerCnv_p1.h"
#include "CaloSimEventTPCnv/CaloCalibrationHitContainerCnv_p2.h"
#include "CaloSimEventTPCnv/CaloCalibrationHitContainerCnv_p3.h"
#include "CaloCalibrationHitContainerCnv.h"
#include "CaloSimEventTPCnv/CaloCalibrationHit_p1.h"
#include "CaloSimEventTPCnv/CaloCalibrationHit_p2.h"
CaloCalibrationHitContainer_PERS* CaloCalibrationHitContainerCnv::createPersistent(CaloCalibrationHitContainer* transCont) {
MsgStream mlog(messageService(), "CaloCalibrationHitContainerConverter" );
CaloCalibrationHitContainerCnv_p3 converter;
CaloCalibrationHitContainer_PERS *persObj = converter.createPersistent( transCont, mlog );
return persObj;
}
CaloCalibrationHitContainer* CaloCalibrationHitContainerCnv::createTransient() {
MsgStream mlog(messageService(), "CaloCalibrationHitContainerConverter" );
CaloCalibrationHitContainerCnv_p1 converter_p1;
CaloCalibrationHitContainerCnv_p2 converter_p2;
CaloCalibrationHitContainerCnv_p3 converter_p3;
CaloCalibrationHitContainer *trans_cont(0);
static const pool::Guid p1_guid("185FEF89-2350-4D1E-A1A7-9CB5A357232E");
static const pool::Guid p2_guid("4942B9D4-F545-4C68-BD2D-A8E5923C29F3");
static const pool::Guid p3_guid("D4E51325-2A55-41E4-B163-5224F2FA27CB");
static const pool::Guid p0_guid("33CDAED0-F472-47D2-8F28-27C6D6761F35");
if( this->compareClassGuid(p3_guid)) {
std::auto_ptr< CaloCalibrationHitContainer_p3 > col_vect( this->poolReadObject< CaloCalibrationHitContainer_p3 >() );
trans_cont = converter_p3.createTransient( col_vect.get(), mlog );
}
else if( this->compareClassGuid(p2_guid)) {
std::auto_ptr< CaloCalibrationHitContainer_p2 > col_vect( this->poolReadObject< CaloCalibrationHitContainer_p2 >() );
trans_cont = converter_p2.createTransient( col_vect.get(), mlog );
}
else if( this->compareClassGuid(p1_guid)) {
std::auto_ptr< CaloCalibrationHitContainer_p1 > col_vect( this->poolReadObject< CaloCalibrationHitContainer_p1 >() );
trans_cont = converter_p1.createTransient( col_vect.get(), mlog );
}
else if( this->compareClassGuid(p0_guid)) {
// old version from before TP separation, just return it
trans_cont = this->poolReadObject<CaloCalibrationHitContainer>();
} else {
throw std::runtime_error("Unsupported persistent version of Data container");
}
return trans_cont;
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef CALOCALIBRATIONHITCONTAINERCNV
#define CALOCALIBRATIONHITCONTAINERCNV
#include "CaloSimEvent/CaloCalibrationHitContainer.h"
#include "CaloSimEventTPCnv/CaloCalibrationHitContainer_p1.h"
#include "CaloSimEventTPCnv/CaloCalibrationHitContainer_p2.h"
#include "CaloSimEventTPCnv/CaloCalibrationHitContainer_p3.h"
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
// Gaudi
#include "GaudiKernel/MsgStream.h"
// typedef to the latest persistent version
typedef CaloCalibrationHitContainer_p3 CaloCalibrationHitContainer_PERS;
class CaloCalibrationHitContainerCnv : public T_AthenaPoolCustomCnv<CaloCalibrationHitContainer, CaloCalibrationHitContainer_PERS > {
friend class CnvFactory<CaloCalibrationHitContainerCnv>;
protected:
CaloCalibrationHitContainerCnv(ISvcLocator* svcloc) :
T_AthenaPoolCustomCnv<CaloCalibrationHitContainer, CaloCalibrationHitContainer_PERS >( svcloc) {}
CaloCalibrationHitContainer_PERS* createPersistent(CaloCalibrationHitContainer* transCont);
CaloCalibrationHitContainer* createTransient ();
};
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment