ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
RecAthenaPool
src
MissingEtTruthCnv.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: MissingEtTruthCnv.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/MissingEtTruthCnv_p1.h
"
16
#include "
RecTPCnv/MissingEtTruthCnv_p2.h
"
17
#include "
RecTPCnv/MissingEtTruthCnv_p3.h
"
18
19
// RecAthenaPool includes
20
#include "
MissingEtTruthCnv.h
"
21
22
23
MissingEtTruth_PERS
*
24
MissingEtTruthCnv::createPersistent
(
MissingEtTruth
* transCont )
25
{
26
MsgStream
msg
( msgSvc(),
"MissingEtTruthCnv"
);
27
28
MissingEtTruthCnv_p3
cnv;
29
MissingEtTruth_PERS
*persObj = cnv.
createPersistent
( transCont,
msg
);
30
31
msg
<< MSG::DEBUG <<
"::createPersistent [Success]"
<<
endmsg
;
32
return
persObj;
33
}
34
35
MissingEtTruth
*
MissingEtTruthCnv::createTransient
(
const
Token
* token)
36
{
37
MsgStream
msg
( msgSvc(),
"MissingEtTruthCnv"
);
38
39
MissingEtTruth
*transObj = 0;
40
41
static
const
Guid
tr_guid(
"2147ED1C-7337-4717-900B-1B52BD8DC316"
);
42
static
const
Guid
p1_guid(
"E7D6D6B8-08A8-409E-9477-2A61467738B2"
);
43
static
const
Guid
p2_guid(
"291A1BDB-A25E-412D-8E49-EF0E1EA1A835"
);
44
static
const
Guid
p3_guid(
"3FA8CC45-8798-4C24-9D0E-22E5F11AD85F"
);
45
46
if
(
compareClassGuid
(token, p3_guid)) {
47
48
// using unique_ptr ensures deletion of the persistent object
49
std::unique_ptr<MissingEtTruth_p3> persObj(
poolReadObject<MissingEtTruth_p3>
(token) );
50
MissingEtTruthCnv_p3
cnv;
51
transObj = cnv.
createTransient
( persObj.get(),
msg
);
52
53
}
else
if
(
compareClassGuid
(token, p2_guid)) {
54
55
// using unique_ptr ensures deletion of the persistent object
56
std::unique_ptr<MissingEtTruth_p2> persObj(
poolReadObject<MissingEtTruth_p2>
(token) );
57
MissingEtTruthCnv_p2
cnv;
58
transObj = cnv.
createTransient
( persObj.get(),
msg
);
59
60
}
else
if
(
compareClassGuid
(token, p1_guid)) {
61
62
// using unique_ptr ensures deletion of the persistent object
63
std::unique_ptr<MissingEtTruth_p1> persObj(
poolReadObject<MissingEtTruth_p1>
(token) );
64
MissingEtTruthCnv_p1
cnv;
65
transObj = cnv.
createTransient
( persObj.get(),
msg
);
66
67
}
else
if
(
compareClassGuid
(token, tr_guid) ) {
// regular object from before the T/P separation
68
return
poolReadObject<MissingEtTruth>
(token);
69
}
else
{
70
throw
std::runtime_error(
"Unsupported persistent version of MissingEtTruth"
);
71
}
72
73
return
transObj;
74
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
MissingEtTruthCnv.h
MissingEtTruth_PERS
MissingEtTruth_p3 MissingEtTruth_PERS
Definition
MissingEtTruthCnv.h:25
MissingEtTruthCnv_p1.h
MissingEtTruthCnv_p2.h
MissingEtTruthCnv_p3.h
T_AthenaPoolCustomCnv< MissingEtTruth, MissingEtTruth_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
MissingEtTruthCnv_p1
Definition
MissingEtTruthCnv_p1.h:26
MissingEtTruthCnv_p2
Definition
MissingEtTruthCnv_p2.h:25
MissingEtTruthCnv_p3
Definition
MissingEtTruthCnv_p3.h:20
MissingEtTruthCnv::createPersistent
virtual MissingEtTruth_PERS * createPersistent(MissingEtTruth *transCont)
Build the persistent representation from the transient one.
Definition
MissingEtTruthCnv.cxx:24
MissingEtTruthCnv::createTransient
virtual MissingEtTruth * createTransient(const Token *token)
Build the transient representation from a persistent one.
Definition
MissingEtTruthCnv.cxx:35
MissingEtTruth
Definition
MissingEtTruth.h:28
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< MissingEtTruth, MissingEtTruth_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< MissingEtTruth, MissingEtTruth_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
Generated on
for ATLAS Offline Software by
1.17.0