| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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
typedef Gaudi::PluginService::Factory< IAlgTool *, const std::string &, const std::string &, const IInterface * > | Factory
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, 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")
virtual void | acceptDHVisitor (IDataHandleVisitor *) const override
void | commitHandles () override
void | registerTool (IAlgTool *tool) const
void | deregisterTool (IAlgTool *tool) const
template<class T >
StatusCode | declarePublicTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used public tool. More...
template<class T >
StatusCode | declarePrivateTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used private tool. More...
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...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >
| PropertyHolder ()=default
| ~PropertyHolder () override=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, TYPE &value, const std::string &doc="none") const
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
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleBase &ref, const std::string &doc="none")
| Specializations for various GaudiHandles. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleArrayBase &ref, const std::string &doc="none")
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, DataObjectHandleBase &ref, const std::string &doc="none")
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
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...
MSG::Level | msgLevel () const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. 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 > >
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 {this, "OutputLevel", MSG::NIL, "output level"}
Gaudi::Property< std::string > | m_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::string | m_threadID
| Thread Id for Alg Tool. More...
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 48 of file AlgTool.h.

## Member Typedef Documentation

typedef Gaudi::PluginService::Factory<IAlgTool*, const std::string&, const std::string&, const IInterface*> AlgTool::Factory

Definition at line 53 of file AlgTool.h.

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

Definition at line 324 of file AlgTool.h.

## Constructor & Destructor Documentation

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 139 of file AlgTool.cpp.

141 : m_type( type ),
142 m_name( name ),
143 m_parent( parent )
144 {
145 addRef(); // Initial count set to 1
146
147 IInterface* _p = const_cast<IInterface*>( parent );
148
149 // inherit output level from parent
150 { // get the "OutputLevel" property from parent
151 SmartIF<IProperty> pprop( _p );
152 if ( pprop && pprop->hasProperty( "OutputLevel" ) ) {
153 m_outputLevel.assign( pprop->getProperty( "OutputLevel" ) );
154 }
155 }
156 m_outputLevel.declareUpdateHandler(
157 [this]( Gaudi::Details::PropertyBase& ) { this->updateMsgStreamOutputLevel( this->m_outputLevel ); } );
158
159 if ( Algorithm* _alg = dynamic_cast<Algorithm*>( _p ) ) {
160 m_svcLocator = _alg->serviceLocator();
161 m_threadID = getGaudiThreadIDfromName( _alg->name() );
162 } else if ( Service* _svc = dynamic_cast<Service*>( _p ) ) {
163 m_svcLocator = _svc->serviceLocator();
164 m_threadID = getGaudiThreadIDfromName( _svc->name() );
165 } else if ( AlgTool* _too = dynamic_cast<AlgTool*>( _p ) ) {
166 m_svcLocator = _too->serviceLocator();
167 m_threadID = getGaudiThreadIDfromName( _too->m_threadID );
168 } else if ( Auditor* _aud = dynamic_cast<Auditor*>( _p ) ) {
169 m_svcLocator = _aud->serviceLocator();
170 m_threadID = getGaudiThreadIDfromName( _aud->name() );
171 } else {
172 throw GaudiException( "Failure to create tool '" + type + "/" + name + "': illegal parent type '" +
173 System::typeinfoName( typeid( *_p ) ) + "'",
174 "AlgTool", 0 );
175 }
176
177 {
178 // Auditor monitoring properties
179 // Initialize the default value from ApplicationMgr AuditAlgorithms
180 Gaudi::Property<bool> audit( false );
181 // note that here we need that the service locator is already defined
182 auto appMgr = serviceLocator()->service<IProperty>( "ApplicationMgr" );
183 if ( appMgr && appMgr->hasProperty( "AuditTools" ) ) {
184 audit.assign( appMgr->getProperty( "AuditTools" ) );
185 }
186 m_auditInit = audit;
187 m_auditorInitialize = audit;
188 m_auditorStart = audit;
189 m_auditorStop = audit;
190 m_auditorFinalize = audit;
191 m_auditorReinitialize = audit;
192 m_auditorRestart = audit;
193 }
194
195 // check thread ID and try if tool name indicates thread ID
196 if ( m_threadID.empty() ) {
197 m_threadID = getGaudiThreadIDfromName( AlgTool::name() );
198 }
199 }
SmartIF< IProperty >
std::string::empty
T empty(T...args)
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
AlgTool::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: AlgTool.cpp:84
AlgTool::m_auditorStart
Gaudi::Property< bool > m_auditorStart
Definition: AlgTool.h:346
AlgTool::m_type
std::string m_type
AlgTool type (concrete class name)
Definition: AlgTool.h:326
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:314
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
AlgTool::m_parent
const IInterface * m_parent
AlgTool parent.
Definition: AlgTool.h:328
AlgTool::m_auditorReinitialize
Gaudi::Property< bool > m_auditorReinitialize
Definition: AlgTool.h:349
AlgTool::m_name
const std::string m_name
AlgTool full name.
Definition: AlgTool.h:327
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:78
AlgTool::m_outputLevel
Gaudi::Property< int > m_outputLevel
Definition: AlgTool.h:339
CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >::updateMsgStreamOutputLevel
void updateMsgStreamOutputLevel(int level)
Update the output level of the cached MsgStream.
Definition: CommonMessaging.h:186
IInterface
Definition of the basic interface.
Definition: IInterface.h:234
AlgTool::m_threadID
std::string m_threadID
Thread Id for Alg Tool.
Definition: AlgTool.h:352
AlgTool::m_auditorStop
Gaudi::Property< bool > m_auditorStop
Definition: AlgTool.h:347
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
AlgTool::m_auditorRestart
Gaudi::Property< bool > m_auditorRestart
Definition: AlgTool.h:350
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:63
AlgTool::m_auditInit
Gaudi::Property< bool > m_auditInit
Definition: AlgTool.h:344
AlgTool
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:48
AlgTool::parent
const IInterface * parent() const override
Retrieve parent of the sub-algtool.
Definition: AlgTool.cpp:77
AlgTool::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Pointer to Service Locator service.
Definition: AlgTool.h:330
IOTest.appMgr
appMgr
Definition: IOTest.py:83
AlgTool::m_auditorInitialize
Gaudi::Property< bool > m_auditorInitialize
Definition: AlgTool.h:345
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
getGaudiThreadIDfromName
GAUDI_API std::string getGaudiThreadIDfromName(const std::string &name)
helper function to extract Gaudi Thread ID from thread copy name
Definition: ThreadGaudi.cpp:26
AlgTool::m_auditorFinalize
Gaudi::Property< bool > m_auditorFinalize
Definition: AlgTool.h:348
Auditor
Base class from which all concrete auditor classes should be derived.
Definition: Auditor.h:35

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

