Commit 79142053 authored by Jochen Meyer's avatar Jochen Meyer Committed by Graeme Stewart
Browse files

factorizing out sim hit (MuonSimEventAthenaPool-00-00-00)

parent 613ed57d
package MuonSimEventAthenaPool
public
use AtlasPolicy AtlasPolicy-*
use AthenaPoolUtilities AthenaPoolUtilities-* Database/AthenaPOOL
use AtlasSealCLHEP AtlasSealCLHEP-* Database
private
use AthenaPoolCnvSvc AthenaPoolCnvSvc-* Database/AthenaPOOL
use GaudiInterface GaudiInterface-* External
use HitManagement HitManagement-* Simulation
use MuonSimEventTPCnv MuonSimEventTPCnv-* MuonSpectrometer/MuonCnv
use MuonSimEvent MuonSimEvent-* MuonSpectrometer
use StoreGate StoreGate-* Control
public
branches MuonSimEventAthenaPool src
apply_pattern poolcnv files="-s=${MuonSimEvent_root}/MuonSimEvent \
CSCSimHitCollection.h \
MDTSimHitCollection.h \
RPCSimHitCollection.h \
TGCSimHitCollection.h \
GenericMuonSimHitCollection.h"
apply_pattern declare_joboptions files="*.py"
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "CSCSimHitCollectionCnv.h"
// Gaudi
#include "GaudiKernel/CnvFactory.h"
#include "GaudiKernel/StatusCode.h"
#include "GaudiKernel/MsgStream.h"
// Athena
#include "StoreGate/StoreGateSvc.h"
#include "MuonSimEvent/CSCSimHitCollection.h"
#include "MuonSimEventTPCnv/CSCSimHitCollection_p1.h"
#include "MuonSimEventTPCnv/CSCSimHitCollection_p2.h"
#include "HitManagement/AthenaHitsVector.h" //for back-compatibility
CSCSimHitCollectionCnv::CSCSimHitCollectionCnv(ISvcLocator* svcloc) :
CSCSimHitCollectionCnvBase(svcloc)
{
}
CSCSimHitCollectionCnv::~CSCSimHitCollectionCnv() {
}
CSCSimHitCollection_PERS* CSCSimHitCollectionCnv::createPersistent (CSCSimHitCollection* transCont) {
MsgStream log(messageService(), "CSCSimHitCollectionCnv" );
if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createPersistent(): main converter"<<endreq;
CSCSimHitCollection_PERS *pixdc_p= m_TPConverter_p2.createPersistent( transCont, log );
return pixdc_p;
}
CSCSimHitCollection* CSCSimHitCollectionCnv::createTransient() {
MsgStream log(messageService(), "CSCSimHitCollectionCnv" );
static pool::Guid p0_guid("DC744F9B-078A-4C61-B03F-D035D885B559"); // before t/p split
static pool::Guid p1_guid("E45CD293-4599-41BE-8B65-945A18F41AB7");
static pool::Guid p2_guid("7E5A120C-E64F-4519-A24B-B485A58724BF");
if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): main converter"<<endreq;
CSCSimHitCollection* p_collection(0);
if( compareClassGuid(p2_guid) ) {
if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): T/P version 2 detected"<<endreq;
// poolReadObject< CSCSimHitCollection_PERS >( m_TPConverter );
// p_collection = m_TPConverter.createTransient( log );
std::auto_ptr< CSCSimHitCollection_PERS > col_vect( this->poolReadObject< CSCSimHitCollection_PERS >() );
p_collection = m_TPConverter_p2.createTransient( col_vect.get(), log );
}
else if( compareClassGuid(p1_guid) ) {
if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): T/P version 1 detected"<<endreq;
// poolReadObject< CSCSimHitCollection_PERS >( m_TPConverter );
// p_collection = m_TPConverter.createTransient( log );
std::auto_ptr< Muon::CSCSimHitCollection_p1 > col_vect( this->poolReadObject< Muon::CSCSimHitCollection_p1 >() );
p_collection = m_TPConverter.createTransient( col_vect.get(), log );
}
//----------------------------------------------------------------
else if( compareClassGuid(p0_guid) ) {
if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): Old input file"<<std::endl;
AthenaHitsVector<CSCSimHit>* oldColl = this->poolReadObject< AthenaHitsVector<CSCSimHit> >();
size_t size = oldColl->size();
p_collection=new CSCSimHitCollection("DefaultCollectionName",size);
//p_collection->reserve(size);
//do the copy
AthenaHitsVector<CSCSimHit>::const_iterator it = oldColl->begin(), itEnd=oldColl->end();
for (;it!=itEnd;it++) {
p_collection->push_back(**it);
}
delete oldColl;
}
else {
throw std::runtime_error("Unsupported persistent version of CSCSimHitCollection");
}
return p_collection;
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONSIMEVENTATHENAPOOL_CSCSIMHITCOLLECTIONCNV_H
#define MUONSIMEVENTATHENAPOOL_CSCSIMHITCOLLECTIONCNV_H
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
#include "MuonSimEvent/CSCSimHitCollection.h"
#include "MuonSimEventTPCnv/CSCSimHitCollectionCnv_p1.h"
#include "MuonSimEventTPCnv/CSCSimHitCollectionCnv_p2.h"
// the latest persistent representation type of DataCollection:
typedef Muon::CSCSimHitCollection_p2 CSCSimHitCollection_PERS;
typedef T_AthenaPoolCustomCnv<CSCSimHitCollection, CSCSimHitCollection_PERS > CSCSimHitCollectionCnvBase;
/**
** Create derived converter to customize the saving of identifiable
** container
**/
class CSCSimHitCollectionCnv :
public CSCSimHitCollectionCnvBase
{
friend class CnvFactory<CSCSimHitCollectionCnv>;
public:
CSCSimHitCollectionCnv(ISvcLocator* svcloc);
virtual ~CSCSimHitCollectionCnv();
virtual CSCSimHitCollection_PERS* createPersistent (CSCSimHitCollection* transCont);
virtual CSCSimHitCollection* createTransient ();
private:
CSCSimHitCollectionCnv_p1 m_TPConverter;
CSCSimHitCollectionCnv_p2 m_TPConverter_p2;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "GenericMuonSimHitCollectionCnv.h"
// Gaudi
#include "GaudiKernel/CnvFactory.h"
#include "GaudiKernel/StatusCode.h"
#include "GaudiKernel/MsgStream.h"
// Athena
#include "StoreGate/StoreGateSvc.h"
#include "MuonSimEvent/GenericMuonSimHitCollection.h"
#include "MuonSimEventTPCnv/GenericMuonSimHitCollection_p1.h"
#include "HitManagement/AthenaHitsVector.h" //for back-compatibility
GenericMuonSimHitCollectionCnv::GenericMuonSimHitCollectionCnv(ISvcLocator* svcloc) :
GenericMuonSimHitCollectionCnvBase(svcloc)
{
}
GenericMuonSimHitCollectionCnv::~GenericMuonSimHitCollectionCnv() {
}
GenericMuonSimHitCollection_PERS* GenericMuonSimHitCollectionCnv::createPersistent (GenericMuonSimHitCollection* transCont) {
MsgStream log(messageService(), "GenericMuonSimHitCollectionCnv" );
ATH_MSG_DEBUG("createPersistent(): main converter");
GenericMuonSimHitCollection_PERS *pixdc_p= m_TPConverter_p1.createPersistent( transCont, log );
return pixdc_p;
}
GenericMuonSimHitCollection* GenericMuonSimHitCollectionCnv::createTransient() {
MsgStream log(messageService(), "GenericMuonSimHitCollectionCnv" );
static pool::Guid p1_guid("C2D5D558-2671-11E1-AAFA-001E4F3E5646");
ATH_MSG_DEBUG("createTransient(): main converter");
GenericMuonSimHitCollection* p_collection(0);
if( compareClassGuid(p1_guid) ) {
ATH_MSG_DEBUG("createTransient(): T/P version 2 detected");
std::auto_ptr< GenericMuonSimHitCollection_PERS > col_vect( this->poolReadObject< GenericMuonSimHitCollection_PERS >() );
p_collection = m_TPConverter_p1.createTransient( col_vect.get(), log );
}
//----------------------------------------------------------------
else {
throw std::runtime_error("Unsupported persistent version of GenericMuonSimHitCollection");
}
return p_collection;
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONSIMEVENTATHENAPOOL_GENERICMUONSIMHITCOLLECTIONCNV_H
#define MUONSIMEVENTATHENAPOOL_GENERICMUONSIMHITCOLLECTIONCNV_H
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
#include "MuonSimEvent/GenericMuonSimHitCollection.h"
#include "MuonSimEventTPCnv/GenericMuonSimHitCollectionCnv_p1.h"
// the latest persistent representation type of DataCollection:
typedef Muon::GenericMuonSimHitCollection_p1 GenericMuonSimHitCollection_PERS;
typedef T_AthenaPoolCustomCnv<GenericMuonSimHitCollection, GenericMuonSimHitCollection_PERS > GenericMuonSimHitCollectionCnvBase;
/**
** Create derived converter to customize the saving of identifiable
** container
**/
class GenericMuonSimHitCollectionCnv :
public GenericMuonSimHitCollectionCnvBase
{
friend class CnvFactory<GenericMuonSimHitCollectionCnv>;
public:
GenericMuonSimHitCollectionCnv(ISvcLocator* svcloc);
virtual ~GenericMuonSimHitCollectionCnv();
virtual GenericMuonSimHitCollection_PERS* createPersistent (GenericMuonSimHitCollection* transCont);
virtual GenericMuonSimHitCollection* createTransient ();
private:
GenericMuonSimHitCollectionCnv_p1 m_TPConverter_p1;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "MDTSimHitCollectionCnv.h"
// Gaudi
#include "GaudiKernel/CnvFactory.h"
#include "GaudiKernel/StatusCode.h"
#include "GaudiKernel/MsgStream.h"
// Athena
#include "StoreGate/StoreGateSvc.h"
#include "MuonSimEvent/MDTSimHitCollection.h"
#include "MuonSimEventTPCnv/MDTSimHitCollection_p1.h"
#include "HitManagement/AthenaHitsVector.h" //for back-compatibility
MDTSimHitCollectionCnv::MDTSimHitCollectionCnv(ISvcLocator* svcloc) :
MDTSimHitCollectionCnvBase(svcloc)
{
}
MDTSimHitCollectionCnv::~MDTSimHitCollectionCnv() {
}
MDTSimHitCollection_PERS* MDTSimHitCollectionCnv::createPersistent (MDTSimHitCollection* transCont) {
MsgStream log(messageService(), "MDTSimHitCollectionCnv" );
ATH_MSG_DEBUG("createPersistent(): main converter");
MDTSimHitCollection_PERS *pixdc_p= m_TPConverter_p2.createPersistent( transCont, log );
return pixdc_p;
}
MDTSimHitCollection* MDTSimHitCollectionCnv::createTransient() {
MsgStream log(messageService(), "MDTSimHitCollectionCnv" );
static pool::Guid p0_guid("D76D06CC-C15F-43E6-BBC3-480DE5DA065D"); // before t/p split
static pool::Guid p1_guid("EA781971-65C5-4B30-9D22-EEFB764BA0B3");
static pool::Guid p2_guid("92880B97-75BB-4C5D-8183-577338059FCC");
ATH_MSG_DEBUG("createTransient(): main converter");
MDTSimHitCollection* p_collection(0);
if( compareClassGuid(p2_guid) ) {
ATH_MSG_DEBUG("createTransient(): T/P version 2 detected");
std::auto_ptr< MDTSimHitCollection_PERS > col_vect( this->poolReadObject< MDTSimHitCollection_PERS >() );
p_collection = m_TPConverter_p2.createTransient( col_vect.get(), log );
} else if( compareClassGuid(p1_guid) ) {
ATH_MSG_DEBUG("createTransient(): T/P version 1 detected");
// poolReadObject< MDTSimHitCollection_PERS >( m_TPConverter );
// p_collection = m_TPConverter.createTransient( log );
std::auto_ptr< Muon::MDTSimHitCollection_p1 > col_vect( this->poolReadObject< Muon::MDTSimHitCollection_p1 >() );
p_collection = m_TPConverter_p1.createTransient( col_vect.get(), log );
}
//----------------------------------------------------------------
else if( compareClassGuid(p0_guid) ) {
if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): Old input file"<<std::endl;
AthenaHitsVector<MDTSimHit>* oldColl = this->poolReadObject< AthenaHitsVector<MDTSimHit> >();
size_t size = oldColl->size();
p_collection=new MDTSimHitCollection("DefaultCollectionName",size);
//p_collection->reserve(size);
//do the copy
AthenaHitsVector<MDTSimHit>::const_iterator it = oldColl->begin(), itEnd=oldColl->end();
for (;it!=itEnd;it++) {
p_collection->push_back(**it);
}
delete oldColl;
}
else {
throw std::runtime_error("Unsupported persistent version of MDTSimHitCollection");
}
return p_collection;
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONSIMEVENTATHENAPOOL_MDTSIMHITCOLLECTIONCNV_H
#define MUONSIMEVENTATHENAPOOL_MDTSIMHITCOLLECTIONCNV_H
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
#include "MuonSimEvent/MDTSimHitCollection.h"
#include "MuonSimEventTPCnv/MDTSimHitCollectionCnv_p1.h"
#include "MuonSimEventTPCnv/MDTSimHitCollectionCnv_p2.h"
// the latest persistent representation type of DataCollection:
typedef Muon::MDTSimHitCollection_p2 MDTSimHitCollection_PERS;
typedef T_AthenaPoolCustomCnv<MDTSimHitCollection, MDTSimHitCollection_PERS > MDTSimHitCollectionCnvBase;
/**
** Create derived converter to customize the saving of identifiable
** container
**/
class MDTSimHitCollectionCnv :
public MDTSimHitCollectionCnvBase
{
friend class CnvFactory<MDTSimHitCollectionCnv>;
public:
MDTSimHitCollectionCnv(ISvcLocator* svcloc);
virtual ~MDTSimHitCollectionCnv();
virtual MDTSimHitCollection_PERS* createPersistent (MDTSimHitCollection* transCont);
virtual MDTSimHitCollection* createTransient ();
private:
MDTSimHitCollectionCnv_p1 m_TPConverter_p1;
MDTSimHitCollectionCnv_p2 m_TPConverter_p2;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "RPCSimHitCollectionCnv.h"
// Gaudi
#include "GaudiKernel/CnvFactory.h"
#include "GaudiKernel/StatusCode.h"
#include "GaudiKernel/MsgStream.h"
// Athena
#include "StoreGate/StoreGateSvc.h"
#include "MuonSimEvent/RPCSimHitCollection.h"
#include "MuonSimEventTPCnv/RPCSimHitCollection_p1.h"
#include "MuonSimEventTPCnv/RPCSimHitCollection_p2.h"
#include "HitManagement/AthenaHitsVector.h" //for back-compatibility
RPCSimHitCollectionCnv::RPCSimHitCollectionCnv(ISvcLocator* svcloc) :
RPCSimHitCollectionCnvBase(svcloc)
{
}
RPCSimHitCollectionCnv::~RPCSimHitCollectionCnv() {
}
RPCSimHitCollection_PERS* RPCSimHitCollectionCnv::createPersistent (RPCSimHitCollection* transCont) {
MsgStream log(messageService(), "RPCSimHitCollectionCnv" );
if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createPersistent(): main converter"<<endreq;
RPCSimHitCollection_PERS *pixdc_p= m_TPConverter_p2.createPersistent( transCont, log );
return pixdc_p;
}
RPCSimHitCollection* RPCSimHitCollectionCnv::createTransient() {
MsgStream log(messageService(), "RPCSimHitCollectionCnv" );
static pool::Guid p0_guid("45EB013E-FC8E-4612-88B7-6E0CAF718F79"); // before t/p split
static pool::Guid p1_guid("C4C57487-41DC-4706-9604-721D76F0AA52");
static pool::Guid p2_guid("1B611C70-CC6F-42AE-9F6D-7DA6A9A22546");
if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): main converter"<<endreq;
RPCSimHitCollection* p_collection(0);
if( compareClassGuid(p2_guid) ) {
if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): T/P version 2 detected"<<endreq;
// poolReadObject< RPCSimHitCollection_PERS >( m_TPConverter );
// p_collection = m_TPConverter.createTransient( log );
std::auto_ptr< RPCSimHitCollection_PERS > col_vect( this->poolReadObject< RPCSimHitCollection_PERS >() );
p_collection = m_TPConverter_p2.createTransient( col_vect.get(), log );
}
else if( compareClassGuid(p1_guid) ) {
if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): T/P version 1 detected"<<endreq;
// poolReadObject< RPCSimHitCollection_PERS >( m_TPConverter );
// p_collection = m_TPConverter.createTransient( log );
std::auto_ptr< Muon::RPCSimHitCollection_p1 > col_vect( this->poolReadObject< Muon::RPCSimHitCollection_p1 >() );
p_collection = m_TPConverter.createTransient( col_vect.get(), log );
}
//----------------------------------------------------------------
else if( compareClassGuid(p0_guid) ) {
if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<"createTransient(): Old input file"<<std::endl;
AthenaHitsVector<RPCSimHit>* oldColl = this->poolReadObject< AthenaHitsVector<RPCSimHit> >();
size_t size = oldColl->size();
p_collection=new RPCSimHitCollection("DefaultCollectionName",size);
//p_collection->reserve(size);
//do the copy
AthenaHitsVector<RPCSimHit>::const_iterator it = oldColl->begin(), itEnd=oldColl->end();
for (;it!=itEnd;it++) {
p_collection->push_back(**it);
}
delete oldColl;
}
else {
throw std::runtime_error("Unsupported persistent version of RPCSimHitCollection");
}
return p_collection;
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONSIMEVENTATHENAPOOL_RPCSIMHITCOLLECTIONCNV_H
#define MUONSIMEVENTATHENAPOOL_RPCSIMHITCOLLECTIONCNV_H
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
#include "MuonSimEvent/RPCSimHitCollection.h"
#include "MuonSimEventTPCnv/RPCSimHitCollectionCnv_p1.h"
#include "MuonSimEventTPCnv/RPCSimHitCollectionCnv_p2.h"
// the latest persistent representation type of DataCollection:
typedef Muon::RPCSimHitCollection_p2 RPCSimHitCollection_PERS;
typedef T_AthenaPoolCustomCnv<RPCSimHitCollection, RPCSimHitCollection_PERS > RPCSimHitCollectionCnvBase;
/**
** Create derived converter to customize the saving of identifiable
** container
**/
class RPCSimHitCollectionCnv :
public RPCSimHitCollectionCnvBase
{
friend class CnvFactory<RPCSimHitCollectionCnv>;
public:
RPCSimHitCollectionCnv(ISvcLocator* svcloc);
virtual ~RPCSimHitCollectionCnv();
virtual RPCSimHitCollection_PERS* createPersistent (RPCSimHitCollection* transCont);
virtual RPCSimHitCollection* createTransient ();
private:
RPCSimHitCollectionCnv_p1 m_TPConverter;
RPCSimHitCollectionCnv_p2 m_TPConverter_p2;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "TGCSimHitCollectionCnv.h"
// Gaudi
#include "GaudiKernel/CnvFactory.h"
#include "GaudiKernel/StatusCode.h"
#include "GaudiKernel/MsgStream.h"
// Athena
#include "StoreGate/StoreGateSvc.h"
#include "MuonSimEvent/TGCSimHitCollection.h"
#include "MuonSimEventTPCnv/TGCSimHitCollection_p1.h"
#include "HitManagement/AthenaHitsVector.h" //for back-compatibility
TGCSimHitCollectionCnv::TGCSimHitCollectionCnv(ISvcLocator* svcloc) :
TGCSimHitCollectionCnvBase(svcloc)
{
}
TGCSimHitCollectionCnv::~TGCSimHitCollectionCnv() {
}
TGCSimHitCollection_PERS* TGCSimHitCollectionCnv::createPersistent (TGCSimHitCollection* transCont) {
MsgStream log(messageService(), "TGCSimHitCollectionCnv" );
log<<MSG::DEBUG<<"createPersistent(): main converter"<<endreq;
TGCSimHitCollection_PERS *pixdc_p= m_TPConverter_p3.createPersistent( transCont, log );
return pixdc_p;
}
TGCSimHitCollection* TGCSimHitCollectionCnv::createTransient() {
MsgStream log(messageService(), "TGCSimHitCollectionCnv" );
static pool::Guid p0_guid("D7C91818-4730-4717-A650-107F52C0221E"); // before t/p split
static pool::Guid p1_guid("BD569381-2489-4402-BBD3-91EE8C009F26");
static pool::Guid p2_guid("710241EE-D5F7-4CB6-A1D7-6E80D040E637");
static pool::Guid p3_guid("BACD19A8-4737-4857-A22D-B9DF833A0A80");
log<<MSG::DEBUG<<"createTransient(): main converter"<<endreq;
TGCSimHitCollection* p_collection(0);
if(compareClassGuid(p3_guid) ) {
log<<MSG::DEBUG<<"createTransient(): T/P version 3 detected"<<endreq;
std::auto_ptr< TGCSimHitCollection_PERS > col_vect( this->poolReadObject< TGCSimHitCollection_PERS >() );
p_collection = m_TPConverter_p3.createTransient( col_vect.get(), log );
}
//----------------------------------------------------------------
else if( compareClassGuid(p2_guid) ) {
log<<MSG::DEBUG<<"createTransient(): T/P version 2 detected"<<endreq;
std::auto_ptr< Muon::TGCSimHitCollection_p2 > col_vect( this->poolReadObject< Muon::TGCSimHitCollection_p2 >() );
p_collection = m_TPConverter_p2.createTransient( col_vect.get(), log );
}
//----------------------------------------------------------------
else if( compareClassGuid(p1_guid) ) {
log<<MSG::DEBUG<<"createTransient(): T/P version 1 detected"<<endreq;
std::auto_ptr< Muon::TGCSimHitCollection_p1 > col_vect( this->poolReadObject< Muon::TGCSimHitCollection_p1 >() );
p_collection = m_TPConverter_p1.createTransient( col_vect.get(), log );
}
//----------------------------------------------------------------
else if( compareClassGuid(p0_guid) ) {
log<<MSG::DEBUG<<"createTransient(): Old input file"<<std::endl;
AthenaHitsVector<TGCSimHit>* oldColl = this->poolReadObject< AthenaHitsVector<TGCSimHit> >();
size_t size = oldColl->size();
p_collection=new TGCSimHitCollection("DefaultCollectionName",size);
//p_collection->reserve(size);
//do the copy
AthenaHitsVector<TGCSimHit>::const_iterator it = oldColl->begin(), itEnd=oldColl->end();
for (;it!=itEnd;it++) {
p_collection->push_back(**it);
}
delete oldColl;
}
else {
throw std::runtime_error("Unsupported persistent version of TGCSimHitCollection");
}
return p_collection;
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONSIMEVENTATHENAPOOL_TGCSIMHITCOLLECTIONCNV_H
#define MUONSIMEVENTATHENAPOOL_TGCSIMHITCOLLECTIONCNV_H
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
#include "MuonSimEvent/TGCSimHitCollection.h"
#include "MuonSimEventTPCnv/TGCSimHitCollectionCnv_p1.h"
#include "MuonSimEventTPCnv/TGCSimHitCollectionCnv_p2.h"
#include "MuonSimEventTPCnv/TGCSimHitCollectionCnv_p3.h"
// the latest persistent representation type of DataCollection:
typedef Muon::TGCSimHitCollection_p3 TGCSimHitCollection_PERS;
typedef T_AthenaPoolCustomCnv<TGCSimHitCollection, TGCSimHitCollection_PERS > TGCSimHitCollectionCnvBase;
/**
** Create derived converter to customize the saving of identifiable
** container
**/
class TGCSimHitCollectionCnv :