ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
SG::ReadHandle< T > Class Template Reference

#include <ReadHandle.h>

Inheritance diagram for SG::ReadHandle< T >:
Collaboration diagram for SG::ReadHandle< T >:

Public Types

typedef T * pointer_type
 
typedef const T * const_pointer_type
 
typedef T & reference_type
 
typedef const T & const_reference_type
 

Public Member Functions

 ReadHandle ()
 Default constructor. More...
 
 ReadHandle (const std::string &sgkey, const std::string &storename=StoreID::storeName(StoreID::EVENT_STORE))
 Constructor with full arguments. More...
 
 ReadHandle (const ReadHandleKey< T > &key)
 Constructor from a ReadHandleKey. More...
 
 ReadHandle (const ReadHandleKey< T > &key, const EventContext &ctx)
 Constructor from a ReadHandleKey and an explicit event context. More...
 
 ReadHandle (SG::DataProxy *proxy)
 Constructor from a DataProxy. More...
 
 ReadHandle (const ReadHandle &rhs)
 Copy constructor. More...
 
 ReadHandle (ReadHandle &&rhs)
 Move constructor. More...
 
ReadHandleoperator= (const ReadHandle &rhs)
 Assignment operator. More...
 
ReadHandleoperator= (ReadHandle &&rhs)
 Move operator. More...
 
const_pointer_type operator-> ()
 Dereference the pointer. More...
 
const_reference_type operator* ()
 Dereference the pointer. More...
 
const_pointer_type cptr ()
 Dereference the pointer. More...
 
const_pointer_type ptr ()
 Dereference the pointer. More...
 
const_pointer_type cachedPtr () const
 Return the cached pointer directly; no lookup. More...
 
virtual bool isValid () override final
 Can the handle be successfully dereferenced? More...
 
const_pointer_type get () const
 Dereference the pointer, but don't cache anything. More...
 
const_pointer_type get (const EventContext &ctx) const
 Dereference the pointer, but don't cache anything. More...
 
StatusCode alias (const WriteHandleKey< T > &key)
 Make an alias. More...
 
virtual const std::string & key () const override final
 Return the StoreGate ID for the referenced object. More...
 
const std::string & name () const
 Return the StoreGate ID for the referenced object. More...
 
std::string store () const
 Return the name of the store holding the object we are proxying. More...
 
bool isPresent () const
 Is the referenced object present in SG? More...
 
bool isInitialized () const
 Has a proxy been retrieved from SG? More...
 
virtual bool isSet () const override final
 Has a proxy been retrieved from SG? More...
 
bool isConst () const
 True if this handle has a proxy, and the proxy is const. More...
 
StatusCode initialize (bool used=true)
 Verify that the handle has been configured properly. More...
 
StatusCode setState ()
 Retrieve and cache all information managed by a handle. More...
 
virtual StatusCode setProxyDict (IProxyDict *store)
 Explicitly set the event store. More...
 
virtual void reset (bool hard) override
 Reset this handle. More...
 
virtual void finalReset () override final
 Reset this handle at the end of processing. More...
 
StatusCode setConst ()
 Set the 'const' bit for the bound proxy in the store. More...
 
CLID clid () const
 Return the class ID for the referenced object. More...
 
const ServiceHandle< IProxyDict > & storeHandle () const
 Return handle to the referenced store. More...
 
Gaudi::DataHandle::Mode mode () const
 Return the mode (read/write/update) for this handle. More...
 
const std::string & objKey () const
 Return the key string of the underlying DataObjID. More...
 
const DataObjID & fullKey () const
 Return the key as a DataObjID. More...
 
SG::VarHandleKeyvhKey ()
 Return a non-const reference to the HandleKey. More...
 
StatusCode assign (const std::string &sgkey)
 Update the underlying key from a string. More...
 

Protected Member Functions

 ReadHandle (const VarHandleKey &key, const EventContext *ctx)
 Protected constructor used by WriteDecorHandle. More...
 
StatusCode setState (SG::DataProxy *proxy)
 Set the state of the handle to a given proxy. More...
 
StatusCode setState (IProxyDict *store, const std::string &name)
 Set the state of a handle from a store and a key name. More...
 
StatusCode record_impl (std::unique_ptr< DataObject > dobj, void *dataPtr, bool allowMods, bool returnExisting)
 Helper to record an object in the event store. More...
 
const void * put_impl (const EventContext *ctx, std::unique_ptr< DataObject > dobj, const void *dataPtr, bool allowMods, bool returnExisting, IProxyDict *&store) const
 Helper to record an object in the event store. More...
 
void * typeless_dataPointer_impl (bool quiet)
 Retrieve an object from StoreGate. More...
 
void * typeless_dataPointer (bool quiet=defaultQuiet)
 Retrieve an object from StoreGate. More...
 
const void * typeless_cptr ()
 Retrieve an object from StoreGate as a const pointer. More...
 
void * typeless_ptr (bool quiet=defaultQuiet)
 Retrieve an object from StoreGate as non-const pointer. More...
 
const void * get_impl (const EventContext *ctx, bool quiet=defaultQuiet) const
 
StatusCode symLink_impl (CLID newClid, const std::string &newKey)
 Make a symlink or alias to the object currently referenced by this handle. More...
 
bool isPresent_impl (const std::string &key) const
 Is the referenced object present in SG? More...
 

Protected Attributes

void * m_ptr
 The object to which we are bound. More...
 
SG::DataProxym_proxy
 Proxy holding the object to which we are bound. More...
 
IProxyDictm_store
 Pointer to the store that owns the object. More...
 
bool m_storeWasSet
 True if the store was set explicitly via setProxyDict. More...
 

Private Member Functions

const_pointer_type checkedCPtr ()
 Helper: dereference the pointer. More...
 
IProxyDictstoreFromHandle (const EventContext *ctx) const
 Return the store instance to use. More...
 
bool setStoreFromHandle (const EventContext *ctx)
 Initialize the store pointer from the store handle. More...
 
void resetProxy ()
 Clear the m_proxy field and release the old proxy. More...
 
void setProxy (SG::DataProxy *proxy)
 Set a new proxy. More...
 
void * typeless_dataPointer_fromProxy (SG::DataProxy *proxy, bool quiet) const
 Retrieve a pointer from a proxy. More...
 

