ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileSvc
TileEventAthenaPool
src
TileL2ContainerCnv.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
// TileL2ContainerCnv.cxx
8
// Implementation file for class TileL2ContainerCnv
9
// Author: Aranzazu Ruiz <aranzazu.ruiz.martinez@cern.ch>
10
// Date: July 2008
12
13
// Framework includes
14
#include "GaudiKernel/MsgStream.h"
15
16
// TileTPCnv includes
17
#include "
TileTPCnv/TileL2ContainerCnv_p1.h
"
18
#include "
TileTPCnv/TileL2ContainerCnv_p2.h
"
19
20
// TileEventAthenaPool includes
21
#include "
TileL2ContainerCnv.h
"
22
23
TileL2Container_PERS
*
24
TileL2ContainerCnv::createPersistent
(
TileL2Container
* transCont )
25
{
26
MsgStream
msg
( msgSvc(),
"TileL2ContainerCnv"
);
27
28
TileL2ContainerCnv_p2
cnv;
29
TileL2Container_PERS
*persObj = cnv.
createPersistent
( transCont,
msg
);
30
31
if
(
msg
.level()<=MSG::DEBUG)
32
msg
<< MSG::DEBUG <<
"::createPersistent [Success]"
<<
endmsg
;
33
return
persObj;
34
}
35
36
TileL2Container
*
TileL2ContainerCnv::createTransient
(
const
Token
* token) {
37
38
MsgStream
msg
( msgSvc(),
"TileL2ContainerCnv"
);
39
40
TileL2Container
*transObj = 0;
41
42
static
const
Guid
tr_guid(
"E9BB4497-FF43-4D70-8A64-B509081DAD88"
);
43
static
const
Guid
p1_guid(
"FE877FF9-475D-42D9-8DC3-CABD220BFD27"
);
44
static
const
Guid
p2_guid(
"3283BF32-0B18-408F-9B46-6A1B26B37D5C"
);
45
46
if
(
compareClassGuid
(token, tr_guid) ) {
47
48
// regular object from before the T/P separation
49
return
poolReadObject<TileL2Container>
(token);
50
51
}
else
if
(
compareClassGuid
(token, p1_guid) ) {
52
53
// using unique_ptr ensures deletion of the persistent object
54
std::unique_ptr<TileL2Container_p1> persObj(
poolReadObject<TileL2Container_p1>
(token) );
55
TileL2ContainerCnv_p1
cnv;
56
transObj = cnv.
createTransient
( persObj.get(),
msg
);
57
}
else
if
(
compareClassGuid
(token, p2_guid) ) {
58
59
// using unique_ptr ensures deletion of the persistent object
60
std::unique_ptr<TileL2Container_p2> persObj(
poolReadObject<TileL2Container_p2>
(token) );
61
TileL2ContainerCnv_p2
cnv;
62
transObj = cnv.
createTransient
( persObj.get(),
msg
);
63
}
else
{
64
throw
std::runtime_error(
"Unsupported persistent version of TileL2Container"
);
65
}
66
67
return
transObj;
68
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TileL2Container
TileContainer< TileL2 > TileL2Container
Definition
TileContainer.h:67
TileL2ContainerCnv.h
TileL2Container_PERS
TileL2Container_p2 TileL2Container_PERS
Definition
TileL2ContainerCnv.h:25
TileL2ContainerCnv_p1.h
TileL2ContainerCnv_p1
T_AthenaPoolTPCnvVector< TileL2Container, TileL2Container_p1, TileL2Cnv_p1 > TileL2ContainerCnv_p1
Definition
TileL2ContainerCnv_p1.h:29
TileL2ContainerCnv_p2.h
TileL2ContainerCnv_p2
T_AthenaPoolTPCnvVector< TileL2Container, TileL2Container_p2, TileL2Cnv_p2 > TileL2ContainerCnv_p2
Definition
TileL2ContainerCnv_p2.h:29
T_AthenaPoolCustomCnv< TileL2Container, TileL2Container_PERS >::msg
MsgStream & msg() const
Definition
AthMessaging.h:167
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
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< TileL2Container, TileL2Container_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< TileL2Container, TileL2Container_PERS >::poolReadObject
P * poolReadObject(const Token *token)
TileL2ContainerCnv::createTransient
virtual TileL2Container * createTransient(const Token *token)
Build the transient representation from a persistent one.
Definition
TileL2ContainerCnv.cxx:36
TileL2ContainerCnv::createPersistent
virtual TileL2Container_PERS * createPersistent(TileL2Container *transCont)
Build the persistent representation from the transient one.
Definition
TileL2ContainerCnv.cxx:24
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
Generated on
for ATLAS Offline Software by
1.17.0