ATLAS Offline Software
Loading...
Searching...
No Matches
AthenaKernel/AthenaKernel/IProxyDict.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef ATHENAKERNEL_IPROXYDICT_H
8# define ATHENAKERNEL_IPROXYDICT_H
9
10// INCLUDES
11#include "SGCore/sgkey_t.h"
16#include "GaudiKernel/INamedInterface.h"
17#include "GaudiKernel/ClassID.h"
18#include <string>
19#include <vector>
20#include <memory>
21
22// DECLARATIONS
23namespace SG {
24 class DataProxy;
25}
26class DataObject;
27class IResetable;
28class IConverter;
29
30
45class IProxyDict : virtual public IStringPool, // not a Gaudi interface
46 virtual public extend_interfaces<IHiveStore, INamedInterface>
47{
48public:
50 virtual ~IProxyDict() override {}
51
59 virtual SG::DataProxy* proxy_exact (SG::sgkey_t sgkey) const = 0;
60
61
75 virtual SG::DataProxy* proxy(const CLID& id,
76 const std::string& key) const = 0;
77
78
85 virtual SG::DataProxy* proxy(const void* const pTransient) const=0;
86
87
91 virtual std::vector<const SG::DataProxy*> proxies() const = 0;
92
93
104 virtual StatusCode addToStore (CLID id, SG::DataProxy* proxy) = 0;
105
106
128 const std::string& key,
129 bool allowMods,
130 bool returnExisting) = 0;
131
132
138 virtual void boundHandle (IResetable* handle);
139
140
146 virtual void unboundHandle (IResetable* handle);
147
148
159 virtual bool tryELRemap (sgkey_t sgkey_in, size_t index_in,
160 sgkey_t& sgkey_out, size_t& index_out);
161
162
178 virtual StatusCode createObj (IConverter* cvt,
179 IOpaqueAddress* addr,
180 DataObject*& refpObject);
181
182
188 virtual IProxyDict* hiveProxyDict() override;
189
190
198 virtual SG::SourceID sourceID (const std::string& key = "EventSelector") const;
199};
200
201
202#endif // ATHENAKERNEL_IPROXYDICT_H
Type used to identify a metadata source.
Smart pointer to manage DataObject reference counts.
uint32_t CLID
The Class ID type.
Abstract interface for looking up strings/CLIDs in a pool.
virtual bool tryELRemap(sgkey_t sgkey_in, size_t index_in, sgkey_t &sgkey_out, size_t &index_out)
Test to see if the target of an ElementLink has moved.
virtual void boundHandle(IResetable *handle)
Tell the store that a handle has been bound to a proxy.
virtual SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting)=0
Record an object in the store.
DeclareInterfaceID(IProxyDict, 2, 0)
virtual IProxyDict * hiveProxyDict() override
Return the current event-slot-specific store.
virtual void unboundHandle(IResetable *handle)
Tell the store that a handle has been unbound from a proxy.
virtual StatusCode addToStore(CLID id, SG::DataProxy *proxy)=0
Add a new proxy to the store.
virtual SG::DataProxy * proxy(const CLID &id, const std::string &key) const =0
Get proxy with given id and key.
virtual std::vector< const SG::DataProxy * > proxies() const =0
Return the list of all current proxies in store.
virtual StatusCode createObj(IConverter *cvt, IOpaqueAddress *addr, DataObject *&refpObject)
Call converter to create an object, possibly with locking.
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const =0
Get proxy given a hashed key+clid.
virtual SG::DataProxy * proxy(const void *const pTransient) const =0
Get a proxy referencing a given transient object.
virtual SG::SourceID sourceID(const std::string &key="EventSelector") const
Return the metadata source ID for the current event slot.
a resetable object (e.g.
Definition IResetable.h:15
Abstract interface for looking up strings/CLIDs in a pool.
Definition IStringPool.h:28
SG::sgkey_t sgkey_t
Type of the keys.
Definition IStringPool.h:34
Forward declaration.
CxxUtils::RefCountedPtr< T > DataObjectSharedPtr
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition sgkey_t.h:32