The Gaudi Framework  master (37c0b60a)
AlgTool Class Reference

#include <GaudiKernel/AlgTool.h>

Inheritance diagram for AlgTool:
Collaboration diagram for AlgTool:

Public Types

using Factory = Gaudi::PluginService::Factory< IAlgTool *(const std::string &, const std::string &, const IInterface *)>
 
- Public Types inherited from extends< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >, IDataHandleHolder >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces... >
 Typedef to the base of this class. More...
 
- Public Types inherited from PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >
using PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >
 Typedef used to refer to this class from derived classes, as in. More...
 
- Public Types inherited from CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >
using base_class = CommonMessaging
 
- Public Types inherited from extend_interfaces< Interfaces... >
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
 take union of the ext_iids of all Interfaces... More...
 

Public Member Functions

StatusCode queryInterface (const InterfaceID &riid, void **ppvUnknown) override
 Query for a given interface. More...
 
const std::stringname () const override
 Retrieve full identifying name of the concrete tool object. More...
 
const std::stringtype () const override
 Retrieve type (concrete class) of the sub-algtool. More...
 
const IInterfaceparent () const override
 Retrieve parent of the sub-algtool. More...
 
StatusCode configure () override
 
StatusCode initialize () override
 
StatusCode start () override
 
StatusCode stop () override
 
StatusCode finalize () override
 
StatusCode terminate () override
 
StatusCode reinitialize () override
 
StatusCode restart () override
 
Gaudi::StateMachine::State FSMState () const override
 
Gaudi::StateMachine::State targetFSMState () const override
 
StatusCode sysInitialize () override
 Initialize AlgTool. More...
 
StatusCode sysStart () override
 Start AlgTool. More...
 
StatusCode sysStop () override
 Stop AlgTool. More...
 
StatusCode sysFinalize () override
 Finalize AlgTool. More...
 
StatusCode sysReinitialize () override
 Initialize AlgTool. More...
 
StatusCode sysRestart () override
 Start AlgTool. More...
 
 AlgTool (std::string type, std::string name, const IInterface *parent)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Retrieve pointer to service locator. More...
 
ISvcLocatorsvcLoc () const
 shortcut for the method service locator More...
 
IDataProviderSvcevtSvc () const
 accessor to event service service More...
 
IToolSvctoolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present. More...
 
template<class T >
StatusCode service (std::string_view name, T *&svc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (std::string_view type, std::string_view name, T *&svc) const
 Access a service by name, type creating it if it doesn't already exist. More...
 
SmartIF< IServiceservice (std::string_view name, const bool createIf=true, const bool quiet=false) const
 Return a pointer to the service identified by name (or "type/name") More...
 
template<typename T >
SmartIF< T > service (std::string_view name, const bool createIf=true, const bool quiet=false) const
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, bool createIf=true)
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, const std::string &toolTypeAndName, bool createIf=true)
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
 
template<class T >
void addToolsArray (ToolHandleArray< T > &hndlArr)
 
void acceptDHVisitor (IDataHandleVisitor *) const override
 
void registerTool (IAlgTool *tool) const
 
void deregisterTool (IAlgTool *tool) const
 
const std::vector< IAlgTool * > & tools () const
 
IAuditorSvcauditorSvc () const
 Access the auditor service. More...
 
IMonitorSvcmonitorSvc () const
 Access the monitor service. More...
 
template<class T >
void declareInfo (const std::string &name, const T &var, const std::string &desc) const
 Declare monitoring information. More...
 
void declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const
 Declare monitoring information (special case) More...
 
 ~AlgTool () override
 
- Public Member Functions inherited from DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >
std::vector< Gaudi::DataHandle * > inputHandles () const override
 
std::vector< Gaudi::DataHandle * > outputHandles () const override
 
virtual const DataObjIDCollextraInputDeps () const override
 
virtual const DataObjIDCollextraOutputDeps () const override
 
void declare (Gaudi::DataHandle &handle) override
 
void renounce (Gaudi::DataHandle &handle) override
 
bool renounceInput (const DataObjID &id) override
 
const DataObjIDCollinputDataObjs () const override
 
const DataObjIDColloutputDataObjs () const override
 
void addDependency (const DataObjID &id, const Gaudi::DataHandle::Mode &mode) override
 
- Public Member Functions inherited from extends< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >, IDataHandleHolder >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p) override
 set the property from another property with a different name More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p)
 Set the property from a property. More...
 
virtual StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p)=0
 Set the property from a property with a different name. More...
 
virtual StatusCode setProperty (const std::string &s)=0
 Set the property by string. More...
 
StatusCode setProperty (const std::string &name, const char *v)
 Special case for string literals. More...
 
StatusCode setProperty (const std::string &name, const std::string &v)
 Special case for std::string. More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode setPropertyRepr (const std::string &n, const std::string &r) override
 set the property from name and value string representation More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (std::string_view name) const override
 get the property by name More...
 
StatusCode getProperty (std::string_view n, std::string &v) const override
 convert the property to the string More...
 
const std::vector< Gaudi::Details::PropertyBase * > & getProperties () const override
 get all properties More...
 
bool hasProperty (std::string_view name) const override
 Return true if we have a property with the given name. More...
 
Gaudi::Details::PropertyBaseproperty (std::string_view name) const
 \fixme property and bindPropertiesTo should be protected More...
 
void bindPropertiesTo (Gaudi::Interfaces::IOptionsSvc &optsSvc)
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 

Protected Member Functions

template<typename I >
void declareInterface (I *i)
 
std::vector< IAlgTool * > & tools ()
 
- Protected Member Functions inherited from DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >
void initDataHandleHolder ()
 initializes all handles - called by the sysInitialize method of any descendant of this More...
 
- Protected Member Functions inherited from CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Protected Attributes