Definition at line 385 of file AlgTool.cpp.

387 {
388 if ( m_pMonitorSvc ) {
389 m_pMonitorSvc->undeclareAll( this );
390 }
391 }
AlgTool::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: AlgTool.h:333
IMonitorSvc::undeclareAll
virtual void undeclareAll(const IInterface *owner)=0
Undeclare monitoring information.

## Member Function Documentation

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

Definition at line 507 of file AlgTool.cpp.

508 {
509 //-----------------------------------------------------------------------------
510 vis->visit( this );
511
512 for ( auto tool : tools() ) vis->visit( dynamic_cast<AlgTool*>( tool ) );
513 }
IDataHandleVisitor::visit
virtual void visit(const IDataHandleHolder *)=0
AlgTool::tools
const std::vector< IAlgTool * > & tools() const
Definition: AlgTool.cpp:457

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

Access the auditor service.

Definition at line 494 of file AlgTool.cpp.

495 {
496 //---------------------------------------------------------------------------
497 if ( !m_pAuditorSvc ) {
498 m_pAuditorSvc = service( "AuditorSvc", true );
499 if ( !m_pAuditorSvc ) {
500 throw GaudiException( "Service [AuditorSvc] not found", name(), StatusCode::FAILURE );
501 }
502 }
503 return m_pAuditorSvc.get();
504 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
StatusCode::FAILURE
Definition: StatusCode.h:29
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&#39;t already exist.
Definition: AlgTool.h:131
AlgTool::m_pAuditorSvc
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: AlgTool.h:334
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:63

void AlgTool::commitHandles | ( |  | ) |
| override

Definition at line 516 of file AlgTool.cpp.

517 {
518 //-----------------------------------------------------------------------------
519
520 for ( auto h : outputHandles() ) h->commit();
521
522 for ( auto t : m_tools ) {
523 AlgTool* at = dynamic_cast<AlgTool*>( t );
524 if ( at ) at->commitHandles();
525 }
526 }
AlgTool::commitHandles
void commitHandles() override
Definition: AlgTool.cpp:516
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:355
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::outputHandles
std::vector< Gaudi::DataHandle * > outputHandles() const override
Definition: DataHandleHolderBase.h:33
HiveAlgSequencer.h
h
Definition: HiveAlgSequencer.py:24
AlgTool
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:48

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

Definition at line 69 of file AlgTool.h.

69 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
Definition: StatusCode.h:30
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 300 of file AlgTool.h.

301 {
302 IMonitorSvc* mS = monitorSvc();
303 if ( mS ) mS->declareInfo( name, var, desc, this );
304 }
AlgTool::monitorSvc
IMonitorSvc * monitorSvc() const
Access the monitor service.
Definition: AlgTool.h:287
IMonitorSvc
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:21
IMonitorSvc::declareInfo
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.

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 313 of file AlgTool.h.

315 {
316 IMonitorSvc* mS = monitorSvc();
317 if ( mS ) mS->declareInfo( name, format, var, size, desc, this );
318 }
AlgTool::monitorSvc
IMonitorSvc * monitorSvc() const
Access the monitor service.
Definition: AlgTool.h:287
IMonitorSvc
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:21
IMonitorSvc::declareInfo
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
template<typename I >

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

Definition at line 155 of file AlgTool.h.

156 {
157 m_interfaceList.emplace_back( I::interfaceID(), i );
158 }
AlgTool::m_interfaceList
InterfaceList m_interfaceList
Interface list.
Definition: AlgTool.h:336
std::list::emplace_back
T emplace_back(T...args)
template<class T >

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

Declare used private tool.

Parameters

  handle | ToolHandle<T>
  toolTypeAndName |
  parent,default | public tool
  create | if necessary, default true

Definition at line 246 of file AlgTool.h.

247 {
248
249 if ( toolTypeAndName == "" ) toolTypeAndName = handle.typeAndName();
250
251 StatusCode sc = handle.initialize( toolTypeAndName, this, createIf );
252 if ( UNLIKELY( !sc ) ) {
253 throw GaudiException{"Cannot create handle for private tool " + toolTypeAndName, name(), sc};
254 }
255
256 m_toolHandles.push_back( &handle );
257
258 return sc;
259 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
std::vector::push_back
T push_back(T...args)
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
ToolHandle::typeAndName
std::string typeAndName() const override
Definition: ToolHandle.h:227
ToolHandle::initialize
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:188
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:63
AlgTool::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: AlgTool.h:356
template<class T >

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

Definition at line 164 of file AlgTool.h.

166 {
167 this->declareTool( hndl ).ignore();
168 return PropertyHolderImpl::declareProperty( name, hndl, doc );
169 }
PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Details::PropertyBase &prop)
Declare a property.
Definition: PropertyHolder.h:99
AlgTool::declareTool
StatusCode declareTool(ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
Definition: AlgTool.h:172
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:106
template<class T >

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

Definition at line 184 of file AlgTool.h.

186 {
187 m_toolHandleArrays.push_back( &hndlArr );
188 return PropertyHolderImpl::declareProperty( name, hndlArr, doc );
189 }
PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Details::PropertyBase &prop)
Declare a property.
Definition: PropertyHolder.h:99
std::vector::push_back
T push_back(T...args)
AlgTool::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: AlgTool.h:357
template<class T >

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

Declare used public tool.

Parameters

  handle | ToolHandle<T>
  toolTypeAndName |
  parent,default | public tool
  create | if necessary, default true

Definition at line 223 of file AlgTool.h.

224 {
225
226 if ( toolTypeAndName == "" ) toolTypeAndName = handle.typeAndName();
227
228 StatusCode sc = handle.initialize( toolTypeAndName, 0, createIf );
229 if ( UNLIKELY( !sc ) ) {
230 throw GaudiException{"Cannot create handle for public tool " + toolTypeAndName, name(), sc};
231 }
232
233 m_toolHandles.push_back( &handle );
234
235 return sc;
236 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
std::vector::push_back
T push_back(T...args)
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
ToolHandle::typeAndName
std::string typeAndName() const override
Definition: ToolHandle.h:227
ToolHandle::initialize
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:188
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:63
AlgTool::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: AlgTool.h:356
template<class T >

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

Definition at line 172 of file AlgTool.h.

173 {
174 if ( handle.isPublic() ) {
175 return declarePublicTool( handle, toolTypeAndName, createIf );
176 } else {
177 return declarePrivateTool( handle, toolTypeAndName, createIf );
178 }
179 }
AlgTool::declarePrivateTool
StatusCode declarePrivateTool(ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
Declare used private tool.
Definition: AlgTool.h:246
ToolHandleInfo::isPublic
bool isPublic() const noexcept
Definition: ToolHandle.h:38
AlgTool::declarePublicTool
StatusCode declarePublicTool(ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
Declare used public tool.
Definition: AlgTool.h:223

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

Definition at line 204 of file AlgTool.h.

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

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

accessor to event service service

Returns
  pointer to detector service

Definition at line 93 of file AlgTool.cpp.

94 {
95 if ( !m_evtSvc ) {
96 m_evtSvc = service( "EventDataSvc", true );
97 if ( !m_evtSvc ) {
98 throw GaudiException( "Service [EventDataSvc] not found", name(), StatusCode::FAILURE );
99 }
100 }
101 return m_evtSvc.get();
102 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
StatusCode::FAILURE
Definition: StatusCode.h:29
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&#39;t already exist.
Definition: AlgTool.h:131
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:63
AlgTool::m_evtSvc
SmartIF< IDataProviderSvc > m_evtSvc
Event data service.
Definition: AlgTool.h:331

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

Definition at line 297 of file AlgTool.cpp.

299 {
300 // For the time being there is nothing to be done here.
301 return StatusCode::SUCCESS;
302 }
StatusCode::SUCCESS
Definition: StatusCode.h:30

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

Definition at line 77 of file AlgTool.h.

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

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

Definition at line 227 of file AlgTool.cpp.

229 {
230 // For the time being there is nothing to be done here.
231 // Setting the properties is done by the ToolSvc calling setProperties()
232 // explicitly.
233 return StatusCode::SUCCESS;
234 }
StatusCode::SUCCESS
Definition: StatusCode.h:30

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

Definition at line 393 of file AlgTool.cpp.

394 {
395
396 IAlgTool* tool( 0 );
397 for ( auto thArr : m_toolHandleArrays ) {
398 if ( !thArr->retrieved() ) {
399 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
400 debug() << "ToolHandleArray " << thArr->propertyName() << " not used: not registering any of its Tools"
401 << endmsg;
402 } else {
403 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
404 debug() << "Registering all Tools in ToolHandleArray " << thArr->propertyName() << endmsg;
405 // Iterate over its tools:
406 for ( auto toolHandle : thArr->getBaseArray() ) {
407 // Try to cast it into a BaseToolHandle pointer:
408 BaseToolHandle* bth = dynamic_cast<BaseToolHandle*>( toolHandle );
409 if ( bth ) {
410 // If the cast was successful, the code is pretty simple:
411 tool = bth->get();
412 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
413 debug() << "Adding " << ( bth->isPublic() ? "public" : "private" ) << " ToolHandle tool " << tool->name()
414 << " (" << tool->type() << ") from ToolHandleArray " << thArr->propertyName() << endmsg;
415 }
416 m_tools.push_back( tool );
417 } else {
418 // If it wasn't for some strange reason, then fall back on the
419 // logic implemented previously:
420 if ( toolSvc()->retrieveTool( toolHandle->typeAndName(), tool, this, false ).isSuccess() ) {
421 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
422 debug() << "Adding private"
423 << " ToolHandle tool " << tool->name() << " (" << tool->type() << ") from ToolHandleArray "
424 << thArr->propertyName() << endmsg;
425 }
426 m_tools.push_back( tool );
427 } else if ( toolSvc()->retrieveTool( toolHandle->typeAndName(), tool, 0, false ).isSuccess() ) {
428 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
429 debug() << "Adding public"
430 << " ToolHandle tool " << tool->name() << " (" << tool->type() << ") from ToolHandleArray "
431 << thArr->propertyName() << endmsg;
432 }
433 m_tools.push_back( tool );
434 } else {
435 warning() << "Error retrieving Tool " << toolHandle->typeAndName() << " in ToolHandleArray "
436 << thArr->propertyName() << ". Not registered" << endmsg;
437 }
438 }
439 }
440 }
441 }
442
443 for ( auto th : m_toolHandles ) {
444 tool = th->get();
445 if ( tool ) {
446 m_tools.push_back( tool );
447 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
448 debug() << "Adding " << ( th->isPublic() ? "Public" : "Private" ) << " ToolHandle tool " << tool->name() << " ("
449 << tool->type() << ")" << endmsg;
450 } else {
451 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) debug() << "ToolHandle " << th->typeAndName() << " not used" << endmsg;
452 }
453 }
454 m_toolHandlesInit = true;
455 }
AlgTool::m_toolHandlesInit
bool m_toolHandlesInit
Definition: AlgTool.h:358
ToolHandleInfo::isPublic
bool isPublic() const noexcept
Definition: ToolHandle.h:38
MSG::DEBUG
Definition: IMessageSvc.h:18
AlgTool::toolSvc
IToolSvc * toolSvc() const
The standard ToolSvc service, Return a pointer to the service if present.
Definition: AlgTool.cpp:104
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
BaseToolHandle
Non-templated base class for actual ToolHandle<T>.
Definition: ToolHandle.h:73
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:355
std::vector::push_back
T push_back(T...args)
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:120
AlgTool::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: AlgTool.h:356
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
IAlgTool
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
BaseToolHandle::get
const IAlgTool * get() const
Definition: ToolHandle.h:90
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:135
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
AlgTool::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: AlgTool.h:357

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 287 of file AlgTool.h.

288 {
289 // If not already located try to locate it without forcing a creation
290 if ( !m_pMonitorSvc ) m_pMonitorSvc = service( m_monitorSvcName, false, true );
291 return m_pMonitorSvc.get();
292 }
AlgTool::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: AlgTool.h:333
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&#39;t already exist.
Definition: AlgTool.h:131
AlgTool::m_monitorSvcName
Gaudi::Property< std::string > m_monitorSvcName
Definition: AlgTool.h:341

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

Retrieve full identifying name of the concrete tool object.

Definition at line 63 of file AlgTool.cpp.

65 {
66 return m_name;
67 }
AlgTool::m_name
const std::string m_name
AlgTool full name.
Definition: AlgTool.h:327

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

Retrieve parent of the sub-algtool.

Definition at line 77 of file AlgTool.cpp.

79 {
80 return m_parent;
81 }
AlgTool::m_parent
const IInterface * m_parent
AlgTool parent.
Definition: AlgTool.h:328

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

Query for a given interface.

Definition at line 44 of file AlgTool.cpp.

46 {
47 if ( !ppvi ) {
48 return StatusCode::FAILURE;
49 } // RETURN
50 StatusCode sc = base_class::queryInterface( riid, ppvi );
51 if ( sc.isSuccess() ) return sc;
52 auto i = std::find_if( std::begin( m_interfaceList ), std::end( m_interfaceList ),
53 [&]( const std::pair<InterfaceID, void*>& item ) { return item.first.versionMatch( riid ); } );
54 if ( i == std::end( m_interfaceList ) ) {
55 *ppvi = nullptr;
56 return NO_INTERFACE; // RETURN
57 }
58 *ppvi = i->second;
59 addRef();
60 return SUCCESS; // RETURN
61 }
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
GaudiPython.Bindings.SUCCESS
SUCCESS
Definition: Bindings.py:52
std::end
T end(T...args)
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::pair< InterfaceID, void * >
std::find_if
T find_if(T...args)
std::begin
T begin(T...args)
AlgTool::m_interfaceList
InterfaceList m_interfaceList
Interface list.
Definition: AlgTool.h:336
queryInterface
StatusCode queryInterface(const InterfaceID &iid, void **pinterface) override

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

Definition at line 198 of file AlgTool.h.

199 {
200 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) debug() << "Registering tool " << tool->name() << endmsg;
201 m_tools.push_back( tool );
202 }
MSG::DEBUG
Definition: IMessageSvc.h:18
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:355
std::vector::push_back
T push_back(T...args)
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:126
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:135
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.

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

