ATLAS Offline Software
TrigHisto1DContainerCnv.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 TrigHisto1DContainerCnv_tlp1)
12 {
13 }
14 
16 {
17  delete m_TPConverter;
18 }
19 
20 
21 //createPersistent
23 {
24  MsgStream mlog(msgSvc(), "TrigHisto1DContainerConverter" );
25 
26  mlog << MSG::DEBUG << "TrigHisto1DContainerCnv::createPersistent" << endmsg;
27 
29 
30  return persObj;
31 
32 }//end of create persistent method
33 
34 
35 //createTransient
37 {
38  MsgStream mlog(msgSvc(), "TrigHisto1DContainerConverter" );
39 
40  mlog << MSG::DEBUG << "TrigHisto1DContainerCnv::createTransient" << endmsg;
41 
42  static const pool::Guid tlp1_guid( "CDC70E22-85DF-45B4-B69E-FC7FD70987A9" );
43  static const pool::Guid p1_guid( "B6240954-1842-45F5-AB5B-50934C633B1E" );
44  static const pool::Guid trans_guid( "B5752F0C-EF7A-4330-8413-1CCF0FC58AC8" );
45 
46  TrigHisto1DContainer *p_container = 0;
47 
48  if(compareClassGuid(tlp1_guid)) {
49  poolReadObject<TrigHisto1DContainer_PERS>(*m_TPConverter);
50  p_container = m_TPConverter->createTransient(mlog);
51  }
52  else if(compareClassGuid(p1_guid)) {
53  std::unique_ptr< TrigHisto1DContainer_p1 > col_vect( poolReadObject< TrigHisto1DContainer_p1 >() );
55  p_container = converter.createTransient( col_vect.get(), mlog );
56  }
57  else if(compareClassGuid(trans_guid)) {
58  p_container = poolReadObject<TrigHisto1DContainer>();
59  }
60  else {
61  throw std::runtime_error( "Unsupported persistent version of TrigHisto1DContainer" );
62  }
63 
64  return p_container;
65 
66 }//end of create transient method
67 
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
TrigHisto1DContainerCnv_tlp1.h
TrigHisto1DContainerCnv::createPersistent
virtual TrigHisto1DContainer_PERS * createPersistent(TrigHisto1DContainer *transObj)
Definition: TrigHisto1DContainerCnv.cxx:22
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
TopLevelTPConverter::createTransient
TRANS * createTransient(MsgStream &log)
Create transient representation of the persistent object known to this converter.
Definition: TopLevelTPConverter.h:62
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
TrigHisto1DContainerCnv_p1
Definition: TrigHisto1DContainerCnv_p1.h:25
TrigHisto1DContainerCnv::m_TPConverter
TrigHisto1DContainerCnv_tlp1 * m_TPConverter
Definition: TrigHisto1DContainerCnv.h:52
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigHisto1DContainerCnv::createTransient
virtual TrigHisto1DContainer * createTransient()
Definition: TrigHisto1DContainerCnv.cxx:36
TrigHisto1DContainerCnv_tlp1
Definition: TrigHisto1DContainerCnv_tlp1.h:24
TrigHisto1DContainerCnv::~TrigHisto1DContainerCnv
~TrigHisto1DContainerCnv()
Definition: TrigHisto1DContainerCnv.cxx:15
TrigHisto1DContainer
Definition: TrigHisto1DContainer.h:20
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigHisto1DContainer_tlp1
Definition: TrigHisto1DContainer_tlp1.h:22
TrigHisto1DContainerCnv::TrigHisto1DContainerCnv
TrigHisto1DContainerCnv(ISvcLocator *svcloc)
Definition: TrigHisto1DContainerCnv.cxx:9
TopLevelTPConverter::createPersistent
virtual TL_PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of transObj.
Definition: TopLevelTPConverter.h:110
TrigHisto1DContainerCnv.h
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigHisto1DContainer_p1.h