ATLAS Offline Software
LVL1_ROICnv.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 "LVL1_ROICnv.h"
11 
12 static const LVL1_ROICnv_p1 TPConverter;
13 
15 
16  MsgStream log( this->msgSvc(), "LVL1_ROICnv" );
17  LVL1_ROI_PERS* persObj = TPConverter.createPersistentConst( transObj, log );
18  return persObj;
19 
20 }
21 
23 
24  static const pool::Guid p1_guid( "5FBA83E0-77DC-43DD-A511-E4F0A49882E0" );
25  static const pool::Guid p0_guid( "3E1829DE-9AA7-489C-AB81-406DF6CC544F" );
26 
27  if( this->compareClassGuid( p1_guid ) ) {
28 
29  std::unique_ptr< LVL1_ROI_p1 > pers_ref( this->poolReadObject< LVL1_ROI_p1 >() );
30  MsgStream log( this->msgSvc(), "LVL1_ROICnv" );
31  return TPConverter.createTransientConst( pers_ref.get(), log );
32 
33  } else if( this->compareClassGuid( p0_guid ) ) {
34 
35  return this->poolReadObject< LVL1_ROI >();
36 
37  }
38 
39  throw std::runtime_error( "Unsupported persistent version of LVL1_ROI" );
40  return 0;
41 
42 }
LVL1_ROI_p1
Persistent representation of LVL1_ROI.
Definition: LVL1_ROI_p1.h:31
LVL1_ROICnv::createPersistent
virtual LVL1_ROI_PERS * createPersistent(LVL1_ROI *transObj)
Definition: LVL1_ROICnv.cxx:14
LVL1_ROICnv::createTransient
virtual LVL1_ROI * createTransient()
Definition: LVL1_ROICnv.cxx:22
LVL1_ROICnv_p1
T/P converter for LVL1_ROI and LVL1_ROI_p1.
Definition: LVL1_ROICnv_p1.h:25
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
TPConverterConstBase::createPersistentConst
virtual PERS * createPersistentConst(const TRANS *transObj, MsgStream &log) const
LVL1_ROICnv.h
LVL1_ROI
Top level AOD object storing LVL1 RoIs.
Definition: LVL1_ROI.h:43
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.
TPConverterConstBase::createTransientConst
virtual TRANS * createTransientConst(const PERS *persObj, MsgStream &log) const