ATLAS Offline Software
TrigHisto2DContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
11  m_TPConverter (new TrigHisto2DContainerCnv_tlp1)
12 {
13 }
15 {
16  delete m_TPConverter;
17 }
18 
19 
20 //createPersistent
22 {
23  MsgStream mlog(msgSvc(), "TrigHisto2DContainerConverter" );
24 
25  mlog << MSG::DEBUG << "TrigHisto2DContainerCnv::createPersistent" << endmsg;
26 
28 
29  return persObj;
30 
31 }//end of create persistent method
32 
33 
34 //createTransient
36 {
37  MsgStream mlog(msgSvc(), "TrigHisto2DContainerConverter" );
38 
39  mlog << MSG::DEBUG << "TrigHisto2DContainerCnv::createTransient" << endmsg;
40 
41  static const pool::Guid tlp1_guid( "59C6A169-C537-4DEC-984D-41CE2544F96E" );
42  static const pool::Guid p1_guid( "C9FE79CB-6875-4E35-A1E3-23DFA6F94DFE" );
43  static const pool::Guid trans_guid( "E43A29FA-3BC9-4B08-9A94-735E1EC53951" );
44 
45  TrigHisto2DContainer *p_container = 0;
46 
47  if(compareClassGuid(tlp1_guid)) {
48  poolReadObject<TrigHisto2DContainer_PERS>(*m_TPConverter);
49  p_container = m_TPConverter->createTransient(mlog);
50  }
51  else if(compareClassGuid(p1_guid)) {
52  std::unique_ptr< TrigHisto2DContainer_p1 > col_vect( poolReadObject< TrigHisto2DContainer_p1 >() );
54  p_container = converter.createTransient( col_vect.get(), mlog );
55  }
56  else if(compareClassGuid(trans_guid)) {
57  p_container = poolReadObject<TrigHisto2DContainer>();
58  }
59  else {
60  throw std::runtime_error( "Unsupported persistent version of TrigHisto2DContainer" );
61  }
62 
63  return p_container;
64 
65 }//end of create transient method
66 
TrigHisto2DContainerCnv_p1
Definition: TrigHisto2DContainerCnv_p1.h:25
TrigHisto2DContainer_tlp1
Definition: TrigHisto2DContainer_tlp1.h:22
TrigHisto2DContainerCnv_tlp1
Definition: TrigHisto2DContainerCnv_tlp1.h:24
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
TrigHisto2DContainerCnv::~TrigHisto2DContainerCnv
~TrigHisto2DContainerCnv()
Definition: TrigHisto2DContainerCnv.cxx:14
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
TrigHisto2DContainer
Definition: Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigHisto2DContainer.h:20
TopLevelTPConverter::createTransient
TRANS * createTransient(MsgStream &log)
Create transient representation of the persistent object known to this converter.
Definition: TopLevelTPConverter.h:62
TrigHisto2DContainer_p1.h
python.InDetPriVxFinderConfig.mlog
mlog
Definition: InDetPriVxFinderConfig.py:134
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition: T_AthenaPoolCustomCnv.h:132
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigHisto2DContainerCnv_tlp1.h
TrigHisto2DContainerCnv::createPersistent
virtual TrigHisto2DContainer_PERS * createPersistent(TrigHisto2DContainer *transObj)
Definition: TrigHisto2DContainerCnv.cxx:21
TrigHisto2DContainerCnv.h
TrigHisto2DContainerCnv::createTransient
virtual TrigHisto2DContainer * createTransient()
Definition: TrigHisto2DContainerCnv.cxx:35
TrigHisto2DContainerCnv::TrigHisto2DContainerCnv
TrigHisto2DContainerCnv(ISvcLocator *svcloc)
Definition: TrigHisto2DContainerCnv.cxx:9
DEBUG
#define DEBUG
Definition: page_access.h:11
TopLevelTPConverter::createPersistent
virtual TL_PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of transObj.
Definition: TopLevelTPConverter.h:110
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigHisto2DContainerCnv::m_TPConverter
TrigHisto2DContainerCnv_tlp1 * m_TPConverter
Definition: TrigHisto2DContainerCnv.h:52