std::unique_ptr< IDataHandleVisitorm_updateDataHandles
 Hook for for derived classes to provide a custom visitor for data handles. More...
 
- Protected Attributes inherited from DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >
DataObjIDColl m_inputDataObjs
 
DataObjIDColl m_outputDataObjs
 

Private Types

typedef std::list< std::pair< InterfaceID, void * > > InterfaceList
 

Private Member Functions

void initToolHandles () const
 
StatusCode service_i (std::string_view algName, bool createIf, const InterfaceID &iid, void **ppSvc) const
 flag indicating whether ToolHandle tools have been added to m_tools More...
 
StatusCode service_i (std::string_view svcType, std::string_view svcName, const InterfaceID &iid, void **ppS) const
 

Private Attributes

friend ToolSvc
 
std::string m_type
 AlgTool type (concrete class name) More...
 
const std::string m_name
 AlgTool full name. More...
 
const IInterfacem_parent = nullptr
 AlgTool parent. More...
 
SmartIF< ISvcLocatorm_svcLocator
 Pointer to Service Locator service. More...
 
SmartIF< IDataProviderSvcm_evtSvc
 Event data service. More...
 
SmartIF< IToolSvcm_ptoolSvc
 Tool service. More...
 
SmartIF< IMonitorSvcm_pMonitorSvc
 Online Monitoring Service. More...
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service. More...
 
InterfaceList m_interfaceList
 Interface list. More...
 
Gaudi::Property< int > m_outputLevel
 
Gaudi::Property< std::stringm_monitorSvcName
 
Gaudi::Property< bool > m_auditInit { this, "AuditTools", false, "[[deprecated]] unused" }
 
Gaudi::Property< bool > m_auditorInitialize { this, "AuditInitialize", false, "trigger auditor on initialize()" }
 
Gaudi::Property< bool > m_auditorStart { this, "AuditStart", false, "trigger auditor on start()" }
 
Gaudi::Property< bool > m_auditorStop { this, "AuditStop", false, "trigger auditor on stop()" }
 
Gaudi::Property< bool > m_auditorFinalize { this, "AuditFinalize", false, "trigger auditor on finalize()" }
 
Gaudi::Property< bool > m_auditorReinitialize { this, "AuditReinitialize", false, "trigger auditor on reinitialize()" }
 
Gaudi::Property< bool > m_auditorRestart { this, "AuditRestart", false, "trigger auditor on restart()" }
 
std::vector< IAlgTool * > m_tools
 
std::vector< BaseToolHandle * > m_toolHandles
 
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
 
bool m_toolHandlesInit = false
 
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::CONFIGURED
 state of the Tool More...
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::CONFIGURED
 state of the Tool More...
 

Friends

class ToolVisitor
 

Detailed Description

Base class from which all the concrete tool classes should be derived. Specific methods for doing something useful should be implemented in the concrete tools. Sub-types of this class could implement an additional interface for behavior common to sets of concrete tools (for example vertexers).

Author
Gloria Corti
Pere Mato

Definition at line 60 of file AlgTool.h.

Member Typedef Documentation

◆ Factory

using AlgTool::Factory = Gaudi::PluginService::Factory<IAlgTool*( const std::string&, const std::string&, const IInterface* )>

Definition at line 67 of file AlgTool.h.

◆ InterfaceList

Definition at line 287 of file AlgTool.h.

Constructor & Destructor Documentation

◆ AlgTool()

AlgTool::AlgTool ( std::string  type,
std::string  name,
const IInterface parent 
)

Standard Constructor.

Parameters
typethe concrete class of the sub-algtool
namethe full name of the concrete sub-algtool
parentthe parent of the concrete sub-algtool

Definition at line 116 of file AlgTool.cpp.

118  : m_type( std::move( type ) ), m_name( std::move( name ) ), m_parent( parent ) {
119  addRef(); // Initial count set to 1
120 
121  IInterface* _p = const_cast<IInterface*>( parent );
122 
123  if ( Gaudi::Algorithm* _alg = dynamic_cast<Gaudi::Algorithm*>( _p ) ) {
124  m_svcLocator = _alg->serviceLocator();
125  } else if ( Service* _svc = dynamic_cast<Service*>( _p ) ) {
126  m_svcLocator = _svc->serviceLocator();
127  } else if ( AlgTool* _too = dynamic_cast<AlgTool*>( _p ) ) {
128  m_svcLocator = _too->serviceLocator();
129  } else if ( Auditor* _aud = dynamic_cast<Auditor*>( _p ) ) {
130  m_svcLocator = _aud->serviceLocator();
131  } else {
132  throw GaudiException( "Failure to create tool '" + m_type + "/" + m_name + "': illegal parent type '" +
133  System::typeinfoName( typeid( *_p ) ) + "'",
134  "AlgTool", StatusCode::FAILURE );
135  }
136 
137  // inherit output level from parent
138  // get the "OutputLevel" property from parent
139  if ( SmartIF<IProperty> pprop( _p ); pprop && pprop->hasProperty( "OutputLevel" ) ) {
140  m_outputLevel.assign( pprop->getProperty( "OutputLevel" ) );
141  }
142 
143  // Auditor monitoring properties
144  // Initialize the default value from ApplicationMgr AuditAlgorithms
145  Gaudi::Property<bool> audit( false );
146  // note that here we need that the service locator is already defined
147  if ( auto appMgr = serviceLocator()->service<IProperty>( "ApplicationMgr" );
148  appMgr && appMgr->hasProperty( "AuditTools" ) ) {
149  audit.assign( appMgr->getProperty( "AuditTools" ) );
150  }
151  m_auditInit = audit;
152  m_auditorInitialize = audit;
153  m_auditorStart = audit;
154  m_auditorStop = audit;
155  m_auditorFinalize = audit;
156  m_auditorReinitialize = audit;
157  m_auditorRestart = audit;
158 }

◆ ~AlgTool()

