ATLAS Offline Software
Reconstruction
RecAthenaPool
src
MissingETCompositionCnv.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
#include "
MissingETCompositionCnv.h
"
7
8
#include "
RecTPCnv/MissingETCompositionCnv_p1.h
"
9
#include "
RecTPCnv/MissingETComposition_p1.h
"
10
11
MissingETComposition_PERS
*
MissingETCompositionCnv::createPersistent
(
MissingETComposition
* transObj)
12
{
13
MsgStream
report
(
msgSvc
(),
"MissingETCompositionConverter"
);
14
// report << MSG::INFO << "Writing MissingETComposition_p2" << endmsg;
15
if
( !
bool
(
m_TPconverter_p2
) )
16
m_TPconverter_p2
=
new
MissingETCompositionCnv_p2
();
17
MissingETComposition_PERS
*persObj =
m_TPconverter_p2
->
createPersistent
( transObj,
report
);
18
return
persObj;
19
}
20
21
MissingETComposition
*
MissingETCompositionCnv::createTransient
()
22
{
23
static
const
pool::Guid
p1_guid(
"78E9CC2F-1FB4-4740-AD44-7C849D9CC865"
);
24
static
const
pool::Guid
p2_guid(
"CF4110FB-35B4-4C8B-BB51-FE8C6CBE0277"
);
25
26
if
(
compareClassGuid
(p2_guid) ){
27
if
( !
bool
(
m_TPconverter_p2
) )
28
m_TPconverter_p2
=
new
MissingETCompositionCnv_p2
();
29
// using unique_ptr ensures deletion of the persistent object
30
std::unique_ptr<MissingETComposition_p2> shapestore( poolReadObject< MissingETComposition_p2 >() );
31
MsgStream
report
(
msgSvc
(),
"MissingETCompositionCnv"
);
32
// report << MSG::INFO << "Reading MissingETComposition_p1" << endmsg;
33
return
m_TPconverter_p2
->
createTransient
( shapestore.get(),
report
);
34
}
35
else
if
(
compareClassGuid
(p1_guid) ) {
36
MissingETCompositionCnv_p1
TPconverter_p1;
37
std::unique_ptr<MissingETComposition_p1> shapestore( poolReadObject< MissingETComposition_p1 >() );
38
MsgStream
report
(
msgSvc
(),
"MissingETCompositionCnv"
);
39
// report << MSG::INFO << "Reading MissingETComposition_p1" << endmsg;
40
return
TPconverter_p1.
createTransient
( shapestore.get(),
report
);
41
}
42
throw
std::runtime_error(
"Unsupported persistent version of MissingETComposition"
);
43
}
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
MissingETComposition_p2
Definition:
MissingETComposition_p2.h:24
checkTP.report
report
Definition:
checkTP.py:127
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
pool::Guid
::Guid Guid
Definition:
T_AthenaPoolCustCnv.h:19
MissingETCompositionCnv::createTransient
virtual MissingETComposition * createTransient()
Definition:
MissingETCompositionCnv.cxx:21
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition:
StdJOSetup.py:36
MissingETCompositionConverterBase< MissingETComposition_p1 >
Definition:
MissingETCompositionCnv_p1.h:17
MissingETComposition
Definition:
Reconstruction/MissingETEvent/MissingETEvent/MissingETComposition.h:297
MissingETComposition_p1.h
MissingETCompositionCnv::m_TPconverter_p2
MissingETCompositionCnv_p2 * m_TPconverter_p2
Definition:
MissingETCompositionCnv.h:37
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
MissingETCompositionCnv_p1.h
MissingETCompositionCnv::createPersistent
virtual MissingETComposition_PERS * createPersistent(MissingETComposition *transObj)
Definition:
MissingETCompositionCnv.cxx:11
MissingETCompositionCnv_p2
MissingETCompositionConverterBase< MissingETComposition_p2 > MissingETCompositionCnv_p2
Definition:
MissingETCompositionCnv_p2.h:35
MissingETCompositionCnv.h
Generated on Thu Nov 7 2024 21:21:10 for ATLAS Offline Software by
1.8.18