ATLAS Offline Software
RingerRingsContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 // createPersistent
9  MsgStream mlog(msgSvc(), "RingerRingsContainerConverter");
10 
11  mlog << MSG::DEBUG << "RingerRingsContainerCnv::createPersistent called" << endmsg;
12 
13  RingerRingsContainer_PERS *p_RingerRingsCont = m_converter.createPersistent(transObj, mlog);
14 
15  return p_RingerRingsCont;
16 
17 }
18 
19 // createTransient
21 
22  MsgStream mlog(msgSvc(), "RingerRingsContainerConverter");
23 
24  mlog << MSG::DEBUG << "RingerRingsContainerCnv::createTransient called" << endmsg;
25 
26  static const pool::Guid p2_guid("30D29B68-6D41-429E-AC16-930ACF71280D");
27  static const pool::Guid tlp1_guid("B5587828-50D8-4DAA-97F3-5E41A7F3E3FE");
28 
29  if( compareClassGuid( p2_guid ) ){
30  std::unique_ptr< RingerRingsContainer_p2 > col_vect( poolReadObject< RingerRingsContainer_p2 >() );
31  // std::cout << "Reading IMFC p2" << std::endl;
32  return m_converter.createTransient( col_vect.get(), mlog ) ;
33  } else if (compareClassGuid(tlp1_guid)) {
34  std::unique_ptr< RingerRingsContainer_tlp1 > col_vect( poolReadObject< RingerRingsContainer_tlp1 >() );
35  // std::cout << "Reading IMFC tlp1" << std::endl;
36  return m_converter_tlp1.createTransient( col_vect.get(), mlog );
37  } else { throw std::runtime_error("Unsupported persistent version of RingerRingsContainer"); }
38 
39 }//end of create transient method
RingerRingsContainer_p2
Definition: RingerRingsContainer_p2.h:11
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.
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
RingerRingsContainerCnv::m_converter_tlp1
RingerRingsContainerCnv_tlp1 m_converter_tlp1
Definition: RingerRingsContainerCnv.h:35
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
RingerRingsContainerCnv.h
RingerRingsContainer
Definition: RingerRingsContainer.h:13
DEBUG
#define DEBUG
Definition: page_access.h:11
RingerRingsContainerCnv::createPersistent
virtual RingerRingsContainer_PERS * createPersistent(RingerRingsContainer *transObj)
Definition: RingerRingsContainerCnv.cxx:8
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
RingerRingsContainerCnv::createTransient
virtual RingerRingsContainer * createTransient()
Definition: RingerRingsContainerCnv.cxx:20
RingerRingsContainerCnv::m_converter
RingerRingsContainerCnv_p2 m_converter
Definition: RingerRingsContainerCnv.h:36