ATLAS Offline Software
PerigeeCnv_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 //
7 // file: PerigeeCnv_p1.cxx
8 //
9 //-----------------------------------------------------------------------------
10 
14 
16  Trk::Perigee *transObj,
17  MsgStream &log )
18 {
20 
21  // Preserve previous behavior of tp converters.
22  bool waszero = false;
23  auto parms = transObj->parameters();
24  if (parms[Trk::qOverP] == 0) {
25  parms[Trk::qOverP] = 1;
26  waszero = true;
27  }
28 
31  assert(surf);
32  *transObj = Trk::Perigee (parms, *surf.get());
33  if (waszero)
34  TrkEventTPCnv::mungeZeroQOverP (*transObj);
35 }
36 
38  Trk::Perigee_p1 * ,
39  MsgStream & )
40 {
41  throw std::runtime_error("PerigeeCnv_p1::transToPers is deprecated!");
42 }
43 
44 
PerigeeCnv_p1::transToPers
void transToPers(const Trk::Perigee *, Trk::Perigee_p1 *, MsgStream &)
Definition: PerigeeCnv_p1.cxx:37
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
PerigeeCnv_p1::m_trackParametersCnv
TrackParametersCnv_p1 * m_trackParametersCnv
Definition: PerigeeCnv_p1.h:40
PerigeeCnv_p1::persToTrans
void persToTrans(const Trk::Perigee_p1 *, Trk::Perigee *, MsgStream &)
Definition: PerigeeCnv_p1.cxx:15
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
Trk::Perigee_p1::m_assocSurface
TPObjRef m_assocSurface
Definition: Perigee_p1.h:17
PerigeeCnv_p1.h
PerigeeCnv_p1::m_perigeeSurfaceCnv
PerigeeSurfaceCnv_p1 * m_perigeeSurfaceCnv
Definition: PerigeeCnv_p1.h:37
Trk::SurfaceUniquePtrT
std::unique_ptr< S, SurfaceDeleter< S > > SurfaceUniquePtrT
Definition: SurfaceUniquePtrT.h:32
mungeZeroQOverP.h
tpcnv compatibility helper
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Trk::Perigee_p1::m_parameters
TPObjRef m_parameters
Definition: Perigee_p1.h:16
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
Trk::Perigee_p1
Definition: Perigee_p1.h:12