Private Attributes

std::unique_ptr< VarHandleKeym_ownedKey
 An owned VarHandleKey. More...
 
const VarHandleKeym_key
 The associated key object. More...
 

Detailed Description

template<class T>
class SG::ReadHandle< T >

Definition at line 68 of file StoreGate/StoreGate/ReadHandle.h.

Member Typedef Documentation

◆ const_pointer_type

template<class T >
typedef const T* SG::ReadHandle< T >::const_pointer_type

Definition at line 73 of file StoreGate/StoreGate/ReadHandle.h.

◆ const_reference_type

template<class T >
typedef const T& SG::ReadHandle< T >::const_reference_type

Definition at line 75 of file StoreGate/StoreGate/ReadHandle.h.

◆ pointer_type

template<class T >
typedef T* SG::ReadHandle< T >::pointer_type

Definition at line 72 of file StoreGate/StoreGate/ReadHandle.h.

◆ reference_type

template<class T >
typedef T& SG::ReadHandle< T >::reference_type

Definition at line 74 of file StoreGate/StoreGate/ReadHandle.h.

Constructor & Destructor Documentation

◆ ReadHandle() [1/8]

template<class T >
SG::ReadHandle< T >::ReadHandle ( )

Default constructor.

The handle will not be usable until a non-blank key is assigned.

◆ ReadHandle() [2/8]

template<class T >
SG::ReadHandle< T >::ReadHandle ( const std::string &  sgkey,
const std::string &  storename = StoreID::storeName(StoreID::EVENT_STORE) 
)
explicit

Constructor with full arguments.

Parameters
sgkeyStoreGate key of the referenced object.
storenameName of the referenced event store.

◆ ReadHandle() [3/8]

template<class T >
SG::ReadHandle< T >::ReadHandle ( const ReadHandleKey< T > &  key)
explicit

Constructor from a ReadHandleKey.

Parameters
keyThe key object holding the clid/key/store.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

◆ ReadHandle() [4/8]

template<class T >
SG::ReadHandle< T >::ReadHandle ( const ReadHandleKey< T > &  key,
const EventContext &  ctx 
)
explicit

Constructor from a ReadHandleKey and an explicit event context.

Parameters
keyThe key object holding the clid/key.
ctxThe event context.

This will raise an exception if the StoreGate key is blank, or if the event store cannot be found.

If the default event store has been requested, then the thread-specific store from the event context will be used.

◆ ReadHandle() [5/8]

template<class T >
SG::ReadHandle< T >::ReadHandle ( SG::DataProxy proxy)
explicit

Constructor from a DataProxy.

Parameters
proxyThe proxy to which to bind.
modeMode of this handle (read/write/update).

This handle will be bound to the given proxy.

◆ ReadHandle() [6/8]

template<class T >
SG::ReadHandle< T >::ReadHandle ( const ReadHandle< T > &  rhs)

Copy constructor.

◆ ReadHandle() [7/8]

template<class T >
SG::ReadHandle< T >::ReadHandle ( ReadHandle< T > &&  rhs)

Move constructor.

◆ ReadHandle() [8/8]

template<class T >
SG::ReadHandle< T >::ReadHandle ( const VarHandleKey key,
const EventContext *  ctx 
)
explicitprotected

Protected constructor used by WriteDecorHandle.

Parameters
keyThe key object holding the clid/key.
ctxThe event context, or nullptr to use the global default.

Member Function Documentation

◆ alias()

template<class T >
StatusCode SG::ReadHandle< T >::alias ( const WriteHandleKey< T > &  key)

Make an alias.

Parameters
keyAlternate key by which the referenced object should be known.

The current handle should be valid and referencing an object.

The object will also be known by the name given in key.

◆ assign()

StatusCode SG::VarHandleBase::assign ( const std::string &  sgkey)
inherited

Update the underlying key from a string.

If this handle was initialized from a HandleKey, then this doesn't work (since the HandleKey is const). ExcNonConstHandleKey will be thrown in that case.

See VarHandleKey::assign.

Definition at line 642 of file StoreGate/src/VarHandleBase.cxx.

643  {
644  return vhKey().assign (sgkey);
645  }

◆ cachedPtr()

template<class T >
const_pointer_type SG::ReadHandle< T >::cachedPtr ( ) const

Return the cached pointer directly; no lookup.

◆ checkedCPtr()

template<class T >
const_pointer_type SG::ReadHandle< T >::checkedCPtr ( )
private

Helper: dereference the pointer.

Throws ExcNullReadHandle on failure.

◆ clid()

CLID SG::VarHandleBase::clid ( ) const
inherited

Return the class ID for the referenced object.

◆ cptr()

template<class T >
const_pointer_type SG::ReadHandle< T >::cptr ( )

Dereference the pointer.

Returns nullptr on failure.

◆ finalReset()

void SG::VarHandleBase::finalReset ( )
finaloverridevirtualinherited

Reset this handle at the end of processing.

hard If true, anything depending on the event store is cleared.

Same as reset(true);

Reimplemented from IResetable.

Definition at line 595 of file StoreGate/src/VarHandleBase.cxx.

595  {
596 #ifdef DEBUG_VHB
597  dbg::print(stderr, "::VHB::finalReset {} with proxy={}, key={}, store={}\n", dbg::ptr(this), dbg::proxy(m_proxy), this->key(), dbg::store(this->m_store));
598 #endif
599  reset (true);
600  }

◆ fullKey()

const DataObjID& SG::VarHandleBase::fullKey ( ) const
inherited

Return the key as a DataObjID.

◆ get() [1/2]

template<class T >
const_pointer_type SG::ReadHandle< T >::get ( ) const

Dereference the pointer, but don't cache anything.

◆ get() [2/2]

template<class T >
const_pointer_type SG::ReadHandle< T >::get ( const EventContext &  ctx) const

Dereference the pointer, but don't cache anything.

Parameters
ctxThe event context to use.

◆ get_impl()

const void * SG::VarHandleBase::get_impl ( const EventContext *  ctx,
bool  quiet = defaultQuiet 
) const
protectedinherited

Definition at line 876 of file StoreGate/src/VarHandleBase.cxx.

