ATLAS Offline Software
Loading...
Searching...
No Matches
CTP_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 "CTP_RDOCnv.h"
11
17
18 MsgStream log( this->msgSvc(), "CTP_RDOCnv" );
19 return m_converter.createPersistent( transObj, log );
20
21}
22
28
29 static const pool::Guid p2_guid( "12717F15-E516-4ECD-BC07-82C72B524AD5" );
30 static const pool::Guid p1_guid( "5E6D3E52-952F-4144-BC68-83ACE605AA45" );
31 static const pool::Guid p0_guid( "56C714CC-DC17-4927-B413-9151C82792BB" );
32
33 if( this->compareClassGuid( p2_guid ) ) {
34
35 std::unique_ptr< CTP_RDO_p2 > pers_ref( this->poolReadObject< CTP_RDO_p2 >() );
36 MsgStream log( this->msgSvc(), "CTP_RDOCnv" );
37 return m_converter.createTransient( pers_ref.get(), log );
38
39 } else if( this->compareClassGuid( p1_guid ) ) {
40
41 std::unique_ptr< CTP_RDO_p1 > pers_ref( this->poolReadObject< CTP_RDO_p1 >() );
42 MsgStream log( this->msgSvc(), "CTP_RDOCnv" );
43 return m_converter_p1.createTransient( pers_ref.get(), log );
44
45 } else if( this->compareClassGuid( p0_guid ) ) {
46
47 return this->poolReadObject< CTP_RDO >();
48
49 }
50
51 throw std::runtime_error( "Unsupported persistent version of CTP_RDO" );
52 return 0;
53
54}
CTP_RDO_p2 CTP_RDO_PERS
Definition CTP_RDOCnv.h:22
virtual CTP_RDO * createTransient()
Function reading a version of CTP_RDO from POOL and converting it to a transient CTP_RDO object.
virtual CTP_RDO_PERS * createPersistent(CTP_RDO *transObj)
Function creating a persistent CTP_RDO_PERS object from a transient CTP_RDO one.
CTP_RDOCnv_p1 m_converter_p1
Definition CTP_RDOCnv.h:46
CTP_RDOCnv_p2 m_converter
Definition CTP_RDOCnv.h:45
virtual bool compareClassGuid(const Guid &clid) const