The Gaudi Framework  master (594c33fa)
IUpdateManagerSvc Class Referenceabstract

#include <GaudiKernel/IUpdateManagerSvc.h>

Inheritance diagram for IUpdateManagerSvc:
Collaboration diagram for IUpdateManagerSvc:

Classes

class  PtrSetter
 

Public Member Functions

 DeclareInterfaceID (IUpdateManagerSvc, 2, 0)
 InterfaceID. More...
 
virtual IDataProviderSvcdataProvider () const =0
 Give access to the data provider. More...
 
virtual IDetDataSvcdetDataSvc () const =0
 Give access to the detector data service interface (usualy of the data provider itself). More...
 
template<class CallerClass >
void registerCondition (CallerClass *instance, const std::string &condition="", typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=nullptr)
 Register an object (algorithm instance) to the service. More...
 
template<class CallerClass , class CondType >
void registerCondition (CallerClass *instance, const std::string &condition, typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf, CondType *&condPtrDest)
 
template<class CallerClass >
void registerCondition (CallerClass *instance, const char *condition, typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=nullptr)
 See above. Needed to avoid conflicts with the next one. More...
 
template<class CallerClass , class ObjectClass >
void registerCondition (CallerClass *instance, ObjectClass *obj, typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=nullptr)
 Like the first version of registerCondition, but instead declaring the dependency on a condition of the service privider, it uses an already registered object. More...
 
template<class CallerClass >
void unregister (CallerClass *instance)
 Generic objects can be unregistered from the UpdateManagerSvc. More...
 
template<class CallerClass >
void invalidate (CallerClass *instance)
 Invalidate the given object in the dependency network. More...
 
virtual bool getValidity (const std::string path, Gaudi::Time &since, Gaudi::Time &until, bool path_to_db=false)=0
 Retrieve the interval of validity (in the UpdateManagerSvc) of the given item. More...
 
virtual void setValidity (const std::string path, const Gaudi::Time &since, const Gaudi::Time &until, bool path_to_db=false)=0
 Change the interval of validity of the given item to the specified values, updating parents if needed. More...
 
virtual StatusCode newEvent ()=0
 Start an update loop using the event time given by the detector data service. More...
 
virtual StatusCode newEvent (const Gaudi::Time &)=0
 Start an update loop using the give event time. More...
 
template<class CallerClass >
StatusCode update (CallerClass *instance)
 Update the given instance. More...
 
virtual void dump ()=0
 Debug method: it dumps the dependency network through the message service (not very readable, for experts only). More...
 
virtual void acquireLock ()=0
 Force the update manager service to wait before entering the newEvent loop. More...
 
virtual void releaseLock ()=0
 Let the update manager service enter the newEvent loop. More...
 
virtual void purge ()=0
 Remove all the items referring to objects present in the transient store. More...
 
- Public Member Functions inherited from IInterface
virtual void * i_cast (const InterfaceID &) const =0
 main cast function More...
 
virtual std::vector< std::stringgetInterfaceNames () const =0
 Returns a vector of strings containing the names of all the implemented interfaces. More...
 
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long release ()=0
 Release Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)=0
 Set the void** to the pointer to the requested interface of the instance. More...
 
virtual ~IInterface ()=default
 Virtual destructor. More...
 

Protected Member Functions

virtual void i_registerCondition (const std::string &condition, BaseObjectMemberFunction *mf, BasePtrSetter *ptr_dest=nullptr)=0
 
virtual void i_registerCondition (void *obj, BaseObjectMemberFunction *mf)=0
 
virtual StatusCode i_update (void *instance)=0
 
virtual void i_unregister (void *instance)=0
 
virtual void i_invalidate (void *instance)=0
 

Friends

class PythonHelper
 

Additional Inherited Members

- Public Types inherited from IInterface
enum  Status : StatusCode::code_t {
  Status::FAILURE = 0, Status::SUCCESS = 1, Status::NO_INTERFACE, Status::VERSMISMATCH,
  Status::LAST_ERROR
}
 Return status. More...
 
