ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
RecAthenaPool
src
MissingEtCaloCnv.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
/********************************************************************
6
NAME: MissingEtCaloCnv.h
7
PURPOSE: Implementation file for class MissingEtCaloCnv
8
********************************************************************/
9
10
// Framework includes
11
#include "GaudiKernel/MsgStream.h"
12
13
// RecTPCnv includes
14
#include "
RecTPCnv/MissingEtCaloCnv_p1.h
"
15
#include "
RecTPCnv/MissingEtCaloCnv_p2.h
"
16
#include "
RecTPCnv/MissingEtCaloCnv_p3.h
"
17
18
// RecAthenaPool includes
19
#include "
MissingEtCaloCnv.h
"
20
21
MissingEtCalo_PERS
*
22
MissingEtCaloCnv::createPersistent
(
MissingEtCalo
* transCont )
23
{
24
MsgStream
msg
( msgSvc(),
"MissingEtCaloCnv"
);
25
26
MissingEtCaloCnv_p3
cnv;
27
MissingEtCalo_PERS
*persObj = cnv.
createPersistent
( transCont,
msg
);
28
29
msg
<< MSG::DEBUG <<
"::createPersistent [Success]"
<<
endmsg
;
30
return
persObj;
31
}
32
33
MissingEtCalo
*
MissingEtCaloCnv::createTransient
(
const
Token
* token)
34
{
35
MsgStream
msg
( msgSvc(),
"MissingEtCaloCnv"
);
36
37
MissingEtCalo
*transObj = 0;
38
39
static
const
pool::Guid
tr_guid(
"BD14D6E7-C771-4079-BF31-F43FE1068C95"
);
40
static
const
pool::Guid
p1_guid(
"877E907D-D7E1-49DE-B01F-9CDA344E6004"
);
41
static
const
pool::Guid
p2_guid(
"F16ECA98-8809-436C-A00A-06DBBF9C3087"
);
42
static
const
pool::Guid
p3_guid(
"0B9C9E87-92C8-49D3-8DF1-45ACDDD3336F"
);
43
44
if
(
compareClassGuid
(token, tr_guid) ) {
// regular object from before the T/P separation
45
return
poolReadObject<MissingEtCalo>
(token);
46
}
else
if
(
compareClassGuid
(token, p1_guid) ) {
47
// using unique_ptr ensures deletion of the persistent object
48
std::unique_ptr<MissingEtCalo_p1> persObj(
poolReadObject<MissingEtCalo_p1>
(token) );
49
MissingEtCaloCnv_p1
cnv;
50
transObj = cnv.
createTransient
( persObj.get(),
msg
);
51
}
else
if
(
compareClassGuid
(token, p2_guid) ) {
52
std::unique_ptr<MissingEtCalo_p2> persObj(
poolReadObject<MissingEtCalo_p2>
(token) );
53
MissingEtCaloCnv_p2
cnv;
54
transObj = cnv.
createTransient
( persObj.get(),
msg
);
55
}
else
if
(
compareClassGuid
(token, p3_guid) ) {
56
std::unique_ptr<MissingEtCalo_p3> persObj(
poolReadObject<MissingEtCalo_p3>
(token) );
57
MissingEtCaloCnv_p3
cnv;
58
transObj = cnv.
createTransient
( persObj.get(),
msg
);
59
}
else
{
60
throw
std::runtime_error(
"Unsupported persistent version of MissingEtCalo"
);
61
}
62
63
return
transObj;
64
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
MissingEtCaloCnv.h
MissingEtCalo_PERS
MissingEtCalo_p3 MissingEtCalo_PERS
Definition
MissingEtCaloCnv.h:23
MissingEtCaloCnv_p1.h
MissingEtCaloCnv_p2.h
MissingEtCaloCnv_p3.h
T_AthenaPoolCustomCnv< MissingEtCalo, MissingEtCalo_PERS >::msg
MsgStream & msg() const
Definition
AthMessaging.h:167
MissingEtCaloCnv_p1
Definition
MissingEtCaloCnv_p1.h:27
MissingEtCaloCnv_p2
Definition
MissingEtCaloCnv_p2.h:20
MissingEtCaloCnv_p3
Definition
MissingEtCaloCnv_p3.h:20
MissingEtCaloCnv::createTransient
virtual MissingEtCalo * createTransient(const Token *token)
Build the transient representation from a persistent one.
Definition
MissingEtCaloCnv.cxx:33
MissingEtCaloCnv::createPersistent
virtual MissingEtCalo_PERS * createPersistent(MissingEtCalo *transCont)
Build the persistent representation from the transient one.
Definition
MissingEtCaloCnv.cxx:22
MissingEtCalo
Definition
MissingEtCalo.h:27
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< MissingEtCalo, MissingEtCalo_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< MissingEtCalo, MissingEtCalo_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