ATLAS Offline Software
TrackParametersCnv_p2.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //-----------------------------------------------------------------------------
6 //
7 // file: TrackParametersCnv_p2.h
8 // author: edward.moyse@cern.ch
9 //
10 //-----------------------------------------------------------------------------
11 
12 #ifndef TRACK_PARAMETERS_CNV_P2_H
13 #define TRACK_PARAMETERS_CNV_P2_H
14 
16 
19 #include "GaudiKernel/ToolHandle.h"
22 
23 class MsgStream;
24 
28  : public T_AthenaPoolTPAbstractPolyCnvBase<Trk::TrackParameters, Trk::TrackParameters, Trk::TrackParameters_p2>
29  // : public T_AthenaPoolTPCnvBase<Trk::ParametersBase,Trk::TrackParameters_p2>
30 {
31 public:
32  TrackParametersCnv_p2(bool nosurf = false)
33  : m_emConverter(0),
34  m_eventCnvTool("Trk::EventCnvSuperTool/EventCnvSuperTool"),
35  m_nosurf (nosurf)
36  {}
37 
38  void persToTrans( const Trk :: TrackParameters_p2 *persObj,
39  Trk :: TrackParameters *transObj,
40  MsgStream &log );
41 
42  Trk::TrackParameters* createTransient( const Trk::TrackParameters_p2 * persObj, MsgStream& log);
43 
44  void transToPers( const Trk::TrackParameters *transObj,
45  Trk::TrackParameters_p2 *persObj,
46  MsgStream &log );
47 
48  virtual Trk::TrackParameters* virt_createTransFromPStore( unsigned index, MsgStream& log) {
49  //FIXME - I'm really not sure if this is correct to have this here. Perhaps I just need to change the T_AthenaXXX baseclass that this cnv inherits from?
50  // The method I wanted to call is in T_AthenaPoolTPPolyCnvBase
51  // But T_AthenaPoolTPPolyCnvBase doesn't work because T_AthenaPoolTPConverter.icc:63 tries to instantiate a Trk::ParametersBase, which isn't possible.
52  assert (index < this->m_pStorage->size());
53  return createTransient( &(*this->m_pStorage)[index], log );
54  }
55 
56 
57 private:
58  AmgSymMatrix(5)* transErrorMatrix(const Trk :: TrackParameters_p2 *persObj, MsgStream& log);
59  const Trk::Surface* transSurface( const Trk :: TrackParameters_p2 *persObj, Trk::SurfaceType type, MsgStream& log);
60  static void fillPersSurface( const Trk :: TrackParameters *transObj, Trk :: TrackParameters_p2 *persObj, MsgStream& log);
61  static void convertTransCurvilinearToPers(const Trk :: TrackParameters *transObj, Trk :: TrackParameters_p2 *persObj) ;
62  static bool isPersistifiableType(const Trk :: TrackParameters *transObj) ;
63 
65  ToolHandle<Trk::IEventCnvSuperTool> m_eventCnvTool;
66  bool m_nosurf;
67 };
68 
69 #endif // TRACK_PARAMETERS_CNV_P2_H
TPAbstractPolyCnvBase::m_pStorage
std::vector< PERS > * m_pStorage
the address of the storage vector for persistent representations
Definition: TPConverter.h:579
TrackParameters.h
index
Definition: index.py:1
Trk::TrackParameters_p2
Definition: TrackParameters_p2.h:20
TrackParametersCnv_p2
New convertor which handles all track parameters in one go - i.e.
Definition: TrackParametersCnv_p2.h:30
ErrorMatrixCnv_p1
Definition: ErrorMatrixCnv_p1.h:33
TrackParametersCnv_p2::virt_createTransFromPStore
virtual Trk::TrackParameters * virt_createTransFromPStore(unsigned index, MsgStream &log)
This method implements a pure virtual base class method, but should never be called,...
Definition: TrackParametersCnv_p2.h:48
TrackParametersCnv_p2::m_emConverter
ErrorMatrixCnv_p1 * m_emConverter
Definition: TrackParametersCnv_p2.h:64
Trk::SurfaceType
SurfaceType
Definition: SurfaceTypes.h:17
TrackParametersCnv_p2::fillPersSurface
static void fillPersSurface(const Trk ::TrackParameters *transObj, Trk ::TrackParameters_p2 *persObj, MsgStream &log)
Definition: TrackParametersCnv_p2.cxx:222
TrackParametersCnv_p2::transToPers
void transToPers(const Trk::TrackParameters *transObj, Trk::TrackParameters_p2 *persObj, MsgStream &log)
Definition: TrackParametersCnv_p2.cxx:155
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:50
xAOD::TrackParameters
TrackParameters_v1 TrackParameters
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParameters.h:11
IEventCnvSuperTool.h
TPAbstractPolyCnvBase
Definition: TPConverter.h:332
TrackParametersCnv_p2::m_eventCnvTool
ToolHandle< Trk::IEventCnvSuperTool > m_eventCnvTool
Definition: TrackParametersCnv_p2.h:65
T_AthenaPoolTPConverter.h
TrackParametersCnv_p2::TrackParametersCnv_p2
TrackParametersCnv_p2(bool nosurf=false)
Definition: TrackParametersCnv_p2.h:32
Trk::ParametersBase
Definition: ParametersBase.h:55
TrackParametersCnv_p2::m_nosurf
bool m_nosurf
Definition: TrackParametersCnv_p2.h:66
TrackParametersCnv_p2::isPersistifiableType
static bool isPersistifiableType(const Trk ::TrackParameters *transObj)
Definition: TrackParametersCnv_p2.cxx:215
TrackParametersCnv_p2::persToTrans
void persToTrans(const Trk ::TrackParameters_p2 *persObj, Trk ::TrackParameters *transObj, MsgStream &log)
Definition: TrackParametersCnv_p2.cxx:32
TrackParametersCnv_p2::convertTransCurvilinearToPers
static void convertTransCurvilinearToPers(const Trk ::TrackParameters *transObj, Trk ::TrackParameters_p2 *persObj)
Definition: TrackParametersCnv_p2.cxx:200
ErrorMatrixCnv_p1.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrackParameters_p2.h
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
TrackParametersCnv_p2::createTransient
Trk::TrackParameters * createTransient(const Trk::TrackParameters_p2 *persObj, MsgStream &log)
Definition: TrackParametersCnv_p2.cxx:39