ATLAS Offline Software
CombinedMuonFeatureCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 //constructor
11 {
13 }
14 
15 //destructor
17 {
18  delete m_TPConverter;
19 }
20 
21 //-----------------------------------------------------------------------------
22 // Create persistent
23 //-----------------------------------------------------------------------------
24 
27 {
28  MsgStream mlog(msgSvc(), "CombinedMuonFeatureConverter" );
29 
30  mlog << MSG::DEBUG << "CombinedMuonFeatureCnv::createPersistent" << endmsg;
31 
33 
34  return persObj;
35 }
36 
37 //-----------------------------------------------------------------------------
38 // Create transient
39 //-----------------------------------------------------------------------------
41 {
42  MsgStream mlog(msgSvc(), "CombinedMuonFeatureConverter" );
43 
44  mlog << MSG::DEBUG << "CombinedMuonFeatureCnv::createTransient " << endmsg;
45 
46  CombinedMuonFeature *transObj(0);
47 
48  static const pool::Guid p1_guid( "7B8452AC-DDD8-42C5-85BD-D2CE183065A1" );
49  static const pool::Guid p0_guid( "9DFC54CA-4799-4BCB-A95B-919E7E761112" );
50 
51 
52  if( compareClassGuid( p1_guid ) ) {
53  std::unique_ptr< CombinedMuonFeature_tlp1 > ptr_tlp1( this->poolReadObject< CombinedMuonFeature_tlp1 >() );
54  transObj = m_TPConverter->createTransient( ptr_tlp1.get(), mlog );
55  }
56  else if( compareClassGuid(p0_guid) ) {
57  // old version from before TP separation, just return it
58  transObj = this->poolReadObject<CombinedMuonFeature>();
59  }
60  else {
61  throw std::runtime_error("Unsupported persistent version");
62  }
63  return transObj;
64 }
CombinedMuonFeatureCnv.h
CombinedMuonFeature_tlp1
Definition: CombinedMuonFeature_tlp1.h:17
CombinedMuonFeatureCnv_tlp1.h
CombinedMuonFeatureCnv_tlp1
Definition: CombinedMuonFeatureCnv_tlp1.h:31
CombinedMuonFeatureCnv::createTransient
virtual CombinedMuonFeature * createTransient()
Definition: CombinedMuonFeatureCnv.cxx:40
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
TopLevelTPConverter::createTransient
TRANS * createTransient(MsgStream &log)
Create transient representation of the persistent object known to this converter.
Definition: TopLevelTPConverter.h:62
python.InDetPriVxFinderConfig.mlog
mlog
Definition: InDetPriVxFinderConfig.py:134
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition: T_AthenaPoolCustomCnv.h:132
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CombinedMuonFeatureCnv::m_TPConverter
CombinedMuonFeatureCnv_tlp1 * m_TPConverter
Definition: CombinedMuonFeatureCnv.h:56
CombinedMuonFeature
Definition: CombinedMuonFeature.h:30
CombinedMuonFeatureCnv::~CombinedMuonFeatureCnv
~CombinedMuonFeatureCnv()
Definition: CombinedMuonFeatureCnv.cxx:16
DEBUG
#define DEBUG
Definition: page_access.h:11
CombinedMuonFeatureCnv::createPersistent
virtual CombinedMuonFeature_PERS * createPersistent(CombinedMuonFeature *transObj)
Definition: CombinedMuonFeatureCnv.cxx:26
TopLevelTPConverter::createPersistent
virtual TL_PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of transObj.
Definition: TopLevelTPConverter.h:110
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
CombinedMuonFeatureCnv::CombinedMuonFeatureCnv
CombinedMuonFeatureCnv(ISvcLocator *svcloc)
Definition: CombinedMuonFeatureCnv.cxx:9