ATLAS Offline Software
Loading...
Searching...
No Matches
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
10
13
16
18
20
21namespace {
22 const DataLinkCnv_p1<DataLink<TrackCollection> > dataLinkConverter;
23 const DetailedTrackTruthCnv_p1 detailedTruthConverter;
24}
25
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) {
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
47 MsgStream& msg )
48{
49 const char* info = "DetailedTrackTruthCollectionCnv_p1::transToPers()";
50 msg<<MSG::FATAL<<info<<endmsg;
51 throw std::runtime_error(info);
52}
#define endmsg
This file contains the class definition for the DataLinkCnv_p1 class and DataLinkVectorCnv_p1 class.
virtual void persToTrans(const Trk::DetailedTrackTruthCollection_p1 *persObj, DetailedTrackTruthCollection *transObj, MsgStream &msg)
Method creating the transient representation of Analysis::DetailedTrackTruthCollection from its persi...
virtual void transToPers(const DetailedTrackTruthCollection *transObj, Trk::DetailedTrackTruthCollection_p1 *persObj, MsgStream &msg)
Method creating the persistent representation DetailedTrackTruthCollection_p1 from its transient repr...
static DataLink< TrackCollection > & trackCollectionLink(TrackTruthCollection *truthColl)
MsgStream & msg
Definition testRead.cxx:32