878  {
879  if (this->mode() != Gaudi::DataHandle::Reader) {
880  if (!quiet)
881  REPORT_ERROR (StatusCode::FAILURE)
882  << "get_impl called for a non-read handle.";
883  return nullptr;
884  }
885 
886  if (this->key().empty()) {
887  if (!quiet)
888  REPORT_ERROR (StatusCode::FAILURE)
889  << "Cannot initialize a Read/Write/Update handle with a null key.";
890  return nullptr;
891  }
892 
894  if (!store) {
895  if (!quiet)
896  REPORT_ERROR (StatusCode::FAILURE) << "No store.";
897  return nullptr;
898  }
899 
900  SG::DataProxy* proxy = store->proxy_exact(m_key->hashedKey());
901  if (!proxy) {
902  proxy = store->proxy(this->clid(), this->key());
903  if (!proxy) {
904  if (!quiet)
905  REPORT_ERROR (StatusCode::FAILURE)
906  << "Cannot find proxy for "
907  << this->clid() << "/" << this->key();
908  return nullptr;
909  }
910  }
911 
912  return typeless_dataPointer_fromProxy (proxy, quiet);
913  }

◆ initialize()

StatusCode SG::VarHandleBase::initialize ( bool  used = true)
inherited

Verify that the handle has been configured properly.

Parameters
usedIf false, then this handle is not to be used. Instead of normal initialization, the key will be cleared.

This will return failure if the key is blank or if the event store cannot be found.

Definition at line 452 of file StoreGate/src/VarHandleBase.cxx.

453  {
454  if (!used) {
455  if (m_ownedKey) {
456  CHECK( m_ownedKey->initialize (used) );
457  }
458  return StatusCode::SUCCESS;
459  }
460 
461  if (!m_store) {
462  if (m_ownedKey) {
463  CHECK( m_ownedKey->initialize() );
464  }
465  m_store = &*(this->storeHandle());
466  m_storeWasSet = false;
467  }
468 
469  if (!m_store) {
470  return StatusCode::FAILURE;
471  }
472 
473  return StatusCode::SUCCESS;
474  }

◆ isConst()

bool SG::VarHandleBase::isConst ( ) const
inherited

True if this handle has a proxy, and the proxy is const.

Refers to the state of the proxy, not of the handle.

Definition at line 432 of file StoreGate/src/VarHandleBase.cxx.

433  {
434 #ifdef DEBUG_VHB
435  dbg::print(stderr, "::VHB::isConst({}, proxy={}) const\n", dbg::ptr(this), dbg::proxy(m_proxy));
436 #endif
437  return 0 != m_proxy
438  ? m_proxy->isConst()
439  : false;
440  }

◆ isInitialized()

bool SG::VarHandleBase::isInitialized ( ) const
inherited

Has a proxy been retrieved from SG?

(Weaker test than isValid, but does not touch the disk.)

Definition at line 406 of file StoreGate/src/VarHandleBase.cxx.

407  {
408 #ifdef DEBUG_VHB
409  dbg::print(stderr, "::VHB::isInitialized({}, proxy={}) const\n", dbg::ptr(this), dbg::proxy(m_proxy));
410 #endif
411  return (0 != m_proxy);
412  }

◆ isPresent()

bool SG::VarHandleBase::isPresent ( ) const
inherited

Is the referenced object present in SG?

Const method; the handle does not change as a result of this.

Definition at line 394 of file StoreGate/src/VarHandleBase.cxx.

395  {
396  return isPresent_impl (key());
397  }

◆ isPresent_impl()

bool SG::VarHandleBase::isPresent_impl ( const std::string &  key) const
protectedinherited

Is the referenced object present in SG?

Parameters
keySG key to test.

Const method; the handle does not change as a result of this.

Definition at line 1101 of file StoreGate/src/VarHandleBase.cxx.

1102  {
1103  const DataProxy* proxy = m_proxy;
1104  if (!proxy) {
1105  const IProxyDict* store = m_store;
1106  if (!store)
1107  store = this->storeHandle().get();
1108  if (store)
1109  proxy = store->proxy(this->clid(), key);
1110  }
1111  if (proxy) {
1112  return proxy->isValid();
1113  }
1114  return false;
1115  }

◆ isSet()

bool SG::VarHandleBase::isSet ( ) const
finaloverridevirtualinherited

Has a proxy been retrieved from SG?

Same as isInitialized; this is an interface required by IResetable.

Implements IResetable.

Definition at line 420 of file StoreGate/src/VarHandleBase.cxx.

421  {
422  return isInitialized();
423  }

◆ isValid()

template<class T >
virtual bool SG::ReadHandle< T >::isValid ( )
finaloverridevirtual

Can the handle be successfully dereferenced?

Implements SG::VarHandleBase.

◆ key()

const std::string & SG::VarHandleBase::key ( ) const
finaloverridevirtualinherited

Return the StoreGate ID for the referenced object.

This is defined in VarHandleKey. We need to redefine it here because it's also in IResetable. (Otherwise there would be an ambiguity.)

Implements IResetable.

Definition at line 64 of file AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx.

65  {
66  return m_key->key();
67  }

◆ mode()

Gaudi::DataHandle::Mode SG::VarHandleBase::mode ( ) const
inherited

Return the mode (read/write/update) for this handle.

◆ name()

const std::string & SG::VarHandleBase::name ( ) const
inherited

Return the StoreGate ID for the referenced object.

A synonym for key().

Definition at line 75 of file AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx.

76  {
77  return this->key();
78  }

◆ objKey()

const std::string& SG::VarHandleBase::objKey ( ) const
inherited

Return the key string of the underlying DataObjID.

Compared to key(), this will be prefixed with the store name.

◆ operator*()

template<class T >
const_reference_type SG::ReadHandle< T >::operator* ( )

Dereference the pointer.

Throws ExcNullReadHandle on failure.

◆ operator->()

template<class T >
const_pointer_type SG::ReadHandle< T >::operator-> ( )

Dereference the pointer.

Throws ExcNullReadHandle on failure.

◆ operator=() [1/2]

template<class T >
ReadHandle& SG::ReadHandle< T >::operator= ( const ReadHandle< T > &  rhs)

Assignment operator.

◆ operator=() [2/2]

template<class T >
ReadHandle& SG::ReadHandle< T >::operator= ( ReadHandle< T > &&  rhs)