Definition at line 324 of file AlgTool.cpp.

326 {
327 /* @TODO
328 * MCl 2008-10-23: the implementation of reinitialize as finalize+initialize
329 * is causing too many problems
330 *
331 // Default implementation is finalize+initialize
332 StatusCode sc = finalize();
333 if (sc.isFailure()) {
334 error() << "reinitialize(): cannot be finalized" << endmsg;
335 return sc;
336 }
337 sc = initialize();
338 if (sc.isFailure()) {
339 error() << "reinitialize(): cannot be initialized" << endmsg;
340 return sc;
341 }
342 */
343 return StatusCode::SUCCESS;
344 }
StatusCode::SUCCESS
Definition: StatusCode.h:30

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

Definition at line 367 of file AlgTool.cpp.

369 {
370 // Default implementation is stop+start
371 StatusCode sc = stop();
372 if ( sc.isFailure() ) {
373 error() << "restart(): cannot be stopped" << endmsg;
374 return sc;
375 }
376 sc = start();
377 if ( sc.isFailure() ) {
378 error() << "restart(): cannot be started" << endmsg;
379 return sc;
380 }
381 return StatusCode::SUCCESS;
382 }
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:84
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:117
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
AlgTool::stop
StatusCode stop() override
Definition: AlgTool.cpp:275
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
AlgTool::start
StatusCode start() override
Definition: AlgTool.cpp:252
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 131 of file AlgTool.h.

