ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkEventCnv
TrkTruthTPCnv
src
DetailedTrackTruthCnv_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
// T/P converter for DetailedTrackTruth.
6
// Andrei Gaponenko <agaponenko@lbl.gov>, 2007
7
8
#include "
TrkTruthTPCnv/DetailedTrackTruthCnv_p1.h
"
9
#include "
TrkTruthTPCnv/DetailedTrackTruth_p1.h
"
10
#include "
TrkTruthData/DetailedTrackTruth.h
"
11
12
#include "
TrkTruthTPCnv/SubDetHitStatisticsCnv_p0.h
"
13
#include "
TrkTruthTPCnv/TruthTrajectoryCnv_p1.h
"
14
15
#include "
TrackTruthCollectionAccessor.h
"
16
17
#include <stdexcept>
18
19
namespace
{
20
const
SubDetHitStatisticsCnv_p0
subDetHitStatConverter;
21
const
TruthTrajectoryCnv_p1
truthTrajConverter;
22
}
23
24
25
void
DetailedTrackTruthCnv_p1::persToTrans
(
const
Trk::DetailedTrackTruth_p1
* pers,
26
DetailedTrackTruth
* trans,
27
MsgStream&
msg
)
const
28
{
29
msg
<<MSG::DEBUG<<
"DetailedTrackTruthCnv_p1::persToTrans()"
<<
endmsg
;
30
31
static
std::once_flag first_flag;
32
std::call_once (first_flag, [&]() {
33
msg
<<MSG::WARNING<<
"Reading DetailedTrackTruth in the old format, statsTruth() info will not be available."
<<
endmsg
;
34
});
35
36
subDetHitStatConverter.persToTrans(&pers->
m_hitsCommon
, &
TrackTruthCollectionAccessor::statsCommon
(trans),
msg
);
37
subDetHitStatConverter.persToTrans(&pers->
m_hitsTrack
, &
TrackTruthCollectionAccessor::statsTrack
(trans),
msg
);
38
truthTrajConverter.persToTrans(&pers->
m_trajectory
, &
TrackTruthCollectionAccessor::trajectory
(trans),
msg
);
39
40
msg
<<MSG::DEBUG<<
"DetailedTrackTruthCnv_p1::persToTrans() DONE"
<<
endmsg
;
41
}
42
43
void
DetailedTrackTruthCnv_p1::transToPers
(
const
DetailedTrackTruth
*,
44
Trk::DetailedTrackTruth_p1
*,
45
MsgStream&
msg
)
const
46
{
47
const
char
*info =
"DetailedTrackTruthCnv_p1::transToPers(): THIS OLD CONVERTER SHOLD NOT GET CALLED!"
;
48
msg
<<MSG::FATAL<<info<<
endmsg
;
49
throw
std::runtime_error(info);
50
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
DetailedTrackTruthCnv_p1.h
DetailedTrackTruth.h
DetailedTrackTruth_p1.h
SubDetHitStatisticsCnv_p0.h
TrackTruthCollectionAccessor.h
TruthTrajectoryCnv_p1.h
DetailedTrackTruthCnv_p1::persToTrans
virtual void persToTrans(const Trk::DetailedTrackTruth_p1 *persObj, DetailedTrackTruth *transObj, MsgStream &msg) const override
Method creating the transient representation of Analysis::DetailedTrackTruth from its persistent repr...
Definition
DetailedTrackTruthCnv_p1.cxx:25
DetailedTrackTruthCnv_p1::transToPers
virtual void transToPers(const DetailedTrackTruth *transObj, Trk::DetailedTrackTruth_p1 *persObj, MsgStream &msg) const override
Method creating the persistent representation DetailedTrackTruth_p1 from its transient representation...
Definition
DetailedTrackTruthCnv_p1.cxx:43
DetailedTrackTruth
Definition
DetailedTrackTruth.h:16
SubDetHitStatisticsCnv_p0
Definition
SubDetHitStatisticsCnv_p0.h:25
TrackTruthCollectionAccessor::statsCommon
static SubDetHitStatistics & statsCommon(DetailedTrackTruth *dt)
Definition
TrackTruthCollectionAccessor.h:42
TrackTruthCollectionAccessor::statsTrack
static SubDetHitStatistics & statsTrack(DetailedTrackTruth *dt)
Definition
TrackTruthCollectionAccessor.h:43
TrackTruthCollectionAccessor::trajectory
static TruthTrajectory & trajectory(DetailedTrackTruth *dt)
Definition
TrackTruthCollectionAccessor.h:45
Trk::DetailedTrackTruth_p1
Definition
DetailedTrackTruth_p1.h:19
Trk::DetailedTrackTruth_p1::m_hitsTrack
SubDetHitStatistics_p0 m_hitsTrack
Definition
DetailedTrackTruth_p1.h:22
Trk::DetailedTrackTruth_p1::m_hitsCommon
SubDetHitStatistics_p0 m_hitsCommon
Definition
DetailedTrackTruth_p1.h:21
Trk::DetailedTrackTruth_p1::m_trajectory
TruthTrajectory_p1 m_trajectory
Definition
DetailedTrackTruth_p1.h:23
TruthTrajectoryCnv_p1
Definition
TruthTrajectoryCnv_p1.h:25
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0