| The Gaudi Framework v32r1 (f65d50dc)

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
AlgTool Class Reference

Base class from which all the concrete tool classes should be derived. More...

`#include <GaudiKernel/AlgTool.h>`

Inheritance diagram for AlgTool:
[legend]
Collaboration diagram for AlgTool:
[legend]

## 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::string & | name () const override
| Retrieve full identifying name of the concrete tool object. More...
const std::string & | type () const override
| Retrieve type (concrete class) of the sub-algtool. More...
const IInterface * | parent () 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 (const std::string &type, const std::string &name, const IInterface *parent)
| Standard Constructor. More...
SmartIF< ISvcLocator > & | serviceLocator () const override
| Retrieve pointer to service locator. More...
ISvcLocator * | svcLoc () const
| shortcut for the method service locator More...
IDataProviderSvc * | evtSvc () const
| accessor to event service service More...
IToolSvc * | toolSvc () const
| The standard ToolSvc service, Return a pointer to the service if present. More...
StatusCode | setProperties ()
| Method for setting declared properties to the values specified in the jobOptions via the job option service. More...
template<class T >
StatusCode | service (const std::string &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 (const std::string &type, const std::string &name, T *&svc) const
| Access a service by name, type creating it if it doesn't already exist. More...
SmartIF< IService > | service (const std::string &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 (const std::string &name, const bool createIf=true, const bool quiet=false) const
template<class T >
Gaudi::Details::PropertyBase * | declareProperty (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, std::string toolTypeAndName, bool createIf=true)
template<class T >
Gaudi::Details::PropertyBase * | declareProperty (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
IAuditorSvc * | auditorSvc () const
| Access the auditor service. More...
IMonitorSvc * | monitorSvc () 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 DataObjIDColl & | extraInputDeps () const override
virtual const DataObjIDColl & | extraOutputDeps () const override
void | declare (Gaudi::DataHandle &handle) override
void | renounce (Gaudi::DataHandle &handle) override
const DataObjIDColl & | inputDataObjs () const override
const DataObjIDColl & | outputDataObjs () 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::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >
| PropertyHolder ()=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (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::PropertyBase * | declareProperty (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::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
| Declare a remote property. More...
StatusCode | setProperty (const Gaudi::Details::PropertyBase &p) override
| set the property form another property More...
StatusCode | setProperty (const std::string &s) override
| set the property from the formatted string More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| set the property from name and the value More...
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override
| get the property More...
const Gaudi::Details::PropertyBase & | getProperty (const std::string &name) const override
| get the property by name More...
StatusCode | getProperty (const std::string &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 (const std::string &name) const override
| Return true if we have a property with the given name. More...
| PropertyHolder (const PropertyHolder &)=delete
PropertyHolder & | operator= (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...
MSG::Level | outputLevel () const
| Backward compatibility function for getting the output level. More...
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
const SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) 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 PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >
Gaudi::Details::PropertyBase * | property (const std::string &name) const
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< IDataHandleVisitor > | m_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 (const std::string &algName, bool createIf, const InterfaceID &iid, void **ppSvc) const
| flag indicating whether ToolHandle tools have been added to m_tools More...
StatusCode | service_i (const std::string &svcType, const std::string &svcName, const InterfaceID &iid, void **ppS) const

## Private Attributes
std::string | m_type
| AlgTool type (concrete class name) More...
const std::string | m_name
| AlgTool full name. More...
const IInterface * | m_parent = nullptr
| AlgTool parent. More...
SmartIF< ISvcLocator > | m_svcLocator
| Pointer to Service Locator service. More...
SmartIF< IDataProviderSvc > | m_evtSvc
| Event data service. More...
SmartIF< IToolSvc > | m_ptoolSvc
| Tool service. More...
SmartIF< IMonitorSvc > | m_pMonitorSvc
| Online Monitoring Service. More...
SmartIF< IAuditorSvc > | m_pAuditorSvc
| Auditor Service. More...
InterfaceList | m_interfaceList
| Interface list. More...
Gaudi::Property< int > | m_outputLevel
Gaudi::Property< std::string > | m_monitorSvcName
Gaudi::Property< bool > | m_auditInit {this, "AuditTools", false, " 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...

## 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 47 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 51 of file AlgTool.h.

## ◆ InterfaceList

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

Definition at line 276 of file AlgTool.h.

## Constructor & Destructor Documentation

## ◆ AlgTool()

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

Standard Constructor.

Parameters

  type | the concrete class of the sub-algtool
  name | the full name of the concrete sub-algtool
  parent | the parent of the concrete sub-algtool

Definition at line 118 of file AlgTool.cpp.

120 : m_type( type ), m_name( name ), m_parent( parent ) {
121 addRef(); // Initial count set to 1
122
123 IInterface* _p = const_cast<IInterface*>( parent );
124
125 if ( Gaudi::Algorithm* _alg = dynamic_cast<Gaudi::Algorithm*>( _p ) ) {
126 m_svcLocator = _alg->serviceLocator();
127 } else if ( Service* _svc = dynamic_cast<Service*>( _p ) ) {
128 m_svcLocator = _svc->serviceLocator();
129 } else if ( AlgTool* _too = dynamic_cast<AlgTool*>( _p ) ) {
130 m_svcLocator = _too->serviceLocator();
131 } else if ( Auditor* _aud = dynamic_cast<Auditor*>( _p ) ) {
132 m_svcLocator = _aud->serviceLocator();
133 } else {
134 throw GaudiException( "Failure to create tool '" + type + "/" + name + "': illegal parent type '" +
135 System::typeinfoName( typeid( *_p ) ) + "'",
136 "AlgTool", StatusCode::FAILURE );
137 }
138
139 // inherit output level from parent
140 { // get the "OutputLevel" property from parent
141 SmartIF<IProperty> pprop( _p );
142 if ( pprop && pprop->hasProperty( "OutputLevel" ) ) { m_outputLevel.assign( pprop->getProperty( "OutputLevel" ) ); }
143 }
144
145 {
146 // Auditor monitoring properties
147 // Initialize the default value from ApplicationMgr AuditAlgorithms
148 Gaudi::Property<bool> audit( false );
149 // note that here we need that the service locator is already defined
150 auto appMgr = serviceLocator()->service<IProperty>( "ApplicationMgr" );
151 if ( appMgr && appMgr->hasProperty( "AuditTools" ) ) { audit.assign( appMgr->getProperty( "AuditTools" ) ); }
152 m_auditInit = audit;
153 m_auditorInitialize = audit;
154 m_auditorStart = audit;
155 m_auditorStop = audit;
156 m_auditorFinalize = audit;
157 m_auditorReinitialize = audit;
158 m_auditorRestart = audit;
159 }
160 }
SmartIF< IProperty >
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
AlgTool::m_auditorStart
Gaudi::Property< bool > m_auditorStart
Definition: AlgTool.h:302
AlgTool::m_type
std::string m_type
AlgTool type (concrete class name)
Definition: AlgTool.h:278
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:352
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
AlgTool::m_parent
const IInterface * m_parent
AlgTool parent.
Definition: AlgTool.h:280
AlgTool::m_auditorReinitialize
Gaudi::Property< bool > m_auditorReinitialize
Definition: AlgTool.h:305
AlgTool::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: AlgTool.cpp:79
AlgTool::m_name
const std::string m_name
AlgTool full name.
Definition: AlgTool.h:279
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:76
AlgTool::m_outputLevel
Gaudi::Property< int > m_outputLevel
Definition: AlgTool.h:292
IInterface
Definition of the basic interface.
Definition: IInterface.h:244
AlgTool::m_auditorStop
Gaudi::Property< bool > m_auditorStop
Definition: AlgTool.h:303
AlgTool::m_auditorRestart
Gaudi::Property< bool > m_auditorRestart
Definition: AlgTool.h:306
AlgTool::m_auditInit
Gaudi::Property< bool > m_auditInit
Definition: AlgTool.h:300
AlgTool
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:47
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:79
AlgTool::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Pointer to Service Locator service.
Definition: AlgTool.h:282
IOTest.appMgr
appMgr
Definition: IOTest.py:92
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
AlgTool::type
const std::string & type() const override
Retrieve type (concrete class) of the sub-algtool.
Definition: AlgTool.cpp:65
AlgTool::m_auditorInitialize
Gaudi::Property< bool > m_auditorInitialize
Definition: AlgTool.h:301
IProperty
The IProperty is the basic interface for all components which have properties that can be set or get.
Definition: IProperty.h:20
Service
Base class for all services.
Definition: Service.h:36
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58
AlgTool::m_auditorFinalize
Gaudi::Property< bool > m_auditorFinalize
Definition: AlgTool.h:304
Auditor
Base class from which all concrete auditor classes should be derived.
Definition: Auditor.h:34
AlgTool::parent
const IInterface * parent() const override
Retrieve parent of the sub-algtool.
Definition: AlgTool.cpp:72

## ◆ ~AlgTool()

AlgTool::~AlgTool | ( |  | ) |
| override

Definition at line 354 of file AlgTool.cpp.

356 {
357 if ( m_pMonitorSvc ) { m_pMonitorSvc->undeclareAll( this ); }
358 }
AlgTool::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: AlgTool.h:285
IMonitorSvc::undeclareAll
virtual void undeclareAll(const IInterface *owner)=0
Undeclare monitoring information.

## Member Function Documentation

## ◆ acceptDHVisitor()

void AlgTool::acceptDHVisitor | ( | IDataHandleVisitor * | vis | ) | const
| override

Definition at line 472 of file AlgTool.cpp.

472 {
473 //-----------------------------------------------------------------------------
474 vis->visit( this );
475
476 for ( auto tool : tools() ) vis->visit( dynamic_cast<AlgTool*>( tool ) );
477 }
IDataHandleVisitor::visit
virtual void visit(const IDataHandleHolder *)=0
AlgTool::tools
const std::vector< IAlgTool * > & tools() const
Definition: AlgTool.cpp:430

## ◆ addToolsArray()

template<class T >

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

Definition at line 193 of file AlgTool.h.

193 {
194 m_toolHandleArrays.push_back( &hndlArr );
195 }
std::vector::push_back
T push_back(T... args)
AlgTool::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: AlgTool.h:311

## ◆ auditorSvc()

IAuditorSvc * AlgTool::auditorSvc | ( |  | ) | const

Access the auditor service.

Definition at line 462 of file AlgTool.cpp.

462 {
463 //---------------------------------------------------------------------------
464 if ( !m_pAuditorSvc ) {
465 m_pAuditorSvc = service( "AuditorSvc", true );
466 if ( !m_pAuditorSvc ) { throw GaudiException( "Service [AuditorSvc] not found", name(), StatusCode::FAILURE ); }
467 }
468 return m_pAuditorSvc.get();
469 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
AlgTool::service
StatusCode service(const std::string &name, T *&svc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: AlgTool.h:128
AlgTool::m_pAuditorSvc
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: AlgTool.h:286
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ configure()

StatusCode AlgTool::configure | ( |  | ) |
| inline override

Definition at line 66 of file AlgTool.h.

66 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ declareInfo() [1/2]

template<class T >

void AlgTool::declareInfo | ( | const std::string & | name,
|  | const T & | var,
|  | const std::string & | desc
| ) |  | const
| inline

Declare monitoring information.

Parameters

  name | Monitoring information name known to the external system
  var | Monitoring Listener address (the item to monitor...)
  desc | Textual description of the information being monitored

Definition at line 254 of file AlgTool.h.

254 {
255 IMonitorSvc* mS = monitorSvc();
256 if ( mS ) mS->declareInfo( name, var, desc, this );
257 }
AlgTool::monitorSvc
IMonitorSvc * monitorSvc() const
Access the monitor service.
Definition: AlgTool.h:242
IMonitorSvc
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:23
IMonitorSvc::declareInfo
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ declareInfo() [2/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

  name | Monitoring information name known to the external system
  format | Format information
  var | Monitoring Listener address
  size | Monitoring Listener address size
  desc | Textual description of the information being monitored

Definition at line 266 of file AlgTool.h.

267 {
268 IMonitorSvc* mS = monitorSvc();
269 if ( mS ) mS->declareInfo( name, format, var, size, desc, this );
270 }
details::size
constexpr auto size(const T &, Args &&...) noexcept
Definition: AnyDataWrapper.h:14
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109
AlgTool::monitorSvc
IMonitorSvc * monitorSvc() const
Access the monitor service.
Definition: AlgTool.h:242
IMonitorSvc
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:23
IMonitorSvc::declareInfo
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ declareInterface()

template<typename I >

void AlgTool::declareInterface | ( | I * | i | ) |
| inline protected

Definition at line 149 of file AlgTool.h.

149 {
150 m_interfaceList.emplace_back( I::interfaceID(), i );
151 }
AlgTool::m_interfaceList
InterfaceList m_interfaceList
Interface list.
Definition: AlgTool.h:288
std::list::emplace_back
T emplace_back(T... args)

## ◆ 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 157 of file AlgTool.h.

158 {
159 this->declareTool( hndl, hndl.typeAndName() ).ignore();
160 return PropertyHolderImpl::declareProperty( name, hndl, doc );
161 }
ToolHandle::typeAndName
std::string typeAndName() const override
Definition: ToolHandle.h:260
AlgTool::declareTool
StatusCode declareTool(ToolHandle< T > &handle, bool createIf=true)
Definition: AlgTool.h:164
PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Details::PropertyBase &prop)
Declare a property.
Definition: PropertyHolder.h:95
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ 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 186 of file AlgTool.h.

187 {
188 addToolsArray( hndlArr );
189 return PropertyHolderImpl::declareProperty( name, hndlArr, doc );
190 }
AlgTool::addToolsArray
void addToolsArray(ToolHandleArray< T > &hndlArr)
Definition: AlgTool.h:193
PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Details::PropertyBase &prop)
Declare a property.
Definition: PropertyHolder.h:95
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ declareTool() [1/2]

template<class T >

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

Definition at line 164 of file AlgTool.h.

164 {
165 return this->declareTool( handle, handle.typeAndName(), createIf );
166 }
ToolHandle::typeAndName
std::string typeAndName() const override
Definition: ToolHandle.h:260
AlgTool::declareTool
StatusCode declareTool(ToolHandle< T > &handle, bool createIf=true)
Definition: AlgTool.h:164

## ◆ declareTool() [2/2]

template<class T >

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

Definition at line 169 of file AlgTool.h.

169 {
170
171 StatusCode sc = handle.initialize( toolTypeAndName, handle.isPublic() ? nullptr : this, createIf );
172 if ( UNLIKELY( !sc ) ) {
173 throw GaudiException{std::string{"Cannot create handle for "} + ( handle.isPublic() ? "public" : "private" ) +
174 " tool " + toolTypeAndName,
175 name(), sc};
176 }
177
178 m_toolHandles.push_back( &handle );
179
180 return sc;
181 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:96
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
std::string
STL class.
std::vector::push_back
T push_back(T... args)
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
ToolHandleInfo::isPublic
bool isPublic() const noexcept
Definition: ToolHandle.h:40
ToolHandle::initialize
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:200
AlgTool::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: AlgTool.h:310
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ deregisterTool()

void AlgTool::deregisterTool | ( | IAlgTool * | tool | ) | const
| inline

Definition at line 206 of file AlgTool.h.

206 {
207 auto it = std::find( m_tools.begin(), m_tools.end(), tool );
208 if ( it != m_tools.end() ) {
209 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) debug() << "De-Registering tool " << tool->name() << endmsg;
210 m_tools.erase( it );
211 } else {
212 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) debug() << "Could not de-register tool " << tool->name() << endmsg;
213 }
214 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:96
MSG::DEBUG
Definition: IMessageSvc.h:15
std::vector::end
T end(T... args)
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:309
CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
std::vector::erase
T erase(T... args)
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
std::find
T find(T... args)
std::vector::begin
T begin(T... args)
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ evtSvc()

IDataProviderSvc * AlgTool::evtSvc | ( |  | ) | const

accessor to event service service

Returns
  pointer to detector service

Definition at line 88 of file AlgTool.cpp.

88 {
89 if ( !m_evtSvc ) {
90 m_evtSvc = service( "EventDataSvc", true );
91 if ( !m_evtSvc ) { throw GaudiException( "Service [EventDataSvc] not found", name(), StatusCode::FAILURE ); }
92 }
93 return m_evtSvc.get();
94 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
AlgTool::service
StatusCode service(const std::string &name, T *&svc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: AlgTool.h:128
AlgTool::m_evtSvc
SmartIF< IDataProviderSvc > m_evtSvc
Event data service.
Definition: AlgTool.h:283
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ finalize()

StatusCode AlgTool::finalize | ( |  | ) |
| override

Definition at line 268 of file AlgTool.cpp.

270 {
271 // For the time being there is nothing to be done here.
272 return StatusCode::SUCCESS;
273 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ FSMState()

Gaudi::StateMachine::State AlgTool::FSMState | ( |  | ) | const
| inline override

Definition at line 74 of file AlgTool.h.

74 { return m_state; }
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:319

## ◆ initialize()

StatusCode AlgTool::initialize | ( |  | ) |
| override

Definition at line 201 of file AlgTool.cpp.

203 {
204 // For the time being there is nothing to be done here.
205 // Setting the properties is done by the ToolSvc calling setProperties()
206 // explicitly.
207 return StatusCode::SUCCESS;
208 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ initToolHandles()

void AlgTool::initToolHandles | ( |  | ) | const
| private

Definition at line 360 of file AlgTool.cpp.

360 {
361
362 IAlgTool* tool = nullptr;
363 for ( auto thArr : m_toolHandleArrays ) {
364 if ( !thArr->retrieved() ) {
365 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
366 debug() << "ToolHandleArray " << thArr->propertyName() << " not used: not registering any of its Tools"
367 << endmsg;
368 } else {
369 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
370 debug() << "Registering all Tools in ToolHandleArray " << thArr->propertyName() << endmsg;
371 // Iterate over its tools:
372 for ( auto toolHandle : thArr->getBaseArray() ) {
373 // Try to cast it into a BaseToolHandle pointer:
374 BaseToolHandle* bth = dynamic_cast<BaseToolHandle*>( toolHandle );
375 if ( bth ) {
376 // If the cast was successful, the code is pretty simple:
377 tool = bth->get();
378 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
379 debug() << "Adding " << ( bth->isPublic() ? "public" : "private" ) << " ToolHandle tool " << tool->name()
380 << " (" << tool->type() << ") from ToolHandleArray " << thArr->propertyName() << endmsg;
381 }
382 m_tools.push_back( tool );
383 } else {
384 // If it wasn't for some strange reason, then fall back on the
385 // logic implemented previously:
386 if ( toolSvc()->retrieveTool( toolHandle->typeAndName(), tool, this, false ).isSuccess() ) {
387 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
388 debug() << "Adding private"
389 << " ToolHandle tool " << tool->name() << " (" << tool->type() << ") from ToolHandleArray "
390 << thArr->propertyName() << endmsg;
391 }
392 m_tools.push_back( tool );
393 } else if ( toolSvc()->retrieveTool( toolHandle->typeAndName(), tool, 0, false ).isSuccess() ) {
394 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
395 debug() << "Adding public"
396 << " ToolHandle tool " << tool->name() << " (" << tool->type() << ") from ToolHandleArray "
397 << thArr->propertyName() << endmsg;
398 }
399 m_tools.push_back( tool );
400 } else {
401 warning() << "Error retrieving Tool " << toolHandle->typeAndName() << " in ToolHandleArray "
402 << thArr->propertyName() << ". Not registered" << endmsg;
403 }
404 }
405 }
406 }
407 }
408
409 for ( auto th : m_toolHandles ) {
410 if ( !th->isEnabled() ) {
411 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) && !th->typeAndName().empty() )
412 debug() << "ToolHandle " << th->typeAndName() << " not used" << endmsg;
413 continue;
414 }
415 if ( !th->get() ) {
416 auto sc = th->retrieve();
417 if ( UNLIKELY( sc.isFailure() ) ) {
418 throw GaudiException( "Failed to retrieve tool " + th->typeAndName(), this->name(), StatusCode::FAILURE );
419 }
420 }
421 tool = th->get();
422 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
423 debug() << "Adding " << ( th->isPublic() ? "public" : "private" ) << " ToolHandle tool " << tool->name() << " ("
424 << tool->type() << ")" << endmsg;
425 m_tools.push_back( tool );
426 }
427 m_toolHandlesInit = true;
428 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:96
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
AlgTool::m_toolHandlesInit
bool m_toolHandlesInit
Definition: AlgTool.h:312
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:101
MSG::DEBUG
Definition: IMessageSvc.h:15
BaseToolHandle
Non-templated base class for actual ToolHandle<T>.
Definition: ToolHandle.h:69
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:309
CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
std::vector::push_back
T push_back(T... args)
ToolHandleInfo::isPublic
bool isPublic() const noexcept
Definition: ToolHandle.h:40
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
IAlgTool::type
virtual const std::string & type() const =0
The type of an AlgTool, meaning the concrete AlgTool class.
AlgTool::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: AlgTool.h:310
AlgTool::toolSvc
IToolSvc * toolSvc() const
The standard ToolSvc service, Return a pointer to the service if present.
Definition: AlgTool.cpp:96
IAlgTool
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58
BaseToolHandle::get
const IAlgTool * get() const
Definition: ToolHandle.h:83
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
AlgTool::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: AlgTool.h:311

## ◆ 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

  NULL | No monitor service is present
  non-NULL | A monitor service is present and available to be used

Definition at line 242 of file AlgTool.h.

242 {
243 // If not already located try to locate it without forcing a creation
244 if ( !m_pMonitorSvc ) m_pMonitorSvc = service( m_monitorSvcName, false, true );
245 return m_pMonitorSvc.get();
246 }
AlgTool::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: AlgTool.h:285
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
AlgTool::m_monitorSvcName
Gaudi::Property< std::string > m_monitorSvcName
Definition: AlgTool.h:297
AlgTool::service
StatusCode service(const std::string &name, T *&svc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: AlgTool.h:128

## ◆ name()

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

Retrieve full identifying name of the concrete tool object.

Definition at line 58 of file AlgTool.cpp.

60 {
61 return m_name;
62 }
AlgTool::m_name
const std::string m_name
AlgTool full name.
Definition: AlgTool.h:279

## ◆ parent()

const IInterface * AlgTool::parent | ( |  | ) | const
| override

Retrieve parent of the sub-algtool.

Definition at line 72 of file AlgTool.cpp.

74 {
75 return m_parent;
76 }
AlgTool::m_parent
const IInterface * m_parent
AlgTool parent.
Definition: AlgTool.h:280

## ◆ queryInterface()

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

Query for a given interface.

Definition at line 41 of file AlgTool.cpp.

43 {
44 if ( !ppvi ) { return StatusCode::FAILURE; } // RETURN
45 StatusCode sc = base_class::queryInterface( riid, ppvi );
46 if ( sc.isSuccess() ) return sc;
47 auto i = std::find_if( std::begin( m_interfaceList ), std::end( m_interfaceList ),
48 [&]( const std::pair<InterfaceID, void*>& item ) { return item.first.versionMatch( riid ); } );
49 if ( i == std::end( m_interfaceList ) ) {
50 *ppvi = nullptr;
51 return Status::NO_INTERFACE; // RETURN
52 }
53 *ppvi = i->second;
54 addRef();
55 return StatusCode::SUCCESS; // RETURN
56 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
std::end
T end(T... args)
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
std::pair< InterfaceID, void * >
std::find_if
T find_if(T... args)
std::begin
T begin(T... args)
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
AlgTool::m_interfaceList
InterfaceList m_interfaceList
Interface list.
Definition: AlgTool.h:288

## ◆ registerTool()

void AlgTool::registerTool | ( | IAlgTool * | tool | ) | const
| inline

Definition at line 201 of file AlgTool.h.

201 {
202 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) debug() << "Registering tool " << tool->name() << endmsg;
203 m_tools.push_back( tool );
204 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:96
MSG::DEBUG
Definition: IMessageSvc.h:15
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:309
CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:138
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
std::vector::push_back
T push_back(T... args)
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ reinitialize()

StatusCode AlgTool::reinitialize | ( |  | ) |
| override

Definition at line 294 of file AlgTool.cpp.

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

## ◆ restart()

StatusCode AlgTool::restart | ( |  | ) |
| override

Definition at line 336 of file AlgTool.cpp.

338 {
339 // Default implementation is stop+start
340 StatusCode sc = stop();
341 if ( sc.isFailure() ) {
342 error() << "restart(): cannot be stopped" << endmsg;
343 return sc;
344 }
345 sc = start();
346 if ( sc.isFailure() ) {
347 error() << "restart(): cannot be started" << endmsg;
348 return sc;
349 }
350 return StatusCode::SUCCESS;
351 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
AlgTool::stop
StatusCode stop() override
Definition: AlgTool.cpp:247
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
AlgTool::start
StatusCode start() override
Definition: AlgTool.cpp:225

## ◆ service() [1/4]

template<class T >

StatusCode AlgTool::service | ( | const std::string & | name,
|  | T *& | svc,
|  | bool | createIf = `true`
| ) |  | const
| inline

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

Definition at line 128 of file AlgTool.h.

128 {
129 return service_i( name, createIf, T::interfaceID(), (void**)&svc );
130 }
AlgTool::service_i
StatusCode service_i(const std::string &algName, bool createIf, const InterfaceID &iid, void **ppSvc) const
flag indicating whether ToolHandle tools have been added to m_tools
Definition: AlgTool.cpp:444
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ service() [2/4]

template<class T >

StatusCode AlgTool::service | ( | const std::string & | type,
|  | const std::string & | name,
|  | T *& | svc
| ) |  | const
| inline

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

Definition at line 135 of file AlgTool.h.

135 {
136 return service_i( type, name, T::interfaceID(), reinterpret_cast<void**>( &svc ) );
137 }
AlgTool::service_i
StatusCode service_i(const std::string &algName, bool createIf, const InterfaceID &iid, void **ppSvc) const
flag indicating whether ToolHandle tools have been added to m_tools
Definition: AlgTool.cpp:444
AlgTool::type
const std::string & type() const override
Retrieve type (concrete class) of the sub-algtool.
Definition: AlgTool.cpp:65
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ service() [3/4]

SmartIF< IService > AlgTool::service | ( | const std::string & | 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 456 of file AlgTool.cpp.

456 {
457 const ServiceLocatorHelper helper( *serviceLocator(), *this );
458 return helper.service( name, quiet, createIf );
459 }
ServiceLocatorHelper
an helper to share the implementation of service() among the various kernel base classes
Definition: ServiceLocatorHelper.h:17
AlgTool::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: AlgTool.cpp:79
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ service() [4/4]

template<typename T >

SmartIF<T> AlgTool::service | ( | const std::string & | name,
|  | const bool | createIf = `true`,
|  | const bool | quiet = `false`
| ) |  | const
| inline

Definition at line 143 of file AlgTool.h.

143 {
144 return SmartIF<T>( service( name, createIf, quiet ) );
145 }
SmartIF
Small smart pointer class with automatic reference counting for IInterface.
Definition: IConverter.h:15
AlgTool::service
StatusCode service(const std::string &name, T *&svc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: AlgTool.h:128
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ service_i() [1/2]

StatusCode AlgTool::service_i | ( | const std::string & | 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

Definition at line 444 of file AlgTool.cpp.

444 {
445 const ServiceLocatorHelper helper( *serviceLocator(), *this );
446 return helper.getService( svcName, createIf, iid, ppSvc );
447 }
ServiceLocatorHelper
an helper to share the implementation of service() among the various kernel base classes
Definition: ServiceLocatorHelper.h:17
AlgTool::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: AlgTool.cpp:79

## ◆ service_i() [2/2]

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

Definition at line 450 of file AlgTool.cpp.

451 {
452 const ServiceLocatorHelper helper( *serviceLocator(), *this );
453 return helper.createService( svcType, svcName, iid, ppSvc );
454 }
ServiceLocatorHelper
an helper to share the implementation of service() among the various kernel base classes
Definition: ServiceLocatorHelper.h:17
AlgTool::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: AlgTool.cpp:79

## ◆ serviceLocator()

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

Retrieve pointer to service locator.

Definition at line 79 of file AlgTool.cpp.

81 {
82 return m_svcLocator;
83 }
AlgTool::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Pointer to Service Locator service.
Definition: AlgTool.h:282

## ◆ setProperties()

StatusCode AlgTool::setProperties | ( |  | ) |

Method for setting declared properties to the values specified in the jobOptions via the job option service.

This method is called by the ToolSvc after creating the concrete tool, before passing it to the requesting parent and does not need to be called explicitly.

Definition at line 107 of file AlgTool.cpp.

109 {
110 if ( !m_svcLocator ) return StatusCode::FAILURE;
111 auto jos = m_svcLocator->service<IJobOptionsSvc>( "JobOptionsSvc" );
112 if ( !jos ) return StatusCode::FAILURE;
113
114 return jos->setMyProperties( name(), this );
115 }
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:76
IJobOptionsSvc
Main interface for the JobOptions service.
Definition: IJobOptionsSvc.h:20
AlgTool::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Pointer to Service Locator service.
Definition: AlgTool.h:282
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ start()

StatusCode AlgTool::start | ( |  | ) |
| override

Definition at line 225 of file AlgTool.cpp.

227 {
228 // For the time being there is nothing to be done here.
229 return StatusCode::SUCCESS;
230 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ stop()

StatusCode AlgTool::stop | ( |  | ) |
| override

Definition at line 247 of file AlgTool.cpp.

249 {
250 // For the time being there is nothing to be done here.
251 return StatusCode::SUCCESS;
252 }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ svcLoc()

ISvcLocator* AlgTool::svcLoc | ( |  | ) | const
| inline

shortcut for the method service locator

Definition at line 107 of file AlgTool.h.

107 { return serviceLocator(); }
AlgTool::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: AlgTool.cpp:79

## ◆ sysFinalize()

StatusCode AlgTool::sysFinalize | ( |  | ) |
| override

Finalize AlgTool.

Definition at line 255 of file AlgTool.cpp.

255 {
256 //-----------------------------------------------------------------------------
257 return attempt( *this, "sysFinalize", [&]() {
258 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::FINALIZE, m_state );
259 Gaudi::Guards::AuditorGuard guard( this,
260 // check if we want to audit the initialize
261 m_auditorFinalize ? auditorSvc() : nullptr, IAuditor::Finalize );
262 StatusCode sc = finalize();
263 if ( sc.isSuccess() ) m_state = m_targetState;
264 return sc;
265 } );
266 }
Gaudi::StateMachine::FINALIZE
Definition: StateMachine.h:28
AlgTool::finalize
StatusCode finalize() override
Definition: AlgTool.cpp:268
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:462
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IAuditor::Finalize
Definition: IAuditor.h:24
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:319
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:9
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:320
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
Definition: Guards.h:203
AlgTool::m_auditorFinalize
Gaudi::Property< bool > m_auditorFinalize
Definition: AlgTool.h:304

## ◆ sysInitialize()

StatusCode AlgTool::sysInitialize | ( |  | ) |
| override

Initialize AlgTool.

Definition at line 163 of file AlgTool.cpp.

163 {
164 //-----------------------------------------------------------------------------
165 return attempt( *this, "sysInitialize", [&]() {
166 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::INITIALIZE, m_state );
167 Gaudi::Guards::AuditorGuard guard( this,
168 // check if we want to audit the initialize
169 m_auditorInitialize ? auditorSvc() : nullptr, IAuditor::Initialize );
170 StatusCode sc = initialize();
171 if ( !sc ) return sc;
172
173 m_state = m_targetState;
174 if ( m_updateDataHandles ) acceptDHVisitor( m_updateDataHandles.get() );
175
176 // check for explicit circular data dependencies in declared handles
177 DataObjIDColl out;
178 for ( auto& h : outputHandles() ) {
179 if ( !h->objKey().empty() ) out.emplace( h->fullKey() );
180 }
181 for ( auto& h : inputHandles() ) {
182 if ( !h->objKey().empty() && out.find( h->fullKey() ) != out.end() ) {
183 error() << "Explicit circular data dependency found for id " << h->fullKey() << endmsg;
184 sc = StatusCode::FAILURE;
185 }
186 }
187
188 if ( !sc ) return sc;
189
190 // visit all sub-tools, build full set
191 DHHVisitor avis( m_inputDataObjs, m_outputDataObjs );
192 acceptDHVisitor( &avis );
193
194 // initialize handles
195 initDataHandleHolder(); // this should 'freeze' the handle configuration.
196
197 return sc;
198 } );
199 }
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::inputHandles
std::vector< Gaudi::DataHandle * > inputHandles() const override
Definition: DataHandleHolderBase.h:28
AlgTool::initialize
StatusCode initialize() override
Definition: AlgTool.cpp:201
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:67
Gaudi::StateMachine::INITIALIZE
Definition: StateMachine.h:25
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::m_inputDataObjs
DataObjIDColl m_inputDataObjs
Definition: DataHandleHolderBase.h:71
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:462
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
DHHVisitor
Definition: DataHandleHolderVisitor.h:8
std::unordered_set< DataObjID, DataObjID_Hasher >
IAuditor::Initialize
Definition: IAuditor.h:24
AlgTool::acceptDHVisitor
void acceptDHVisitor(IDataHandleVisitor *) const override
Definition: AlgTool.cpp:472
std::unique_ptr::get
T get(T... args)
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:319
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:9
std::unordered_set::emplace
T emplace(T... args)
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
AlgTool::m_auditorInitialize
Gaudi::Property< bool > m_auditorInitialize
Definition: AlgTool.h:301
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:320
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
Definition: Guards.h:203
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::outputHandles
std::vector< Gaudi::DataHandle * > outputHandles() const override
Definition: DataHandleHolderBase.h:31
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::m_outputDataObjs
DataObjIDColl m_outputDataObjs
Definition: DataHandleHolderBase.h:71
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:222

## ◆ sysReinitialize()

StatusCode AlgTool::sysReinitialize | ( |  | ) |
| override

Initialize AlgTool.

Definition at line 276 of file AlgTool.cpp.

276 {
277 //-----------------------------------------------------------------------------
278
279 // Check that the current status is the correct one.
280 if ( Gaudi::StateMachine::INITIALIZED != FSMState() ) {
281 error() << "sysReinitialize(): cannot reinitialize tool not initialized" << endmsg;
282 return StatusCode::FAILURE;
283 }
284
285 return attempt( *this, "SysReinitialize()", [&]() {
286 Gaudi::Guards::AuditorGuard guard( this,
287 // check if we want to audit the initialize
288 m_auditorReinitialize ? auditorSvc() : nullptr, IAuditor::ReInitialize );
289 return reinitialize();
290 } );
291 }
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
IAuditor::ReInitialize
Definition: IAuditor.h:24
AlgTool::m_auditorReinitialize
Gaudi::Property< bool > m_auditorReinitialize
Definition: AlgTool.h:305
AlgTool::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: AlgTool.h:74
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:462
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
AlgTool::reinitialize
StatusCode reinitialize() override
Definition: AlgTool.cpp:294
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
Definition: Guards.h:203
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ sysRestart()

StatusCode AlgTool::sysRestart | ( |  | ) |
| override

Start AlgTool.

Definition at line 317 of file AlgTool.cpp.

317 {
318 //-----------------------------------------------------------------------------
319
320 // Check that the current status is the correct one.
321 if ( Gaudi::StateMachine::RUNNING != FSMState() ) {
322 error() << "sysRestart(): cannot reinitialize tool not started" << endmsg;
323 return StatusCode::FAILURE;
324 }
325
326 return attempt( *this, "sysRestart", [&]() {
327 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::START, m_state );
328 Gaudi::Guards::AuditorGuard guard( this,
329 // check if we want to audit the initialize
330 m_auditorRestart ? auditorSvc() : nullptr, IAuditor::ReStart );
331 return restart();
332 } );
333 }
IAuditor::ReStart
Definition: IAuditor.h:24
AlgTool::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: AlgTool.h:74
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:462
AlgTool::restart
StatusCode restart() override
Definition: AlgTool.cpp:336
AlgTool::m_auditorRestart
Gaudi::Property< bool > m_auditorRestart
Definition: AlgTool.h:306
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:16
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:319
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:9
Gaudi::StateMachine::START
Definition: StateMachine.h:26
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:320
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
Definition: Guards.h:203
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ sysStart()

StatusCode AlgTool::sysStart | ( |  | ) |
| override

Start AlgTool.

Definition at line 211 of file AlgTool.cpp.

211 {
212 //-----------------------------------------------------------------------------
213 return attempt( *this, "sysStart", [&]() {
214 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::START, m_state );
215 Gaudi::Guards::AuditorGuard guard( this,
216 // check if we want to audit the initialize
217 m_auditorStart ? auditorSvc() : nullptr, IAuditor::Start );
218 StatusCode sc = start();
219 if ( sc.isSuccess() ) m_state = m_targetState;
220 return sc;
221 } );
222 }
IAuditor::Start
Definition: IAuditor.h:24
AlgTool::m_auditorStart
Gaudi::Property< bool > m_auditorStart
Definition: AlgTool.h:302
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:462
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:319
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:9
Gaudi::StateMachine::START
Definition: StateMachine.h:26
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:320
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
Definition: Guards.h:203
AlgTool::start
StatusCode start() override
Definition: AlgTool.cpp:225

## ◆ sysStop()

StatusCode AlgTool::sysStop | ( |  | ) |
| override

Stop AlgTool.

Definition at line 233 of file AlgTool.cpp.

233 {
234 //-----------------------------------------------------------------------------
235 return attempt( *this, "sysStop", [&]() {
236 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::STOP, m_state );
237 Gaudi::Guards::AuditorGuard guard( this,
238 // check if we want to audit the initialize
239 m_auditorStop ? auditorSvc() : nullptr, IAuditor::Stop );
240 StatusCode sc = stop();
241 if ( sc.isSuccess() ) m_state = m_targetState;
242 return sc;
243 } );
244 }
IAuditor::Stop
Definition: IAuditor.h:24
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:462
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
AlgTool::m_auditorStop
Gaudi::Property< bool > m_auditorStop
Definition: AlgTool.h:303
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
Gaudi::StateMachine::STOP
Definition: StateMachine.h:27
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:319
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:9
AlgTool::stop
StatusCode stop() override
Definition: AlgTool.cpp:247
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:320
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
Definition: Guards.h:203

## ◆ targetFSMState()

Gaudi::StateMachine::State AlgTool::targetFSMState | ( |  | ) | const
| inline override

Definition at line 75 of file AlgTool.h.

75 { return m_targetState; }
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:320

## ◆ terminate()

StatusCode AlgTool::terminate | ( |  | ) |
| inline override

Definition at line 71 of file AlgTool.h.

71 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ tools() [1/2]

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

Definition at line 430 of file AlgTool.cpp.

430 {
431 if ( UNLIKELY( !m_toolHandlesInit ) ) initToolHandles();
432
433 return m_tools;
434 }
AlgTool::initToolHandles
void initToolHandles() const
Definition: AlgTool.cpp:360
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:96
AlgTool::m_toolHandlesInit
bool m_toolHandlesInit
Definition: AlgTool.h:312
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:309

## ◆ tools() [2/2]

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

Definition at line 436 of file AlgTool.cpp.

436 {
437 if ( UNLIKELY( !m_toolHandlesInit ) ) initToolHandles();
438
439 return m_tools;
440 }
AlgTool::initToolHandles
void initToolHandles() const
Definition: AlgTool.cpp:360
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:96
AlgTool::m_toolHandlesInit
bool m_toolHandlesInit
Definition: AlgTool.h:312
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:309

## ◆ toolSvc()

IToolSvc * AlgTool::toolSvc | ( |  | ) | const

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

Definition at line 96 of file AlgTool.cpp.

98 {
99 if ( !m_ptoolSvc ) {
100 m_ptoolSvc = service( "ToolSvc", true );
101 if ( !m_ptoolSvc ) { throw GaudiException( "Service [ToolSvc] not found", name(), StatusCode::FAILURE ); }
102 }
103 return m_ptoolSvc.get();
104 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
AlgTool::service
StatusCode service(const std::string &name, T *&svc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: AlgTool.h:128
AlgTool::m_ptoolSvc
SmartIF< IToolSvc > m_ptoolSvc
Tool service.
Definition: AlgTool.h:284
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:58

## ◆ type()

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

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

Definition at line 65 of file AlgTool.cpp.

67 {
68 return m_type;
69 }
AlgTool::m_type
std::string m_type
AlgTool type (concrete class name)
Definition: AlgTool.h:278

## Member Data Documentation

## ◆ m_auditInit

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

Definition at line 300 of file AlgTool.h.

## ◆ m_auditorFinalize

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

Definition at line 304 of file AlgTool.h.

## ◆ m_auditorInitialize

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

Definition at line 301 of file AlgTool.h.

## ◆ m_auditorReinitialize

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

Definition at line 305 of file AlgTool.h.

## ◆ m_auditorRestart

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

Definition at line 306 of file AlgTool.h.

## ◆ m_auditorStart

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

Definition at line 302 of file AlgTool.h.

## ◆ m_auditorStop

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

Definition at line 303 of file AlgTool.h.

## ◆ m_evtSvc

SmartIF<IDataProviderSvc> AlgTool::m_evtSvc
| mutable private

Event data service.

Definition at line 283 of file AlgTool.h.

## ◆ m_interfaceList

InterfaceList AlgTool::m_interfaceList
| private

Interface list.

Definition at line 288 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 297 of file AlgTool.h.

## ◆ m_name

const std::string AlgTool::m_name
| private

AlgTool full name.

Definition at line 279 of file AlgTool.h.

## ◆ m_outputLevel

Gaudi::Property<int> AlgTool::m_outputLevel
| private

Initial value:
{
this, "OutputLevel", setUpMessaging(),
[this]( Gaudi::Details::PropertyBase& ) { this->updateMsgStreamOutputLevel( this->m_outputLevel ); },
"output level"}

Definition at line 292 of file AlgTool.h.

## ◆ m_parent

const IInterface* AlgTool::m_parent = nullptr
| private

AlgTool parent.

Definition at line 280 of file AlgTool.h.

## ◆ m_pAuditorSvc

SmartIF<IAuditorSvc> AlgTool::m_pAuditorSvc
| mutable private

Auditor Service.

Definition at line 286 of file AlgTool.h.

## ◆ m_pMonitorSvc

SmartIF<IMonitorSvc> AlgTool::m_pMonitorSvc
| mutable private

Online Monitoring Service.

Definition at line 285 of file AlgTool.h.

## ◆ m_ptoolSvc

SmartIF<IToolSvc> AlgTool::m_ptoolSvc
| mutable private

Tool service.

Definition at line 284 of file AlgTool.h.

## ◆ m_state

Gaudi::StateMachine::State AlgTool::m_state = Gaudi::StateMachine::CONFIGURED
| private

state of the Tool

Definition at line 319 of file AlgTool.h.

## ◆ m_svcLocator

SmartIF<ISvcLocator> AlgTool::m_svcLocator
| mutable private

Pointer to Service Locator service.

Definition at line 282 of file AlgTool.h.

## ◆ m_targetState

Gaudi::StateMachine::State AlgTool::m_targetState = Gaudi::StateMachine::CONFIGURED
| private

state of the Tool

Definition at line 320 of file AlgTool.h.

## ◆ m_toolHandleArrays

std::vector<GaudiHandleArrayBase*> AlgTool::m_toolHandleArrays
| mutable private

Definition at line 311 of file AlgTool.h.

## ◆ m_toolHandles

std::vector<BaseToolHandle*> AlgTool::m_toolHandles
| mutable private

Definition at line 310 of file AlgTool.h.

## ◆ m_toolHandlesInit

bool AlgTool::m_toolHandlesInit = false
| mutable private

Definition at line 312 of file AlgTool.h.

## ◆ m_tools

std::vector<IAlgTool*> AlgTool::m_tools
| mutable private

Definition at line 309 of file AlgTool.h.

## ◆ m_type

std::string AlgTool::m_type
| private

AlgTool type (concrete class name)

Definition at line 278 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 222 of file AlgTool.h.

The documentation for this class was generated from the following files:

- GaudiKernel/GaudiKernel/AlgTool.h
- GaudiKernel/src/Lib/AlgTool.cpp