AlgTool::~AlgTool ( )
override

Definition at line 352 of file AlgTool.cpp.

354 {
355  if ( m_pMonitorSvc ) { m_pMonitorSvc->undeclareAll( this ); }
356 }

Member Function Documentation

◆ acceptDHVisitor()

void AlgTool::acceptDHVisitor ( IDataHandleVisitor vis) const
override

Definition at line 441 of file AlgTool.cpp.

441  {
442  //-----------------------------------------------------------------------------
443  vis->visit( this );
444 
445  for ( auto tool : tools() ) vis->visit( dynamic_cast<AlgTool*>( tool ) );
446 }

◆ addToolsArray()

template<class T >
void AlgTool::addToolsArray ( ToolHandleArray< T > &  hndlArr)
inline

Definition at line 204 of file AlgTool.h.

204  {
205  m_toolHandleArrays.push_back( &hndlArr );
206  }

◆ auditorSvc()

IAuditorSvc * AlgTool::auditorSvc ( ) const

Access the auditor service.

Definition at line 431 of file AlgTool.cpp.

431  {
432  //---------------------------------------------------------------------------
433  if ( !m_pAuditorSvc ) {
434  m_pAuditorSvc = service( "AuditorSvc", true );
435  if ( !m_pAuditorSvc ) { throw GaudiException( "Service [AuditorSvc] not found", name(), StatusCode::FAILURE ); }
436  }
437  return m_pAuditorSvc.get();
438 }

◆ configure()

StatusCode AlgTool::configure ( )
inlineoverride

Definition at line 82 of file AlgTool.h.

82 { return StatusCode::SUCCESS; }

◆ declareInfo() [1/2]

void AlgTool::declareInfo ( const std::string name,
const std::string format,
const void *  var,
int  size,
const std::string desc 
) const
inline

Declare monitoring information (special case)

Parameters
nameMonitoring information name known to the external system
formatFormat information
varMonitoring Listener address
sizeMonitoring Listener address size
descTextual description of the information being monitored

Definition at line 277 of file AlgTool.h.

278  {
279  IMonitorSvc* mS = monitorSvc();
280  if ( mS ) mS->declareInfo( name, format, var, size, desc, this );
281  }

◆ declareInfo() [2/2]

template<class T >
void AlgTool::declareInfo ( const std::string name,
const T &  var,
const std::string desc 
) const
inline

Declare monitoring information.

Parameters
nameMonitoring information name known to the external system
varMonitoring Listener address (the item to monitor...)
descTextual description of the information being monitored

Definition at line 265 of file AlgTool.h.

265  {
266  IMonitorSvc* mS = monitorSvc();
267  if ( mS ) mS->declareInfo( name, var, desc, this );
268  }

◆ declareInterface()

template<typename I >
void AlgTool::declareInterface ( I *  i)
inlineprotected

Definition at line 160 of file AlgTool.h.

160  {
161  m_interfaceList.emplace_back( I::interfaceID(), i );
162  }

◆ declareProperty() [1/2]

template<class T >
Gaudi::Details::PropertyBase* AlgTool::declareProperty ( const std::string name,
ToolHandle< T > &  hndl,
const std::string doc = "none" 
)
inline

Definition at line 168 of file AlgTool.h.

169  {
170  this->declareTool( hndl, hndl.typeAndName() ).ignore();
171  return PropertyHolderImpl::declareProperty( name, hndl, doc );
172  }

◆ declareProperty() [2/2]

template<class T >
Gaudi::Details::PropertyBase* AlgTool::declareProperty ( const std::string name,
ToolHandleArray< T > &  hndlArr,
const std::string doc = "none" 
)
inline

Definition at line 197 of file AlgTool.h.

198  {
199  addToolsArray( hndlArr );
200  return PropertyHolderImpl::declareProperty( name, hndlArr, doc );
201  }

◆ declareTool() [1/2]

template<class T >
StatusCode AlgTool::declareTool ( ToolHandle< T > &  handle,
bool  createIf = true 
)
inline

Definition at line 175 of file AlgTool.h.

175  {
176  return this->declareTool( handle, handle.typeAndName(), createIf );
177  }

◆ declareTool() [2/2]

template<class T >
StatusCode AlgTool::declareTool ( ToolHandle< T > &  handle,
const std::string toolTypeAndName,
bool  createIf = true 
)
inline

Definition at line 180 of file AlgTool.h.

180  {
181 
182  StatusCode sc = handle.initialize( toolTypeAndName, handle.isPublic() ? nullptr : this, createIf );
183  if ( !sc ) {
184  throw GaudiException{ std::string{ "Cannot create handle for " } + ( handle.isPublic() ? "public" : "private" ) +
185  " tool " + toolTypeAndName,
186  name(), sc };
187  }
188 
189  m_toolHandles.push_back( &handle );
190 
191  return sc;
192  }

◆ deregisterTool()

void AlgTool::deregisterTool ( IAlgTool tool) const
inline

Definition at line 217 of file AlgTool.h.

217  {
218  auto it = std::find( m_tools.begin(), m_tools.end(), tool );
219  if ( it != m_tools.end() ) {
220  if ( msgLevel( MSG::DEBUG ) ) debug() << "De-Registering tool " << tool->name() << endmsg;
221  m_tools.erase( it );
222  } else {
223  if ( msgLevel( MSG::DEBUG ) ) debug() << "Could not de-register tool " << tool->name() << endmsg;
224  }
225  }

◆ evtSvc()

IDataProviderSvc * AlgTool::evtSvc ( ) const

accessor to event service service

Returns
pointer to detector service

Definition at line 97 of file AlgTool.cpp.

97  {
98  if ( !m_evtSvc ) {
99  m_evtSvc = service( "EventDataSvc", true );
100  if ( !m_evtSvc ) { throw GaudiException( "Service [EventDataSvc] not found", name(), StatusCode::FAILURE ); }
101  }
102  return m_evtSvc.get();
103 }