132 {
133 return service_i( name, createIf, T::interfaceID(), (void**)&svc );
134 }
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:473
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 139 of file AlgTool.h.

140 {
141 return service_i( type, name, T::interfaceID(), (void**)&svc );
142 }
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:473

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 487 of file AlgTool.cpp.

488 {
489 const ServiceLocatorHelper helper( *serviceLocator(), *this );
490 return helper.service( name, quiet, createIf );
491 }
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:84
template<typename T >

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

Definition at line 148 of file AlgTool.h.

149 {
150 return SmartIF<T>( service( name, createIf, quiet ) );
151 }
SmartIF
Small smart pointer class with automatic reference counting for IInterface.
Definition: IConverter.h:14
AlgTool::service
StatusCode service(const std::string &name, T *&svc, bool createIf=true) const
Access a service by name, creating it if it doesn&#39;t already exist.
Definition: AlgTool.h:131

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 473 of file AlgTool.cpp.

474 {
475 const ServiceLocatorHelper helper( *serviceLocator(), *this );
476 return helper.getService( svcName, createIf, iid, ppSvc );
477 }
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:84

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

Definition at line 480 of file AlgTool.cpp.

482 {
483 const ServiceLocatorHelper helper( *serviceLocator(), *this );
484 return helper.createService( svcType, svcName, iid, ppSvc );
485 }
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:84

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

