ATLAS Offline Software
ElementTableCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // ElementTableCnv.cxx, (c) ATLAS Detector software
8 
9 #include "ElementTableCnv.h"
10 #include "GaudiKernel/MsgStream.h"
11 
12 
13 //-----------------------------------------------------------------------------
14 // Constructor
15 //-----------------------------------------------------------------------------
16 
17 ElementTableCnv::ElementTableCnv( ISvcLocator *svcloc ) :
18  ElementTableCnvBase(svcloc),
19  m_msgSvc( msgSvc() )
20  {}
21 
22 
25  const std::string& key)
26 {
27  MsgStream log (m_msgSvc, "ElementTableCnv: " + key);
28 
29  // call to the converter
31 
32  return etPers;
33 
34 }//end of create persistent method
35 
36 
39 {
40  MsgStream log (m_msgSvc, "ElementTableCnv: " + key);
41 
42  static const pool::Guid p1_guid( "B157B642-94C0-11E3-B1C2-02163E00A511" );
43 
44  Trk::ElementTable* tCollection = nullptr;
45  if( compareClassGuid( p1_guid ) ) {
46 
47  std::unique_ptr< ElementTable_PERS > p_coll( poolReadObject< ElementTable_PERS >() );
48  tCollection = m_TPConverter.createTransient( p_coll.get(), log );
49  }
50 
51  return tCollection;
52 
53 }
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
ElementTableCnv::ElementTableCnv
ElementTableCnv(ISvcLocator *svcloc)
Definition: ElementTableCnv.cxx:17
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
T_AthenaPoolCustomCnvWithKey
This templated class extends T_AthenaPoolCustCnv to provide management of the persistent objects crea...
Definition: T_AthenaPoolCustomCnv.h:35
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
ElementTableCnv::m_TPConverter
ElementTableCnv_p1 m_TPConverter
Definition: ElementTableCnv.h:40
ElementTableCnv.h
Trk::ElementTable
Definition: ElementTable.h:24
ElementTableCnv::m_msgSvc
IMessageSvc * m_msgSvc
MsgStream svc.
Definition: ElementTableCnv.h:39
Trk::ElementTable_p1
Definition: ElementTable_p1.h:25
ElementTableCnv::createTransientWithKey
virtual Trk::ElementTable * createTransientWithKey(const std::string &key) override
method to be implemented by the developer.
Definition: ElementTableCnv.cxx:38
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.
ElementTableCnv::createPersistentWithKey
virtual ElementTable_PERS * createPersistentWithKey(Trk::ElementTable *transCont, const std::string &key) override
Definition: ElementTableCnv.cxx:24
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37