◆ finalize()

StatusCode AlgTool::finalize ( )
override

Definition at line 266 of file AlgTool.cpp.

268 {
269  // For the time being there is nothing to be done here.
270  return StatusCode::SUCCESS;
271 }

◆ FSMState()

Gaudi::StateMachine::State AlgTool::FSMState ( ) const
inlineoverride

Definition at line 90 of file AlgTool.h.

90 { return m_state; }

◆ initialize()

StatusCode AlgTool::initialize ( )
override

Definition at line 199 of file AlgTool.cpp.

201 {
202  // For the time being there is nothing to be done here.
203  // Setting the properties is done by the ToolSvc calling setProperties()
204  // explicitly.
205  return StatusCode::SUCCESS;
206 }

◆ initToolHandles()

void AlgTool::initToolHandles ( ) const
private

Definition at line 358 of file AlgTool.cpp.

358  {
359  auto init_one = [&]( BaseToolHandle* th ) {
360  if ( !th->isEnabled() ) {
361  if ( msgLevel( MSG::DEBUG ) && !th->typeAndName().empty() )
362  debug() << "ToolHandle " << th->typeAndName() << " not used" << endmsg;
363  return;
364  }
365  if ( !th->get() ) {
366  auto sc = th->retrieve();
367  if ( sc.isFailure() ) {
368  throw GaudiException( "Failed to retrieve tool " + th->typeAndName(), this->name(), StatusCode::FAILURE );
369  }
370  }
371  auto* tool = th->get();
372  if ( msgLevel( MSG::DEBUG ) )
373  debug() << "Adding " << ( th->isPublic() ? "public" : "private" ) << " ToolHandle tool " << tool->name() << " ("
374  << tool->type() << ")" << endmsg;
376  };
377 
378  for ( auto thArr : m_toolHandleArrays ) {
379  if ( msgLevel( MSG::DEBUG ) )
380  debug() << "Registering all Tools in ToolHandleArray " << thArr->propertyName() << endmsg;
381  // Iterate over its tools:
382  for ( auto toolHandle : thArr->getBaseArray() ) {
383  // Try to cast it into a BaseToolHandle pointer:
384  BaseToolHandle* bth = dynamic_cast<BaseToolHandle*>( toolHandle );
385  if ( bth ) {
386  init_one( bth );
387  } else {
388  error() << "Error retrieving Tool " << toolHandle->typeAndName() << " in ToolHandleArray "
389  << thArr->propertyName() << ". Not registered" << endmsg;
390  }
391  }
392  }
393 
394  for ( BaseToolHandle* th : m_toolHandles ) init_one( th );
395 
396  m_toolHandlesInit = true;
397 }

◆ monitorSvc()

IMonitorSvc* AlgTool::monitorSvc ( ) const
inline

Access the monitor service.

Attention
Note that this method will return a NULL pointer if no monitor service is configured to be present. You must take this possibility into account when using the pointer
Returns
Pointer to the Monitor service
Return values
NULLNo monitor service is present
non-NULLA monitor service is present and available to be used

Definition at line 253 of file AlgTool.h.

253  {
254  // If not already located try to locate it without forcing a creation
255  if ( !m_pMonitorSvc ) m_pMonitorSvc = service( m_monitorSvcName, false, true );
256  return m_pMonitorSvc.get();
257  }

◆ name()

const std::string & AlgTool::name ( ) const
override

Retrieve full identifying name of the concrete tool object.

Definition at line 67 of file AlgTool.cpp.

69 {
70  return m_name;
71 }

◆ parent()

const IInterface * AlgTool::parent ( ) const
override

Retrieve parent of the sub-algtool.

Definition at line 81 of file AlgTool.cpp.

83 {
84  return m_parent;
85 }

◆ queryInterface()

StatusCode AlgTool::queryInterface ( const InterfaceID riid,
void **  ppvUnknown 
)
override

Query for a given interface.

Definition at line 50 of file AlgTool.cpp.

52 {
53  if ( !ppvi ) { return StatusCode::FAILURE; } // RETURN
54  StatusCode sc = base_class::queryInterface( riid, ppvi );
55  if ( sc.isSuccess() ) return sc;
57  [&]( const std::pair<InterfaceID, void*>& item ) { return item.first.versionMatch( riid ); } );
58  if ( i == std::end( m_interfaceList ) ) {
59  *ppvi = nullptr;
60  return Status::NO_INTERFACE; // RETURN
61  }
62  *ppvi = i->second;
63  addRef();
64  return StatusCode::SUCCESS; // RETURN
65 }

◆ registerTool()

void AlgTool::registerTool ( IAlgTool tool) const
inline

Definition at line 212 of file AlgTool.h.

212  {
213  if ( msgLevel( MSG::DEBUG ) ) debug() << "Registering tool " << tool->name() << endmsg;
215  }

◆ reinitialize()

StatusCode AlgTool::reinitialize ( )
override

Definition at line 292 of file AlgTool.cpp.

294 {
295  /* @TODO
296  * MCl 2008-10-23: the implementation of reinitialize as finalize+initialize
297  * is causing too many problems
298  *
299  // Default implementation is finalize+initialize
300  StatusCode sc = finalize();
301  if (sc.isFailure()) {
302  error() << "reinitialize(): cannot be finalized" << endmsg;
303  return sc;
304  }
305  sc = initialize();
306  if (sc.isFailure()) {
307  error() << "reinitialize(): cannot be initialized" << endmsg;
308  return sc;
309  }
310  */
311  return StatusCode::SUCCESS;
312 }

◆ restart()

StatusCode AlgTool::restart ( )
override

Definition at line 334 of file AlgTool.cpp.

