Skip to content
Snippets Groups Projects
Commit 27814e71 authored by Marcin Nowak's avatar Marcin Nowak :radioactive:
Browse files

TwoPers converter used to write old Pers versions of some objects

parent e52bd0d8
No related branches found
No related tags found
1 merge request!66707renamed: T_AthenaPoolTwoPersCnv.h -> T_AthenaPoolLegacyCnv.h
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
#include "InDetSimDataCollectionCnv.h"
#include "InDetSimDataCollectionCnv_p1.h"
#include "InDetSimDataCollectionCnv_p2.h"
#include "InDetSimDataCollectionCnv_p3.h"
// Gaudi
#include "GaudiKernel/MsgStream.h"
bool InDetSimDataCollectionCnv::writeOldPers() {
return true;
}
InDetSimDataCollection_p2*
InDetSimDataCollectionCnv::createOldPersistent(InDetSimDataCollection* transCont) {
MsgStream mlog(msgSvc(), "InDetSimDataCollectionCnvOld" );
InDetSimDataCollectionCnv_p2 converter;
return converter.createPersistent( transCont, mlog );
}
InDetSimDataCollection_PERS* InDetSimDataCollectionCnv::createPersistent(InDetSimDataCollection* transCont) {
MsgStream mlog(msgSvc(), "InDetSimDataCollectionCnv" );
InDetSimDataCollectionCnv_PERS converter;
InDetSimDataCollectionCnv_p3 converter;
InDetSimDataCollection_PERS *persObj = converter.createPersistent( transCont, mlog );
return persObj;
}
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
#ifndef INDETSIMDATACOLLECTIONCNV_H
#define INDETSIMDATACOLLECTIONCNV_H
#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
#include "InDetSimData/InDetSimDataCollection.h"
#include "InDetSimDataCollectionCnv_p1.h"
#include "AthenaPoolCnvSvc/T_AthenaPoolTwoPersCnv.h"
// full includes needed for unique_ptr in "TwoPers" converter
#include "InDetSimDataCollectionCnv_p2.h"
#include "InDetSimDataCollectionCnv_p3.h"
// Gaudi
#include "GaudiKernel/MsgStream.h"
// typedef to the latest persistent version
typedef InDetSimDataCollection_p3 InDetSimDataCollection_PERS;
typedef InDetSimDataCollectionCnv_p3 InDetSimDataCollectionCnv_PERS;
// base class
typedef T_AthenaPoolCustomCnv<InDetSimDataCollection, InDetSimDataCollection_PERS > InDetSimDataCollectionCnvBase;
typedef T_AthenaPoolTwoPersCnv< InDetSimDataCollection,
InDetSimDataCollection_PERS,
InDetSimDataCollection_p2 > InDetSimDataCollectionCnvBase;
class InDetSimDataCollectionCnv : public InDetSimDataCollectionCnvBase {
class InDetSimDataCollectionCnv : public InDetSimDataCollectionCnvBase
{
friend class CnvFactory<InDetSimDataCollectionCnv >;
protected:
public:
InDetSimDataCollectionCnv (ISvcLocator* svcloc) : InDetSimDataCollectionCnvBase(svcloc) {}
using InDetSimDataCollectionCnvBase::InDetSimDataCollectionCnvBase;
virtual bool writeOldPers() override final;
protected:
virtual InDetSimDataCollection_PERS* createPersistent (InDetSimDataCollection* transCont);
virtual InDetSimDataCollection* createTransient ();
virtual InDetSimDataCollection_PERS* createPersistent( InDetSimDataCollection* transCont ) override final;
virtual InDetSimDataCollection_p2* createOldPersistent( InDetSimDataCollection* transCont ) override final;
virtual InDetSimDataCollection* createTransient () override final;
};
#endif
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