Retrieve pointer to service locator.

Definition at line 84 of file AlgTool.cpp.

86 {
87 return m_svcLocator;
88 }
AlgTool::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Pointer to Service Locator service.
Definition: AlgTool.h:330

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 117 of file AlgTool.cpp.

119 {
120 if ( !m_svcLocator ) return StatusCode::FAILURE;
121 auto jos = m_svcLocator->service<IJobOptionsSvc>( "JobOptionsSvc" );
122 if ( !jos ) return StatusCode::FAILURE;
123
124 // set first generic Properties
125 StatusCode sc = jos->setMyProperties( getGaudiThreadGenericName( name() ), this );
126 if ( sc.isFailure() ) return StatusCode::FAILURE;
127
128 // set specific Properties
129 if ( isGaudiThreaded( name() ) ) {
130 if ( jos->setMyProperties( name(), this ).isFailure() ) {
131 return StatusCode::FAILURE;
132 }
133 }
134 updateMsgStreamOutputLevel( m_outputLevel );
135 return StatusCode::SUCCESS;
136 }
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:84
isGaudiThreaded
GAUDI_API bool isGaudiThreaded(const std::string &name)
test if current Gaudi object is running /will run in a thread
Definition: ThreadGaudi.cpp:73
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:78
IJobOptionsSvc
Main interface for the JobOptions service.
Definition: IJobOptionsSvc.h:20
AlgTool::m_outputLevel
Gaudi::Property< int > m_outputLevel
Definition: AlgTool.h:339
CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >::updateMsgStreamOutputLevel
void updateMsgStreamOutputLevel(int level)
Update the output level of the cached MsgStream.
Definition: CommonMessaging.h:186
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:63
AlgTool::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Pointer to Service Locator service.
Definition: AlgTool.h:330
getGaudiThreadGenericName
GAUDI_API std::string getGaudiThreadGenericName(const std::string &name)
helper function to extract Gaudi instance name from thread copy name
Definition: ThreadGaudi.cpp:50

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