336 {
337  // Default implementation is stop+start
338  StatusCode sc = stop();
339  if ( sc.isFailure() ) {
340  error() << "restart(): cannot be stopped" << endmsg;
341  return sc;
342  }
343  sc = start();
344  if ( sc.isFailure() ) {
345  error() << "restart(): cannot be started" << endmsg;
346  return sc;
347  }
348  return StatusCode::SUCCESS;
349 }

◆ service() [1/4]

SmartIF< IService > AlgTool::service ( std::string_view  name,
const bool  createIf = true,
const bool  quiet = false 
) const

Return a pointer to the service identified by name (or "type/name")

Definition at line 425 of file AlgTool.cpp.

425  {
426  const ServiceLocatorHelper helper( *serviceLocator(), *this );
427  return helper.service( name, quiet, createIf );
428 }

◆ service() [2/4]

template<typename T >
SmartIF<T> AlgTool::service ( std::string_view  name,
const bool  createIf = true,
const bool  quiet = false 
) const
inline

Definition at line 154 of file AlgTool.h.

154  {
155  return SmartIF<T>( service( name, createIf, quiet ) );
156  }

◆ service() [3/4]

template<class T >
StatusCode AlgTool::service ( std::string_view  name,
T *&  svc,
bool  createIf = true 
) const
inline

Access a service by name, creating it if it doesn't already exist.

Definition at line 137 of file AlgTool.h.

138  {
139  return service_i( name, createIf, T::interfaceID(), (void**)&svc );
140  }

◆ service() [4/4]

template<class T >
StatusCode AlgTool::service ( std::string_view  type,
std::string_view  name,
T *&  svc 
) const
inline

Access a service by name, type creating it if it doesn't already exist.

Definition at line 146 of file AlgTool.h.

146  {
147  return service_i( type, name, T::interfaceID(), reinterpret_cast<void**>( &svc ) );
148  }

◆ service_i() [1/2]

StatusCode AlgTool::service_i ( std::string_view  algName,
bool  createIf,
const InterfaceID iid,
void **  ppSvc 
) const
private

flag indicating whether ToolHandle tools have been added to m_tools

implementation of service method

implementation of legacy service method

Definition at line 413 of file AlgTool.cpp.

413  {
414  const ServiceLocatorHelper helper( *serviceLocator(), *this );
415  return helper.getService( svcName, createIf, iid, ppSvc );
416 }

◆ service_i() [2/2]

StatusCode AlgTool::service_i ( std::string_view  svcType,
std::string_view  svcName,
const InterfaceID iid,
void **  ppS 
) const
private

Definition at line 419 of file AlgTool.cpp.

420  {
421  const ServiceLocatorHelper helper( *serviceLocator(), *this );
422  return helper.createService( svcType, svcName, iid, ppSvc );
423 }

◆ serviceLocator()

SmartIF< ISvcLocator > & AlgTool::serviceLocator ( ) const
override

Retrieve pointer to service locator.

Definition at line 88 of file AlgTool.cpp.

90 {
91  return m_svcLocator;
92 }

◆ start()

StatusCode AlgTool::start ( )
override

Definition at line 223 of file AlgTool.cpp.

225 {
226  // For the time being there is nothing to be done here.
227  return StatusCode::SUCCESS;
228 }

◆ stop()

StatusCode AlgTool::stop ( )
override

Definition at line 245 of file AlgTool.cpp.

247 {
248  // For the time being there is nothing to be done here.
249  return StatusCode::SUCCESS;
250 }

◆ svcLoc()

ISvcLocator* AlgTool::svcLoc ( ) const
inline

shortcut for the method service locator

Definition at line 123 of file AlgTool.h.

123 { return serviceLocator(); }

◆ sysFinalize()

StatusCode AlgTool::sysFinalize ( )
override

Finalize AlgTool.

Definition at line 253 of file AlgTool.cpp.