Move operator.

◆ ptr()

template<class T >
const_pointer_type SG::ReadHandle< T >::ptr ( )

Dereference the pointer.

Returns nullptr on failure.

◆ put_impl()

const void * SG::VarHandleBase::put_impl ( const EventContext *  ctx,
std::unique_ptr< DataObject >  dobj,
const void *  dataPtr,
bool  allowMods,
bool  returnExisting,
IProxyDict *&  store 
) const
protectedinherited

Helper to record an object in the event store.

Unlike record, put does not change the handle and does not cache the pointer in the handle.

Parameters
ctxThe event context, or nullptr to use the current context.
dobjThe wrapped data object (DataBucket) to record.
dataPtrPointer to the transient object itself.
allowModsIf false, record the object as const.
returnExistingAllow an existing object.
[out]storeThe store being used.

Returns the object placed in the store, or nullptr if there was an error. If there was already an object in the store with the given key, then return null, unless returnExisting is true, in which case return success. In either case, dobj is destroyed.

Definition at line 782 of file StoreGate/src/VarHandleBase.cxx.

788  {
789  if (this->name().empty()) {
790  REPORT_ERROR (StatusCode::FAILURE) << "Attempt to record an object with a null key";
791  return nullptr;
792  }
793 
794  store = storeFromHandle (ctx);
795  if (!store) {
796  REPORT_ERROR (StatusCode::FAILURE) << "No store.";
797  return nullptr;
798  }
799 
800  SG::DataObjectSharedPtr<DataObject> sptr (std::move (dobj));
801  unsigned int initRefCount = sptr->refCount();
802  SG::DataProxy* new_proxy =
803  store->recordObject (sptr, this->name(), allowMods, returnExisting);
804  if (!new_proxy) {
805  REPORT_ERROR (StatusCode::FAILURE) << "recordObject failed";
806  return nullptr;
807  }
808 
809  if (new_proxy && initRefCount == sptr->refCount() && new_proxy->isValid()) {
810  // If the reference count hasn't changed, then we've returned an existing
811  // object rather than recording a new one. Retrieve the pointer.
812  dataPtr = typeless_dataPointer_fromProxy (new_proxy, true);
813  }
814 
815  return dataPtr;
816  }

◆ record_impl()

StatusCode SG::VarHandleBase::record_impl ( std::unique_ptr< DataObject >  dobj,
void *  dataPtr,
bool  allowMods,
bool  returnExisting 
)
protectedinherited

Helper to record an object in the event store.

Parameters
Thewrapped data object (DataBucket) to record.
dataPtrPointer to the transient object itself.
allowModsIf false, record the object as const.
returnExistingAllow an existing object.

If there is already an existing object with our key, then return failure, unless returnExisting is true, in which case return success. In either case, dobj is destroyed.

Definition at line 713 of file StoreGate/src/VarHandleBase.cxx.

717  {
718  if (!m_store) {
719  if (m_ownedKey) {
720  CHECK (m_ownedKey->initialize());
721  }
722  m_store = &*(this->storeHandle());
723  m_storeWasSet = false;
724  }
725 
726  if (this->name().empty()) {
727  REPORT_ERROR (StatusCode::FAILURE) << "Attempt to record an object with a null key";
728  return StatusCode::FAILURE;
729  }
730 
731  SG::DataObjectSharedPtr<DataObject> sptr (dobj.release());
732  unsigned int initRefCount = sptr->refCount();
733  SG::DataProxy* new_proxy =
734  m_store->recordObject (sptr, this->name(), allowMods, returnExisting);
735  if (!new_proxy) {
736  REPORT_ERROR (StatusCode::FAILURE) << "recordObject failed";
737  resetProxy();
738  return StatusCode::FAILURE;
739  }
740  if (m_proxy != new_proxy) {
741  CHECK (this->setState (new_proxy));
742  }
743 
744  if (new_proxy && initRefCount == sptr->refCount() && new_proxy->isValid()) {
745  // If the reference count hasn't changed, then we've returned an existing
746  // object rather than recording a new one. Retrieve the pointer, making
747  // sure that it isn't const.
748  if (m_proxy->isConst()) {
749  REPORT_ERROR (StatusCode::FAILURE)
750  << "Found an existing const object from recordOrRetrieve.";
751  return StatusCode::FAILURE;
752  }
754  if (!allowMods)
755  CHECK( setConst() );
756  }
757  else
758  m_ptr=(void*)dataPtr;
759 
760  return StatusCode::SUCCESS;
761  }

◆ reset()

void SG::VarHandleBase::reset ( bool  hard)
overridevirtualinherited

Reset this handle.

Parameters
hardIf true, anything depending on the event store is cleared.

If the handle stays associated with a given event store, then hard=false. In that case, we clear the cached pointer; the proxy is also dropped if it is reset only. If hard=true, then we always drop the proxy and in addition clear the cached pointer to the event store.

Implements IResetable.

Reimplemented in SG::UpdateHandle< T >.

Definition at line 570 of file StoreGate/src/VarHandleBase.cxx.

570  {
571 #ifdef DEBUG_VHB
572  dbg::print(stderr, "::VHB::reset {} with proxy={}, key={}, store={} (hard={})\n", dbg::ptr(this), dbg::proxy(m_proxy), this->key(), dbg::store(this->m_store), hard);
573 #endif
574  m_ptr = 0;
575 
576  if (hard) {
577  m_store = 0;
578  m_storeWasSet = false;
579  }
580 
581  //if the proxy is not resetOnly then release it as it will become invalid
582  // Also release on a hard reset.
583  if (0 != m_proxy && (!m_proxy->isResetOnly() || hard)) {
584  resetProxy();
585  }
586  }

◆ resetProxy()

void SG::VarHandleBase::resetProxy ( )
privateinherited

Clear the m_proxy field and release the old proxy.

Definition at line 1004 of file StoreGate/src/VarHandleBase.cxx.

1005  {
1006  if (m_proxy) {
1007  if (m_ownedKey) {
1008  m_proxy->unbindHandle(this);
1009  m_proxy->release();
1010  }
1011  m_proxy = nullptr;
1012  }
1013  }

◆ setConst()

StatusCode SG::VarHandleBase::setConst ( )
inherited