using iid = Gaudi::InterfaceId< IInterface, 0, 0 >
 Interface ID. More...
 
using ext_iids = Gaudi::interface_list< iid >
 Extra interfaces. More...
 
- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 

Detailed Description

Interface class to the Update Manager service. Users should only use this interface.

Author
Marco CLEMENCIC
Date
2005-03-30

Definition at line 142 of file IUpdateManagerSvc.h.

Member Function Documentation

◆ acquireLock()

virtual void IUpdateManagerSvc::acquireLock ( )
pure virtual

Force the update manager service to wait before entering the newEvent loop.

◆ dataProvider()

virtual IDataProviderSvc* IUpdateManagerSvc::dataProvider ( ) const
pure virtual

Give access to the data provider.

◆ DeclareInterfaceID()

IUpdateManagerSvc::DeclareInterfaceID ( IUpdateManagerSvc  ,
,
 
)

◆ detDataSvc()

virtual IDetDataSvc* IUpdateManagerSvc::detDataSvc ( ) const
pure virtual

Give access to the detector data service interface (usualy of the data provider itself).

◆ dump()

virtual void IUpdateManagerSvc::dump ( )
pure virtual

Debug method: it dumps the dependency network through the message service (not very readable, for experts only).

◆ getValidity()

virtual bool IUpdateManagerSvc::getValidity ( const std::string  path,
Gaudi::Time since,
Gaudi::Time until,
bool  path_to_db = false 
)
pure virtual

Retrieve the interval of validity (in the UpdateManagerSvc) of the given item.

Returns
false if the item was not found.

◆ i_invalidate()

virtual void IUpdateManagerSvc::i_invalidate ( void *  instance)
protectedpure virtual

◆ i_registerCondition() [1/2]

virtual void IUpdateManagerSvc::i_registerCondition ( const std::string condition,
BaseObjectMemberFunction mf,
BasePtrSetter ptr_dest = nullptr 
)
protectedpure virtual

◆ i_registerCondition() [2/2]

virtual void IUpdateManagerSvc::i_registerCondition ( void *  obj,
BaseObjectMemberFunction mf 
)
protectedpure virtual

◆ i_unregister()

virtual void IUpdateManagerSvc::i_unregister ( void *  instance)
protectedpure virtual

◆ i_update()

virtual StatusCode IUpdateManagerSvc::i_update ( void *  instance)
protectedpure virtual

◆ invalidate()

template<class CallerClass >
void IUpdateManagerSvc::invalidate ( CallerClass *  instance)
inline

Invalidate the given object in the dependency network.

It means that all the objects depending on that one will be updated before the next event.

Definition at line 217 of file IUpdateManagerSvc.h.

217  {
218  i_invalidate( dynamic_cast<void*>( instance ) );
219  }

◆ newEvent() [1/2]

virtual StatusCode IUpdateManagerSvc::newEvent ( )
pure virtual

Start an update loop using the event time given by the detector data service.

◆ newEvent() [2/2]

virtual StatusCode IUpdateManagerSvc::newEvent ( const Gaudi::Time )
pure virtual

Start an update loop using the give event time.

NOTE: the given event time is only used to check if updates are needed, the real update is done using the detector data service event time. (may change in future)

◆ purge()

virtual void IUpdateManagerSvc::purge ( )
pure virtual

Remove all the items referring to objects present in the transient store.

This is needed when the Detector Transient Store is purged, otherwise we will keep pointers to not existing objects.

◆ registerCondition() [1/4]

template<class CallerClass >
void IUpdateManagerSvc::registerCondition ( CallerClass *  instance,
const char *  condition,
typename ObjectMemberFunction< CallerClass >::MemberFunctionType  mf = nullptr 
)
inline

See above. Needed to avoid conflicts with the next one.

Definition at line 192 of file IUpdateManagerSvc.h.

193  {
194  i_registerCondition( std::string( condition ), new ObjectMemberFunction{ instance, mf } );
195  }

◆ registerCondition() [2/4]

