1 #ifndef GAUDIKERNEL_ALGTOOL_H
2 #define GAUDIKERNEL_ALGTOOL_H
48 virtual const std::string&
name()
const;
51 virtual const std::string&
type()
const;
139 template <
class TYPE>
152 const std::string& name,
179 (
const std::string& name, T*& svc,
bool createIf =
true )
const {
180 return service_i(name, createIf, T::interfaceID(), (
void**)&svc);
187 return service_i(type, name, T::interfaceID(), (
void**)&svc);
199 tool->declInterface( I::interfaceID(), (I*)tool);
234 (
const std::string& name ,
236 const std::string& doc =
"none" )
const
238 return m_propertyMgr -> declareProperty ( name , property , doc ) ;
242 (
const std::string& name ,
244 const std::string& rname =
"" )
const
246 return m_propertyMgr-> declareRemoteProperty ( name , rsvc , rname ) ;
264 if ( !m_pMonitorSvc ){
265 service_i( m_monitorSvcName,
false,
268 return m_pMonitorSvc;
279 const std::string& desc )
const
293 const std::string&
format,
296 const std::string& desc )
const
299 if ( mS ) mS->
declareInfo(name, format, var, size, desc,
this);
311 void initOutputLevel(
Property& prop);
336 StatusCode service_i(
const std::string& algName,
340 StatusCode service_i(
const std::string& svcType,
341 const std::string& svcName,
360 #ifndef GAUDI_NEW_PLUGIN_SERVICE
365 template <
typename S,
typename... Args>
367 return new T(
args...);
373 #define DECLARE_TOOL_FACTORY(x) \
374 DECLARE_FACTORY_WITH_CREATOR(x, ToolFactory< x >, AlgTool::Factory)
375 #define DECLARE_NAMESPACE_TOOL_FACTORY(n, x) \
376 DECLARE_TOOL_FACTORY(n::x)
381 #define DECLARE_TOOL_FACTORY(x) DECLARE_COMPONENT(x)
382 #define DECLARE_NAMESPACE_TOOL_FACTORY(n,x) DECLARE_COMPONENT(n::x)
387 #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.
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.
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.