ATLAS Offline Software
AthConstConverter.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
4  */
13 #ifndef ATHENABASECOMPS_ATHCONSTCONVERTER_H
14 #define ATHENABASECOMPS_ATHCONSTCONVERTER_H
15 
16 
19 #include "GaudiKernel/Converter.h"
20 
21 
33 {
34 public:
35  AthConstConverter (long storage_type,
36  const CLID& class_type,
37  ISvcLocator* svc,
38  const std::string& name)
39  : Converter (storage_type, class_type, svc),
40  AthMessaging (msgSvc().get(), name),
41  m_name (name)
42  {
43  }
44 
45 
47  virtual StatusCode createObjConst( IOpaqueAddress* pAddress,
48  DataObject*& refpObject ) const;
49 
51  virtual StatusCode createRepConst( DataObject* pObject,
52  IOpaqueAddress*& refpAddress ) const;
53 
54 
56  // Non-const version; just calls the const version.
57  virtual StatusCode createObj( IOpaqueAddress* pAddress,
58  DataObject*& refpObject ) override final;
59 
60 
62  // Non-const version; just calls the const version.
63  virtual StatusCode createRep( DataObject* pObject,
64  IOpaqueAddress*& refpAddress ) override final;
65 
66 
67  std::string name() const { return m_name; }
68 
69 
70 private:
71  std::string m_name;
72 };
73 
74 
75 #endif // not ATHENABASECOMPS_ATHCONSTCONVERTER_H
AthMsgStreamMacros.h
AthConstConverter::m_name
std::string m_name
Definition: AthConstConverter.h:71
AthConstConverter::AthConstConverter
AthConstConverter(long storage_type, const CLID &class_type, ISvcLocator *svc, const std::string &name)
Definition: AthConstConverter.h:35
AthConstConverter
Gaudi converter base class with const interfaces.
Definition: AthConstConverter.h:33
AthConstConverter::createRepConst
virtual StatusCode createRepConst(DataObject *pObject, IOpaqueAddress *&refpAddress) const
Convert the transient object to the requested representation.
Definition: AthConstConverter.cxx:32
AthConstConverter::createObj
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject) override final
Create the transient representation of an object.
Definition: AthConstConverter.cxx:44
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
AthConstConverter::createRep
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override final
Convert the transient object to the requested representation.
Definition: AthConstConverter.cxx:56
Converter
Definition: Converter.h:27
AthConstConverter::createObjConst
virtual StatusCode createObjConst(IOpaqueAddress *pAddress, DataObject *&refpObject) const
Create the transient representation of an object.
Definition: AthConstConverter.cxx:20
AthMessaging.h
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
AthConstConverter::name
std::string name() const
Definition: AthConstConverter.h:67