 |
ATLAS Offline Software
|
Go to the documentation of this file.
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);
90 virtual unsigned long addRef() override final;
94 virtual
unsigned long release() override final;
110 virtual
void setAddress(IOpaqueAddress* ioa) override final;
166 void reset (
bool hard = false);
257 std::unique_ptr<DataObject>
readData();
435 #include "SGTools/DataProxy.icc"
437 #endif // SGTOOLS_DATAPROXY
Interface for registering a transient object in t2p map.
std::vector< IResetable * > handleList_t
list of bound DataHandles
bool m_boundHandles
True if there are any bound handles.
StoreID::type storeID() const
check if it is a transient ID (primary or symLinked):
bool isConst() const
Check if it is a const object.
sgkey_t sgkey() const
< Get the primary (hashed) SG key.
singleton-like access to IMessageSvc via open function and helper
std::atomic< IProxyDict * > m_store
The store of which we are a part.
void resetBoundHandles(bool hard)
reset the bound DataHandles If HARD is true, then the bound objects should also clear any data that d...
CLIDCont_t transientID() const
virtual void registerTransient(void *p) override final
Register a transient object in a t2p map.
bool removeAlias(const std::string &key)
remove alias from proxy
std::recursive_mutex objMutex_t
Athena::IMessageSvcHolder m_ims
std::lock_guard< objMutex_t > objLock_t
DataObject * accessData()
Access DataObject on-demand using conversion service.
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...
bool isValid() const
called by destructor
IStringPool::sgkey_t sgkey_t
bool const RAWDATA *ch2 const
SG::sgkey_t sgkey_t
Type of the keys.
void lock(objLock_t &)
Lock the data object we're holding, if any.
virtual IDataProviderSvc * dataSvc() const override final
set DataSvc (Gaudi-specific); do nothing for us
void unbindHandle(IResetable *ir)
TransientAddress::TransientClidSet CLIDCont_t
void setProvider(IAddressProvider *provider, StoreID::type storeID)
Set the address provider.
void setStore(IProxyDict *store)
Set the store of which we're a part.
a resetable object (e.g. a SG DataHandle)
bool requestRelease(bool force, bool hard)
Reset/release a proxy at the end of an event.
virtual IOpaqueAddress * address() const override final
Retrieve IOpaqueAddress.
const EventContext & contextFromStore() const
Retrieve the EventContext saved in the owning store.
void setSGKey(sgkey_t sgkey)
Return the ID of the store containing this proxy.
Some weak symbol referencing magic...
std::atomic< DataObject * > m_dObject
AliasCont_t alias() const
access set of proxy aliases Returns a COPY of the alias set.
std::lock_guard< mutex_t > lock_t
interface for IOA providers
bool m_origConst
Was the proxy created as const?
std::atomic< bool > m_const
Is the proxy currently const?
defines an enum used by address providers to decide what kind of StoreGateSvc they are providing addr...
virtual const id_type & identifier() const override final
Retrieve data object key == string duplicated for Gaudi folks does same as name()
IProxyDict * store()
Return the store of which we're a part.
bool bindHandle(IResetable *ir)
uint32_t CLID
The Class ID type.
CLID clID() const
Retrieve clid.
virtual unsigned long release() override final
release reference to object
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.
virtual DataObject *object ATLAS_NOT_CONST_THREAD_SAFE() const override final
Retrieve DataObject.
virtual unsigned long addRef() override final
Add reference to object.
virtual const name_type & name() const override final
Retrieve data object key == string.
void resetRef()
Drop the reference to the data object.
void setAlias(const std::string &key)
Add a new proxy alias.
void setTransientID(CLID id)
Add a new transient ID.
IAddressProvider * provider()
Return the address provider.
int ir
counter of the current depth
bool isValidObject() const
is the object valid?
bool hasAlias(const std::string &key) const
Test to see if a given string is in the alias set.
void reset(bool hard=false)
Other methods of DataProxy (not in Interface IRegistry):
virtual void setAddress(IOpaqueAddress *ioa) override final
set an IOpaqueAddress
void resetOnly(const bool &flag)
set the reset only flag: Clear Store will reset and not delete.
DataObject * accessDataOol()
Out-of-line part of accessData().
Hold DataProxy instances associated with a store.
bool m_resetFlag
reset and not delete: default is true
void setConst()
Mark this object as const.
bool isValidAddress() const
is the address valid?
Interface for registering a transient object in t2p map.
enum ErrNo m_errno
errno-style error code for accessData
bool isResetOnly() const
Check reset only:
unsigned long refCount() const
return refCount
TransientAddress m_tAddress
Define macros for attributes used to control the static checker.
std::unique_ptr< DataObject > readData()
Read in a new copy of the object referenced by this proxy.
std::set< std::string > TransientAliasSet
TransientAddress::TransientAliasSet AliasCont_t
IConverter * m_dataLoader
std::recursive_mutex mutex_t
void setID(CLID id, const std::string &key)
Set the CLID / key.