ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
egamma
egammaAthenaPool
src
egammaContainerCnv.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
// egammaContainerCnv.cxx
8
// Implementation file for class egammaContainerCnv
9
// Author: K.Cranmer<cranmer@cern.ch>
10
// Author: S.Binet<binet@cern.ch>
12
13
// STL includes
14
15
// Framework includes
16
#include "GaudiKernel/MsgStream.h"
17
18
// egammaEventTPCnv includes
19
#include "
egammaEventTPCnv/egammaContainerCnv_p1.h
"
20
#include "
egammaEventTPCnv/egammaContainerCnv_p2.h
"
21
#include "
egammaEventTPCnv/egammaContainerCnv_p3.h
"
22
#include "
egammaEventTPCnv/egammaContainerCnv_p4.h
"
23
#include "
egammaEventTPCnv/egammaContainerCnv_p5.h
"
24
25
// RecAthenaPool includes
26
#include "
egammaContainerCnv.h
"
27
#include "
egammaMsgUtil.h
"
28
29
33
37
39
// Protected methods:
41
42
43
egammaContainer_PERS
*
44
egammaContainerCnv::createPersistent
(
egammaContainer
* transCont )
45
{
46
MsgStream
msg
( msgSvc(),
"egammaContainerCnv"
);
47
48
egammaContainerCnv_p5
cnv;
49
egammaContainer_PERS
*persObj = cnv.
createPersistent
( transCont,
msg
);
50
51
MSG_DEBUG
(
msg
,
"::createPersistent [Success]"
);
52
return
persObj;
53
}
54
55
egammaContainer
*
egammaContainerCnv::createTransient
(
const
Token
* token)
56
{
57
MsgStream
msg
( msgSvc(),
"egammaContainerCnv"
);
58
59
egammaContainer
*transObj =
nullptr
;
60
61
static
const
pool::Guid
tr_guid(
"7CAB4F67-1765-4CDC-9614-60EB93E5551B"
);
62
static
const
pool::Guid
p1_guid(
"DBA382E5-52F7-4B40-8623-E807E134412E"
);
63
static
const
pool::Guid
p2_guid(
"5576188C-ECA9-4BD1-B1F1-563C728FE51F"
);
64
static
const
pool::Guid
p3_guid(
"95BD7D50-F070-4245-91DE-ECAB4A8D722D"
);
65
static
const
pool::Guid
p4_guid(
"451AACD2-5B23-4557-8A3F-6CD1AB36BF9F"
);
66
static
const
pool::Guid
p5_guid(
"1AA8DE2E-D1CC-4076-B74A-82BBCC551798"
);
67
68
if
(
compareClassGuid
(token, p5_guid) ) {
69
70
// using unique_ptr ensures deletion of the persistent object
71
std::unique_ptr<egammaContainer_p5> persObj(
poolReadObject<egammaContainer_p5>
(token) );
72
egammaContainerCnv_p5
cnv;
73
transObj = cnv.
createTransient
( persObj.get(),
msg
);
74
75
}
else
if
(
compareClassGuid
(token, p4_guid) ) {
76
77
// using unique_ptr ensures deletion of the persistent object
78
std::unique_ptr<egammaContainer_p4> persObj(
poolReadObject<egammaContainer_p4>
(token) );
79
egammaContainerCnv_p4
cnv;
80
transObj = cnv.
createTransient
( persObj.get(),
msg
);
81
82
}
else
if
(
compareClassGuid
(token, p3_guid) ) {
83
84
// using unique_ptr ensures deletion of the persistent object
85
std::unique_ptr<egammaContainer_p3> persObj(
poolReadObject<egammaContainer_p3>
(token) );
86
egammaContainerCnv_p3
cnv;
87
transObj = cnv.
createTransient
( persObj.get(),
msg
);
88
89
}
else
if
(
compareClassGuid
(token, p2_guid) ) {
90
91
// using unique_ptr ensures deletion of the persistent object
92
std::unique_ptr<egammaContainer_p2> persObj(
poolReadObject<egammaContainer_p2>
(token) );
93
egammaContainerCnv_p2
cnv;
94
transObj = cnv.
createTransient
( persObj.get(),
msg
);
95
96
}
else
if
(
compareClassGuid
(token, p1_guid) ) {
97
98
// using unique_ptr ensures deletion of the persistent object
99
std::unique_ptr<egammaContainer_p1> persObj(
poolReadObject<egammaContainer_p1>
(token) );
100
egammaContainerCnv_p1
cnv;
101
transObj = cnv.
createTransient
( persObj.get(),
msg
);
102
103
}
else
if
(
compareClassGuid
(token, tr_guid) ) {
104
105
// regular object from before the T/P separation
106
return
poolReadObject<egammaContainer>
(token);
107
108
}
else
{
109
throw
std::runtime_error(
"Unsupported persistent version of egammaContainer"
);
110
}
111
112
return
transObj;
113
}
MSG_DEBUG
#define MSG_DEBUG(log, x)
Definition
MsgUtil.h:16
T_AthenaPoolCustomCnv< egammaContainer, egammaContainer_PERS >::msg
MsgStream & msg() const
Definition
AthMessaging.h:167
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< egammaContainer, egammaContainer_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< egammaContainer, egammaContainer_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
egammaContainerCnv::createTransient
virtual egammaContainer * createTransient(const Token *token)
Build the transient representation from a persistent one.
Definition
egammaContainerCnv.cxx:55
egammaContainerCnv::createPersistent
virtual egammaContainer_PERS * createPersistent(egammaContainer *transCont)
Build the persistent representation from the transient one.
Definition
egammaContainerCnv.cxx:44
egammaContainer
This is a data object, containing a collection of egamma Objects.
Definition
egammaContainer.h:41
egammaContainerCnv.h
egammaContainer_PERS
egammaContainer_p5 egammaContainer_PERS
Definition
egammaContainerCnv.h:34
egammaContainerCnv_p1.h
egammaContainerCnv_p1
T_AthenaPoolTPCnvVector< egammaContainer, egammaContainer_p1, egammaCnv_p1 > egammaContainerCnv_p1
Definition
egammaContainerCnv_p1.h:33
egammaContainerCnv_p2.h
egammaContainerCnv_p2
T_AthenaPoolTPCnvVector< egammaContainer, egammaContainer_p2, egammaCnv_p2 > egammaContainerCnv_p2
Definition
egammaContainerCnv_p2.h:31
egammaContainerCnv_p3.h
egammaContainerCnv_p3
T_AthenaPoolTPCnvVector< egammaContainer, egammaContainer_p3, egammaCnv_p3 > egammaContainerCnv_p3
Definition
egammaContainerCnv_p3.h:31
egammaContainerCnv_p4.h
egammaContainerCnv_p4
T_AthenaPoolTPCnvVector< egammaContainer, egammaContainer_p4, egammaCnv_p4 > egammaContainerCnv_p4
Definition
egammaContainerCnv_p4.h:31
egammaContainerCnv_p5.h
egammaContainerCnv_p5
T_AthenaPoolTPCnvVector< egammaContainer, egammaContainer_p5, egammaCnv_p5 > egammaContainerCnv_p5
Definition
egammaContainerCnv_p5.h:32
egammaMsgUtil.h
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.17.0