template<class CallerClass , class CondType >
void IUpdateManagerSvc::registerCondition ( CallerClass *  instance,
const std::string condition,
typename ObjectMemberFunction< CallerClass >::MemberFunctionType  mf,
CondType *&  condPtrDest 
)
inline

Definition at line 184 of file IUpdateManagerSvc.h.

186  {
187  i_registerCondition( condition, new ObjectMemberFunction{ instance, mf }, new PtrSetter{ condPtrDest } );
188  }

◆ registerCondition() [3/4]

template<class CallerClass >
void IUpdateManagerSvc::registerCondition ( CallerClass *  instance,
const std::string condition = "",
typename ObjectMemberFunction< CallerClass >::MemberFunctionType  mf = nullptr 
)
inline

Register an object (algorithm instance) to the service.

The object should provide a method to be called in case of an update of the needed condition. An object can register multiple conditions using the same method: it will be called if at least one of the specified conditions is updated, but only when all of them are up to date.

Returns
StatusCode::SUCCESS if the registration went right.

Definition at line 178 of file IUpdateManagerSvc.h.

179  {
180  i_registerCondition( condition, new ObjectMemberFunction{ instance, mf } );
181  }

◆ registerCondition() [4/4]

template<class CallerClass , class ObjectClass >
void IUpdateManagerSvc::registerCondition ( CallerClass *  instance,
ObjectClass *  obj,
typename ObjectMemberFunction< CallerClass >::MemberFunctionType  mf = nullptr 
)
inline

Like the first version of registerCondition, but instead declaring the dependency on a condition of the service privider, it uses an already registered object.

It means that a generic object can depend on another generic object that depends on a ValidDataObject. The dependency network is kept consistent by the UpdateManagerSvc.

Definition at line 201 of file IUpdateManagerSvc.h.

202  {
203  i_registerCondition( dynamic_cast<void*>( obj ), new ObjectMemberFunction{ instance, mf } );
204  }

◆ releaseLock()

virtual void IUpdateManagerSvc::releaseLock ( )
pure virtual

Let the update manager service enter the newEvent loop.

◆ setValidity()

virtual void IUpdateManagerSvc::setValidity ( const std::string  path,
const Gaudi::Time since,
const Gaudi::Time until,
bool  path_to_db = false 
)
pure virtual

Change the interval of validity of the given item to the specified values, updating parents if needed.

The change can only restrict the current IOV, If you want to expand the validity you should act on the transient data store and the change will be reflected at the next update.

◆ unregister()

template<class CallerClass >
void IUpdateManagerSvc::unregister ( CallerClass *  instance)
inline

Generic objects can be unregistered from the UpdateManagerSvc.

The dependency network is always consistent, but internal IOVs are not modified.

Warning
{Removing a node which other nodes depends on can create problems if the methods of this other nodes are called.}

Definition at line 210 of file IUpdateManagerSvc.h.

210  {
211  i_unregister( dynamic_cast<void*>( instance ) );
212  }

◆ update()

template<class CallerClass >
StatusCode IUpdateManagerSvc::update ( CallerClass *  instance)
inline

Update the given instance.

This method should be called by the object after registration to ensure that the needed operations is done immediately and not before the next event.

Definition at line 243 of file IUpdateManagerSvc.h.

243  {
244  return i_update( dynamic_cast<void*>( instance ) );
245  }

Friends And Related Function Documentation

◆ PythonHelper

friend class PythonHelper
friend

Definition at line 275 of file IUpdateManagerSvc.h.


The documentation for this class was generated from the following file:
std::string
STL class.
IUpdateManagerSvc::i_invalidate
virtual void i_invalidate(void *instance)=0
IUpdateManagerSvc::i_unregister
virtual void i_unregister(void *instance)=0
IUpdateManagerSvc::i_update
virtual StatusCode i_update(void *instance)=0
IUpdateManagerSvc::i_registerCondition
virtual void i_registerCondition(const std::string &condition, BaseObjectMemberFunction *mf, BasePtrSetter *ptr_dest=nullptr)=0
ObjectMemberFunction
Definition: IUpdateManagerSvc.h:65