Definition at line 252 of file AlgTool.cpp.

254 {
255 // For the time being there is nothing to be done here.
256 return StatusCode::SUCCESS;
257 }
StatusCode::SUCCESS
Definition: StatusCode.h:30

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

Definition at line 275 of file AlgTool.cpp.

277 {
278 // For the time being there is nothing to be done here.
279 return StatusCode::SUCCESS;
280 }
StatusCode::SUCCESS
Definition: StatusCode.h:30

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

shortcut for the method service locator

Definition at line 110 of file AlgTool.h.

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

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

Finalize AlgTool.

Definition at line 283 of file AlgTool.cpp.

284 {
285 //-----------------------------------------------------------------------------
286 return attempt( *this, "sysFinalize", [&]() {
287 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::FINALIZE, m_state );
288 Gaudi::Guards::AuditorGuard guard( this,
289 // check if we want to audit the initialize
290 m_auditorFinalize ? auditorSvc() : nullptr, IAuditor::Finalize );
291 StatusCode sc = finalize();
292 if ( sc.isSuccess() ) m_state = m_targetState;
293 return sc;
294 } );
295 }
Gaudi::StateMachine::FINALIZE
Definition: StateMachine.h:28
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
AlgTool::finalize
StatusCode finalize() override
Definition: AlgTool.cpp:297
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IAuditor::Finalize
Definition: IAuditor.h:25
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:365
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:8
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:366
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:214
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:494
AlgTool::m_auditorFinalize
Gaudi::Property< bool > m_auditorFinalize
Definition: AlgTool.h:348

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

Initialize AlgTool.

Definition at line 202 of file AlgTool.cpp.

203 {
204 //-----------------------------------------------------------------------------
205 return attempt( *this, "sysInitialize", [&]() {
206 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::INITIALIZE, m_state );
207 Gaudi::Guards::AuditorGuard guard( this,
208 // check if we want to audit the initialize
209 m_auditorInitialize ? auditorSvc() : nullptr, IAuditor::Initialize );
210 StatusCode sc = initialize();
211 if ( !sc ) return sc;
212
213 m_state = m_targetState;
214 if (m_updateDataHandles) acceptDHVisitor(m_updateDataHandles.get());
215
216 // visit all sub-tools, build full set
217 DHHVisitor avis(m_inputDataObjs, m_outputDataObjs);
218 acceptDHVisitor(&avis);
219
220 // initialize handles
221 initDataHandleHolder(); // this should 'freeze' the handle configuration.
222
223 return sc;
224 } );
225 }
AlgTool::acceptDHVisitor
virtual void acceptDHVisitor(IDataHandleVisitor *) const override
Definition: AlgTool.cpp:507
AlgTool::initialize
StatusCode initialize() override
Definition: AlgTool.cpp:227
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:77
Gaudi::StateMachine::INITIALIZE
Definition: StateMachine.h:25
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::m_inputDataObjs
DataObjIDColl m_inputDataObjs
Definition: DataHandleHolderBase.h:81
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DHHVisitor
Definition: DataHandleHolderVisitor.h:8
IAuditor::Initialize
Definition: IAuditor.h:25
std::unique_ptr::get
T get(T...args)
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:365
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:8
AlgTool::m_auditorInitialize
Gaudi::Property< bool > m_auditorInitialize
Definition: AlgTool.h:345
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:366
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:214
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:494
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::m_outputDataObjs
DataObjIDColl m_outputDataObjs
Definition: DataHandleHolderBase.h:81
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:267

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

