ATLAS Offline Software
TrackParametersVectorCnv_p1.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
16 #ifndef TRACKEVENTTPCNV_TRACKPARAMETERSVECTORCNV_P1_H
17 #define TRACKEVENTTPCNV_TRACKPARAMETERSVECTORCNV_P1_H
18 
19 
23 #include <stdexcept>
24 
25 
26 template <typename VEC>
28  : public T_AthenaPoolTPAbstractPolyCnvBase<VEC, VEC, Trk::TrackParameters_p1>
29 {
30 public:
32 
33  void persToTrans( const Trk :: TrackParameters_p1 *persObj,
34  VEC *transObj,
35  MsgStream &/*log*/ )
36  {
37  if (persObj->m_parameters.size() != (size_t)transObj->rows()) {
38  throw std::runtime_error("TrackParametersVectorCnv_p1::persToTrans bad size!");
39  }
40  for (int i = 0; i < transObj->rows(); i++)
41  (*transObj)[i] = persObj->m_parameters[i];
42  }
43 
44  void transToPers( const VEC */*transObj*/,
45  Trk::TrackParameters_p1 */*persObj*/,
46  MsgStream &/*log*/ )
47  {
48  throw std::runtime_error("TrackParametersVectorCnv_p1::transToPers unimplemented!");
49  }
50 };
51 
52 
53 #endif // not TRACKEVENTTPCNV_TRACKPARAMETERSVECTORCNV_P1_H
TrackParametersVectorCnv_p1::TrackParametersVectorCnv_p1
TrackParametersVectorCnv_p1()
Definition: TrackParametersVectorCnv_p1.h:31
TrackParameters.h
TrackParametersVectorCnv_p1::transToPers
void transToPers(const VEC *, Trk::TrackParameters_p1 *, MsgStream &)
Definition: TrackParametersVectorCnv_p1.h:44
Trk::TrackParameters_p1
Definition: TrackParameters_p1.h:19
TPAbstractPolyCnvBase
Definition: TPConverter.h:332
TrackParametersVectorCnv_p1::persToTrans
void persToTrans(const Trk ::TrackParameters_p1 *persObj, VEC *transObj, MsgStream &)
Definition: TrackParametersVectorCnv_p1.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
T_AthenaPoolTPConverter.h
TrackParametersVectorCnv_p1
Definition: TrackParametersVectorCnv_p1.h:29
TrackParameters_p1.h