ATLAS Offline Software
VertexCnv_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 #include "VxVertex/Vertex.h"
7 
8 void VertexCnv_p1::persToTrans(const Trk::Vertex_p1 * persObj, Trk::Vertex * transObj, MsgStream &/*log*/){
9  // std::cout<<"reading Vertex_p1 "<<std::endl;
10  const std::vector<float>& pers_position = persObj->m_position;
11  Amg::Vector3D trans_position(pers_position[0], pers_position[1], pers_position[2]);
12  *transObj = Trk::Vertex (trans_position);
13  // std::cout<<" vertex "<<trans_position<<std::endl;
14 }
15 
16 void VertexCnv_p1::transToPers(const Trk::Vertex * transObj, Trk::Vertex_p1 * persObj, MsgStream &/*log*/){
17  // std::cout<<"writing Vertex_p1 "<<std::endl;
18  std::vector<float> pers_position(3);
19  const Amg::Vector3D& trans_position = transObj->position();
20  pers_position[0] = trans_position(0);
21  pers_position[1] = trans_position(1);
22  pers_position[2] = trans_position(2);
23  persObj->m_position = std::move(pers_position);
24  // std::cout<<" vertex "<<trans_position<<std::endl;
25 }
Trk::Vertex
Definition: Tracking/TrkEvent/VxVertex/VxVertex/Vertex.h:26
xAOD::Vertex
Vertex_v1 Vertex
Define the latest version of the vertex class.
Definition: Event/xAOD/xAODTracking/xAODTracking/Vertex.h:16
VertexCnv_p1.h
Trk::Vertex_p1
Definition: Vertex_p1.h:22
VertexCnv_p1::transToPers
void transToPers(const Trk::Vertex *transObj, Trk::Vertex_p1 *persObj, MsgStream &log)
Definition: VertexCnv_p1.cxx:16
Trk::Vertex_p1::m_position
std::vector< float > m_position
Definition: Vertex_p1.h:29
VertexCnv_p1::persToTrans
void persToTrans(const Trk::Vertex_p1 *persObj, Trk::Vertex *transObj, MsgStream &log)
Definition: VertexCnv_p1.cxx:8
Trk::Vertex::position
const Amg::Vector3D & position() const
return position of vertex
Definition: Vertex.cxx:72
Vertex.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47