ATLAS Offline Software
Loading...
Searching...
No Matches
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-2024 CERN for the benefit of the ATLAS collaboration.
4 */
11
12
13#ifndef ATHENABASECOMPS_ATHCONSTCONVERTER_H
14#define ATHENABASECOMPS_ATHCONSTCONVERTER_H
15
16
19#include "GaudiKernel/Converter.h"
20
21
33{
34public:
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 const std::string& name() const { return m_name; }
68
69
70private:
71 std::string m_name;
72};
73
74
75#endif // not ATHENABASECOMPS_ATHCONSTCONVERTER_H
uint32_t CLID
The Class ID type.
AthConstConverter(long storage_type, const CLID &class_type, ISvcLocator *svc, const std::string &name)
const std::string & name() const
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress) override final
Convert the transient object to the requested representation.
virtual StatusCode createObjConst(IOpaqueAddress *pAddress, DataObject *&refpObject) const
Create the transient representation of an object.
virtual StatusCode createObj(IOpaqueAddress *pAddress, DataObject *&refpObject) override final
Create the transient representation of an object.
virtual StatusCode createRepConst(DataObject *pObject, IOpaqueAddress *&refpAddress) const
Convert the transient object to the requested representation.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130