ATLAS Offline Software
Loading...
Searching...
No Matches
DetailedTrackTruthCollectionCnv.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
13
14#include "GaudiKernel/StatusCode.h"
15#include "GaudiKernel/MsgStream.h"
16#include "GaudiKernel/ISvcLocator.h"
17
18// Athena
20
21// This is release 12 guid for DetailedTrackTruthVector.
22constexpr pool::Guid s_p1_guid("1BA26DEE-BACE-43D6-8F19-E9490CDE8BB8");
23constexpr pool::Guid s_p2_guid("B30AE3A0-F34E-45B6-A8A1-B9CB5E669EB2");
24constexpr pool::Guid s_p3_guid("F5A1DC75-C3FB-4575-8178-905223CF1277");
25constexpr pool::Guid s_p4_guid("018E422D-E420-7894-9245-A824C0ECE535");
26
27//================================================================
31
32//================================================================
34 MsgStream log(msgSvc(), "DetailedTrackTruthCollectionCnv");
35 log<<MSG::DEBUG<<"Writing DetailedTrackTruthCollection_p4"<<endmsg;
36
37 //orig: return new DetailedTrackTruthCollectionPERS( *reinterpret_cast<DetailedTrackTruthCollectionPERS*>(trans) );
38
40 m_converter_p4.transToPers(trans,pers,log);
41 return pers;
42}
43
44//================================================================
46 MsgStream log(msgSvc(), "DetailedTrackTruthCollectionCnv" );
47 DetailedTrackTruthCollection *trans(nullptr);
48
50 trans = new DetailedTrackTruthCollection();
51 log<<MSG::DEBUG<<"Read DetailedTrackTruthCollection_p4. GUID="<<m_classID.toString()<<endmsg;
53 m_converter_p4.persToTrans(pers, trans, log);
54 delete pers;
55 }
56 else if (compareClassGuid(s_p3_guid)) {
57 trans = new DetailedTrackTruthCollection();
58 log<<MSG::DEBUG<<"Read DetailedTrackTruthCollection_p3. GUID="<<m_classID.toString()<<endmsg;
60 m_converter_p3.persToTrans(pers, trans, log);
61 delete pers;
62 }
63 else if (compareClassGuid(s_p2_guid)) {
64 trans = new DetailedTrackTruthCollection();
65 log<<MSG::DEBUG<<"Read DetailedTrackTruthCollection_p2. GUID="<<m_classID.toString()<<endmsg;
67 m_converter_p2.persToTrans(pers, trans, log);
68 delete pers;
69 }
70 else if (compareClassGuid(s_p1_guid)) {
71 trans = new DetailedTrackTruthCollection();
72 log<<MSG::DEBUG<<"Read DetailedTrackTruthCollection_p1. GUID="<<m_classID.toString()<<endmsg;
74 m_converter_p1.persToTrans(pers, trans, log);
75 delete pers;
76 }
77 else {
78 std::string info("Unsupported persistent version of DetailedTrackTruthCollection. GUID=" + m_classID.toString());
79 log<<MSG::FATAL<<info<<endmsg;
80 throw std::runtime_error(info);
81 }
82
83 return trans;
84}
85
86//================================================================
#define endmsg
constexpr pool::Guid s_p1_guid("1BA26DEE-BACE-43D6-8F19-E9490CDE8BB8")
constexpr pool::Guid s_p2_guid("B30AE3A0-F34E-45B6-A8A1-B9CB5E669EB2")
constexpr pool::Guid s_p3_guid("F5A1DC75-C3FB-4575-8178-905223CF1277")
constexpr pool::Guid s_p4_guid("018E422D-E420-7894-9245-A824C0ECE535")
T_AthenaPoolCustomCnv< DetailedTrackTruthCollection, DetailedTrackTruthCollectionPERS > DetailedTrackTruthCollectionCnvBase
Trk::DetailedTrackTruthCollection_p4 DetailedTrackTruthCollectionPERS
constexpr pool::Guid s_p3_guid("018F1ACE-8405-7174-9305-46B503B5EF52")
constexpr pool::Guid s_p1_guid("D62AFEEE-EF2C-437A-B7BE-CA926D38CCFA")
constexpr pool::Guid s_p2_guid("D62AFEEE-EF2C-437A-B7BE-CA926D38CCFB")
DetailedTrackTruthCollection
DetailedTrackTruthCollectionCnv_p1 m_converter_p1
DetailedTrackTruthCollectionCnv_p2 m_converter_p2
virtual DetailedTrackTruthCollection * createTransient()
DetailedTrackTruthCollectionCnv_p3 m_converter_p3
virtual DetailedTrackTruthCollectionPERS * createPersistent(DetailedTrackTruthCollection *)
DetailedTrackTruthCollectionCnv_p4 m_converter_p4