ATLAS Offline Software
Loading...
Searching...
No Matches
PRD_MultiTruthCollectionCnv_p4.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5// T/P converter for PRD_MultiTruthCollection.
6// Andrei Gaponenko <agaponenko@lbl.gov>, 2007
7// Olivier Arnaez <olivier.arnaez@cern.ch>, 2015
8
10
13
15
16namespace {
17 const HepMcParticleLinkCnv_p3 particleLinkConverter;
18}
19
20
23 MsgStream& msg )
24{
25 msg<<MSG::DEBUG<<"PRD_MultiTruthCollectionCnv_p4::persToTrans()"<<endmsg;
26
27 for (const Trk::PRD_MultiTruthCollection_p4::Entry& ent : pers->m_entries) {
29 particleLinkConverter.persToTrans(&ent.particle, &link, msg);
30 trans->insert(trans->end(), std::make_pair(Identifier(ent.id), link) );
31 }
32
33 msg<<MSG::DEBUG<<"PRD_MultiTruthCollectionCnv_p4::persToTrans() DONE"<<endmsg;
34}
35
38 MsgStream& msg )
39{
40 msg<<MSG::DEBUG<<"PRD_MultiTruthCollectionCnv_p4::transToPers()"<<endmsg;
41
42 pers->m_entries.reserve(trans->size());
43
44 for (const auto& p : *trans) {
46 particleLinkConverter.transToPers(&p.second, &link, msg);
47 pers->m_entries.push_back(Trk::PRD_MultiTruthCollection_p4::Entry(p.first.get_compact(), link));
48 }
49
50 msg<<MSG::DEBUG<<"PRD_MultiTruthCollectionCnv_p4::transToPers() DONE"<<endmsg;
51}
#define endmsg
virtual void persToTrans(const Trk::PRD_MultiTruthCollection_p4 *persObj, PRD_MultiTruthCollection *transObj, MsgStream &msg)
Method creating the transient representation of Analysis::PRD_MultiTruthCollection from its persisten...
virtual void transToPers(const PRD_MultiTruthCollection *transObj, Trk::PRD_MultiTruthCollection_p4 *persObj, MsgStream &msg)
Method creating the persistent representation PRD_MultiTruthCollection_p4 from its transient represen...
A PRD is mapped onto all contributing particles.
MsgStream & msg
Definition testRead.cxx:32