7#ifndef SGTOOLS_DATAPROXY_H
8#define SGTOOLS_DATAPROXY_H
18#include "GaudiKernel/IRegistry.h"
19#include "GaudiKernel/ClassID.h"
20#include "GaudiKernel/EventContext.h"
64 IConverter* pDataLoader,
65 bool constFlag=
false,
bool resetOnly=
true);
68 DataProxy(std::unique_ptr<TransientAddress> tAddr,
69 IConverter* pDataLoader,
70 bool constFlag=
false,
bool resetOnly=
true);
73 IConverter* pDataLoader,
74 bool constFlag=
false,
bool resetOnly=
true);
79 bool constFlag=
false,
bool resetOnly=
true);
83 bool constFlag=
false,
bool resetOnly=
true);
91 virtual unsigned long addRef() override final;
94 virtual
unsigned long release() override final;
110 virtual
void setAddress(IOpaqueAddress* ioa) override final;
169 void reset (
bool hard = false);
186 void setObject(DataObject* obj,
bool doreg = true);
438#include "SGTools/DataProxy.icc"
uint32_t CLID
The Class ID type.
Interface for registering a transient object in t2p map.
Define macros for attributes used to control the static checker.
Hold DataProxy instances associated with a store.
interface for IOA providers
SG::sgkey_t sgkey_t
Type of the keys.
CLID clID() const
Retrieve clid.
void resetBoundHandles(bool hard)
reset the bound DataHandles If HARD is true, then the bound objects should also clear any data that d...
std::lock_guard< objMutex_t > objLock_t
void setTransientID(CLID id)
Add a new transient ID.
std::recursive_mutex objMutex_t
virtual const name_type & name() const override final
Retrieve data object key == string.
virtual DataObject *object ATLAS_NOT_CONST_THREAD_SAFE() const override final
Retrieve DataObject.
AliasCont_t alias() const
access set of proxy aliases Returns a COPY of the alias set.
std::vector< IResetable * > handleList_t
list of bound DataHandles
IConverter * m_dataLoader
void setID(CLID id, const std::string &key)
Set the CLID / key.
bool transientID(CLID id) const
return the list of transient IDs (primary or symLinked):
std::recursive_mutex mutex_t
void setConst()
Mark this object as const.
friend class SG::DataStore
For access to requestRelease.
DataObject * accessDataOol()
Out-of-line part of accessData().
bool requestRelease(bool force, bool hard)
Reset/release a proxy at the end of an event.
virtual void setAddress(IOpaqueAddress *ioa) override final
set an IOpaqueAddress
std::unique_ptr< DataObject > readData()
Read in a new copy of the object referenced by this proxy.
bool m_resetFlag
reset and not delete: default is true
bool removeAlias(const std::string &key)
remove alias from proxy
IStringPool::sgkey_t sgkey_t
bool m_boundHandles
True if there are any bound handles.
virtual void registerTransient(void *p) override final
Register a transient object in a t2p map.
virtual IOpaqueAddress * address() const override final
Retrieve IOpaqueAddress.
std::vector< std::string > AliasCont_t
virtual unsigned long release() override final
release reference to object
sgkey_t sgkey() const
< Get the primary (hashed) SG key.
bool isResetOnly() const
Check reset only:
void reset(bool hard=false)
Other methods of DataProxy (not in Interface IRegistry):
bool isValid() const
called by destructor
void lock(objLock_t &)
Lock the data object we're holding, if any.
void setProvider(IAddressProvider *provider, StoreID::type storeID)
Set the address provider.
void setObject(DataObject *obj, bool doreg=true)
set DataObject If doreg is true, then call setRegistry to set the backpointer from obj to the proxt.
IProxyDict * store()
Return the store of which we're a part.
void setAlias(const std::string &key)
Add a new proxy alias.
bool isValidAddress() const
is the address valid?
void resetRef()
Drop the reference to the data object.
enum ErrNo m_errno
errno-style error code for accessData
TransientAddress m_tAddress
IAddressProvider * provider()
Return the address provider.
void resetOnly(const bool &flag)
set the reset only flag: Clear Store will reset and not delete.
bool isConst() const
Check if it is a const object.
DataObject * accessData()
Access DataObject on-demand using conversion service.
std::atomic< IProxyDict * > m_store
The store of which we are a part.
Athena::IMessageSvcHolder m_ims
std::atomic< DataObject * > m_dObject
TransientAddress::TransientClidSet CLIDCont_t
void unbindHandle(IResetable *ir)
std::atomic< bool > m_const
Is the proxy currently const?
StoreID::type storeID() const
check if it is a transient ID (primary or symLinked):
unsigned long refCount() const
return refCount
virtual const id_type & identifier() const override final
Retrieve data object key == string duplicated for Gaudi folks does same as name()
bool m_origConst
Was the proxy created as const?
bool bindHandle(IResetable *ir)
void setSGKey(sgkey_t sgkey)
Return the ID of the store containing this proxy.
const EventContext & contextFromStore() const
Retrieve the EventContext saved in the owning store.
void setStore(IProxyDict *store)
Set the store of which we're a part.
bool hasAlias(const std::string &key) const
Test to see if a given string is in the alias set.
std::lock_guard< mutex_t > lock_t
bool isValidObject() const
is the object valid?
virtual IDataProviderSvc * dataSvc() const override final
set DataSvc (Gaudi-specific); do nothing for us
virtual unsigned long addRef() override final
Add reference to object.
Interface for registering a transient object in t2p map.
std::vector< CLID > TransientClidSet
Strictly a set, but there shouldn't be more than a handful of entries, so store it as a sorted vector...
defines an enum used by address providers to decide what kind of StoreGateSvc they are providing addr...
int ir
counter of the current depth
singleton-like access to IMessageSvc via open function and helper
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....