ATLAS Offline Software
Loading...
Searching...
No Matches
SurfaceCnv_p2.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef SURFACE_CNV_P2_H
6#define SURFACE_CNV_P2_H
7
8//-----------------------------------------------------------------------------
9//
10// file: SurfaceCnv_p2.h
11//
12//-----------------------------------------------------------------------------
13
15#include "GaudiKernel/ToolHandle.h"
17
18#include "TrkSurfaces/Surface.h"
27
28class MsgStream;
29
30template< class SURFACE >
32 : public T_AthenaPoolTPPolyCnvBase<Trk::Surface, SURFACE, Trk::Surface_p2>
33{
34public:
35 SurfaceCnv_p2() : m_eventCnvTool("Trk::EventCnvSuperTool/EventCnvSuperTool"){}
36
37 void persToTrans( const Trk::Surface_p2*, SURFACE*, MsgStream& );
38 void transToPers( const SURFACE*, Trk::Surface_p2*, MsgStream& );
39
40 SURFACE* createTransient( const Trk::Surface_p2 * persObj, MsgStream& log);
41
42 void setCnvToolName (const std::string& name)
43 { m_eventCnvTool.setTypeAndName(name); }
44
45private:
46 ToolHandle<Trk::IEventCnvSuperTool> m_eventCnvTool;
47};
48
50 : public SurfaceCnv_p2< Trk::ConeSurface> {};
52 : public SurfaceCnv_p2< Trk::CylinderSurface> {};
54 : public SurfaceCnv_p2< Trk::DiscSurface> {};
56 : public SurfaceCnv_p2< Trk::PerigeeSurface> {};
58 : public SurfaceCnv_p2< Trk::PlaneSurface> {};
60 : public SurfaceCnv_p2< Trk::StraightLineSurface> {};
61
62// Special case for SaggedLineSurface: the detector elements we get back
63// are now StraightLineSurface's.
65 : public SurfaceCnv_p2< Trk::StraightLineSurface>
66{
67public:
68 virtual const std::type_info& transientTInfo() const override
69 { return typeid (Trk::SaggedLineSurface); }
70};
71
72
73
74
75#endif // SURFACE_CNV_p2_H
TPPolyCnvBase< TRANS_BASE, TRANS, PERS > T_AthenaPoolTPPolyCnvBase
virtual const std::type_info & transientTInfo() const override
return C++ type id of the transient class this converter is for
void setCnvToolName(const std::string &name)
void transToPers(const SURFACE *, Trk::Surface_p2 *, MsgStream &)
void persToTrans(const Trk::Surface_p2 *, SURFACE *, MsgStream &)
ToolHandle< Trk::IEventCnvSuperTool > m_eventCnvTool
SURFACE * createTransient(const Trk::Surface_p2 *persObj, MsgStream &log)
The distorted surface itself is the nominal surface.