1 #ifndef GAUDIKERNEL_ALGTOOL_H 2 #define GAUDIKERNEL_ALGTOOL_H 47 :
public PropertyHolder<CommonMessaging<implements<IAlgTool, IDataHandleHolder, IProperty, IStateful>>>
131 return service_i( name, createIf, T::interfaceID(), (
void**)&svc );
139 return service_i( type, name, T::interfaceID(), (
void**)&svc );
145 template <
typename T>
148 return SmartIF<T>( service( name, createIf, quiet ) );
152 template <
typename I>
155 m_interfaceList.emplace_back( I::interfaceID(), i );
166 this->declareTool( hndl ).ignore();
174 return declarePublicTool( handle, toolTypeAndName, createIf );
176 return declarePrivateTool( handle, toolTypeAndName, createIf );
186 m_toolHandleArrays.push_back( &hndlArr );
206 void commitHandles()
override;
216 m_tools.push_back( tool );
221 auto it =
std::find( m_tools.begin(), m_tools.end(), tool );
222 if ( it != m_tools.end() ) {
241 if ( toolTypeAndName ==
"" ) toolTypeAndName = handle.
typeAndName();
245 throw GaudiException{
"Cannot create handle for public tool " + toolTypeAndName,
name(), sc};
248 m_toolHandles.push_back( &handle );
264 if ( toolTypeAndName ==
"" ) toolTypeAndName = handle.
typeAndName();
268 throw GaudiException{
"Cannot create handle for private tool " + toolTypeAndName,
name(), sc};
271 m_toolHandles.push_back( &handle );
286 void initToolHandles()
const;
305 if ( !m_pMonitorSvc ) m_pMonitorSvc = service( m_monitorSvcName,
false,
true );
306 return m_pMonitorSvc.get();
318 if ( mS ) mS->
declareInfo( name, var, desc,
this );
332 if ( mS ) mS->
declareInfo( name, format, var, size, desc,
this );
357 "name to use for Monitor Service"};
376 mutable bool m_toolHandlesInit =
false;
387 #ifndef GAUDI_NEW_PLUGIN_SERVICE 390 template <
typename S,
typename... Args>
393 return new T( std::forward<Args>(
args )... );
398 #define DECLARE_TOOL_FACTORY( x ) DECLARE_FACTORY_WITH_CREATOR( x, ToolFactory<x>, AlgTool::Factory ) 399 #define DECLARE_NAMESPACE_TOOL_FACTORY( n, x ) DECLARE_TOOL_FACTORY( n::x ) 404 #define DECLARE_TOOL_FACTORY( x ) DECLARE_COMPONENT( x ) 405 #define DECLARE_NAMESPACE_TOOL_FACTORY( n, x ) DECLARE_COMPONENT( n::x ) 409 #endif // GAUDIKERNEL_ALGTOOL_H
Define general base for Gaudi exception.
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(...)".
Implementation of property with value of concrete type.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Details::PropertyBase &prop)
Declare a property.
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
Data provider interface definition.
DataObjectHandle.h GaudiKernel/DataObjectHandle.h.
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
PropertyBase base class allowing PropertyBase* 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.
Helper class to implement the IProperty interface.
StatusCode queryInterface(const InterfaceID &iid, void **pinterface) override
The interface implemented by the IAuditorSvc base class.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
virtual const std::string & name() const =0
Retrieve the name of the instance.