ATLAS Offline Software
Loading...
Searching...
No Matches
SurfaceCnv_p1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5//-----------------------------------------------------------------------------
6//
7// file: SurfaceCnv_p1.cxx
8//
9// ----------------------------------------------------------------------------
10
11#include "TrkSurfaces/Surface.h"
14
15//-----------------------------------------------------------------------------
16// Persistent to Transient
17//-----------------------------------------------------------------------------
18void SurfaceCnv_p1::persToTrans( const Trk::Surface_p1 *persObj, Trk::Surface *transObj, MsgStream &) {
20 if( !persObj->m_transform.empty() ) {
21
22 Amg::Transform3D trans{};
23 trans(0,0)=persObj->m_transform[0];
24 trans(0,1)=persObj->m_transform[1];
25 trans(0,2)=persObj->m_transform[2];
26 trans(0,3)=persObj->m_transform[3];
27 trans(1,0)=persObj->m_transform[4];
28 trans(1,1)=persObj->m_transform[5];
29 trans(1,2)=persObj->m_transform[6];
30 trans(1,3)=persObj->m_transform[7];
31 trans(2,0)=persObj->m_transform[8];
32 trans(2,1)=persObj->m_transform[9];
33 trans(2,2)=persObj->m_transform[10];
34 trans(2,3)=persObj->m_transform[11];
35 transObj->setTransform(trans);
36 }
37}
38
39//-----------------------------------------------------------------------------
40// Transient to Persistent
41//-----------------------------------------------------------------------------
44 MsgStream &)
45{
46 throw std::runtime_error("SurfaceCnv_p1::transToPers is deprecated!");
47 // persObj->m_associatedDetElementId = transObj->m_associatedDetElementId.get_compact();
48 // if( transObj->m_transform ) {
49 // EigenHelpers::eigenTransform3DToVector( *transObj->m_transform,
50 // persObj->m_transform );
51 // }
52}
53
void persToTrans(const Trk::Surface_p1 *, Trk::Surface *, MsgStream &)
void transToPers(const Trk::Surface *, Trk::Surface_p1 *, MsgStream &)
Identifier32::value_type m_associatedDetElementId
Definition Surface_p1.h:26
std::vector< double > m_transform
Definition Surface_p1.h:30
Abstract Base Class for tracking surfaces.
void setTransform(const Amg::Transform3D &trans)
Set the transform updates center and normal.
Identifier m_associatedDetElementId
Identifier to the Detector Element.
Eigen::Affine3d Transform3D