ATLAS Offline Software
MaterialStepCollectionCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // MaterialStepCollectionCnv.cxx, (c) ATLAS Detector software
8 
10 #include "GaudiKernel/MsgStream.h"
11 
12 
13 //-----------------------------------------------------------------------------
14 // Constructor
15 //-----------------------------------------------------------------------------
16 
19  m_msgSvc( msgSvc() )
20  {}
21 
24  const std::string& key)
25 {
26  MsgStream log (m_msgSvc, "MaterialStepCollectionCnv:" + key);
27  return m_TPConverter.createPersistent( transCont, log );
28 }
29 
30 
33 {
34  MsgStream log (m_msgSvc, "MaterialStepCollectionCnv:" + key);
35 
36  static const pool::Guid p1_guid( "DF8A7FA8-693F-44E0-A5E5-F9907B8B429E" );
37 
38  Trk::MaterialStepCollection* tCollection = nullptr;
39  if( compareClassGuid( p1_guid ) ) {
40 
41  std::unique_ptr< MaterialStepCollection_PERS > p_coll( poolReadObject< MaterialStepCollection_PERS >() );
42  tCollection = m_TPConverter.createTransient( p_coll.get(), log );
43  }
44 
45  return tCollection;
46 }
MaterialStepCollectionCnv.h
MaterialStepCollectionCnv::MaterialStepCollectionCnv
MaterialStepCollectionCnv(ISvcLocator *svcloc)
Definition: MaterialStepCollectionCnv.cxx:17
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
MaterialStepCollectionCnv::m_TPConverter
MaterialStepCollectionCnv_p1 m_TPConverter
Definition: MaterialStepCollectionCnv.h:49
T_AthenaPoolCustomCnvWithKey
This templated class extends T_AthenaPoolCustCnv to provide management of the persistent objects crea...
Definition: T_AthenaPoolCustomCnv.h:35
MaterialStepCollectionCnv::m_msgSvc
IMessageSvc * m_msgSvc
MsgStream svc.
Definition: MaterialStepCollectionCnv.h:48
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
MaterialStepCollectionCnv::createPersistentWithKey
virtual MaterialStepCollection_PERS * createPersistentWithKey(Trk::MaterialStepCollection *transCont, const std::string &key) override
Definition: MaterialStepCollectionCnv.cxx:23
Trk::MaterialStepCollection_p1
Definition: MaterialStepCollection_p1.h:18
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
MaterialStepCollectionCnv::createTransientWithKey
virtual Trk::MaterialStepCollection * createTransientWithKey(const std::string &key) override
method to be implemented by the developer.
Definition: MaterialStepCollectionCnv.cxx:32
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.
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37