ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
egamma
egammaAthenaPool
src
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
18
#include "
egammaEventTPCnv/CaloRingsContainerCnv_p1.h
"
19
20
// RecAthenaPool includes
21
#include "
CaloRingsContainerCnv.h
"
22
#include "
egammaMsgUtil.h
"
23
27
31
33
// Protected methods:
35
36
37
CaloRingsContainer_PERS
*
38
CaloRingsContainerCnv::createPersistent
(
CaloRingsContainer
* transCont )
39
{
40
MsgStream
msg
( msgSvc(),
"CaloRingsContainerCnv"
);
41
42
CaloRingsContainerCnv_p1
cnv;
43
CaloRingsContainer_PERS
*persObj = cnv.
createPersistent
( transCont,
msg
);
44
45
MSG_DEBUG
(
msg
,
"::createPersistent [Success]"
);
46
return
persObj;
47
}
48
49
CaloRingsContainer
*
CaloRingsContainerCnv::createTransient
(
const
Token
* token)
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
(token, p1_guid) ) {
59
// using unique_ptr ensures deletion of the persistent object
60
std::unique_ptr<CaloRingsContainer_p1> persObj(
poolReadObject<CaloRingsContainer_p1>
(token) );
61
CaloRingsContainerCnv_p1
cnv;
62
transObj = cnv.
createTransient
( persObj.get(),
msg
);
63
}
else
if
(
compareClassGuid
(token, tr_guid) ) {
64
// regular object from before the T/P separation
65
return
poolReadObject<CaloRingsContainer>
(token);
66
}
else
{
67
throw
std::runtime_error(
"Unsupported persistent version of CaloRingsContainer"
);
68
}
69
70
return
transObj;
71
}
CaloRingsContainerCnv.h
CaloRingsContainer_PERS
CaloRingsContainer_p1 CaloRingsContainer_PERS
Definition
CaloRingsContainerCnv.h:29
CaloRingsContainerCnv_p1.h
CaloRingsContainerCnv_p1
T_AthenaPoolTPCnvVector< CaloRingsContainer, CaloRingsContainer_p1, CaloRingsCnv_p1 > CaloRingsContainerCnv_p1
Definition
CaloRingsContainerCnv_p1.h:32
MSG_DEBUG
#define MSG_DEBUG(log, x)
Definition
MsgUtil.h:16
T_AthenaPoolCustomCnv< CaloRingsContainer, CaloRingsContainer_PERS >::msg
MsgStream & msg() const
Definition
AthMessaging.h:167
CaloRingsContainerCnv::createPersistent
virtual CaloRingsContainer_PERS * createPersistent(CaloRingsContainer *transCont)
Build the persistent representation from the transient one.
Definition
CaloRingsContainerCnv.cxx:38
CaloRingsContainerCnv::createTransient
virtual CaloRingsContainer * createTransient(const Token *token)
Build the transient representation from a persistent one.
Definition
CaloRingsContainerCnv.cxx:49
CaloRingsContainer
Definition
Reconstruction/egamma/egammaEvent/egammaEvent/CaloRingsContainer.h:15
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
T_AthenaPoolCustomCnv< CaloRingsContainer, CaloRingsContainer_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< CaloRingsContainer, CaloRingsContainer_PERS >::poolReadObject
P * poolReadObject(const Token *token)
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
egammaMsgUtil.h
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.17.0