ATLAS Offline Software
DetailedTrackTruthCnv_p2.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 // T/P converter for DetailedTrackTruth.
6 // Andrei Gaponenko <agaponenko@lbl.gov>, 2008
7 
11 
14 
16 
17 namespace {
18  const SubDetHitStatisticsCnv_p0 subDetHitStatConverter;
19  const TruthTrajectoryCnv_p1 truthTrajConverter;
20 }
21 
22 
24  DetailedTrackTruth* trans,
25  MsgStream& msg ) const
26 {
27  msg<<MSG::DEBUG<<"DetailedTrackTruthCnv_p2::persToTrans()"<<endmsg;
28 
29  subDetHitStatConverter.persToTrans(&pers->m_hitsCommon, &TrackTruthCollectionAccessor::statsCommon(trans), msg);
30  subDetHitStatConverter.persToTrans(&pers->m_hitsTrack, &TrackTruthCollectionAccessor::statsTrack(trans), msg);
31  subDetHitStatConverter.persToTrans(&pers->m_hitsTruth, &TrackTruthCollectionAccessor::statsTruth(trans), msg);
32  truthTrajConverter.persToTrans(&pers->m_trajectory, &TrackTruthCollectionAccessor::trajectory(trans), msg);
33 
34  msg<<MSG::DEBUG<<"DetailedTrackTruthCnv_p2::persToTrans() DONE"<<endmsg;
35 }
36 
39  MsgStream& msg ) const
40 {
41  msg<<MSG::DEBUG<<"DetailedTrackTruthCnv_p2::transToPers()"<<endmsg;
42 
43  subDetHitStatConverter.transToPers(&trans->statsCommon(), &pers->m_hitsCommon, msg);
44  subDetHitStatConverter.transToPers(&trans->statsTrack(), &pers->m_hitsTrack, msg);
45  subDetHitStatConverter.transToPers(&trans->statsTruth(), &pers->m_hitsTruth, msg);
46  truthTrajConverter.transToPers(&trans->trajectory(), &pers->m_trajectory, msg);
47 
48  msg<<MSG::DEBUG<<"DetailedTrackTruthCnv_p2::transToPers() DONE"<<endmsg;
49 }
DetailedTrackTruthCnv_p2::persToTrans
virtual void persToTrans(const Trk::DetailedTrackTruth_p2 *persObj, DetailedTrackTruth *transObj, MsgStream &msg) const override
Method creating the transient representation of Analysis::DetailedTrackTruth from its persistent repr...
Definition: DetailedTrackTruthCnv_p2.cxx:23
Trk::DetailedTrackTruth_p2::m_hitsTrack
SubDetHitStatistics_p0 m_hitsTrack
Definition: DetailedTrackTruth_p2.h:23
TrackTruthCollectionAccessor::statsCommon
static SubDetHitStatistics & statsCommon(DetailedTrackTruth *dt)
Definition: TrackTruthCollectionAccessor.h:42
TrackTruthCollectionAccessor::statsTrack
static SubDetHitStatistics & statsTrack(DetailedTrackTruth *dt)
Definition: TrackTruthCollectionAccessor.h:43
DetailedTrackTruth::statsTruth
const SubDetHitStatistics & statsTruth() const
Definition: DetailedTrackTruth.h:21
SubDetHitStatisticsCnv_p0
Definition: SubDetHitStatisticsCnv_p0.h:25
DetailedTrackTruth::statsCommon
const SubDetHitStatistics & statsCommon() const
Definition: DetailedTrackTruth.h:19
Trk::DetailedTrackTruth_p2::m_hitsCommon
SubDetHitStatistics_p0 m_hitsCommon
Definition: DetailedTrackTruth_p2.h:22
Trk::DetailedTrackTruth_p2
Definition: DetailedTrackTruth_p2.h:20
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
DetailedTrackTruth::statsTrack
const SubDetHitStatistics & statsTrack() const
Definition: DetailedTrackTruth.h:20
DetailedTrackTruth.h
TruthTrajectoryCnv_p1
Definition: TruthTrajectoryCnv_p1.h:25
Trk::DetailedTrackTruth_p2::m_trajectory
TruthTrajectory_p1 m_trajectory
This is a new member in p2.
Definition: DetailedTrackTruth_p2.h:25
DetailedTrackTruthCnv_p2.h
SubDetHitStatisticsCnv_p0.h
DetailedTrackTruth
Definition: DetailedTrackTruth.h:16
TrackTruthCollectionAccessor::statsTruth
static SubDetHitStatistics & statsTruth(DetailedTrackTruth *dt)
Definition: TrackTruthCollectionAccessor.h:44
DetailedTrackTruth_p2.h
TrackTruthCollectionAccessor::trajectory
static TruthTrajectory & trajectory(DetailedTrackTruth *dt)
Definition: TrackTruthCollectionAccessor.h:45
TrackTruthCollectionAccessor.h
DEBUG
#define DEBUG
Definition: page_access.h:11
DetailedTrackTruth::trajectory
const TruthTrajectory & trajectory() const
Definition: DetailedTrackTruth.h:18
Trk::DetailedTrackTruth_p2::m_hitsTruth
SubDetHitStatistics_p0 m_hitsTruth
Definition: DetailedTrackTruth_p2.h:24
DetailedTrackTruthCnv_p2::transToPers
virtual void transToPers(const DetailedTrackTruth *transObj, Trk::DetailedTrackTruth_p2 *persObj, MsgStream &msg) const override
Method creating the persistent representation DetailedTrackTruth_p2 from its transient representation...
Definition: DetailedTrackTruthCnv_p2.cxx:37
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
TruthTrajectoryCnv_p1.h