ATLAS Offline Software
IsoMuonFeatureContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 
10 //createPersistent
12 {
13  MsgStream mlog(msgSvc(), "IsoMuonFeatureContainerConverter" );
14 
15  mlog << MSG::DEBUG << "IsoMuonFeatureContainerCnv::createPersistent called" << endmsg;
16 
18 
19  return p_cont;
20 
21 }//end of create persistent method
22 
23 //createTransient
25 {
26  MsgStream mlog(msgSvc(), "IsoMuonFeatureContainerConverter" );
27 
28  mlog << MSG::DEBUG << "IsoMuonFeatureContainerCnv::createTransient called" << endmsg;
29 
30  static const pool::Guid p3_guid( "291897DE-5380-424C-AE8F-FFE69DCC8F15" );
31  static const pool::Guid p2_guid( "A9A660B1-DEFD-4B56-A10D-9F41178715BD" );
32  static const pool::Guid tlp1_guid( "B9543660-E776-405D-8DB7-06AD06A24BAB" );
33  static const pool::Guid p0_guid( "3962B221-2A36-4160-AEE5-3BB6BC29BB46" );
34 
35  //IsoMuonFeatureContainer *p_collection = 0;
36  if( compareClassGuid( p3_guid ) ){
37  std::unique_ptr< IsoMuonFeatureContainer_p3 > col_vect( poolReadObject< IsoMuonFeatureContainer_p3 >() );
38  // std::cout << "Reading IMFC p3" << std::endl;
39  return m_converter.createTransient( col_vect.get(), mlog ) ;
40 
41  }else if( compareClassGuid( p2_guid ) ){
42  std::unique_ptr< IsoMuonFeatureContainer_p2 > col_vect( poolReadObject< IsoMuonFeatureContainer_p2 >() );
43  // std::cout << "Reading IMFC p2" << std::endl;
44  return m_converter2.createTransient( col_vect.get(), mlog ) ;
45 
46  }else if( compareClassGuid( tlp1_guid ) ){
47  std::unique_ptr< IsoMuonFeatureContainer_tlp1 > col_vect( poolReadObject< IsoMuonFeatureContainer_tlp1 >() );
48  // std::cout << "Reading IMFC tlp1" << std::endl;
49  return m_converter1.createTransient( col_vect.get(), mlog );
50 
51  }else if( compareClassGuid( p0_guid ) ){
52  return poolReadObject< IsoMuonFeatureContainer >();
53 
54  }else throw std::runtime_error( "Unsupported persistent version of IsoMuonFeatureContainer" );
55 
56 }//end of create transient method
57 
IsoMuonFeatureContainerCnv::createPersistent
virtual IsoMuonFeatureContainer_PERS * createPersistent(IsoMuonFeatureContainer *transObj)
Definition: IsoMuonFeatureContainerCnv.cxx:11
IsoMuonFeatureContainerCnv::m_converter2
IsoMuonFeatureContainerCnv_p2 m_converter2
Definition: IsoMuonFeatureContainerCnv.h:35
IsoMuonFeatureContainer_p3.h
IsoMuonFeatureContainerCnv::m_converter1
IsoMuonFeatureContainerCnv_tlp1 m_converter1
Definition: IsoMuonFeatureContainerCnv.h:34
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
IsoMuonFeatureContainer_tlp1.h
IsoMuonFeatureContainer
Definition: IsoMuonFeatureContainer.h:14
IsoMuonFeatureContainer_p2.h
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
IsoMuonFeatureContainerCnv.h
IsoMuonFeatureContainerCnv::createTransient
virtual IsoMuonFeatureContainer * createTransient()
Definition: IsoMuonFeatureContainerCnv.cxx:24
IsoMuonFeatureContainerCnv::m_converter
IsoMuonFeatureContainerCnv_p3 m_converter
Definition: IsoMuonFeatureContainerCnv.h:36
DEBUG
#define DEBUG
Definition: page_access.h:11
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
IsoMuonFeatureContainer_p3
Definition: IsoMuonFeatureContainer_p3.h:10