ATLAS Offline Software
LocalParametersCnv_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: LocalParametersCnv_p1.cxx
8 // author: Lukasz Janyst <ljanyst@cern.ch>
9 //
10 //-----------------------------------------------------------------------------
13 #include <stdexcept>
14 
15 void LocalParametersCnv_p1 :: persToTrans( const Trk :: LocalParameters_p1 *persObj,
16  Trk :: LocalParameters *transObj,
17  MsgStream&)
18 {
19  transObj->m_parameterkey = persObj->m_parameterKey;
20  // transObj->readArray(persObj->m_vec);
21  unsigned int size = persObj->m_vec.size();
22  transObj->resize(size);
23  for (unsigned int i=0; i<size;++i)
24  (*transObj)(i)=persObj->m_vec[i];
25 }
26 
27 void LocalParametersCnv_p1 :: transToPers( const Trk :: LocalParameters *transObj,
28  Trk :: LocalParameters_p1 *persObj,
29  MsgStream& )
30 {
31  persObj->m_parameterKey = transObj->m_parameterkey;
32  unsigned int size=transObj->size();
33  persObj->m_vec.resize(size);
34  // persObj->m_vec.insert(persObj->m_vec.begin(),transObj->array(),transObj->array()+size);
35  // std::transform(transObj->array(), transObj->array()+size,
36  // std::back_inserter(persObj->m_vec),
37  // castToFloat());
38 
39  for (unsigned int i=0; i<size;++i)
40  persObj->m_vec[i]=(*transObj)(i);
41 }
LocalParametersCnv_p1.h
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
lumiFormat.i
int i
Definition: lumiFormat.py:85
LocalParameters.h
LocalParametersCnv_p1::persToTrans
virtual void persToTrans(const Trk ::LocalParameters_p1 *persObj, Trk ::LocalParameters *transObj, MsgStream &log)
Definition: LocalParametersCnv_p1.cxx:15
LocalParametersCnv_p1::transToPers
virtual void transToPers(const Trk ::LocalParameters *transObj, Trk ::LocalParameters_p1 *persObj, MsgStream &log)
Definition: LocalParametersCnv_p1.cxx:27