ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileSvc
TileEventAthenaPool
src
TileTTL1ContainerCnv.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
// TileTTL1ContainerCnv.cxx
8
// Implementation file for class TileTTL1ContainerCnv
9
// Author: Alexander Solodkov <Sanya.Solodkov@cern.ch>
10
// Date: June 2009
12
13
// Framework includes
14
#include "GaudiKernel/MsgStream.h"
15
16
// TileTPCnv includes
17
#include "
TileTPCnv/TileTTL1ContainerCnv_p1.h
"
18
19
// TileEventAthenaPool includes
20
#include "
TileTTL1ContainerCnv.h
"
21
22
TileTTL1Container_PERS
*
23
TileTTL1ContainerCnv::createPersistent
(
TileTTL1Container
* transCont )
24
{
25
MsgStream
msg
( msgSvc(),
"TileTTL1ContainerCnv"
);
26
27
TileTTL1ContainerCnv_p1
cnv;
28
TileTTL1Container_PERS
*persObj = cnv.
createPersistent
( transCont,
msg
);
29
30
if
(
msg
.level()<=MSG::DEBUG)
31
msg
<< MSG::DEBUG <<
"::createPersistent [Success]"
<<
endmsg
;
32
return
persObj;
33
}
34
35
TileTTL1Container
*
TileTTL1ContainerCnv::createTransient
(
const
Token
* token) {
36
37
MsgStream
msg
( msgSvc(),
"TileTTL1ContainerCnv"
);
38
39
TileTTL1Container
*transObj = 0;
40
41
static
const
pool::Guid
tr_guid(
"F06C00C1-896A-4773-9F9C-21893C1E0CE7"
);
42
static
const
pool::Guid
p1_guid(
"213FA88B-52AE-4229-8886-62D7D54FA7A3"
);
43
44
if
(
compareClassGuid
(token, tr_guid) ) {
45
46
// regular object from before the T/P separation
47
return
poolReadObject<TileTTL1Container>
(token);
48
49
}
else
if
(
compareClassGuid
(token, p1_guid) ) {
50
51
// using unique_ptr ensures deletion of the persistent object
52
std::unique_ptr<TileTTL1Container_p1> persObj(
poolReadObject<TileTTL1Container_p1>
(token) );
53
TileTTL1ContainerCnv_p1
cnv;
54
transObj = cnv.
createTransient
( persObj.get(),
msg
);
55
}
else
{
56
throw
std::runtime_error(
"Unsupported persistent version of TileTTL1Container"
);
57
}
58
59
return
transObj;
60
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TileTTL1Container
TileContainer< TileTTL1 > TileTTL1Container
Definition
TileContainer.h:65
TileTTL1ContainerCnv.h
TileTTL1Container_PERS
TileTTL1Container_p1 TileTTL1Container_PERS
Definition
TileTTL1ContainerCnv.h:24
TileTTL1ContainerCnv_p1.h
TileTTL1ContainerCnv_p1
T_AthenaPoolTPCnvVector< TileTTL1Container, TileTTL1Container_p1, TileTTL1Cnv_p1 > TileTTL1ContainerCnv_p1
Definition
TileTTL1ContainerCnv_p1.h:29
T_AthenaPoolCustomCnv< TileTTL1Container, TileTTL1Container_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< TileTTL1Container, TileTTL1Container_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< TileTTL1Container, TileTTL1Container_PERS >::poolReadObject
P * poolReadObject(const Token *token)
TileTTL1ContainerCnv::createTransient
virtual TileTTL1Container * createTransient(const Token *token)
Build the transient representation from a persistent one.
Definition
TileTTL1ContainerCnv.cxx:35
TileTTL1ContainerCnv::createPersistent
virtual TileTTL1Container_PERS * createPersistent(TileTTL1Container *transCont)
Build the persistent representation from the transient one.
Definition
TileTTL1ContainerCnv.cxx:23
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.17.0