ATLAS Offline Software
ForwardDetectors
AFP
AFP_EventCnv
AFP_EventAthenaPool
src
AFP_TDSimHitCollectionCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
AFP_EventTPCnv/AFP_TDSimHitCollectionCnv_p1.h
"
6
#include "
AFP_TDSimHitCollectionCnv.h
"
7
#include "
AFP_EventTPCnv/AFP_TDSimHit_p1.h
"
8
9
AFP_TDSimHitCollection_PERS
*
AFP_TDSimHitCollectionCnv::createPersistent
(
AFP_TDSimHitCollection
* transCont)
10
{
11
MsgStream
mlog
(
msgSvc
(),
"AFP_TDSimHitCollectionConverter"
);
12
13
AFP_TDSimHitCollectionCnv_p1
TPConverter;
14
AFP_TDSimHitCollection_PERS
*pPersColl = TPConverter.
createPersistent
( transCont,
mlog
);
15
16
return
pPersColl;
17
}
18
19
AFP_TDSimHitCollection
*
AFP_TDSimHitCollectionCnv::createTransient
()
20
{
21
MsgStream
mlog
(
msgSvc
(),
"AFP_TDSimHitCollectionConverter"
);
22
23
//GUID of persistence collection class (see selection.xml in AFP_EventTPCnv, class item AFP_TDSimHitCollection_p1
24
static
const
pool::Guid
p1_guid(
"F38ED236-94F3-483B-A015-C95EA7B194AE"
);
25
26
AFP_TDSimHitCollectionCnv_p1
TPConverter_p1;
27
AFP_TDSimHitCollection
*pTransColl=
nullptr
;
28
29
if
(this->
compareClassGuid
(p1_guid)){
30
std::unique_ptr<AFP_TDSimHitCollection_p1> col_vect(this->poolReadObject<AFP_TDSimHitCollection_p1>());
31
pTransColl=TPConverter_p1.
createTransient
(col_vect.get(),
mlog
);
32
}
33
else
{
34
throw
std::runtime_error(
"Unsupported persistent version of Data container"
);
35
}
36
37
return
pTransColl;
38
}
AFP_TDSimHitCollectionCnv.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
AtlasHitsVector< AFP_TDSimHit >
AFP_TDSimHitCollectionCnv::createTransient
AFP_TDSimHitCollection * createTransient()
Definition:
AFP_TDSimHitCollectionCnv.cxx:19
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
AFP_TDSimHit_p1.h
python.InDetPriVxFinderConfig.mlog
mlog
Definition:
InDetPriVxFinderConfig.py:134
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition:
StdJOSetup.py:36
AFP_TDSimHitCollectionCnv::createPersistent
AFP_TDSimHitCollection_PERS * createPersistent(AFP_TDSimHitCollection *transCont)
Definition:
AFP_TDSimHitCollectionCnv.cxx:9
T_AtlasHitsVectorCnv
Definition:
TPConverter.h:1234
AFP_TDSimHitCollectionCnv_p1.h
AFP_TDSimHitCollection_p1
Definition:
AFP_TDSimHitCollection_p1.h:15
T_AthenaPoolCustCnv< AFP_TDSimHitCollection, AFP_TDSimHitCollection_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
Generated on Tue Jul 2 2024 21:09:50 for ATLAS Offline Software by
1.8.18