Loading [MathJax]/extensions/tex2jax.js
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;
73 const std::string&
name()
const override;
76 const std::string&
type()
const override;
134 SmartIF<IService> service( std::string_view
name,
const bool createIf =
true,
const bool quiet =
false )
const;
136 template <
typename T>
142 template <
typename I>
144 m_interfaceList.emplace_back( I::interfaceID(), i );
148 using PropertyHolderImpl::declareProperty;
152 const std::string& doc =
"none" ) {
153 this->declareTool( hndl, hndl.
typeAndName() ).ignore();
154 return PropertyHolderImpl::declareProperty(
name, hndl, doc );
159 return this->declareTool( handle, handle.
typeAndName(), createIf );
167 throw GaudiException{ std::string{
"Cannot create handle for " } + ( handle.
isPublic() ?
"public" :
"private" ) +
168 " tool " + toolTypeAndName,
172 m_toolHandles.push_back( &handle );
181 const std::string& doc =
"none" ) {
182 addToolsArray( hndlArr );
183 return PropertyHolderImpl::declareProperty(
name, hndlArr, doc );
188 m_toolHandleArrays.push_back( &hndlArr );
197 m_tools.push_back(
tool );
201 auto it = std::find( m_tools.begin(), m_tools.end(),
tool );
202 if ( it != m_tools.end() ) {
206 if ( msgLevel(
MSG::DEBUG ) ) debug() <<
"Could not de-register tool " <<
tool->name() <<
endmsg;
210 const std::vector<IAlgTool*>& tools()
const;
213 std::vector<IAlgTool*>& tools();
220 void initToolHandles()
const;
238 if ( !m_pMonitorSvc ) m_pMonitorSvc = service( m_monitorSvcName,
false,
true );
239 return m_pMonitorSvc.get();
248 void declareInfo(
const std::string&
name,
const T& var,
const std::string& desc )
const {
261 const std::string& desc )
const {
287 this,
"OutputLevel", setUpMessaging(),
292 "name to use for Monitor Service" };
298 Gaudi::Property<bool> m_auditorReinitialize{
this,
"AuditReinitialize",
false,
"trigger auditor on reinitialize()" };
305 mutable bool m_toolHandlesInit =
false;
311 #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
The interface implemented by the IAuditorSvc base class.
StatusCode queryInterface(const InterfaceID &ti, void **pp) override
Implementation of IInterface::queryInterface.