Initialize AlgTool.

Definition at line 305 of file AlgTool.cpp.

306 {
307 //-----------------------------------------------------------------------------
308
309 // Check that the current status is the correct one.
310 if ( Gaudi::StateMachine::INITIALIZED != FSMState() ) {
311 error() << "sysReinitialize(): cannot reinitialize tool not initialized" << endmsg;
312 return StatusCode::FAILURE;
313 }
314
315 return attempt( *this, "SysReinitialize()", [&]() {
316 Gaudi::Guards::AuditorGuard guard( this,
317 // check if we want to audit the initialize
318 m_auditorReinitialize ? auditorSvc() : nullptr, IAuditor::ReInitialize );
319 return reinitialize();
320 } );
321 }
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
StatusCode::FAILURE
Definition: StatusCode.h:29
IAuditor::ReInitialize
Definition: IAuditor.h:25
AlgTool::m_auditorReinitialize
Gaudi::Property< bool > m_auditorReinitialize
Definition: AlgTool.h:349
AlgTool::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: AlgTool.h:77
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:117
AlgTool::reinitialize
StatusCode reinitialize() override
Definition: AlgTool.cpp:324
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:214
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:494
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

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

Start AlgTool.

Definition at line 347 of file AlgTool.cpp.

348 {
349 //-----------------------------------------------------------------------------
350
351 // Check that the current status is the correct one.
352 if ( Gaudi::StateMachine::RUNNING != FSMState() ) {
353 error() << "sysRestart(): cannot reinitialize tool not started" << endmsg;
354 return StatusCode::FAILURE;
355 }
356
357 return attempt( *this, "sysRestart", [&]() {
358 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::START, m_state );
359 Gaudi::Guards::AuditorGuard guard( this,
360 // check if we want to audit the initialize
361 m_auditorRestart ? auditorSvc() : nullptr, IAuditor::ReStart );
362 return restart();
363 } );
364 }
StatusCode::FAILURE
Definition: StatusCode.h:29
IAuditor::ReStart
Definition: IAuditor.h:25
AlgTool::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: AlgTool.h:77
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:117
AlgTool::restart
StatusCode restart() override
Definition: AlgTool.cpp:367
AlgTool::m_auditorRestart
Gaudi::Property< bool > m_auditorRestart
Definition: AlgTool.h:350
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:16
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:365
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:8
Gaudi::StateMachine::START
Definition: StateMachine.h:26
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:366
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:214
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:494
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

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

Start AlgTool.

Definition at line 237 of file AlgTool.cpp.

238 {
239 //-----------------------------------------------------------------------------
240 return attempt( *this, "sysStart", [&]() {
241 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::START, m_state );
242 Gaudi::Guards::AuditorGuard guard( this,
243 // check if we want to audit the initialize
244 m_auditorStart ? auditorSvc() : nullptr, IAuditor::Start );
245 StatusCode sc = start();
246 if ( sc.isSuccess() ) m_state = m_targetState;
247 return sc;
248 } );
249 }
IAuditor::Start
Definition: IAuditor.h:25
AlgTool::m_auditorStart
Gaudi::Property< bool > m_auditorStart
Definition: AlgTool.h:346
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:365
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:8
Gaudi::StateMachine::START
Definition: StateMachine.h:26
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:366
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:214
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:494
AlgTool::start
StatusCode start() override
Definition: AlgTool.cpp:252

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

Stop AlgTool.

Definition at line 260 of file AlgTool.cpp.

261 {
262 //-----------------------------------------------------------------------------
263 return attempt( *this, "sysStop", [&]() {
264 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::STOP, m_state );
265 Gaudi::Guards::AuditorGuard guard( this,
266 // check if we want to audit the initialize
267 m_auditorStop ? auditorSvc() : nullptr, IAuditor::Stop );
268 StatusCode sc = stop();
269 if ( sc.isSuccess() ) m_state = m_targetState;
270 return sc;
271 } );
272 }
IAuditor::Stop
Definition: IAuditor.h:25
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
AlgTool::m_auditorStop
Gaudi::Property< bool > m_auditorStop
Definition: AlgTool.h:347
Gaudi::StateMachine::STOP
Definition: StateMachine.h:27
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:365
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:8
AlgTool::stop
StatusCode stop() override
Definition: AlgTool.cpp:275
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:366
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:214
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:494

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

