2 #ifndef GAUDIKERNEL_IUPDATEMANAGERSVC_H
3 #define GAUDIKERNEL_IUPDATEMANAGERSVC_H 1
15 class ValidDataObject;
19 namespace Gaudi {
class Time; }
37 virtual const std::type_info &
type()
const = 0;
53 template <
class CallerClass>
77 virtual const std::type_info &
type()
const {
return typeid(CallerClass); }
97 return dynamic_cast<ValidDataObject*
>(
m_instance);
134 virtual bool isNull() = 0;
144 template<
class ActualType>
192 template <
class CallerClass>
198 template <
class CallerClass,
class CondType>
201 CondType *&condPtrDest){
207 template <
class CallerClass>
216 template <
class CallerClass,
class ObjectClass>
225 template <
class CallerClass>
227 i_unregister(dynamic_cast<void*>(instance));
232 template <
class CallerClass>
233 inline void invalidate(CallerClass *instance) {i_invalidate(dynamic_cast<void*>(instance));}
242 virtual void setValidity(
const std::string
path,
244 bool path_to_db =
false) = 0;
255 template <
class CallerClass>
257 return i_update(dynamic_cast<void*>(instance));
261 virtual void dump() = 0;
264 virtual void acquireLock() = 0;
266 virtual void releaseLock() = 0;
271 virtual void purge() = 0;
285 virtual StatusCode i_update(
void *instance) = 0;
286 virtual void i_unregister(
void *instance) = 0;
287 virtual void i_invalidate(
void *instance) = 0;
294 #endif // GAUDIKERNEL_IUPDATEMANAGERSVC_H
virtual DataObject * castToDataObject() const =0
MemberFunctionType m_memberFunction
Pointer to the member function.
virtual bool isNull()=0
tells if the internal pointer is NULL.
virtual ~BasePtrSetter()
Empty virtual destructor.
Base class to set the pointer to an object of a class derived from DataObject in a generic way...
virtual void * castToVoid() const =0
void invalidate(CallerClass *instance)
Invalidate the given object in the dependency network.
virtual ~ObjectMemberFunction()
Virtual destructor.
void unregister(CallerClass *instance)
Generic objects can be unregistered from the UpdateManagerSvc.
virtual ~BaseObjectMemberFunction()
Virtual destructor.
Templated specialization of BasePtrSetter.
virtual bool match(BaseObjectMemberFunction *) const =0
Data provider interface definition.
dest_type ** m_storage
pointer to the pointer to fill provided by the user.
virtual BaseObjectMemberFunction * makeCopy() const =0
virtual void set(DataObject *obj)
sets the internal pointer to the provided data object (with a dynamic_cast).
virtual StatusCode operator()() const =0
void registerCondition(CallerClass *instance, ObjectClass *obj, typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=NULL)
Like the first version of registerCondition, but instead declaring the dependency on a condition of t...
CallerClass * m_instance
Pointer to the object.
void registerCondition(CallerClass *instance, const std::string &condition, typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf, CondType *&condPtrDest)
This class is used for returning status codes from appropriate routines.
virtual bool match(BaseObjectMemberFunction *bmf) const
Comparison between two BaseObjectMemberFunction instances.
Definition of the basic interface.
Helper class implemented in the python dictionary to allow access from python to template member func...
#define DeclareInterfaceID(name, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
virtual ValidDataObject * castToValidDataObject() const
Cast the object to ValidDataObject.
virtual void set(DataObject *)=0
sets the internal pointer to the provided data object (with a dynamic_cast).
Interface class to the Update Manager service.
virtual const std::type_info & type() const =0
virtual DataObject * castToDataObject() const
Cast the object to DataObject.
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
PtrSetter(dest_type *&dest)
Construct a new object using the destination pointer.
StatusCode update(CallerClass *instance)
Update the given instance.
ObjectMemberFunction(CallerClass *instance, const MemberFunctionType &mf)
Standard constructor. Protected so that can be called only by itself or IUpdateManagerSvc.
This class is used by IUpdateManagerSvc to keep pairs made of a member function and a pointer to the ...
void registerCondition(CallerClass *instance, const std::string &condition="", typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=NULL)
Register an object (algorithm instance) to the service.
virtual ~PtrSetter()
Empty virtual destructor.
virtual bool isNull()
tells if the internal pointer is NULL.
StatusCode(CallerClass::* MemberFunctionType)()
MemberFunctionType is the type for a pointer to a member function of class CallerClass.
This is a number of static methods for bootstrapping the Gaudi framework.
virtual const std::type_info & type() const
Returns the type_info of the CallerClass.
A DataObject is the base class of any identifiable object on any data store.
virtual StatusCode operator()() const
Calls the member function of the object and returns the StatusCode.
virtual ValidDataObject * castToValidDataObject() const =0
Base class of ObjectMemberFunction.
void registerCondition(CallerClass *instance, const char *condition, typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=NULL)
See above. Needed to avoid conflicts with the next one.
virtual void * castToVoid() const
Cast the object to void with dynamic_cast.
virtual BaseObjectMemberFunction * makeCopy() const
Clone method to be able to copy an ObjectMemberFunction from the BaseObjectMemberFunction interface...