ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCnv
LArAthenaPool
src
LArTTL1ContainerCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// LArTPCnv includes
6
#include "
LArTPCnv/LArTTL1ContainerCnv_p1.h
"
7
8
// LArEventAthenaPool includes
9
#include "
LArTTL1ContainerCnv.h
"
10
11
LArTTL1Container_PERS
*
12
LArTTL1ContainerCnv::createPersistent
(
LArTTL1Container
* transCont )
13
{
14
LArTTL1ContainerCnv_p1
cnv;
15
LArTTL1Container_PERS
*persObj = cnv.
createPersistent
( transCont,
msg
() );
16
17
return
persObj;
18
}
19
20
LArTTL1Container
*
LArTTL1ContainerCnv::createTransient
(
const
Token
* token) {
21
22
LArTTL1Container
*transObj = 0;
23
24
static
const
pool::Guid
tr_guid(
"38FAECC7-D0C5-4DD8-8FAE-8D35F0542ECD"
);
25
static
const
pool::Guid
p1_guid(
"B859A463-2EA4-4902-B46A-89E5FBC20132"
);
26
27
if
(
compareClassGuid
(token, tr_guid) ) {
28
29
// regular object from before the T/P separation
30
return
poolReadObject<LArTTL1Container>
(token);
31
32
}
else
if
(
compareClassGuid
(token, p1_guid) ) {
33
34
// using unique_ptr ensures deletion of the persistent object
35
std::unique_ptr<LArTTL1Container_p1> persObj(
poolReadObject<LArTTL1Container_p1>
(token) );
36
LArTTL1ContainerCnv_p1
cnv;
37
transObj = cnv.
createTransient
( persObj.get(),
msg
() );
38
}
else
{
39
throw
std::runtime_error(
"Unsupported persistent version of LArTTL1Container"
);
40
}
41
42
return
transObj;
43
}
LArTTL1ContainerCnv.h
LArTTL1Container_PERS
LArTTL1Container_p1 LArTTL1Container_PERS
Definition
LArTTL1ContainerCnv.h:17
LArTTL1ContainerCnv_p1.h
LArTTL1ContainerCnv_p1
T_AthenaPoolTPCnvVector< LArTTL1Container, LArTTL1Container_p1, LArTTL1Cnv_p1 > LArTTL1ContainerCnv_p1
Definition
LArTTL1ContainerCnv_p1.h:22
T_AthenaPoolCustomCnv< LArTTL1Container, LArTTL1Container_PERS >::msg
MsgStream & msg() const
Definition
AthMessaging.h:167
LArTTL1ContainerCnv::createPersistent
virtual LArTTL1Container_PERS * createPersistent(LArTTL1Container *transCont)
Build the persistent representation from the transient one.
Definition
LArTTL1ContainerCnv.cxx:12
LArTTL1ContainerCnv::createTransient
virtual LArTTL1Container * createTransient(const Token *token)
Build the transient representation from a persistent one.
Definition
LArTTL1ContainerCnv.cxx:20
LArTTL1Container
Container class for LArTTL1.
Definition
LArTTL1Container.h:24
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< LArTTL1Container, LArTTL1Container_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< LArTTL1Container, LArTTL1Container_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
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.17.0