ATLAS Offline Software
PerigeeCnv_p2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
9 void PerigeeCnv_p2::persToTrans( const Trk::Perigee_p2 *persObj, Trk::Perigee *transObj, MsgStream &log ) {
10 
12 
13  // Preserve previous behavior of tp converters.
14  bool waszero = false;
15  auto parms = transObj->parameters();
16  if (parms[Trk::qOverP] == 0) {
17  parms[Trk::qOverP] = 1;
18  waszero = true;
19  }
20 
23  assert(surf);
24  *transObj = Trk::Perigee (parms, *surf.get());
25  if (waszero)
26  TrkEventTPCnv::mungeZeroQOverP (*transObj);
27 }
28 
29 
30 void PerigeeCnv_p2::transToPers( const Trk::Perigee *, Trk::Perigee_p2 *, MsgStream & ) {
31  throw std::runtime_error("PerigeeCnv_p2::transToPers is deprecated! (Use TrackParametersCnv_pX instead)");
32 }
33 
34 
TrackParameters.h
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
Trk::Perigee_p2
Definition: Perigee_p2.h:12
PerigeeCnv_p2::transToPers
void transToPers(const Trk::Perigee *, Trk::Perigee_p2 *, MsgStream &)
Definition: PerigeeCnv_p2.cxx:30
PerigeeCnv_p2::persToTrans
void persToTrans(const Trk::Perigee_p2 *, Trk::Perigee *, MsgStream &)
Definition: PerigeeCnv_p2.cxx:9
Trk::Perigee
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
Definition: Tracking/TrkEvent/TrkParameters/TrkParameters/TrackParameters.h:33
ITPConverterFor< TRANS_BASE >::fillTransFromPStore
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
Convert persistent object, stored in the the top-level persistent object and referenced by the TP Ref...
Definition: TPConverter.h:145
PerigeeCnv_p2.h
PerigeeCnv_p2::m_perigeeSurfaceCnv
PerigeeSurfaceCnv_p1 * m_perigeeSurfaceCnv
Definition: PerigeeCnv_p2.h:29
Trk::Perigee_p2::m_parameters
TPObjRef m_parameters
Definition: Perigee_p2.h:16
Trk::SurfaceUniquePtrT
std::unique_ptr< S, SurfaceDeleter< S > > SurfaceUniquePtrT
Definition: SurfaceUniquePtrT.h:32
Trk::Perigee_p2::m_assocSurface
TPObjRef m_assocSurface
Definition: Perigee_p2.h:17
mungeZeroQOverP.h
tpcnv compatibility helper
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
PerigeeCnv_p2::m_trackParametersCnv
TrackParametersCnv_p1 * m_trackParametersCnv
Definition: PerigeeCnv_p2.h:30
ITPConverterFor< TRANS_BASE >::createTransFromPStore
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
Create transient representation of a persistent object, stored in the the top-level persistent object...
Definition: TPConverter.h:172