1 #ifndef GAUDIKERNEL_ALGTOOL_H 2 #define GAUDIKERNEL_ALGTOOL_H 49 :
public DataHandleHolderBase<PropertyHolder<CommonMessaging<implements<IAlgTool, IDataHandleHolder, IProperty, IStateful>>>>
133 return service_i( name, createIf, T::interfaceID(), (
void**)&svc );
141 return service_i( type, name, T::interfaceID(), (
void**)&svc );
147 template <
typename T>
150 return SmartIF<T>( service( name, createIf, quiet ) );
154 template <
typename I>
157 m_interfaceList.emplace_back( I::interfaceID(), i );
167 this->declareTool( hndl ).ignore();
175 return declarePublicTool( handle, toolTypeAndName, createIf );
177 return declarePrivateTool( handle, toolTypeAndName, createIf );
187 m_toolHandleArrays.push_back( &hndlArr );
195 void commitHandles()
override;
201 m_tools.push_back( tool );
206 auto it =
std::find( m_tools.begin(), m_tools.end(), tool );
207 if ( it != m_tools.end() ) {
226 if ( toolTypeAndName ==
"" ) toolTypeAndName = handle.
typeAndName();
230 throw GaudiException{
"Cannot create handle for public tool " + toolTypeAndName,
name(), sc};
233 m_toolHandles.push_back( &handle );
249 if ( toolTypeAndName ==
"" ) toolTypeAndName = handle.
typeAndName();
253 throw GaudiException{
"Cannot create handle for private tool " + toolTypeAndName,
name(), sc};
256 m_toolHandles.push_back( &handle );
271 void initToolHandles()
const;
290 if ( !m_pMonitorSvc ) m_pMonitorSvc = service( m_monitorSvcName,
false,
true );
291 return m_pMonitorSvc.get();
303 if ( mS ) mS->
declareInfo( name, var, desc,
this );
317 if ( mS ) mS->
declareInfo( name, format, var, size, desc,
this );
342 "name to use for Monitor Service"};
358 mutable bool m_toolHandlesInit =
false;
369 #ifndef GAUDI_NEW_PLUGIN_SERVICE 372 template <
typename S,
typename... Args>
375 return new T( std::forward<Args>(
args )... );
380 #define DECLARE_TOOL_FACTORY( x ) DECLARE_FACTORY_WITH_CREATOR( x, ToolFactory<x>, AlgTool::Factory ) 381 #define DECLARE_NAMESPACE_TOOL_FACTORY( n, x ) DECLARE_TOOL_FACTORY( n::x ) 386 #define DECLARE_TOOL_FACTORY( x ) DECLARE_COMPONENT( x ) 387 #define DECLARE_NAMESPACE_TOOL_FACTORY( n, x ) DECLARE_COMPONENT( n::x ) 391 #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.
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
Data provider interface definition.
DataObjectHandle.h GaudiKernel/DataObjectHandle.h.
StatusCode queryInterface(const InterfaceID &ti, void **pp) override
Implementation of IInterface::queryInterface.
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
This class is used for returning status codes from appropriate routines.
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, TYPE &value, const std::string &doc="none")
Declare a property (templated)
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.
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.