Go to the documentation of this file.
11 #ifndef GAUDIKERNEL_ALGTOOL_H
12 #define GAUDIKERNEL_ALGTOOL_H
62 PropertyHolder<CommonMessaging<implements<IAlgTool, IDataHandleHolder, IProperty, IStateful>>>> {
64 friend class ToolVisitor;
137 [[deprecated(
"use service<T>(name, createIf) -> SmartIF<T>" )]]
StatusCode service( std::string_view
name, T*& svc,
138 bool createIf =
true )
const {
139 return service_i(
name, createIf, T::interfaceID(), (
void**)&svc );
145 [[deprecated(
"use service<T>(name, createIf) -> SmartIF<T>" )]]
StatusCode
147 return service_i(
type,
name, T::interfaceID(),
reinterpret_cast<void**
>( &svc ) );
151 SmartIF<IService> service( std::string_view
name,
const bool createIf =
true,
const bool quiet =
false )
const;
153 template <
typename T>
159 template <
typename I>
161 m_interfaceList.emplace_back( I::interfaceID(), i );
165 using PropertyHolderImpl::declareProperty;
170 this->declareTool( hndl, hndl.
typeAndName() ).ignore();
171 return PropertyHolderImpl::declareProperty(
name, hndl, doc );
176 return this->declareTool( handle, handle.
typeAndName(), createIf );
185 " tool " + toolTypeAndName,
189 m_toolHandles.push_back( &handle );
199 addToolsArray( hndlArr );
200 return PropertyHolderImpl::declareProperty(
name, hndlArr, doc );
205 m_toolHandleArrays.push_back( &hndlArr );
214 m_tools.push_back(
tool );
219 if ( it != m_tools.end() ) {
223 if ( msgLevel(
MSG::DEBUG ) ) debug() <<
"Could not de-register tool " <<
tool->name() <<
endmsg;
237 void initToolHandles()
const;
255 if ( !m_pMonitorSvc ) m_pMonitorSvc = service( m_monitorSvcName,
false,
true );
256 return m_pMonitorSvc.get();
304 this,
"OutputLevel", setUpMessaging(),
309 "name to use for Monitor Service" };
316 Gaudi::Property<bool> m_auditorReinitialize{
this,
"AuditReinitialize",
false,
"trigger auditor on reinitialize()" };
323 mutable bool m_toolHandlesInit =
false;
326 [[deprecated]]
StatusCode service_i( std::string_view algName,
bool createIf,
const InterfaceID& iid,
327 void** ppSvc )
const;
328 [[deprecated]]
StatusCode service_i( std::string_view svcType, std::string_view svcName,
const InterfaceID& iid,
335 #endif // GAUDIKERNEL_ALGTOOL_H
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
constexpr auto size(const T &, Args &&...) noexcept
DataObjectHandle.h GaudiKernel/DataObjectHandle.h.
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm,...
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
constexpr static const auto SUCCESS
StatusCode queryInterface(const InterfaceID &ti, void **pp) override
Implementation of IInterface::queryInterface.