ATLAS Offline Software
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 
11 
14 
16 
17 #include <stdexcept>
18 
19 namespace {
20  const SubDetHitStatisticsCnv_p0 subDetHitStatConverter;
21  const TruthTrajectoryCnv_p1 truthTrajConverter;
22 }
23 
24 
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 
45  MsgStream& msg ) const
46 {
47  const char *info = "DetailedTrackTruthCnv_p1::transToPers(): THIS OLD CONVERTER SHOLD NOT GET CALLED!";
49  throw std::runtime_error(info);
50 }
grepfile.info
info
Definition: grepfile.py:38
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
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
TrackTruthCollectionAccessor::statsCommon
static SubDetHitStatistics & statsCommon(DetailedTrackTruth *dt)
Definition: TrackTruthCollectionAccessor.h:42
TrackTruthCollectionAccessor::statsTrack
static SubDetHitStatistics & statsTrack(DetailedTrackTruth *dt)
Definition: TrackTruthCollectionAccessor.h:43
SubDetHitStatisticsCnv_p0
Definition: SubDetHitStatisticsCnv_p0.h:25
Trk::DetailedTrackTruth_p1::m_trajectory
TruthTrajectory_p1 m_trajectory
Definition: DetailedTrackTruth_p1.h:23
Trk::DetailedTrackTruth_p1::m_hitsTrack
SubDetHitStatistics_p0 m_hitsTrack
Definition: DetailedTrackTruth_p1.h:22
DetailedTrackTruthCnv_p1.h
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
DetailedTrackTruth.h
TruthTrajectoryCnv_p1
Definition: TruthTrajectoryCnv_p1.h:25
Trk::DetailedTrackTruth_p1::m_hitsCommon
SubDetHitStatistics_p0 m_hitsCommon
Definition: DetailedTrackTruth_p1.h:21
Trk::DetailedTrackTruth_p1
Definition: DetailedTrackTruth_p1.h:19
DetailedTrackTruth_p1.h
SubDetHitStatisticsCnv_p0.h
DetailedTrackTruth
Definition: DetailedTrackTruth.h:16
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
TrackTruthCollectionAccessor::trajectory
static TruthTrajectory & trajectory(DetailedTrackTruth *dt)
Definition: TrackTruthCollectionAccessor.h:45
TrackTruthCollectionAccessor.h
DEBUG
#define DEBUG
Definition: page_access.h:11
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
TruthTrajectoryCnv_p1.h