ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkEventCnv
TrkTruthTPCnv
src
TrackTruthCollectionCnv_p0.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// T/P converter for TrackTruthCollection.
6
// Andrei Gaponenko <agaponenko@lbl.gov>, 2007
7
8
9
#include "
TrkTruthTPCnv/TrackTruthCollectionCnv_p0.h
"
10
11
#include "
TrkTruthTPCnv/TrackTruthCollection_p0.h
"
12
#include "
TrkTruthData/TrackTruthCollection.h
"
13
14
#include "
GeneratorObjectsTPCnv/HepMcParticleLinkCnv_p1.h
"
15
16
#include "AthLinks/DataLink.h"
17
#include "
StoreGate/StoreGateSvc.h
"
18
19
#include "
TrackTruthCollectionAccessor.h
"
20
21
namespace
{
22
HepMcParticleLinkCnv_p1
particleLinkConverter;
23
}
24
25
void
TrackTruthCollectionCnv_p0::persToTrans
(
const
Trk::TrackTruthCollection_p0
* pers,
26
TrackTruthCollection
* trans,
27
MsgStream&
msg
)
28
{
29
msg
<<MSG::DEBUG<<
"TrackTruthCollectionCnv_p0::persToTrans(): PERS size = "
<<pers->size()<<
endmsg
;
30
31
if
(pers->empty()) {
32
msg
<<MSG::WARNING<<
"persToTrans(): can't find out the corresponding TrackCollection for the empty TrackTruthCollection_p0 (old-format)"
<<
endmsg
;
33
}
34
else
{
35
TrackTruthCollectionAccessor::trackCollectionLink
(trans) = (*pers)[0].first.getStorableObjectPointer();
36
37
for
(Trk::TrackTruthCollection_p0::const_iterator i=pers->begin(); i!=pers->end(); ++i) {
38
trans->insert(trans->end(), std::make_pair(i->first, i->second));
39
}
40
}
41
42
msg
<<MSG::DEBUG<<
"TrackTruthCollectionCnv_p0::persToTrans() DONE"
<<
endmsg
;
43
}
44
45
void
TrackTruthCollectionCnv_p0::transToPers
(
const
TrackTruthCollection
*
/*trans*/
,
46
Trk::TrackTruthCollection_p0
*
/*pers*/
,
47
MsgStream&
/* msg */
)
48
{
49
throw
std::runtime_error(
"TrackTruthCollectionCnv_p0::transToPers() is not implemented, _p1 or later is meant to be used."
);
50
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
HepMcParticleLinkCnv_p1.h
StoreGateSvc.h
TrackTruthCollectionAccessor.h
TrackTruthCollectionCnv_p0.h
TrackTruthCollection.h
TrackTruthCollection_p0.h
HepMcParticleLinkCnv_p1
Definition
HepMcParticleLinkCnv_p1.h:33
TrackTruthCollectionAccessor::trackCollectionLink
static DataLink< TrackCollection > & trackCollectionLink(TrackTruthCollection *truthColl)
Definition
TrackTruthCollectionAccessor.h:21
TrackTruthCollectionCnv_p0::transToPers
virtual void transToPers(const TrackTruthCollection *transObj, Trk::TrackTruthCollection_p0 *persObj, MsgStream &msg)
Method creating the persistent representation TrackTruthCollection_p0 from its transient representati...
Definition
TrackTruthCollectionCnv_p0.cxx:45
TrackTruthCollectionCnv_p0::persToTrans
virtual void persToTrans(const Trk::TrackTruthCollection_p0 *persObj, TrackTruthCollection *transObj, MsgStream &msg)
Method creating the transient representation of Analysis::TrackTruthCollection from its persistent re...
Definition
TrackTruthCollectionCnv_p0.cxx:25
TrackTruthCollection
Definition
TrackTruthCollection.h:21
Trk::TrackTruthCollection_p0
TrackTruthVector TrackTruthCollection_p0
Definition
TrackTruthCollectionCnv_p0.h:22
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0