253  {
254  //-----------------------------------------------------------------------------
255  return attempt( *this, "sysFinalize", [&]() {
257  Gaudi::Guards::AuditorGuard guard( this,
258  // check if we want to audit the initialize
260  StatusCode sc = finalize();
261  if ( sc.isSuccess() ) m_state = m_targetState;
262  return sc;
263  } );
264 }

◆ sysInitialize()

StatusCode AlgTool::sysInitialize ( )
override

Initialize AlgTool.

Definition at line 161 of file AlgTool.cpp.

161  {
162  //-----------------------------------------------------------------------------
163  return attempt( *this, "sysInitialize", [&]() {
165  Gaudi::Guards::AuditorGuard guard( this,
166  // check if we want to audit the initialize
168  StatusCode sc = initialize();
169  if ( !sc ) return sc;
170 
173 
174  // check for explicit circular data dependencies in declared handles
176  for ( auto& h : outputHandles() ) {
177  if ( !h->objKey().empty() ) out.emplace( h->fullKey() );
178  }
179  for ( auto& h : inputHandles() ) {
180  if ( !h->objKey().empty() && out.find( h->fullKey() ) != out.end() ) {
181  error() << "Explicit circular data dependency found for id " << h->fullKey() << endmsg;
182  sc = StatusCode::FAILURE;
183  }
184  }
185 
186  if ( !sc ) return sc;
187 
188  // visit all sub-tools, build full set
190  acceptDHVisitor( &avis );
191 
192  // initialize handles
193  initDataHandleHolder(); // this should 'freeze' the handle configuration.
194 
195  return sc;
196  } );
197 }

◆ sysReinitialize()

StatusCode AlgTool::sysReinitialize ( )
override

Initialize AlgTool.

Definition at line 274 of file AlgTool.cpp.

274  {
275  //-----------------------------------------------------------------------------
276 
277  // Check that the current status is the correct one.
279  error() << "sysReinitialize(): cannot reinitialize tool not initialized" << endmsg;
280  return StatusCode::FAILURE;
281  }
282 
283  return attempt( *this, "SysReinitialize()", [&]() {
284  Gaudi::Guards::AuditorGuard guard( this,
285  // check if we want to audit the initialize
287  return reinitialize();
288  } );
289 }

◆ sysRestart()

StatusCode AlgTool::sysRestart ( )
override

Start AlgTool.

Definition at line 315 of file AlgTool.cpp.

315  {
316  //-----------------------------------------------------------------------------
317 
318  // Check that the current status is the correct one.
320  error() << "sysRestart(): cannot reinitialize tool not started" << endmsg;
321  return StatusCode::FAILURE;
322  }
323 
324  return attempt( *this, "sysRestart", [&]() {
326  Gaudi::Guards::AuditorGuard guard( this,
327  // check if we want to audit the initialize
329  return restart();
330  } );
331 }

◆ sysStart()

StatusCode AlgTool::sysStart ( )
override

Start AlgTool.

Definition at line 209 of file AlgTool.cpp.

209  {
210  //-----------------------------------------------------------------------------
211  return attempt( *this, "sysStart", [&]() {
213  Gaudi::Guards::AuditorGuard guard( this,
214  // check if we want to audit the initialize
215  m_auditorStart ? auditorSvc() : nullptr, IAuditor::Start );
216  StatusCode sc = start();
217  if ( sc.isSuccess() ) m_state = m_targetState;
218  return sc;
219  } );
220 }

◆ sysStop()

StatusCode AlgTool::sysStop ( )
override

Stop AlgTool.

Definition at line 231 of file AlgTool.cpp.

231  {
232  //-----------------------------------------------------------------------------
233  return attempt( *this, "sysStop", [&]() {
235  Gaudi::Guards::AuditorGuard guard( this,
236  // check if we want to audit the initialize
237  m_auditorStop ? auditorSvc() : nullptr, IAuditor::Stop );
238  StatusCode sc = stop();
239  if ( sc.isSuccess() ) m_state = m_targetState;
240  return sc;
241  } );
242 }

◆ targetFSMState()

Gaudi::StateMachine::State AlgTool::targetFSMState ( ) const
inlineoverride

Definition at line 91 of file AlgTool.h.

91 { return m_targetState; }

◆ terminate()

StatusCode AlgTool::terminate ( )
inlineoverride

Definition at line 87 of file AlgTool.h.

87 { return StatusCode::SUCCESS; }

◆ tools() [1/2]

std::vector< IAlgTool * > & AlgTool::tools ( )
protected

Definition at line 405 of file AlgTool.cpp.

405  {
407 
408  return m_tools;
409 }

◆ tools() [2/2]

const std::vector< IAlgTool * > & AlgTool::tools ( ) const

Definition at line 399 of file AlgTool.cpp.

399  {
401 
402  return m_tools;
403 }

◆ toolSvc()

IToolSvc * AlgTool::toolSvc ( ) const

The standard ToolSvc service, Return a pointer to the service if present.

Definition at line 105 of file AlgTool.cpp.

107 {
108  if ( !m_ptoolSvc ) {
109  m_ptoolSvc = service( "ToolSvc", true );
110  if ( !m_ptoolSvc ) { throw GaudiException( "Service [ToolSvc] not found", name(), StatusCode::FAILURE ); }
111  }
112  return m_ptoolSvc.get();
113 }

◆ type()

const std::string & AlgTool::type ( ) const
override

Retrieve type (concrete class) of the sub-algtool.

Definition at line 74 of file AlgTool.cpp.

76 {
77  return m_type;
78 }

Friends And Related Function Documentation

◆ ToolVisitor

friend class ToolVisitor
friend

Definition at line 64 of file AlgTool.h.

Member Data Documentation

◆ m_auditInit

Gaudi::Property<bool> AlgTool::m_auditInit { this, "AuditTools", false, "[[deprecated]] unused" }
private

Definition at line 311 of file AlgTool.h.

◆ m_auditorFinalize

Gaudi::Property<bool> AlgTool::m_auditorFinalize { this, "AuditFinalize", false, "trigger auditor on finalize()" }
private

Definition at line 315 of file AlgTool.h.

◆ m_auditorInitialize

Gaudi::Property<bool> AlgTool::m_auditorInitialize { this, "AuditInitialize", false, "trigger auditor on initialize()" }
private

Definition at line 312 of file AlgTool.h.

◆ m_auditorReinitialize

Gaudi::Property<bool> AlgTool::m_auditorReinitialize { this, "AuditReinitialize", false, "trigger auditor on reinitialize()" }
private

Definition at line 316 of file AlgTool.h.

◆ m_auditorRestart

Gaudi::Property<bool> AlgTool::m_auditorRestart { this, "AuditRestart", false, "trigger auditor on restart()" }
private

Definition at line 317 of file AlgTool.h.

◆ m_auditorStart

Gaudi::Property<bool> AlgTool::m_auditorStart { this, "AuditStart", false, "trigger auditor on start()" }
private

Definition at line 313 of file AlgTool.h.

◆ m_auditorStop

Gaudi::Property<bool> AlgTool::m_auditorStop { this, "AuditStop", false, "trigger auditor on stop()" }
private

Definition at line 314 of file AlgTool.h.

◆ m_evtSvc

SmartIF<IDataProviderSvc> AlgTool::m_evtSvc
mutableprivate

Event data service.

Definition at line 294 of file AlgTool.h.

◆ m_interfaceList

InterfaceList AlgTool::m_interfaceList
private

Interface list.

Definition at line 299 of file AlgTool.h.

◆ m_monitorSvcName

Gaudi::Property<std::string> AlgTool::m_monitorSvcName
private
Initial value:
{ this, "MonitorService", "MonitorSvc",
"name to use for Monitor Service" }

Definition at line 308 of file AlgTool.h.

◆ m_name

const std::string AlgTool::m_name
private

AlgTool full name.

Definition at line 290 of file AlgTool.h.

◆ m_outputLevel

Gaudi::Property<int> AlgTool::m_outputLevel
private
Initial value:
{
this, "OutputLevel", setUpMessaging(),
"output level" }

Definition at line 303 of file AlgTool.h.

◆ m_parent

const IInterface* AlgTool::m_parent = nullptr
private

AlgTool parent.

Definition at line 291 of file AlgTool.h.

◆ m_pAuditorSvc

SmartIF<IAuditorSvc> AlgTool::m_pAuditorSvc
mutableprivate

Auditor Service.

Definition at line 297 of file AlgTool.h.

◆ m_pMonitorSvc

SmartIF<IMonitorSvc> AlgTool::m_pMonitorSvc
mutableprivate

Online Monitoring Service.

Definition at line 296 of file AlgTool.h.

◆ m_ptoolSvc

SmartIF<IToolSvc> AlgTool::m_ptoolSvc
mutableprivate

Tool service.

Definition at line 295 of file AlgTool.h.

◆ m_state

state of the Tool

Definition at line 331 of file AlgTool.h.

◆ m_svcLocator

SmartIF<ISvcLocator> AlgTool::m_svcLocator
mutableprivate

Pointer to Service Locator service.

Definition at line 293 of file AlgTool.h.

◆ m_targetState

state of the Tool

Definition at line 332 of file AlgTool.h.

◆ m_toolHandleArrays

std::vector<GaudiHandleArrayBase*> AlgTool::m_toolHandleArrays
mutableprivate

Definition at line 322 of file AlgTool.h.

◆ m_toolHandles

std::vector<BaseToolHandle*> AlgTool::m_toolHandles
mutableprivate

Definition at line 321 of file AlgTool.h.

◆ m_toolHandlesInit

bool AlgTool::m_toolHandlesInit = false
mutableprivate

Definition at line 323 of file AlgTool.h.

◆ m_tools

std::vector<IAlgTool*> AlgTool::m_tools
mutableprivate

Definition at line 320 of file AlgTool.h.

◆ m_type

std::string AlgTool::m_type
private

AlgTool type (concrete class name)

Definition at line 289 of file AlgTool.h.

◆ m_updateDataHandles

std::unique_ptr<IDataHandleVisitor> AlgTool::m_updateDataHandles
protected

Hook for for derived classes to provide a custom visitor for data handles.

Definition at line 233 of file AlgTool.h.

◆ ToolSvc

friend AlgTool::ToolSvc
private

Definition at line 63 of file AlgTool.h.


The documentation for this class was generated from the following files:
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: PropertyBase.h:35
AlgTool::m_auditorFinalize
Gaudi::Property< bool > m_auditorFinalize
Definition: AlgTool.h:315
IAuditor::ReStart
@ ReStart
Definition: IAuditor.h:34
AlgTool::m_auditorRestart
Gaudi::Property< bool > m_auditorRestart
Definition: AlgTool.h:317
std::string
STL class.
details::size
constexpr auto size(const T &, Args &&...) noexcept
Definition: AnyDataWrapper.h:23
AlgTool::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: AlgTool.h:296
AlgTool::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: AlgTool.h:321
AlgTool::addToolsArray
void addToolsArray(ToolHandleArray< T > &hndlArr)
Definition: AlgTool.h:204
std::move
T move(T... args)
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:331
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
AlgTool::m_updateDataHandles
std::unique_ptr< IDataHandleVisitor > m_updateDataHandles
Hook for for derived classes to provide a custom visitor for data handles.
Definition: AlgTool.h:233
AlgTool::m_toolHandlesInit
bool m_toolHandlesInit
Definition: AlgTool.h:323
std::unordered_set< DataObjID, DataObjID_Hasher >
AlgTool::m_auditorStop
Gaudi::Property< bool > m_auditorStop
Definition: AlgTool.h:314
std::pair< InterfaceID, void * >
AlgTool::m_auditorReinitialize
Gaudi::Property< bool > m_auditorReinitialize
Definition: AlgTool.h:316
AlgTool::parent
const IInterface * parent() const override
Retrieve parent of the sub-algtool.
Definition: AlgTool.cpp:81
AlgTool::declareTool
StatusCode declareTool(ToolHandle< T > &handle, bool createIf=true)
Definition: AlgTool.h:175
Gaudi::StateMachine::FINALIZE
@ FINALIZE
Definition: StateMachine.h:38
std::find
T find(T... args)
AlgTool::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Pointer to Service Locator service.
Definition: AlgTool.h:293
AlgTool::restart
StatusCode restart() override
Definition: AlgTool.cpp:334
GaudiException
Definition: GaudiException.h:31
AlgTool::m_evtSvc
SmartIF< IDataProviderSvc > m_evtSvc
Event data service.
Definition: AlgTool.h:294
AlgTool::m_auditorInitialize
Gaudi::Property< bool > m_auditorInitialize
Definition: AlgTool.h:312
AlgTool::type
const std::string & type() const override
Retrieve type (concrete class) of the sub-algtool.
Definition: AlgTool.cpp:74
std::unique_ptr::get
T get(T... args)
AlgTool::reinitialize
StatusCode reinitialize() override
Definition: AlgTool.cpp:292
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::outputHandles
std::vector< Gaudi::DataHandle * > outputHandles() const override
Definition: DataHandleHolderBase.h:41
AlgTool::acceptDHVisitor
void acceptDHVisitor(IDataHandleVisitor *) const override
Definition: AlgTool.cpp:441
Gaudi::Property::assign
bool assign(const Details::PropertyBase &source) override
get the value from another property
Definition: Property.h:370
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:315
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:320
AlgTool::initialize
StatusCode initialize() override
Definition: AlgTool.cpp:199
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:332
IMonitorSvc
Definition: IMonitorSvc.h:33
DHHVisitor
Definition: DataHandleHolderVisitor.h:21
CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:148
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:431
AlgTool::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: AlgTool.h:90
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:67
Service
Definition: Service.h:46
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::m_outputDataObjs
DataObjIDColl m_outputDataObjs
Definition: DataHandleHolderBase.h:98
Gaudi::Guards::AuditorGuard
Definition: Guards.h:213
Gaudi::StateMachine::INITIALIZE
@ INITIALIZE
Definition: StateMachine.h:35
std::vector::push_back
T push_back(T... args)
AlgTool::m_parent
const IInterface * m_parent
AlgTool parent.
Definition: AlgTool.h:291
IAuditor::Finalize
@ Finalize
Definition: IAuditor.h:34
bug_34121.tool
tool
Definition: bug_34121.py:18
CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >::setUpMessaging
MSG::Level setUpMessaging() const
Set up local caches.
Definition: CommonMessaging.h:174
Auditor
Definition: Auditor.h:43
AlgTool::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: AlgTool.cpp:88
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::initDataHandleHolder
void initDataHandleHolder()
initializes all handles - called by the sysInitialize method of any descendant of this
Definition: DataHandleHolderBase.h:94
StatusCode
Definition: StatusCode.h:65
IAuditor::Stop
@ Stop
Definition: IAuditor.h:34
AlgTool::monitorSvc
IMonitorSvc * monitorSvc() const
Access the monitor service.
Definition: AlgTool.h:253
IMonitorSvc::declareInfo
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
IAuditor::Initialize
@ Initialize
Definition: IAuditor.h:34
IAuditor::ReInitialize
@ ReInitialize
Definition: IAuditor.h:34
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:90
AlgSequencer.h
h
Definition: AlgSequencer.py:31
AlgTool::m_type
std::string m_type
AlgTool type (concrete class name)
Definition: AlgTool.h:289
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::m_inputDataObjs
DataObjIDColl m_inputDataObjs
Definition: DataHandleHolderBase.h:98
ServiceLocatorHelper
an helper to share the implementation of service() among the various kernel base classes
Definition: ServiceLocatorHelper.h:27
std::vector::erase
T erase(T... args)
CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >::updateMsgStreamOutputLevel
void updateMsgStreamOutputLevel(int level)
Update the output level of the cached MsgStream.
Definition: CommonMessaging.h:185
AlgTool::m_ptoolSvc
SmartIF< IToolSvc > m_ptoolSvc
Tool service.
Definition: AlgTool.h:295
AlgTool::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: AlgTool.h:322
SmartIF< IProperty >
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
Gaudi::StateMachine::RUNNING
@ RUNNING
Definition: StateMachine.h:26
StatusCode::ignore
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition: StatusCode.h:139
ToolHandleInfo::isPublic
bool isPublic() const noexcept
Definition: ToolHandle.h:51
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::inputHandles
std::vector< Gaudi::DataHandle * > inputHandles() const override
Definition: DataHandleHolderBase.h:38
Gaudi::StateMachine::ChangeState
State GAUDI_API ChangeState(const Transition transition, const State state)
Function to get the new state according to the required transition, checking if the transition is all...
Definition: StateMachine.cpp:19
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:129
IAuditor::Start
@ Start
Definition: IAuditor.h:34
AlgTool::m_interfaceList
InterfaceList m_interfaceList
Interface list.
Definition: AlgTool.h:299
std::list::emplace_back
T emplace_back(T... args)
PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Details::PropertyBase &prop)
Declare a property.
Definition: PropertyHolder.h:106
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
AlgTool::service
StatusCode service(std::string_view name, T *&svc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: AlgTool.h:137
AlgTool
Definition: AlgTool.h:62
BaseToolHandle
Definition: ToolHandle.h:80
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:86
AlgTool::tools
const std::vector< IAlgTool * > & tools() const
Definition: AlgTool.cpp:399
std::vector::begin
T begin(T... args)
Gaudi::StateMachine::INITIALIZED
@ INITIALIZED
Definition: StateMachine.h:25
IInterface
Definition: IInterface.h:239
AlgTool::m_auditInit
Gaudi::Property< bool > m_auditInit
Definition: AlgTool.h:311
Gaudi::StateMachine::START
@ START
Definition: StateMachine.h:36
AlgTool::m_name
const std::string m_name
AlgTool full name.
Definition: AlgTool.h:290
AlgTool::m_pAuditorSvc
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: AlgTool.h:297
ToolHandle::initialize
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:213
ToolHandle::typeAndName
std::string typeAndName() const override
Definition: ToolHandle.h:273
std::vector::end
T end(T... args)
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
AlgTool::stop
StatusCode stop() override
Definition: AlgTool.cpp:245
AlgTool::m_outputLevel
Gaudi::Property< int > m_outputLevel
Definition: AlgTool.h:303
IOTest.appMgr
appMgr
Definition: IOTest.py:105
AlgTool::m_auditorStart
Gaudi::Property< bool > m_auditorStart
Definition: AlgTool.h:313
Gaudi::Property< bool >
AlgTool::start
StatusCode start() override
Definition: AlgTool.cpp:223
AlgTool::service_i
StatusCode service_i(std::string_view algName, bool createIf, const InterfaceID &iid, void **ppSvc) const
flag indicating whether ToolHandle tools have been added to m_tools
Definition: AlgTool.cpp:413
Gaudi::StateMachine::STOP
@ STOP
Definition: StateMachine.h:37
AlgTool::m_monitorSvcName
Gaudi::Property< std::string > m_monitorSvcName
Definition: AlgTool.h:308
IDataHandleVisitor::visit
virtual void visit(const IDataHandleHolder *)=0
AlgTool::initToolHandles
void initToolHandles() const
Definition: AlgTool.cpp:358
PrepareBase.out
out
Definition: PrepareBase.py:20
AlgTool::finalize
StatusCode finalize() override
Definition: AlgTool.cpp:266