ATLAS Offline Software
MuCTPI_RDOCnv.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 "MuCTPI_RDOCnv.h"
11 
17 
18  MsgStream log( this->msgSvc(), "MuCTPI_RDOCnv" );
19  return m_converter.createPersistent( transObj, log );
20 
21 }
22 
28 
29  static const pool::Guid p1_guid( "406BC4C7-56B6-4956-A66A-B749BCD35009" );
30  static const pool::Guid p0_guid( "5BE3FA7E-CC70-4842-A095-CA046164764D" );
31 
32  if( this->compareClassGuid( p1_guid ) ) {
33 
34  std::unique_ptr< MuCTPI_RDO_p1 > pers_ref( this->poolReadObject< MuCTPI_RDO_p1 >() );
35  MsgStream log( this->msgSvc(), "MuCTPI_RDOCnv" );
36  return m_converter.createTransient( pers_ref.get(), log );
37 
38  } else if( this->compareClassGuid( p0_guid ) ) {
39 
40  return this->poolReadObject< MuCTPI_RDO >();
41 
42  }
43 
44  throw std::runtime_error( "Unsupported persistent version of MuCTPI_RDO" );
45  return 0;
46 
47 }
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
MuCTPI_RDOCnv::m_converter
MuCTPI_RDOCnv_p1 m_converter
Definition: MuCTPI_RDOCnv.h:42
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
MuCTPI_RDOCnv::createTransient
virtual MuCTPI_RDO * createTransient()
Function reading a version of MuCTPI_RDO from POOL and converting it to a transient MuCTPI_RDO object...
Definition: MuCTPI_RDOCnv.cxx:27
MuCTPI_RDOCnv::createPersistent
virtual MuCTPI_RDO_PERS * createPersistent(MuCTPI_RDO *transObj)
Function creating a persistent MuCTPI_RDO_PERS object from a transient MuCTPI_RDO one.
Definition: MuCTPI_RDOCnv.cxx:16
MuCTPI_RDO_p1
Persistent representation of MuCTPI_RDO.
Definition: MuCTPI_RDO_p1.h:26
MuCTPI_RDO
Class representing the readout data of the MuCTPI hardware and simulation.
Definition: MuCTPI_RDO.h:41
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuCTPI_RDOCnv.h
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.