ATLAS Offline Software
Loading...
Searching...
No Matches
SegmentCnv_p1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
9
10void SegmentCnv_p1::persToTrans( const Trk::Segment_p1 *persObj, Trk::Segment *transObj, MsgStream &log )
11{
13 Trk::ErrorMatrix dummy;
14 fillTransFromPStore( &m_errorMxCnv, persObj->m_localErrorMatrix, &dummy, log );
15 EigenHelpers::vectorToEigenMatrix(dummy.values, transObj->m_localCovariance, "SegmentCnv_p1");
16
17 transObj->m_fitQuality.reset(createTransFromPStore( (ITPConverterFor<Trk::FitQuality>**) nullptr, persObj->m_fitQuality, log));
18
19 std::unique_ptr<DataVector<const Trk::MeasurementBase>> containedMeasBase(
20 m_containedMeasBasesCnv.createTransient(&persObj->m_containedMeasBases, log));
21
22 transObj->m_containedMeasBases = std::move(*containedMeasBase);
23
24 transObj->m_author = static_cast<Trk::Segment::Author>( persObj->m_author );
25}
26
27
28void SegmentCnv_p1::transToPers( const Trk::Segment * transObj, Trk::Segment_p1 * persObj, MsgStream & log)
29{
30
31 persObj->m_localParameters = toPersistent( &m_localParCnv, &transObj->m_localParams, log );
32
35 pMat.values, transObj->m_localCovariance, "SegmentCnv_p1");
36 persObj->m_localErrorMatrix = toPersistent(&m_errorMxCnv, &pMat, log);
37
38 persObj->m_fitQuality =
40 transObj->m_fitQuality.get(),
41 log);
42
43 m_containedMeasBasesCnv.transToPers(
44 &transObj->m_containedMeasBases, &persObj->m_containedMeasBases, log);
45 persObj->m_author = static_cast<uint16_t>(transObj->m_author);
46}
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
ErrorMatrixCnv_p1 * m_errorMxCnv
void persToTrans(const Trk::Segment_p1 *persObj, Trk::Segment *transObj, MsgStream &log)
void transToPers(const Trk::Segment *transObj, Trk::Segment_p1 *persObj, MsgStream &log)
LocalParametersCnv_p1 * m_localParCnv
MeasurementBaseCnv_p1 m_containedMeasBasesCnv
std::vector< float > values
LocalParameters m_localParams
Amg::MatrixX m_localCovariance
std::vector< TPObjRef > m_containedMeasBases
Definition Segment_p1.h:35
uint16_t m_author
Definition Segment_p1.h:37
TPObjRef m_localParameters
Definition Segment_p1.h:29
TPObjRef m_localErrorMatrix
Definition Segment_p1.h:31
TPObjRef m_fitQuality
Definition Segment_p1.h:33
Base class for all TrackSegment implementations, extends the common MeasurementBase.
Author
enum to identify who created the segment.
std::unique_ptr< FitQuality > m_fitQuality
The fit quality of the Segment.
DataVector< const MeasurementBase > m_containedMeasBases
The vector of contained (generic) Trk::MeasurementBase objects.
static void eigenMatrixToVector(VECTOR &vec, COVARIANCE &cov, const char *)