Definition at line 78 of file AlgTool.h.

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

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

Definition at line 74 of file AlgTool.h.

74 { return StatusCode::SUCCESS; }
StatusCode::SUCCESS
Definition: StatusCode.h:30

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

Definition at line 457 of file AlgTool.cpp.

458 {
459 if ( UNLIKELY( !m_toolHandlesInit ) ) initToolHandles();
460
461 return m_tools;
462 }
AlgTool::m_toolHandlesInit
bool m_toolHandlesInit
Definition: AlgTool.h:358
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:355
AlgTool::initToolHandles
void initToolHandles() const
Definition: AlgTool.cpp:393

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

Definition at line 464 of file AlgTool.cpp.

465 {
466 if ( UNLIKELY( !m_toolHandlesInit ) ) initToolHandles();
467
468 return m_tools;
469 }
AlgTool::m_toolHandlesInit
bool m_toolHandlesInit
Definition: AlgTool.h:358
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:355
AlgTool::initToolHandles
void initToolHandles() const
Definition: AlgTool.cpp:393

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

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

Definition at line 104 of file AlgTool.cpp.

106 {
107 if ( !m_ptoolSvc ) {
108 m_ptoolSvc = service( "ToolSvc", true );
109 if ( !m_ptoolSvc ) {
110 throw GaudiException( "Service [ToolSvc] not found", name(), StatusCode::FAILURE );
111 }
112 }
113 return m_ptoolSvc.get();
114 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
StatusCode::FAILURE
Definition: StatusCode.h:29
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&#39;t already exist.
Definition: AlgTool.h:131
AlgTool::m_ptoolSvc
SmartIF< IToolSvc > m_ptoolSvc
Tool service.
Definition: AlgTool.h:332
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:63

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

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

Definition at line 70 of file AlgTool.cpp.

72 {
73 return m_type;
74 }
AlgTool::m_type
std::string m_type
AlgTool type (concrete class name)
Definition: AlgTool.h:326

## Member Data Documentation

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

Definition at line 344 of file AlgTool.h.

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

Definition at line 348 of file AlgTool.h.

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

Definition at line 345 of file AlgTool.h.

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

Definition at line 349 of file AlgTool.h.

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

Definition at line 350 of file AlgTool.h.

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

Definition at line 346 of file AlgTool.h.

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

Definition at line 347 of file AlgTool.h.

SmartIF<IDataProviderSvc> AlgTool::m_evtSvc
| mutable private

Event data service.

Definition at line 331 of file AlgTool.h.

InterfaceList AlgTool::m_interfaceList
| private

Interface list.

Definition at line 336 of file AlgTool.h.

Gaudi::Property<std::string> AlgTool::m_monitorSvcName
| private

Initial value:
{this, "MonitorService", "MonitorSvc",
"name to use for Monitor Service"}

Definition at line 341 of file AlgTool.h.

const std::string AlgTool::m_name
| private

AlgTool full name.

Definition at line 327 of file AlgTool.h.

Gaudi::Property<int> AlgTool::m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
| private

Definition at line 339 of file AlgTool.h.

const IInterface* AlgTool::m_parent = nullptr
| private

AlgTool parent.

Definition at line 328 of file AlgTool.h.

SmartIF<IAuditorSvc> AlgTool::m_pAuditorSvc
| mutable private

Auditor Service.

Definition at line 334 of file AlgTool.h.

SmartIF<IMonitorSvc> AlgTool::m_pMonitorSvc
| mutable private

Online Monitoring Service.

Definition at line 333 of file AlgTool.h.

SmartIF<IToolSvc> AlgTool::m_ptoolSvc
| mutable private

Tool service.

Definition at line 332 of file AlgTool.h.

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

state of the Tool

Definition at line 365 of file AlgTool.h.

SmartIF<ISvcLocator> AlgTool::m_svcLocator
| mutable private

Pointer to Service Locator service.

Definition at line 330 of file AlgTool.h.

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

state of the Tool

Definition at line 366 of file AlgTool.h.

std::string AlgTool::m_threadID
| private

Thread Id for Alg Tool.

Definition at line 352 of file AlgTool.h.

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

Definition at line 357 of file AlgTool.h.

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

Definition at line 356 of file AlgTool.h.

bool AlgTool::m_toolHandlesInit = false
| mutable private

Definition at line 358 of file AlgTool.h.

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

Definition at line 355 of file AlgTool.h.

std::string AlgTool::m_type
| private

AlgTool type (concrete class name)

Definition at line 326 of file AlgTool.h.

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

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

Definition at line 267 of file AlgTool.h.

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

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