ATLAS Offline Software
Loading...
Searching...
No Matches
CompetingTRT_DriftCirclesOnTrackCnv_p1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5//-----------------------------------------------------------------------------
6//
7// file: InDetCompetingRIOsOnTrackCnv_p1.cxx
8//
9//-----------------------------------------------------------------------------
10
16#include "TrkSurfaces/Surface.h"
17
18
19void
22 MsgStream &log )
23{
24 auto containedChildRots = std::vector< const InDet::TRT_DriftCircleOnTrack * >{};
25
26 for (const TPObjRef& ref : persObj->m_containedChildRots) {
28 const InDet::TRT_DriftCircleOnTrack* mcot = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*>(createTransFromPStore(&rotCnv, ref, log));
29 containedChildRots.push_back( mcot );
30 }
31
32 ITPConverterFor<Trk::Surface> *surfaceCnv = nullptr;
33 Trk::Surface* associatedSurface = createTransFromPStore(&surfaceCnv, persObj->m_associatedSurface, log);
34
35 *transObj = InDet::CompetingTRT_DriftCirclesOnTrack (associatedSurface,
36 std::move(containedChildRots),
37 std::vector<double>{},
38 {},
39 {},
40 0);
41
42 fillTransFromPStore( &m_cRotCnv, persObj->m_competingROT, transObj, log );
43}
44
45void
48 MsgStream &log )
49{
50 persObj->m_competingROT = baseToPersistent( &m_cRotCnv, transObj, log );
51
52 for (const InDet::TRT_DriftCircleOnTrack* cl : transObj->containedROTs()) {
54 persObj->m_containedChildRots.push_back( toPersistent(&rotCnv, cl, log) );
55 }
56
57 ITPConverterFor<Trk::Surface> *surfaceCnv = nullptr;
58 persObj->m_associatedSurface = toPersistent(&surfaceCnv, &transObj->associatedSurface(), log);
59
60}
61
62
const boost::regex ref(r_ef)
virtual void transToPers(const InDet::CompetingTRT_DriftCirclesOnTrack *transObj, InDet::CompetingTRT_DriftCirclesOnTrack_p1 *persObj, MsgStream &log)
virtual void persToTrans(const InDet::CompetingTRT_DriftCirclesOnTrack_p1 *persObj, InDet::CompetingTRT_DriftCirclesOnTrack *transObj, MsgStream &log)
TPObjRef baseToPersistent(CNV **cnv, const typename CNV::Trans_t *transObj, MsgStream &log) const
Definition TPConverter.h:97
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
Version 1 of the persistent class representing the transient class InDet::CompetingTRT_DriftCirclesOn...
TPObjRef m_competingROT
link to base CompetingRIOsOnTrack
Class for competing TRT_DriftCircles, it extends the Trk::CompetingRIOsOnTrack base class.
const Trk::Surface & associatedSurface() const
returns the surface for the local to global transformation .
const std::vector< const InDet::TRT_DriftCircleOnTrack * > & containedROTs() const
returns the vector of TRT_DriftCircleOnTrack objects .
Represents 'corrected' measurements from the TRT (for example, corrected for wire sag).
This class is an object reference used in Athena persistent data model.
Definition TPObjRef.h:20
Abstract Base Class for tracking surfaces.