ATLAS Offline Software
Loading...
Searching...
No Matches
CaloRingsContainerCnv.cxx
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5*/
6
7// CaloRingsContainerCnv.cxx
8// Implementation file for class CaloRingsContainerCnv
9// Author: D.E.Ferreira de Lima<dferreir@mail.cern.ch>
11
12// STL includes
13
14// Framework includes
15#include "GaudiKernel/MsgStream.h"
16
17// RecTPCnv includes
19
20// RecAthenaPool includes
22#include "egammaMsgUtil.h"
23
27
31
33// Protected methods:
35
36
39{
40 MsgStream msg( msgSvc(), "CaloRingsContainerCnv" );
41
43 CaloRingsContainer_PERS *persObj = cnv.createPersistent( transCont, msg );
44
45 MSG_DEBUG(msg, "::createPersistent [Success]");
46 return persObj;
47}
48
50{
51 MsgStream msg( msgSvc(), "CaloRingsContainerCnv" );
52
53 CaloRingsContainer *transObj = nullptr;
54
55 static const pool::Guid tr_guid("DA20948A-A38A-11DE-BFE4-001CC0754D20");
56 static const pool::Guid p1_guid("E6E0435E-BFEC-11DE-B657-001CC0754D20");
57
58 if ( compareClassGuid(p1_guid) ) {
59 // using unique_ptr ensures deletion of the persistent object
60 std::unique_ptr<CaloRingsContainer_p1> persObj( poolReadObject<CaloRingsContainer_p1>() );
62 transObj = cnv.createTransient( persObj.get(), msg );
63 } else if ( compareClassGuid(tr_guid) ) {
64 // regular object from before the T/P separation
66 } else {
67 throw std::runtime_error("Unsupported persistent version of CaloRingsContainer");
68 }
69
70 return transObj;
71}
CaloRingsContainer_p1 CaloRingsContainer_PERS
T_AthenaPoolTPCnvVector< CaloRingsContainer, CaloRingsContainer_p1, CaloRingsCnv_p1 > CaloRingsContainerCnv_p1
#define MSG_DEBUG(log, x)
Definition MsgUtil.h:15
virtual CaloRingsContainer_PERS * createPersistent(CaloRingsContainer *transCont)
Build the persistent representation from the transient one.
virtual CaloRingsContainer * createTransient()
Build the transient representation from a persistent one.
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.