ATLAS Offline Software
ForwardDetectors
ForwardSimulation
ForwardRegion_EventCnv
ForwardRegion_EventAthenaPool
src
SimulationHitCollectionCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ForwardRegion_EventTPCnv/SimulationHitCollectionCnv_p1.h
"
6
#include "
SimulationHitCollectionCnv.h
"
7
#include "
ForwardRegion_EventTPCnv/SimulationHit_p1.h
"
8
9
SimulationHitCollection_PERS
*
SimulationHitCollectionCnv::createPersistent
(
SimulationHitCollection
* transCont)
10
{
11
MsgStream
mlog
(
msgSvc
(),
"SimulationHitCollectionConverter"
);
12
13
SimulationHitCollectionCnv_p1
TPConverter;
14
SimulationHitCollection_PERS
*pPersColl = TPConverter.
createPersistent
( transCont,
mlog
);
15
16
return
pPersColl;
17
}
18
19
SimulationHitCollection
*
SimulationHitCollectionCnv::createTransient
()
20
{
21
MsgStream
mlog
(
msgSvc
(),
"SimulationHitCollectionConverter"
);
22
23
//GUID of persistence collection class (see selection.xml in ForwardRegion_EventTPCnv, class item SimulationHitCollection_p1
24
static
const
pool::Guid
p1_guid(
"DD6CF87F-4D7E-4BF6-9FAC-156DB34C08C7"
);
25
26
SimulationHitCollectionCnv_p1
TPConverter_p1;
27
SimulationHitCollection
*pTransColl=NULL;
28
29
if
(this->
compareClassGuid
(p1_guid)){
30
std::unique_ptr<SimulationHitCollection_p1> col_vect(this->poolReadObject<SimulationHitCollection_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
}
SimulationHitCollectionCnv::createTransient
SimulationHitCollection * createTransient()
Definition:
SimulationHitCollectionCnv.cxx:19
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
AtlasHitsVector
Definition:
AtlasHitsVector.h:33
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
SimulationHit_p1.h
SimulationHitCollectionCnv_p1.h
python.InDetPriVxFinderConfig.mlog
mlog
Definition:
InDetPriVxFinderConfig.py:139
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition:
StdJOSetup.py:36
T_AtlasHitsVectorCnv
Definition:
TPConverter.h:1234
SimulationHitCollectionCnv.h
SimulationHitCollection_p1
Definition:
SimulationHitCollection_p1.h:14
SimulationHitCollectionCnv::createPersistent
SimulationHitCollection_PERS * createPersistent(SimulationHitCollection *transCont)
Definition:
SimulationHitCollectionCnv.cxx:9
T_AthenaPoolCustCnv< SimulationHitCollection, SimulationHitCollection_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
Generated on Sun Dec 22 2024 21:18:13 for ATLAS Offline Software by
1.8.18