1 #ifndef GAUDIKERNEL_ALGTOOL_H
2 #define GAUDIKERNEL_ALGTOOL_H
48 virtual const std::string&
name()
const;
51 virtual const std::string&
type()
const;
140 template <
class TYPE>
153 const std::string& name,
180 (
const std::string& name, T*& svc,
bool createIf =
true )
const {
181 return service_i(name, createIf, T::interfaceID(), (
void**)&svc);
188 return service_i(type, name, T::interfaceID(), (
void**)&svc);
200 tool->declInterface( I::interfaceID(), (I*)tool);
235 (
const std::string& name ,
237 const std::string& doc =
"none" )
const
239 return m_propertyMgr -> declareProperty ( name , property , doc ) ;
243 (
const std::string& name ,
245 const std::string& rname =
"" )
const
247 return m_propertyMgr-> declareRemoteProperty ( name , rsvc , rname ) ;
265 if ( !m_pMonitorSvc ){
266 service_i( m_monitorSvcName,
false,
269 return m_pMonitorSvc;
280 const std::string& desc )
const
294 const std::string&
format,
297 const std::string& desc )
const
300 if ( mS ) mS->
declareInfo(name, format, var, size, desc,
this);
312 void initOutputLevel(
Property& prop);
337 StatusCode service_i(
const std::string& algName,
341 StatusCode service_i(
const std::string& svcType,
342 const std::string& svcName,
361 #ifndef GAUDI_NEW_PLUGIN_SERVICE
366 template <
typename S,
typename... Args>
368 return new T(
args...);
374 #define DECLARE_TOOL_FACTORY(x) \
375 DECLARE_FACTORY_WITH_CREATOR(x, ToolFactory< x >, AlgTool::Factory)
376 #define DECLARE_NAMESPACE_TOOL_FACTORY(n, x) \
377 DECLARE_TOOL_FACTORY(n::x)
382 #define DECLARE_TOOL_FACTORY(x) DECLARE_COMPONENT(x)
383 #define DECLARE_NAMESPACE_TOOL_FACTORY(n,x) DECLARE_COMPONENT(n::x)
388 #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.
GAUDI_API bool hasProperty(const IProperty *p, const std::string &name)
simple function which check the existence of the property with the given name.
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
virtual StatusCode sysFinalize()
Finalize Service.
const char *PyHelper() getProperty(IInterface *p, char *name)
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.
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.
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
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.
Class wrapping the signature for a factory with any number of arguments.
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.