Set the 'const' bit for the bound proxy in the store.

Definition at line 606 of file StoreGate/src/VarHandleBase.cxx.

607  {
608  if (typeless_dataPointer()) {
609  m_proxy->setConst();
610  return StatusCode::SUCCESS;
611  }
612  return StatusCode::FAILURE;
613  }

◆ setProxy()

void SG::VarHandleBase::setProxy ( SG::DataProxy proxy)
privateinherited

Set a new proxy.

Release any old one first.

Parameters
proxyThe new proxy.

Definition at line 1020 of file StoreGate/src/VarHandleBase.cxx.

1021  {
1022  resetProxy();
1023  if (proxy) {
1024  if (m_ownedKey) {
1025  proxy->addRef();
1026  proxy->bindHandle (this);
1027  }
1028  m_proxy = proxy;
1029  }
1030  }

◆ setProxyDict()

StatusCode SG::VarHandleBase::setProxyDict ( IProxyDict store)
virtualinherited

Explicitly set the event store.

Parameters
storeThe new event store.

This implicitly does a reset().

Reimplemented in SG::WriteDecorHandle< DataVector, int >, SG::WriteDecorHandle< DataVector, float >, SG::WriteDecorHandle< DataVector, std::vector< float > >, SG::WriteDecorHandle< DataVector, std::vector< int > >, SG::WriteDecorHandle< DataVector, std::vector< bool > >, and SG::WriteDecorHandle< DataVector, uint32_t >.

Definition at line 551 of file StoreGate/src/VarHandleBase.cxx.

552  {
553  reset(true);
554  m_store = store;
555  m_storeWasSet = true;
556  return StatusCode::SUCCESS;
557  }

◆ setState() [1/3]

StatusCode SG::VarHandleBase::setState ( )
inherited

Retrieve and cache all information managed by a handle.

This will retrieve and cache the associated DataProxy.

Note for the case of a WriteHandle that has not yet been written to, the proxy may not exist. We return Success in that case; however, isInitialized will still return false.

Definition at line 487 of file StoreGate/src/VarHandleBase.cxx.

488  {
489  CHECK( initialize() );
490  if (!m_storeWasSet) {
491  IProxyDict* store = storeFromHandle (nullptr);
492  if (store) m_store = store;
493  }
494 
495 #ifdef DEBUG_VHB
496  dbg::print(stderr, "::VHB:: setState() on {} with key={} ({}) and store={} (CLID: {})\n", dbg::ptr(this), this->key(), m_key->hashedKey(), dbg::store(m_store), this->clid());
497 #endif
498 
500  if (!proxy) {
501 #ifdef DEBUG_VHB
502  dbg::print(stderr, "::VHB:: setState() on {} ==> null proxy!\n", dbg::ptr(this));
503 #endif
504  proxy = m_store->proxy(this->clid(), this->key());
505  }
506 
507  if (!proxy) {
508 #ifdef DEBUG_VHB
509  dbg::print(stderr, "::VHB:: setState() on {} ==> STILL null proxy!\n", dbg::ptr(this));
510 #endif
511  }
512  else if (!proxy->isValid()) {
513 #ifdef DEBUG_VHB
514  dbg::print(stderr, "::VHB:: setState() on {} ==> proxy not valid! Dumping Store\n", dbg::ptr(this));
515  if (!m_store) {
516  dbg::print(stderr, "::VHB:: setState() on {} ==> m_store is a nullptr\n", dbg::ptr(this));
517  }
518  else {
519  SGImplSvc* stor = dynamic_cast<SGImplSvc*>(m_store);
520  if (!stor) {
521  dbg::print(stderr, "::VHB:: setState() on {} ==> m_store points not to an SGImplSvc but to a {}\n", dbg::ptr(this), boost::core::demangle(typeid(*m_store).name()));
522  }
523  else {
524  dbg::print(stderr, "\n{}\n", stor->dump());
525  }
526  }
527 #endif
528  }
529  StatusCode sc = this->setState(proxy);
530 
531  // Failure to find the proxy is ok in the case of a @c WriteHandle
532  // that has not yet been written to.
533  if (sc.isFailure() && mode() == Gaudi::DataHandle::Writer && m_ptr == nullptr)
534  return StatusCode::SUCCESS;
535 
536  return sc;
537  }

◆ setState() [2/3]

StatusCode SG::VarHandleBase::setState ( IProxyDict store,
const std::string &  key 
)
protectedinherited

Set the state of a handle from a store and a key name.

Parameters
storeThe event store to access.
nameThe StoreGate key to search for.

Fails if no such object is recorded.

Parameters
storeThe event store to access.
nameThe StoreGate key to search for.

Definition at line 686 of file StoreGate/src/VarHandleBase.cxx.

687  {
688  if (0 == store) {
689  return StatusCode::FAILURE;
690  }
691 #ifdef DEBUG_VHB
692  dbg::print(stderr, "::VHB::setState({}, store={}, key={}) const\n", dbg::ptr(this), dbg::store(store), key);
693 #endif
694  CLID cid = this->clid();
695  SG::DataProxy* proxy = store->proxy(cid, key);
696  // std::cerr << "::VHB:: -- clid=[" << cid << "] proxy=[" << proxy << "]\n";
697  return this->setState(proxy);
698  }

◆ setState() [3/3]

StatusCode SG::VarHandleBase::setState ( SG::DataProxy proxy)
protectedinherited

Set the state of the handle to a given proxy.

Parameters
proxyThe proxy to set.

The proxy must be valid; otherwise FAILURE will be returned.

Definition at line 660 of file StoreGate/src/VarHandleBase.cxx.

661  {
662 #ifdef DEBUG_VHB
663  dbg::print(stderr, "::VHB::setState({}, proxy={}) const\n", dbg::ptr(this), dbg::proxy(proxy));
664 #endif
665  if (0 == proxy || !proxy->isValid()) {
666  return StatusCode::FAILURE;
667  }
668 
669  if (m_proxy != proxy) {
670  // We're changing proxies. Release the old and bind to the new.
671  setProxy (proxy);
672  // Clear cached pointer.
673  m_ptr=0;
674  }
675 
676  return StatusCode::SUCCESS;
677  }

◆ setStoreFromHandle()

