ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkEventCnv
TrkEventTPCnv
src
TrkSegment
TrackSegmentCnv_p1.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 "
TrkSegment/TrackSegment.h
"
7
#include "
TrkEventTPCnv/TrkSegment/TrackSegmentCnv_p1.h
"
8
#include "
TrkSurfaces/Surface.h
"
9
#include "
TrkEventCnvTools/DetElementSurface.h
"
10
#include "
TrkEventTPCnv/TrkDetElementSurface/DetElementSurfaceCnv_p1.h
"
11
12
void
TrackSegmentCnv_p1::persToTrans
(
const
Trk::TrackSegment_p1
*persObj,
Trk::TrackSegment
*transObj, MsgStream &log )
13
{
14
// std::cout << "TrackSegmentCnv_p1::persToTrans(...) start" << std::endl;
15
fillTransFromPStore
( &
m_segmentCnv
, persObj->
m_segment
, transObj, log );
16
// transObj->m_associatedSurface = createTransFromPStore( (ITPConverterFor<Trk::Surface>**)0, persObj->m_associatedSurface, log );
17
ITPConverterFor<Trk::Surface>
* surfaceCnv=
nullptr
;
18
const
Trk::Surface
* temp = this->
createTransFromPStore
( &surfaceCnv, persObj->
m_associatedSurface
, log );
19
20
DetElementSurfaceCnv_p1
* detElCnv =
dynamic_cast<
DetElementSurfaceCnv_p1
*
>
(surfaceCnv);
21
if
(detElCnv) {
22
// have a DetElementSurface
23
temp = detElCnv->
createSurface
(log);
24
}
25
transObj->
m_associatedSurface
= temp;
26
// std::cout << "TrackSegmentCnv_p1::persToTrans(...) end" << std::endl;
27
}
28
29
30
void
TrackSegmentCnv_p1::transToPers
(
const
Trk::TrackSegment
*transObj,
Trk::TrackSegment_p1
*persObj, MsgStream &log )
31
{
32
persObj->
m_segment
=
baseToPersistent
( &
m_segmentCnv
, transObj, log );
33
if
(transObj->
m_associatedSurface
->
isFree
() )
// if this is a free surface, write it out 'as is'
34
persObj->
m_associatedSurface
=
toPersistent
((
ITPConverterFor<Trk::Surface>
**)
nullptr
, transObj->
m_associatedSurface
, log);
35
else
{
// else, make it into a DetElementSurface, to allow the correct convertor to be called
36
Trk::DetElementSurface
surf( *(transObj->
m_associatedSurface
) );
37
persObj->
m_associatedSurface
=
toPersistent
((
ITPConverterFor<Trk::Surface>
**)
nullptr
, &surf, log );
38
}
39
}
DetElementSurfaceCnv_p1.h
DetElementSurface.h
Surface.h
TrackSegmentCnv_p1.h
TrackSegment.h
DetElementSurfaceCnv_p1
Definition
DetElementSurfaceCnv_p1.h:46
DetElementSurfaceCnv_p1::createSurface
const Trk::Surface * createSurface(MsgStream &log)
Definition
DetElementSurfaceCnv_p1.cxx:19
ITPConverterFor< TRANS_BASE >::baseToPersistent
TPObjRef baseToPersistent(CNV **cnv, const typename CNV::Trans_t *transObj, MsgStream &log) const
Definition
TPConverter.h:97
ITPConverterFor< TRANS_BASE >::createTransFromPStore
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
Definition
TPConverter.h:172
ITPConverterFor< TRANS_BASE >::fillTransFromPStore
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
Definition
TPConverter.h:145
ITPConverterFor< TRANS_BASE >::toPersistent
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Definition
TPConverter.h:119
ITPConverterFor< TRANS_BASE >::ITPConverterFor
ITPConverterFor()
Definition
TPConverter.h:43
TrackSegmentCnv_p1::persToTrans
void persToTrans(const Trk::TrackSegment_p1 *persObj, Trk::TrackSegment *transObj, MsgStream &log)
Definition
TrackSegmentCnv_p1.cxx:12
TrackSegmentCnv_p1::m_segmentCnv
SegmentCnv_p1 * m_segmentCnv
Definition
TrackSegmentCnv_p1.h:38
TrackSegmentCnv_p1::transToPers
void transToPers(const Trk::TrackSegment *transObj, Trk::TrackSegment_p1 *persObj, MsgStream &log)
Definition
TrackSegmentCnv_p1.cxx:30
Trk::DetElementSurface
Definition
DetElementSurface.h:32
Trk::SurfacePtrHolderImplDetEl::m_associatedSurface
const S * m_associatedSurface
Definition
SurfaceHolderImpl.h:221
Trk::Surface
Abstract Base Class for tracking surfaces.
Definition
Surface.h:79
Trk::Surface::isFree
bool isFree() const
Returns 'true' if this surface is 'free', i.e.
Trk::TrackSegment_p1
Definition
TrackSegment_p1.h:22
Trk::TrackSegment_p1::m_associatedSurface
TPObjRef m_associatedSurface
Definition
TrackSegment_p1.h:29
Trk::TrackSegment_p1::m_segment
TPObjRef m_segment
Definition
TrackSegment_p1.h:27
Trk::TrackSegment
Class for a generic track segment that holdes polymorphic Trk::MeasurementBase objects,...
Definition
TrackSegment.h:56
Generated on
for ATLAS Offline Software by
1.17.0