ATLAS Offline Software
TrigMuonClusterFeatureCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 //-----------------------------------------------------------------------------
9 // Create persistent
10 //-----------------------------------------------------------------------------
11 
14 {
15  MsgStream mlog(msgSvc(), "TrigMuonClusterFeatureConverter" );
16 
17  mlog << MSG::DEBUG << "TrigMuonClusterFeatureCnv::createPersistent" << endmsg;
18 
20 
21  return persObj;
22 }
23 
24 //-----------------------------------------------------------------------------
25 // Create transient
26 //-----------------------------------------------------------------------------
28 {
29  MsgStream mlog(msgSvc(), "TrigMuonClusterFeatureConverter" );
30 
31  mlog << MSG::DEBUG << "TrigMuonClusterFeatureCnv::createTransient " << endmsg;
32 
33  static const pool::Guid p1_guid("AE4D5D57-689D-40CB-83B3-CB047884952F");
34  static const pool::Guid p0_guid("A7B1865B-55D0-49D2-9778-5E0797FB06FE");
35 
36  if( compareClassGuid( p1_guid ) ) {
37  std::unique_ptr< TrigMuonClusterFeature_tlp1 > col_vect( poolReadObject< TrigMuonClusterFeature_tlp1 >() );
38  return m_converter.createTransient( col_vect.get(), mlog );
39  }
40  else if( compareClassGuid(p0_guid) ) {
41  // old version from before TP separation, just return it
42  return poolReadObject<TrigMuonClusterFeature>();
43  }
44  else {
45  throw std::runtime_error("Unsupported persistent version");
46  }
47 }
TrigMuonClusterFeature_tlp1.h
TrigMuonClusterFeatureCnv.h
TrigMuonClusterFeatureCnv::createTransient
virtual TrigMuonClusterFeature * createTransient()
Definition: TrigMuonClusterFeatureCnv.cxx:27
TrigMuonClusterFeatureCnv::m_converter
TrigMuonClusterFeatureCnv_tlp1 m_converter
Definition: TrigMuonClusterFeatureCnv.h:33
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
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigMuonClusterFeatureCnv::createPersistent
virtual TrigMuonClusterFeature_PERS * createPersistent(TrigMuonClusterFeature *transObj)
Definition: TrigMuonClusterFeatureCnv.cxx:13
TrigMuonClusterFeature
Definition: TrigMuonClusterFeature.h:35
DEBUG
#define DEBUG
Definition: page_access.h:11
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.
TrigMuonClusterFeature_tlp1
Definition: TrigMuonClusterFeature_tlp1.h:13