ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
RecAthenaPool
src
MuonSpShowerContainerCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// Framework includes
6
#include "GaudiKernel/MsgStream.h"
7
8
// RecTPCnv includes
9
#include "
RecTPCnv/MuonSpShowerContainerCnv_p1.h
"
10
11
// RecAthenaPool includes
12
#include "
MuonSpShowerContainerCnv.h
"
13
14
MuonSpShowerContainer_PERS
*
15
MuonSpShowerContainerCnv::createPersistent
(
Rec::MuonSpShowerContainer
* transCont )
16
{
17
MsgStream
msg
( msgSvc(),
"MuonSpShowerContainerCnv"
);
18
// std::cout<<"Test - MuonSpShowerContainerCnv::createPersistent()"<<std::endl;
19
20
MuonSpShowerContainerCnv_p1
cnv;
21
MuonSpShowerContainer_PERS
*persObj = cnv.
createPersistent
( transCont,
msg
);
22
23
msg
<< MSG::DEBUG <<
"::createPersistent [Success]"
<<
endmsg
;
24
return
persObj;
25
}
26
27
Rec::MuonSpShowerContainer
*
28
MuonSpShowerContainerCnv::createTransient
(
const
Token
* token)
29
{
30
MsgStream
msg
( msgSvc(),
"MuonSpShowerContainerConverter"
);
31
// std::cout<<"Test - MuonSpShowerContainerCnv::createTransient(const Token* token)"<<std::endl;
32
Rec::MuonSpShowerContainer
*transObj = 0;
33
34
static
const
pool::Guid
tr_guid(
"64AE1E07-67EC-549C-DE00-A953259EBC9E"
);
35
static
const
pool::Guid
p1_guid(
"522A7143-856B-41E6-A3FA-AB97693010D8"
);
36
37
if
(
compareClassGuid
(token, tr_guid) ) {
38
39
// regular object from before the T/P separation
40
return
poolReadObject<Rec::MuonSpShowerContainer>
(token);
41
42
}
else
if
(
compareClassGuid
(token, p1_guid) ) {
43
44
// using unique_ptr ensures deletion of the persistent object
45
std::unique_ptr<MuonSpShowerContainer_p1> persObj(
poolReadObject<MuonSpShowerContainer_p1>
(token) );
46
MuonSpShowerContainerCnv_p1
cnv;
47
transObj = cnv.
createTransient
( persObj.get(),
msg
);
48
}
else
{
49
throw
std::runtime_error(
"Unsupported persistent version of MuonSpShowerContainer"
);
50
}
51
52
return
transObj;
53
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
MuonSpShowerContainerCnv.h
MuonSpShowerContainer_PERS
MuonSpShowerContainer_p1 MuonSpShowerContainer_PERS
Definition
MuonSpShowerContainerCnv.h:21
MuonSpShowerContainerCnv_p1.h
T_AthenaPoolCustomCnv< Rec::MuonSpShowerContainer, MuonSpShowerContainer_PERS >::msg
MsgStream & msg() const
Definition
AthMessaging.h:167
MuonSpShowerContainerCnv_p1
Definition
MuonSpShowerContainerCnv_p1.h:32
MuonSpShowerContainerCnv::createTransient
virtual Rec::MuonSpShowerContainer * createTransient(const Token *token)
Build the transient representation from a persistent one.
Definition
MuonSpShowerContainerCnv.cxx:28
MuonSpShowerContainerCnv::createPersistent
virtual MuonSpShowerContainer_PERS * createPersistent(Rec::MuonSpShowerContainer *transCont)
Build the persistent representation from the transient one.
Definition
MuonSpShowerContainerCnv.cxx:15
Rec::MuonSpShowerContainer
Definition
MuonSpShowerContainer.h:23
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< Rec::MuonSpShowerContainer, MuonSpShowerContainer_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< Rec::MuonSpShowerContainer, MuonSpShowerContainer_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