ATLAS Offline Software
RoIBResultCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 // Gaudi/Athena include(s):
7 #include "GaudiKernel/MsgStream.h"
8 
9 // Local include(s):
10 #include "RoIBResultCnv.h"
11 
17 
18  MsgStream log( this->msgSvc(), "RoIBResultCnv" );
19  return m_converter.createPersistent( transObj, log );
20 
21 }
22 
28 
29  static const pool::Guid p1_guid( "A9FF18A0-E5A2-4F24-82C7-605CAA9EA1F8" );
30  static const pool::Guid p0_guid( "E9F89B95-329A-4FF1-9110-4CE48D1D7176" );
31 
32  if( this->compareClassGuid( p1_guid ) ) {
33 
34  std::unique_ptr< RoIBResult_p1 > pers_ref( this->poolReadObject< RoIBResult_p1 >() );
35  MsgStream log( this->msgSvc(), "RoIBResultCnv" );
36  return m_converter.createTransient( pers_ref.get(), log );
37 
38  } else if( this->compareClassGuid( p0_guid ) ) {
39 
40  return this->poolReadObject< ROIB::RoIBResult >();
41 
42  }
43 
44  throw std::runtime_error( "Unsupported persistent version of ROIB::RoIBResult" );
45  return 0;
46 
47 }
ROIB::RoIBResult
Class holding the LVL1 RoIB result build by the RoIBuilder.
Definition: RoIBResult.h:47
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
RoIBResult_p1
Persistent representation of ROIB::RoIBResult.
Definition: RoIBResult_p1.h:30
RoIBResultCnv::m_converter
RoIBResultCnv_p1 m_converter
Definition: RoIBResultCnv.h:43
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
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
RoIBResultCnv.h
RoIBResultCnv::createPersistent
virtual RoIBResult_PERS * createPersistent(ROIB::RoIBResult *transObj)
Function creating a persistent RoIBResult_PERS object from a transient ROIB::RoIBResult one.
Definition: RoIBResultCnv.cxx:16
RoIBResultCnv::createTransient
virtual ROIB::RoIBResult * createTransient()
Function reading a version of RoIBResult from POOL and converting it to a transient ROIB::RoIBResult ...
Definition: RoIBResultCnv.cxx:27
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.