ATLAS Offline Software
MuonFeatureContainerCnv.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 //createPersistent
10 {
11  MsgStream mlog(msgSvc(), "MuonFeatureContainerConverter" );
12 
13  mlog << MSG::DEBUG << "MuonFeatureContainerCnv::createPersistent called" << endmsg;
14 
16 
17  return p_cont;
18 
19 }//end of create persistent method
20 
21 
22 //createTransient
24 {
25  MsgStream mlog(msgSvc(), "MuonFeatureContainerConverter" );
26 
27  mlog << MSG::DEBUG << "MuonFeatureContainerCnv::createTransient called" << endmsg;
28 
29  static const pool::Guid p3_guid( "5B571BCD-FE49-4C56-A357-1B535FE65829" );
30  static const pool::Guid tlp2_guid( "2F4ABBC8-EA77-487B-820F-76179BB3828C" );
31  static const pool::Guid tlp1_guid( "039BE61C-DE27-48B3-A2AE-7172BB755CEE" );
32  static const pool::Guid p0_guid( "45225F26-A517-4E8B-BA93-DDFD1217B9A8" );
33 
34  if( compareClassGuid( tlp1_guid ) )
35  {
36  std::unique_ptr< MuonFeatureContainer_tlp1 > col_vect( poolReadObject< MuonFeatureContainer_tlp1 >() );
37  // std::cout << "Reading MFC p1" << std::endl;
38  return m_converter1.createTransient( col_vect.get(), mlog ) ;
39  }
40  else if( compareClassGuid( tlp2_guid ) )
41  {
42  std::unique_ptr< MuonFeatureContainer_tlp2 > col_vect( poolReadObject< MuonFeatureContainer_tlp2 >() );
43  // std::cout << "Reading MFC p2" << std::endl;
44  return m_converter2.createTransient( col_vect.get(), mlog ) ;
45  }
46  else if( compareClassGuid( p3_guid ) )
47  {
48  std::unique_ptr< MuonFeatureContainer_p3 > col_vect( poolReadObject< MuonFeatureContainer_p3 >() );
49  // std::cout << "Reading MFC p3" << std::endl;
50  return m_converter.createTransient( col_vect.get(), mlog ) ;
51  }
52  else if( compareClassGuid( p0_guid ) )
53  {
54  return poolReadObject< MuonFeatureContainer >();
55  }
56  else throw std::runtime_error( "Unsupported persistent version of MuonFeatureContainer" );
57 
58 }//end of create transient method
59 
MuonFeatureContainerCnv::m_converter
MuonFeatureContainerCnv_p3 m_converter
Definition: MuonFeatureContainerCnv.h:33
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.
MuonFeatureContainerCnv::createPersistent
virtual MuonFeatureContainer_PERS * createPersistent(MuonFeatureContainer *transObj)
Definition: MuonFeatureContainerCnv.cxx:9
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
MuonFeatureContainer
Definition: MuonFeatureContainer.h:16
MuonFeatureContainerCnv::m_converter1
MuonFeatureContainerCnv_tlp1 m_converter1
Definition: MuonFeatureContainerCnv.h:31
MuonFeatureContainer_p3.h
MuonFeatureContainerCnv::createTransient
virtual MuonFeatureContainer * createTransient()
Definition: MuonFeatureContainerCnv.cxx:23
MuonFeatureContainer_p3
Definition: MuonFeatureContainer_p3.h:10
MuonFeatureContainerCnv.h
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.
MuonFeatureContainerCnv::m_converter2
MuonFeatureContainerCnv_tlp2 m_converter2
Definition: MuonFeatureContainerCnv.h:32