ATLAS Offline Software
Loading...
Searching...
No Matches
ILockable.h File Reference

Go to the source code of this file.

Functions

virtual void lock ()=0
 Interface to allow an object to lock itself when made const in SG.

Function Documentation

◆ lock()

virtual void lock ( )
pure virtual

Interface to allow an object to lock itself when made const in SG.

An object recorded in StoreGate can be `locked' by a call to StoreGateSvc::setConst(). Normally, this just sets a flag in the DataProxy, which tells StoreGate not to allow non-const retrieves. However, sometimes the object itself should know about this; for example, when a container with an auxiliary store is locked. If an object in StoreGate derives from ILockable, then a setConst() operation will call lock() on the object. */ class ILockable { public: / Destructor. virtual ~ILockable() {}

/**

Lock this object.

When an object in StoreGate is locked via StoreGateSvc::setConst, StoreGate will call this method on the object, provided the object derives from ILockable.