ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileSvc
TileEventAthenaPool
src
TileMuContainerCnv.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
// TileMuContainerCnv.cxx
8
// Implementation file for class TileMuContainerCnv
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/TileMuContainerCnv_p1.h
"
18
19
// TileEventAthenaPool includes
20
#include "
TileMuContainerCnv.h
"
21
22
TileMuContainer_PERS
*
23
TileMuContainerCnv::createPersistent
(
TileMuContainer
* transCont )
24
{
25
MsgStream
msg
( msgSvc(),
"TileMuContainerCnv"
);
26
27
TileMuContainerCnv_p1
cnv;
28
TileMuContainer_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
TileMuContainer
*
TileMuContainerCnv::createTransient
(
const
Token
* token) {
36
37
MsgStream
msg
( msgSvc(),
"TileMuContainerCnv"
);
38
39
TileMuContainer
*transObj = 0;
40
41
static
const
Guid
tr_guid(
"FC0456E4-912B-425B-9AA2-4DDD0C6B2275"
);
42
static
const
Guid
p1_guid(
"DE8904EB-25FD-495A-8DD5-E31B05E397C6"
);
43
44
if
(
compareClassGuid
(token, tr_guid) ) {
45
46
// regular object from before the T/P separation
47
return
poolReadObject<TileMuContainer>
(token);
48
49
}
else
if
(
compareClassGuid
(token, p1_guid) ) {
50
51
// using unique_ptr ensures deletion of the persistent object
52
std::unique_ptr<TileMuContainer_p1> persObj(
poolReadObject<TileMuContainer_p1>
(token) );
53
TileMuContainerCnv_p1
cnv;
54
transObj = cnv.
createTransient
( persObj.get(),
msg
);
55
}
else
{
56
throw
std::runtime_error(
"Unsupported persistent version of TileMuContainer"
);
57
}
58
59
return
transObj;
60
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
TileMuContainer
TileContainer< TileMu > TileMuContainer
Definition
TileContainer.h:68
TileMuContainerCnv.h
TileMuContainer_PERS
TileMuContainer_p1 TileMuContainer_PERS
Definition
TileMuContainerCnv.h:24
TileMuContainerCnv_p1.h
TileMuContainerCnv_p1
T_AthenaPoolTPCnvVector< TileMuContainer, TileMuContainer_p1, TileMuCnv_p1 > TileMuContainerCnv_p1
Definition
TileMuContainerCnv_p1.h:29
T_AthenaPoolCustomCnv< TileMuContainer, TileMuContainer_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< TileMuContainer, TileMuContainer_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< TileMuContainer, TileMuContainer_PERS >::poolReadObject
P * poolReadObject(const Token *token)
TileMuContainerCnv::createTransient
virtual TileMuContainer * createTransient(const Token *token)
Build the transient representation from a persistent one.
Definition
TileMuContainerCnv.cxx:35
TileMuContainerCnv::createPersistent
virtual TileMuContainer_PERS * createPersistent(TileMuContainer *transCont)
Build the persistent representation from the transient one.
Definition
TileMuContainerCnv.cxx:23
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