ATLAS Offline Software
Loading...
Searching...
No Matches
TrackTruthCollectionCnv.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
15
16#include "GaudiKernel/StatusCode.h"
17#include "GaudiKernel/MsgStream.h"
18#include "GaudiKernel/ISvcLocator.h"
19
20// Athena
22
23// This is release 12 guid for TrackTruthVector.
24constexpr pool::Guid s_p0_guid("8BC86D69-DBC4-4B34-8273-513D9BE771D5");
25constexpr pool::Guid s_p1_guid("ED2B4B64-7CF6-48B3-8C40-29F8501A6090");
26constexpr pool::Guid s_p2_guid("44F35B21-838A-4C4E-B09B-971CEA0EB70A");
27constexpr pool::Guid s_p3_guid("018E41F8-0857-7D8C-A062-A3947683EB99");
28
29
30//================================================================
34
35//================================================================
37 MsgStream log(msgSvc(), "TrackTruthCollectionCnv");
38 log<<MSG::DEBUG<<"Writing TrackTruthCollection_p3"<<endmsg;
40 m_converter_p3.transToPers(trans,pers,log);
41 return pers;
42}
43
44//================================================================
46 MsgStream log(msgSvc(), "TrackTruthCollectionCnv" );
47 std::unique_ptr<TrackTruthCollection> trans(new TrackTruthCollection());
48
50 log<<MSG::DEBUG<<"Read TrackTruthCollection_p3. GUID="<<m_classID.toString()<<endmsg;
52 m_converter_p3.persToTrans(pers, trans.get(), log);
53 delete pers;
54 }
55 else if (compareClassGuid(s_p2_guid)) {
56 log<<MSG::DEBUG<<"Read TrackTruthCollection_p2. GUID="<<m_classID.toString()<<endmsg;
58 m_converter_p2.persToTrans(pers, trans.get(), log);
59 delete pers;
60 }
61 else if (compareClassGuid(s_p1_guid)) {
62 log<<MSG::DEBUG<<"Read TrackTruthCollection_p1. GUID="<<m_classID.toString()<<endmsg;
64 m_converter_p1.persToTrans(pers, trans.get(), log);
65 delete pers;
66 }
67 else if (compareClassGuid(s_p0_guid)) {
68 log<<MSG::DEBUG<<"Read version p0 of TrackTruthCollection. GUID="<<m_classID.toString()<<endmsg;
70 m_converter_p0.persToTrans(pers, trans.get(), log);
71 delete pers;
72 }
73 else {
74 log<<MSG::ERROR<<"Unsupported persistent version of TrackTruthCollection. GUID="
75 <<m_classID.toString()<<endmsg;
76 throw std::runtime_error("Unsupported persistent version of Data Collection");
77 }
78
79 return trans.release();
80}
81
82//================================================================
#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")
constexpr pool::Guid s_p0_guid("8BC86D69-DBC4-4B34-8273-513D9BE771D5")
constexpr pool::Guid s_p3_guid("018E41F8-0857-7D8C-A062-A3947683EB99")
constexpr pool::Guid s_p2_guid("44F35B21-838A-4C4E-B09B-971CEA0EB70A")
constexpr pool::Guid s_p1_guid("ED2B4B64-7CF6-48B3-8C40-29F8501A6090")
T_AthenaPoolCustomCnv< TrackTruthCollection, TrackTruthCollectionPERS > TrackTruthCollectionCnvBase
Trk::TrackTruthCollection_p3 TrackTruthCollectionPERS
TrackTruthCollectionCnv_p0 m_converter_p0
virtual TrackTruthCollection * createTransient()
TrackTruthCollectionCnv_p3 m_converter_p3
TrackTruthCollectionCnv(ISvcLocator *svcloc)
TrackTruthCollectionCnv_p2 m_converter_p2
TrackTruthCollectionCnv_p1 m_converter_p1
virtual TrackTruthCollectionPERS * createPersistent(TrackTruthCollection *)