ATLAS Offline Software
Tracking
TrkEventCnv
TrkTruthTPCnv
src
DetailedTrackTruthCollectionCnv_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 DetailedTrackTruthCollection.
6
//
7
// Andrei Gaponenko <agaponenko@lbl.gov>, 2007
8
9
#include "
TrkTruthData/DetailedTrackTruthCollection.h
"
10
11
#include "
TrkTruthTPCnv/DetailedTrackTruthCollectionCnv_p1.h
"
12
#include "
TrkTruthTPCnv/DetailedTrackTruthCollection_p1.h
"
13
14
#include "
DataModelAthenaPool/DataLinkCnv_p1.h
"
15
#include "
TrkTruthTPCnv/DetailedTrackTruthCnv_p1.h
"
16
17
#include "
StoreGate/StoreGateSvc.h
"
18
19
#include "
TrackTruthCollectionAccessor.h
"
20
21
namespace
{
22
const
DataLinkCnv_p1<DataLink<TrackCollection>
> dataLinkConverter;
23
const
DetailedTrackTruthCnv_p1
detailedTruthConverter;
24
}
25
26
void
DetailedTrackTruthCollectionCnv_p1::persToTrans
(
const
Trk::DetailedTrackTruthCollection_p1
* pers,
27
DetailedTrackTruthCollection
* trans,
28
MsgStream&
msg
)
29
{
30
msg
<<
MSG::DEBUG
<<
"DetailedTrackTruthCollectionCnv_p1::persToTrans(): PERS size = "
<<pers->
m_entries
.size()<<
endmsg
;
31
32
trans->clear();
33
34
dataLinkConverter.persToTrans(pers->
m_trackCollectionLink
,
TrackTruthCollectionAccessor::trackCollectionLink
(trans),
msg
);
35
36
for
(Trk::DetailedTrackTruthCollection_p1::CollectionType::const_iterator
i
=pers->
m_entries
.begin();
i
!=pers->
m_entries
.end(); ++
i
) {
37
DetailedTrackTruth
dt
;
38
detailedTruthConverter.persToTrans(&
i
->detailedTruth, &
dt
,
msg
);
39
trans->insert(trans->end(), std::make_pair(
i
->key.m_index,
dt
) );
40
}
41
42
msg
<<
MSG::DEBUG
<<
"DetailedTrackTruthCollectionCnv_p1::persToTrans() DONE"
<<
endmsg
;
43
}
44
45
void
DetailedTrackTruthCollectionCnv_p1::transToPers
(
const
DetailedTrackTruthCollection
*,
46
Trk::DetailedTrackTruthCollection_p1
*,
47
MsgStream&
msg
)
48
{
49
const
char
*
info
=
"DetailedTrackTruthCollectionCnv_p1::transToPers()"
;
50
msg
<<
MSG::FATAL
<<
info
<<
endmsg
;
51
throw
std::runtime_error(
info
);
52
}
grepfile.info
info
Definition:
grepfile.py:38
Trk::DetailedTrackTruthCollection_p1::m_entries
CollectionType m_entries
Definition:
DetailedTrackTruthCollection_p1.h:38
DetailedTrackTruthCollectionCnv_p1.h
python.Constants.FATAL
int FATAL
Definition:
Control/AthenaCommon/python/Constants.py:19
DataLinkCnv_p1.h
This file contains the class definition for the DataLinkCnv_p1 class and DataLinkVectorCnv_p1 class.
Trk::DetailedTrackTruthCollection_p1::m_trackCollectionLink
DataLink_p1 m_trackCollectionLink
Definition:
DetailedTrackTruthCollection_p1.h:27
DetailedTrackTruthCnv_p1.h
DetailedTrackTruthCollection.h
Trk::DetailedTrackTruthCollection_p1
Definition:
DetailedTrackTruthCollection_p1.h:24
TrackTruthCollectionAccessor::trackCollectionLink
static DataLink< TrackCollection > & trackCollectionLink(TrackTruthCollection *truthColl)
Definition:
TrackTruthCollectionAccessor.h:21
lumiFormat.i
int i
Definition:
lumiFormat.py:85
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
CaloNoise_fillDB.dt
dt
Definition:
CaloNoise_fillDB.py:58
DetailedTrackTruth
Definition:
DetailedTrackTruth.h:16
TrackTruthCollectionAccessor.h
DEBUG
#define DEBUG
Definition:
page_access.h:11
DetailedTrackTruthCollection
Definition:
DetailedTrackTruthCollection.h:20
DetailedTrackTruthCnv_p1
Definition:
DetailedTrackTruthCnv_p1.h:23
StoreGateSvc.h
DetailedTrackTruthCollectionCnv_p1::transToPers
virtual void transToPers(const DetailedTrackTruthCollection *transObj, Trk::DetailedTrackTruthCollection_p1 *persObj, MsgStream &msg)
Method creating the persistent representation DetailedTrackTruthCollection_p1 from its transient repr...
Definition:
DetailedTrackTruthCollectionCnv_p1.cxx:45
python.AutoConfigFlags.msg
msg
Definition:
AutoConfigFlags.py:7
DetailedTrackTruthCollection_p1.h
DetailedTrackTruthCollectionCnv_p1::persToTrans
virtual void persToTrans(const Trk::DetailedTrackTruthCollection_p1 *persObj, DetailedTrackTruthCollection *transObj, MsgStream &msg)
Method creating the transient representation of Analysis::DetailedTrackTruthCollection from its persi...
Definition:
DetailedTrackTruthCollectionCnv_p1.cxx:26
DataLinkCnv_p1
Definition:
DataLinkCnv_p1.h:23
Generated on Thu Nov 7 2024 21:13:38 for ATLAS Offline Software by
1.8.18