ATLAS Offline Software
Tracking
TrkEventCnv
TrkEventTPCnv
src
TrkSurfaces
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
"
12
#include "
TrkEventTPCnv/TrkSurfaces/SurfaceCnv_p1.h
"
13
#include "
TrkEventTPCnv/helpers/EigenHelpers.h
"
14
15
//-----------------------------------------------------------------------------
16
// Persistent to Transient
17
//-----------------------------------------------------------------------------
18
void
SurfaceCnv_p1::persToTrans
(
const
Trk::Surface_p1
*persObj,
Trk::Surface
*transObj, MsgStream &) {
19
transObj->
m_associatedDetElementId
=
Identifier
(
Identifier32
(persObj->
m_associatedDetElementId
));
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
//-----------------------------------------------------------------------------
42
void
SurfaceCnv_p1::transToPers
(
const
Trk::Surface
* ,
43
Trk::Surface_p1
* ,
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
Identifier32
Definition:
Identifier32.h:25
Trk::Surface_p1
Definition:
Surface_p1.h:20
Surface.h
Trk::Surface::setTransform
void setTransform(const Amg::Transform3D &trans)
Set the transform updates center and normal.
SurfaceCnv_p1::transToPers
void transToPers(const Trk::Surface *, Trk::Surface_p1 *, MsgStream &)
Definition:
SurfaceCnv_p1.cxx:42
Trk::Surface_p1::m_associatedDetElementId
Identifier32::value_type m_associatedDetElementId
Definition:
Surface_p1.h:26
SurfaceCnv_p1::persToTrans
void persToTrans(const Trk::Surface_p1 *, Trk::Surface *, MsgStream &)
Definition:
SurfaceCnv_p1.cxx:18
Trk::Surface_p1::m_transform
std::vector< double > m_transform
Definition:
Surface_p1.h:30
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition:
GeoPrimitives.h:46
EigenHelpers.h
Trk::Surface::m_associatedDetElementId
Identifier m_associatedDetElementId
Identifier for the TrkDetElementBase.
Definition:
Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:442
SurfaceCnv_p1.h
Trk::Surface
Definition:
Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Identifier
Definition:
IdentifierFieldParser.cxx:14
Generated on Thu Nov 7 2024 21:26:45 for ATLAS Offline Software by
1.8.18