ATLAS Offline Software
UpdateHandle< T > Class Reference

a smart pointer to an object of a given type in an IProxyDict (such as StoreGateSvc). It d-casts and caches locally the pointed-at object, to speed-up subsequent accesses. It can be reset by the store for asynchronous updates (IOVSvc) More...

#include <UpdateHandle.h>

Collaboration diagram for UpdateHandle< T >:

Detailed Description

a smart pointer to an object of a given type in an IProxyDict (such as StoreGateSvc). It d-casts and caches locally the pointed-at object, to speed-up subsequent accesses. It can be reset by the store for asynchronous updates (IOVSvc)

IMPORTANT: UpdateHandle is not really compatible with running in multithreaded jobs. At a minimum, the payload class T must be fully thread-safe for simultaneous reads and writes (DataVector does not satisfy this). It's use will be reserved to a few special cases. If you think you need to use UpdateHandle, please consult with the core and reco groups first.

SG::UpdateHandle<T> can only access non-const proxies in StoreGate. A valid proxy must already exist in StoreGate.

Usage example:

class MyAlg : public AthAlgorithm
{
};
MyAlg::MyAlg(...) : ..., m_int("MyIntSgKey") {
declareProperty("IntHandle",
m_int = SG::UpdateHandle<int>("MyIntSgKey"),
"a handle to an int in StoreGate");
}
{
ATH_MSG_INFO("int value @[" << m_int.name() << "]="
<< *m_int);
*m_int = 10;
ATH_MSG_INFO("int value @[" << m_int.name() << "]="
<< *m_int);
return StatusCode::SUCCESS;
}

For more information have a look under the package Control/AthenaExamples/AthExHelloWorld


The documentation for this class was generated from the following file:
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgorithm
Definition: AthAlgorithm.h:47
SG::UpdateHandle
Definition: UpdateHandle.h:94