ATLAS Offline Software
Loading...
Searching...
No Matches
TrackParticleTruthCollectionCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
14
15#include "GaudiKernel/StatusCode.h"
16#include "GaudiKernel/MsgStream.h"
17#include "GaudiKernel/ISvcLocator.h"
18
19// Athena
21
22// This is release 12 guid for TrackParticleTruthVector.
23constexpr pool::Guid s_p0_guid("B35041E8-D980-458E-AC06-79028CF79D5D");
24constexpr pool::Guid s_p1_guid("D62AFEEE-EF2C-437A-B7BE-CA926D38CCFA");
25constexpr pool::Guid s_p2_guid("D62AFEEE-EF2C-437A-B7BE-CA926D38CCFB");
26constexpr pool::Guid s_p3_guid("018F1ACE-8405-7174-9305-46B503B5EF52");
27
28//================================================================
32
33//================================================================
35 MsgStream log(msgSvc(), "TrackParticleTruthCollectionCnv");
36 log<<MSG::DEBUG<<"Writing TrackParticleTruthCollection_p2"<<endmsg;
38 m_converter_p3.transToPers(trans,pers,log);
39 return pers;
40}
41
42//================================================================
44 MsgStream log(msgSvc(), "TrackParticleTruthCollectionCnv" );
45 std::unique_ptr<TrackParticleTruthCollection> trans(new TrackParticleTruthCollection());
46
48 log<<MSG::DEBUG<<"Read TrackParticleTruthCollection_p3. GUID="<<m_classID.toString()<<endmsg;
50 m_converter_p3.persToTrans(pers, trans.get(), log);
51 delete pers;
52 }
53 else if (compareClassGuid(s_p2_guid)) {
54 log<<MSG::DEBUG<<"Read TrackParticleTruthCollection_p2. GUID="<<m_classID.toString()<<endmsg;
56 m_converter_p2.persToTrans(pers, trans.get(), log);
57 delete pers;
58 }
59 else if (compareClassGuid(s_p1_guid)) {
60 log<<MSG::DEBUG<<"Read TrackParticleTruthCollection_p1. GUID="<<m_classID.toString()<<endmsg;
62 m_converter_p1.persToTrans(pers, trans.get(), log);
63 delete pers;
64 }
65 else if (compareClassGuid(s_p0_guid)) {
66 log<<MSG::DEBUG<<"Read version p0 of TrackParticleTruthCollection. GUID="<<m_classID.toString()<<endmsg;
68 m_converter_p0.persToTrans(pers, trans.get(), log);
69 delete pers;
70 }
71 else {
72 log<<MSG::ERROR<<"Unsupported persistent version of TrackParticleTruthCollection. GUID="
73 <<m_classID.toString()<<endmsg;
74 throw std::runtime_error("Unsupported persistent version of Data Collection");
75 }
76
77 return trans.release();
78}
#define endmsg
constexpr pool::Guid s_p3_guid("018F1ACE-8405-7174-9305-46B503B5EF52")
constexpr pool::Guid s_p0_guid("B35041E8-D980-458E-AC06-79028CF79D5D")
constexpr pool::Guid s_p1_guid("D62AFEEE-EF2C-437A-B7BE-CA926D38CCFA")
constexpr pool::Guid s_p2_guid("D62AFEEE-EF2C-437A-B7BE-CA926D38CCFB")
T_AthenaPoolCustomCnv< TrackParticleTruthCollection, TrackParticleTruthCollectionPERS > TrackParticleTruthCollectionCnvBase
Rec::TrackParticleTruthCollection_p3 TrackParticleTruthCollectionPERS
Athena::TPCnvVers::Old TrackParticleTruthCollection
virtual TrackParticleTruthCollection * createTransient()
TrackParticleTruthCollectionCnv_p3 m_converter_p3
virtual TrackParticleTruthCollectionPERS * createPersistent(TrackParticleTruthCollection *)
TrackParticleTruthCollectionCnv_p1 m_converter_p1
TrackParticleTruthCollectionCnv_p2 m_converter_p2
TrackParticleTruthCollectionCnv_p0 m_converter_p0