bool SG::VarHandleBase::setStoreFromHandle ( const EventContext *  ctx)
privateinherited

Initialize the store pointer from the store handle.

Also checks that the key is valid.

Parameters
ctxThe current event context, or nullptr.

Returns true on success.

Definition at line 987 of file StoreGate/src/VarHandleBase.cxx.

988  {
989  if (m_ownedKey) {
990  if (m_ownedKey->initialize().isFailure()) {
991  return false;
992  }
993  }
994  m_store = storeFromHandle (ctx);
995  m_storeWasSet = (ctx && m_store ==
996  Atlas::getExtendedEventContext(*ctx).proxy());
997  return true;
998  }

◆ store()

std::string SG::VarHandleBase::store ( ) const
inherited

Return the name of the store holding the object we are proxying.

Definition at line 376 of file StoreGate/src/VarHandleBase.cxx.

377  {
378  if (m_store)
379  return m_store->name();
380  return this->storeHandle().name();
381  }

◆ storeFromHandle()

IProxyDict * SG::VarHandleBase::storeFromHandle ( const EventContext *  ctx) const
privateinherited

Return the store instance to use.

Parameters
ctxThe current event context, or nullptr.
ctxThe current event context, or nullptr.

If we're referencing the default event store, pick the specific store to use in this order:

  • Store associated with an explicitly-provided context.
  • A store explicitly set via setProxyDict.
  • Store associated with the current context.

For another store:

  • A store explicitly set via setProxyDict.
  • The store retrieved from the handle, resolved to the current slot if it's a hive store.

Definition at line 957 of file StoreGate/src/VarHandleBase.cxx.

958  {
959  if (m_key->isEventStore()) {
960  if (ctx)
961  return Atlas::getExtendedEventContext(*ctx).proxy();
962  if (m_storeWasSet && m_store) return m_store;
963 
964  if ( Atlas::hasExtendedEventContext (Gaudi::Hive::currentContext()) ) {
965  return Atlas::getExtendedEventContext (Gaudi::Hive::currentContext()).proxy();
966  } else {
967  return nullptr;
968  }
969  }
970 
971  if (m_storeWasSet && m_store) return m_store;
973  if (!store)
974  store = &*this->storeHandle();
975 
976  return store->hiveProxyDict();
977  }

◆ storeHandle()

const ServiceHandle<IProxyDict>& SG::VarHandleBase::storeHandle ( ) const
inherited

Return handle to the referenced store.

◆ symLink_impl()

StatusCode SG::VarHandleBase::symLink_impl ( CLID  newClid,
const std::string &  newKey 
)
protectedinherited

Make a symlink or alias to the object currently referenced by this handle.

Parameters
newClidCLID of link.
newKeySG key of link.

If newClid matches the existing clid, then make an alias. If newKey matches the existing key, then make a symlink. If neither match, it's an error.

Definition at line 926 of file StoreGate/src/VarHandleBase.cxx.

928  {
929  if (!m_ptr || !m_store) {
930  REPORT_ERROR (StatusCode::FAILURE) << "symlink: Handle not valid.";
931  return StatusCode::FAILURE;
932  }
933 
934  SG::DataObjectSharedPtr<DataObject> obj (new SymlinkDataObject (newClid, m_ptr));
935  SG::DataProxy* prox = m_store->recordObject (obj, newKey, false, true);
936  if (!prox)
937  return StatusCode::FAILURE;
938  return StatusCode::SUCCESS;
939  }

◆ typeless_cptr()

const void* SG::VarHandleBase::typeless_cptr ( )
protectedinherited

Retrieve an object from StoreGate as a const pointer.

Same as typeless_dataPointer with the return value converted to const.

◆ typeless_dataPointer()

void* SG::VarHandleBase::typeless_dataPointer ( bool  quiet = defaultQuiet)
protectedinherited

Retrieve an object from StoreGate.

Parameters
quietIf true, suppress failure messages.

Inline method: first check cached pointer, then call the _impl method.

◆ typeless_dataPointer_fromProxy()

void * SG::VarHandleBase::typeless_dataPointer_fromProxy ( SG::DataProxy proxy,
bool  quiet 
) const
privateinherited

Retrieve a pointer from a proxy.

Parameters
proxyThe proxy object.
quietIf true, suppress failure messages.

Warning — doesn't enforce const rules; the caller must do that.

Definition at line 1041 of file StoreGate/src/VarHandleBase.cxx.

1043  {
1044  if (!proxy || !proxy->isValid()) {
1045  // invalid proxy
1046  if (!quiet) {
1047  REPORT_MESSAGE(MSG::WARNING)
1048  << "Proxy "
1049  << " [" << (proxy != 0 ? proxy->clID() : 0)
1050  << "/" << (proxy != 0
1051  ? proxy->name()
1052  : std::string("<N/A>"))
1053  << "] is in an invalid state";
1054  } //quiet
1055  return nullptr;
1056  }
1057 
1058  DataObject* dobj = proxy->accessData();
1059  if (!dobj) {
1060  // invalid dobj
1061  if (!quiet) {
1062  REPORT_MESSAGE(MSG::WARNING)
1063  << "this proxy " << MSG::hex << proxy
1064  << MSG::dec << " has a NULL data object ptr";
1065  }
1066  return nullptr;
1067  }
1068 
1069  const CLID clid = this->clid();
1070  void* ptr = SG::Storable_cast(dobj, clid, proxy);
1071  if (ptr)
1072  return ptr;
1073 
1074  // If ptr is null, probably the clid we gave wasn't the clid
1075  // the object was stored with, nor it inherits from it.
1076  // before giving up, let's check its transient CLIDs
1077  DataBucketBase *dbb = 0;
1078  if (proxy->transientID(clid) &&
1079  0 != (dbb = dynamic_cast<DataBucketBase*>(dobj))) {
1080  // it is a symlink after all.
1081  // Let's hard cast (and keep our fingers Xed)
1082  ptr = static_cast<void*>(dbb->object());
1083  } else {
1084  if (!quiet) {
1085  REPORT_MESSAGE(MSG::WARNING)
1086  << "Request for an invalid object; requested CLID = "
1087  << clid
1088  << ", proxy primary ID is " << proxy->clID();
1089  }
1090  } // try symlink -- endif
1091  return ptr;
1092  }

