ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
RecAthenaPool
src
MissingETCnv.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: MissingETCnv.h
7
PACKAGE: offline/Reconstruction/RecAthenaPool
8
PURPOSE: Implementation file for class MissingETCnv
9
********************************************************************/
10
11
// Framework includes
12
#include "GaudiKernel/MsgStream.h"
13
14
// RecTPCnv includes
15
#include "
RecTPCnv/MissingETCnv_p1.h
"
16
#include "
RecTPCnv/MissingETCnv_p2.h
"
17
#include "
RecTPCnv/MissingETCnv_p3.h
"
18
19
// RecAthenaPool includes
20
#include "
MissingETCnv.h
"
21
22
MissingET_PERS
*
23
MissingETCnv::createPersistent
(
MissingET
* transCont )
24
{
25
MsgStream
msg
( msgSvc(),
"MissingETCnv"
);
26
27
MissingETCnv_p3
cnv;
28
MissingET_PERS
*persObj = cnv.
createPersistent
( transCont,
msg
);
29
30
msg
<< MSG::DEBUG <<
"::createPersistent [Success]"
<<
endmsg
;
31
return
persObj;
32
}
33
34
MissingET
*
MissingETCnv::createTransient
(
const
Token
* token)
35
{
36
MsgStream
msg
( msgSvc(),
"MissingETCnv"
);
37
38
MissingET
*transObj = 0;
39
40
static
const
pool::Guid
tr_guid(
"14E6F88E-BA7F-4241-BF3D-99DE583B4709"
);
41
static
const
pool::Guid
p1_guid(
"C0D9AEE8-A2B0-4EED-BD75-53D67DF9736F"
);
42
static
const
pool::Guid
p2_guid(
"2D9729C7-646D-4BF5-B404-380AE2D9D308"
);
43
static
const
pool::Guid
p3_guid(
"AD744C55-6CA6-4D44-8E2F-C47FF3CE980E"
);
44
45
if
(
compareClassGuid
(token, tr_guid) ) {
// regular object from before the T/P separation
46
return
poolReadObject<MissingET>
(token);
47
}
else
if
(
compareClassGuid
(token, p1_guid) ) {
48
// using unique_ptr ensures deletion of the persistent object
49
std::unique_ptr<MissingET_p1> persObj(
poolReadObject<MissingET_p1>
(token) );
50
MissingETCnv_p1
cnv;
51
transObj = cnv.
createTransient
( persObj.get(),
msg
);
52
}
else
if
(
compareClassGuid
(token, p2_guid) ) {
53
std::unique_ptr<MissingET_p2> persObj(
poolReadObject<MissingET_p2>
(token) );
54
MissingETCnv_p2
cnv;
55
transObj = cnv.
createTransient
( persObj.get(),
msg
);
56
}
else
if
(
compareClassGuid
(token, p3_guid) ) {
57
std::unique_ptr<MissingET_p3> persObj(
poolReadObject<MissingET_p3>
(token) );
58
MissingETCnv_p3
cnv;
59
transObj = cnv.
createTransient
( persObj.get(),
msg
);
60
}
else
{
61
throw
std::runtime_error(
"Unsupported persistent version of MissingET"
);
62
}
63
64
return
transObj;
65
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
MissingETCnv.h
MissingET_PERS
MissingET_p3 MissingET_PERS
Definition
MissingETCnv.h:25
MissingETCnv_p1.h
MissingETCnv_p2.h
MissingETCnv_p3.h
T_AthenaPoolCustomCnv< MissingET, MissingET_PERS >::msg
MsgStream & msg() const
Definition
AthMessaging.h:167
MissingETCnv_p1
Definition
MissingETCnv_p1.h:26
MissingETCnv_p2
Definition
MissingETCnv_p2.h:24
MissingETCnv_p3
Definition
MissingETCnv_p3.h:22
MissingETCnv::createTransient
virtual MissingET * createTransient(const Token *token)
Build the transient representation from a persistent one.
Definition
MissingETCnv.cxx:34
MissingETCnv::createPersistent
virtual MissingET_PERS * createPersistent(MissingET *transCont)
Build the persistent representation from the transient one.
Definition
MissingETCnv.cxx:23
MissingET
Definition
Reconstruction/MissingETEvent/MissingETEvent/MissingET.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< MissingET, MissingET_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< MissingET, MissingET_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