1 #ifndef GAUDIKERNEL_ALGTOOL_H
2 #define GAUDIKERNEL_ALGTOOL_H
46 virtual const std::string&
name()
const;
49 virtual const std::string&
type()
const;
137 template <
class TYPE>
150 const std::string& name,
177 (
const std::string& name, T*& svc,
bool createIf =
true )
const {
178 return service_i(name, createIf, T::interfaceID(), (
void**)&svc);
185 return service_i(type, name, T::interfaceID(), (
void**)&svc);
197 tool->declInterface( I::interfaceID(), (I*)tool);
232 (
const std::string& name ,
234 const std::string& doc =
"none" )
const
236 return m_propertyMgr -> declareProperty ( name , property , doc ) ;
240 (
const std::string& name ,
242 const std::string& rname =
"" )
const
244 return m_propertyMgr-> declareRemoteProperty ( name , rsvc , rname ) ;
262 if ( !m_pMonitorSvc ){
263 service_i( m_monitorSvcName,
false,
266 return m_pMonitorSvc;
277 const std::string& desc )
const
291 const std::string&
format,
294 const std::string& desc )
const
297 if ( mS ) mS->
declareInfo(name, format, var, size, desc,
this);
309 void initOutputLevel(
Property& prop);
334 StatusCode service_i(
const std::string& algName,
338 StatusCode service_i(
const std::string& svcType,
339 const std::string& svcName,
358 #ifndef GAUDI_NEW_PLUGIN_SERVICE
362 template <
typename S>
363 static typename S::ReturnType
create(
typename S::Arg1Type a1,
364 typename S::Arg2Type a2,
365 typename S::Arg3Type a3) {
366 return new T(a1, a2, a3);
371 #define DECLARE_TOOL_FACTORY(x) \
372 DECLARE_FACTORY_WITH_CREATOR(x, ToolFactory< x >, AlgTool::Factory)
373 #define DECLARE_NAMESPACE_TOOL_FACTORY(n, x) \
374 DECLARE_TOOL_FACTORY(n::x)
379 #define DECLARE_TOOL_FACTORY(x) DECLARE_COMPONENT(x)
380 #define DECLARE_NAMESPACE_TOOL_FACTORY(n,x) DECLARE_COMPONENT(n::x)
385 #endif // GAUDIKERNEL_ALGTOOL_H
virtual StatusCode restart()
Initialization (from RUNNING to RUNNING, via INITIALIZED).
StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
Gaudi::StateMachine::State m_targetState
Service state.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Gaudi::StateMachine::State m_state
Service state.
Base class used to implement the interfaces.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
virtual StatusCode sysFinalize()
Finalize Service.
GAUDI_API Property * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Property manager helper class.
Gaudi::InterfaceId< IInterface, 0, 0 > iid
Interface ID.
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
virtual StatusCode queryInterface(const InterfaceID &ti, void **pp)
Implementation of IInterface::queryInterface.
Class wrapping the signature for a factory with 3 arguments.
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
The IMessage is the interface implemented by the message service.
virtual StatusCode sysStop()
Initialize Service.
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
virtual const std::string & name() const
Retrieve name of the service.
virtual StatusCode sysInitialize()
Initialize Service.
virtual StatusCode reinitialize()
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
PropertyMgr * m_propertyMgr
Property Manager.
Property base class allowing Property* collections to be "homogeneous".
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
virtual StatusCode sysRestart()
Re-initialize the Service.
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
virtual StatusCode sysReinitialize()
Re-initialize the Service.
The IProperty is the basic interface for all components which have properties that can be set or get...
The interface implemented by the IAuditorSvc base class.
virtual StatusCode sysStart()
Initialize Service.
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
virtual const std::vector< Property * > & getProperties() const
Get list of properties.
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.