◆ typeless_dataPointer_impl()

void * SG::VarHandleBase::typeless_dataPointer_impl ( bool  quiet)
protectedinherited

Retrieve an object from StoreGate.

Parameters
quietIf true, suppress failure messages.

Definition at line 824 of file StoreGate/src/VarHandleBase.cxx.

825  {
826 #ifdef DEBUG_VHB
827  dbg::print(stderr, "::VHB::typeless_dataPointer_impl({}, ptr={}, proxy={}, key={}, store={})\n", dbg::ptr(this), dbg::ptr(this->m_ptr), dbg::proxy(this->m_proxy), this->key(), dbg::store(this->m_store));
828 #endif
829 
830  // First check for cached pointer.
831  if (0 != m_ptr)
832  return m_ptr;
833 
834  if (0 == m_proxy) {
835  // No proxy, need to look it up.
836  if (this->setState().isFailure() || !m_proxy) {
837  if (!quiet) {
838  REPORT_MESSAGE(MSG::WARNING)
839  << "could not get proxy for key " << key();
840  if (this->mode() != Gaudi::DataHandle::Reader) {
841  REPORT_MESSAGE(MSG::WARNING)<< " try using a ReadHandle";
842  }
843  } //quiet
844  return 0;
845  } //setstate
846  } //m_proxy
847 
849  return m_ptr;
850  }

◆ typeless_ptr()

void * SG::VarHandleBase::typeless_ptr ( bool  quiet = defaultQuiet)
protectedinherited

Retrieve an object from StoreGate as non-const pointer.

Calls typeless_dataPointer, then raises an exception if the proxy is marked as const.

Definition at line 859 of file StoreGate/src/VarHandleBase.cxx.

860  {
861  void* p = typeless_dataPointer(quiet);
862  if (p != nullptr && isConst())
863  throw SG::ExcConstObject (clid(), key(), store());
864  return p;
865  }

◆ vhKey()

SG::VarHandleKey & SG::VarHandleBase::vhKey ( )
inherited

Return a non-const reference to the HandleKey.

If this handle was initialized from a HandleKey, then this doesn't work (since the HandleKey is const). ExcNonConstHandleKey will be thrown in that case.

Definition at line 623 of file StoreGate/src/VarHandleBase.cxx.

624  {
625  if (!m_ownedKey) {
627  m_key->storeHandle().name());
628  }
629  return *m_ownedKey;
630  }

Member Data Documentation

◆ m_key

const VarHandleKey* SG::VarHandleBase::m_key
privateinherited

The associated key object.

If we were initialized from a key object, then this points at that. Otherwise, it points at the same object as m_ownedKey.

Definition at line 523 of file StoreGate/StoreGate/VarHandleBase.h.

◆ m_ownedKey

std::unique_ptr<VarHandleKey> SG::VarHandleBase::m_ownedKey
privateinherited

An owned VarHandleKey.

This is set in the case where a VarHandle is not initialized from a key object.

Definition at line 518 of file StoreGate/StoreGate/VarHandleBase.h.

◆ m_proxy

SG::DataProxy* SG::VarHandleBase::m_proxy
protectedinherited

Proxy holding the object to which we are bound.

Definition at line 505 of file StoreGate/StoreGate/VarHandleBase.h.

◆ m_ptr

void* SG::VarHandleBase::m_ptr
protectedinherited

The object to which we are bound.

Definition at line 502 of file StoreGate/StoreGate/VarHandleBase.h.

◆ m_store

IProxyDict* SG::VarHandleBase::m_store
protectedinherited

Pointer to the store that owns the object.

Definition at line 508 of file StoreGate/StoreGate/VarHandleBase.h.

◆ m_storeWasSet

bool SG::VarHandleBase::m_storeWasSet
protectedinherited

True if the store was set explicitly via setProxyDict.

Definition at line 511 of file StoreGate/StoreGate/VarHandleBase.h.


The documentation for this class was generated from the following file:
used
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:71
common.sgkey
def sgkey(tool)
Definition: common.py:1028
REPORT_ERROR
#define REPORT_ERROR(SC)
Report an error.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:355
IProxyDict::proxy
virtual SG::DataProxy * proxy(const CLID &id, const std::string &key) const =0
Get proxy with given id and key.
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
SG::DataProxy::isConst
bool isConst() const
Check if it is a const object.
SG::VarHandleBase::storeFromHandle
IProxyDict * storeFromHandle(const EventContext *ctx) const
Return the store instance to use.
Definition: StoreGate/src/VarHandleBase.cxx:957
SG::VarHandleBase::m_ownedKey
std::unique_ptr< VarHandleKey > m_ownedKey
An owned VarHandleKey.
Definition: StoreGate/StoreGate/VarHandleBase.h:518
SG::VarHandleBase::typeless_dataPointer
void * typeless_dataPointer(bool quiet=defaultQuiet)
Retrieve an object from StoreGate.
DataBucketBase
A non-templated base class for DataBucket, allows to access the transient object address as a void*.
Definition: DataBucketBase.h:24
quiet
bool quiet
Definition: TrigGlobEffCorrValidation.cxx:190
SG::VarHandleKey::storeHandle
const ServiceHandle< IProxyDict > & storeHandle() const
Return handle to the referenced store.
SG::VarHandleBase::name
const std::string & name() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:75
SG::VarHandleBase::setState
StatusCode setState()
Retrieve and cache all information managed by a handle.
Definition: StoreGate/src/VarHandleBase.cxx:487
DataBucketBase::object
virtual void * object()=0
SG::VarHandleBase::clid
CLID clid() const
Return the class ID for the referenced object.
SG::VarHandleBase::typeless_dataPointer_impl
void * typeless_dataPointer_impl(bool quiet)
Retrieve an object from StoreGate.
Definition: StoreGate/src/VarHandleBase.cxx:824
Atlas::hasExtendedEventContext
bool hasExtendedEventContext(const EventContext &ctx)
Test whether a context object has an extended context installed.
Definition: ExtendedEventContext.cxx:23
get_generator_info.stderr
stderr
Definition: get_generator_info.py:40
SG::DataProxy::isValid
bool isValid() const
called by destructor
StoreGateSvc::clid
CLID clid(const TKEY &key) const
Retrieve the main CLID of the object recorded in StoreGate with the given "key" WARNING: slow!
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
IProxyDict
A proxy dictionary.
Definition: AthenaKernel/AthenaKernel/IProxyDict.h:47
SG::VarHandleBase::setConst
StatusCode setConst()
Set the 'const' bit for the bound proxy in the store.
Definition: StoreGate/src/VarHandleBase.cxx:606
SG::DataProxy::unbindHandle
void unbindHandle(IResetable *ir)
Definition: DataProxy.cxx:293
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Atlas::getExtendedEventContext
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
Definition: ExtendedEventContext.cxx:32
IProxyDict::proxy_exact
virtual SG::DataProxy * proxy_exact(SG::sgkey_t sgkey) const =0
Get proxy given a hashed key+clid.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
SG::VarHandleBase::resetProxy
void resetProxy()
Clear the m_proxy field and release the old proxy.
Definition: StoreGate/src/VarHandleBase.cxx:1004
SG::VarHandleKey::assign
virtual StatusCode assign(const std::string &sgkey)
Change the key of the object to which we're referring.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:88
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::VarHandleBase::m_key
const VarHandleKey * m_key
The associated key object.
Definition: StoreGate/StoreGate/VarHandleBase.h:523
SG::VarHandleBase::store
std::string store() const
Return the name of the store holding the object we are proxying.
Definition: StoreGate/src/VarHandleBase.cxx:376
DataProxy
DataProxy provides the registry services for StoreGate.
Definition: DataProxy.h:31
LHEF::Reader
Pythia8::Reader Reader
Definition: Prophecy4fMerger.cxx:11
SG::VarHandleKey::isEventStore
bool isEventStore() const
Does this key reference the primary event store?
SGImplSvc
The Athena Transient Store API.
Definition: SGImplSvc.h:112
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
SG::VarHandleBase::m_proxy
SG::DataProxy * m_proxy
Proxy holding the object to which we are bound.
Definition: StoreGate/StoreGate/VarHandleBase.h:505
SG::ExcConstObject
Exception — Tried to retrieve non-const pointer to const object.
Definition: Control/StoreGate/StoreGate/exceptions.h:134
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SG::VarHandleBase::isInitialized
bool isInitialized() const
Has a proxy been retrieved from SG?
Definition: StoreGate/src/VarHandleBase.cxx:406
SG::DataProxy::release
virtual unsigned long release() override final
release reference to object
Definition: DataProxy.cxx:320
SGImplSvc::dump
std::string dump() const
dump objects in store.
Definition: SGImplSvc.cxx:557
SG::VarHandleBase::mode
Gaudi::DataHandle::Mode mode() const
Return the mode (read/write/update) for this handle.
SG::VarHandleBase::isPresent_impl
bool isPresent_impl(const std::string &key) const
Is the referenced object present in SG?
Definition: StoreGate/src/VarHandleBase.cxx:1101
SG::VarHandleBase::reset
virtual void reset(bool hard) override
Reset this handle.
Definition: StoreGate/src/VarHandleBase.cxx:570
SG::VarHandleBase::typeless_dataPointer_fromProxy
void * typeless_dataPointer_fromProxy(SG::DataProxy *proxy, bool quiet) const
Retrieve a pointer from a proxy.
Definition: StoreGate/src/VarHandleBase.cxx:1041
SG::VarHandleKey::clid
CLID clid() const
Return the class ID for the referenced object.
Definition: StoreGate/src/VarHandleKey.cxx:177
SG::VarHandleBase::key
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:64
REPORT_MESSAGE
#define REPORT_MESSAGE(LVL)
Report a message.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:365
SG::throwExcNonConstHandleKey
void throwExcNonConstHandleKey(CLID clid, const std::string &sgkey, const std::string &storename)
Throw a SG::ExcNonConstHandleKey exception.
Definition: Control/StoreGate/src/exceptions.cxx:337
SG::VarHandleBase::storeHandle
const ServiceHandle< IProxyDict > & storeHandle() const
Return handle to the referenced store.
SG::Storable_cast
T * Storable_cast(DataObject *pDObj, bool quiet=true, IRegisterTransient *irt=0, bool isConst=true)
Definition: StorableConversions.h:47
SG::DataProxy::setConst
void setConst()
Mark this object as const.
Definition: DataProxy.cxx:204
SG::VarHandleKey::hashedKey
SG::sgkey_t hashedKey() const
Return the hashed StoreGate key.
SG::VarHandleBase::initialize
StatusCode initialize(bool used=true)
Verify that the handle has been configured properly.
Definition: StoreGate/src/VarHandleBase.cxx:452
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
SG::VarHandleBase::m_storeWasSet
bool m_storeWasSet
True if the store was set explicitly via setProxyDict.
Definition: StoreGate/StoreGate/VarHandleBase.h:511
SG::VarHandleBase::m_ptr
void * m_ptr
The object to which we are bound.
Definition: StoreGate/StoreGate/VarHandleBase.h:502
IProxyDict::recordObject
virtual SG::DataProxy * recordObject(SG::DataObjectSharedPtr< DataObject > obj, const std::string &key, bool allowMods, bool returnExisting)=0
Record an object in the store.
SG::DataProxy::isResetOnly
bool isResetOnly() const
Check reset only:
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
SG::VarHandleBase::isConst
bool isConst() const
True if this handle has a proxy, and the proxy is const.
Definition: StoreGate/src/VarHandleBase.cxx:432
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
SG::DataObjectSharedPtr
Smart pointer to manage DataObject reference counts.
Definition: DataObjectSharedPtr.h:46
python.PyAthena.obj
obj
Definition: PyAthena.py:132
SG::VarHandleBase::m_store
IProxyDict * m_store
Pointer to the store that owns the object.
Definition: StoreGate/StoreGate/VarHandleBase.h:508
SG::DataProxy
Definition: DataProxy.h:44
IProxyDict::hiveProxyDict
virtual IProxyDict * hiveProxyDict() override
Return the current event-slot-specific store.
Definition: IProxyDict.cxx:83
SG::VarHandleBase::setProxy
void setProxy(SG::DataProxy *proxy)
Set a new proxy.
Definition: StoreGate/src/VarHandleBase.cxx:1020