The Gaudi Framework
v25r5
|
Base class from which all the concrete tool classes should be derived. More...
#include <GaudiKernel/AlgTool.h>
Classes | |
class | declareInterface |
Public Types | |
typedef Gaudi::PluginService::Factory < IAlgTool *, const std::string &, const std::string &, const IInterface * > | Factory |
![]() | |
typedef implements3 | base_class |
Typedef to this class. More... | |
typedef extend_interfaces3 < IAlgTool, IProperty, IStateful > | extend_interfaces_base |
Typedef to the base of this class. More... | |
typedef extend_interfaces_base::ext_iids | interfaces |
MPL set of all the implemented interfaces. More... | |
![]() | |
typedef mpl::fold< typename IAlgTool::iid::iids::type, typename mpl::fold< typename IProperty::iid::iids::type, typename IStateful::iid::iids::type, mpl::insert< mpl::_1, mpl::_2 > >::type, mpl::insert< mpl::_1, mpl::_2 > >::type | ext_iids |
MPL set of interfaces extended by this one. More... | |
![]() | |
enum | Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR } |
Return status. More... | |
typedef Gaudi::InterfaceId < IInterface, 0, 0 > | iid |
Interface ID. More... | |
typedef mpl::set1< iid > | ext_iids |
Extra interfaces. More... | |
Public Member Functions | |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvUnknown) |
Query for a given interface. More... | |
virtual const std::string & | name () const |
Retrieve full identifying name of the concrete tool object. More... | |
virtual const std::string & | type () const |
Retrieve type (concrete class) of the sub-algtool. More... | |
virtual const IInterface * | parent () const |
Retrieve parent of the sub-algtool. More... | |
virtual StatusCode | configure () |
Configuration (from OFFLINE to CONFIGURED). More... | |
virtual StatusCode | initialize () |
Initialization (from CONFIGURED to INITIALIZED). More... | |
virtual StatusCode | start () |
Start (from INITIALIZED to RUNNING). More... | |
virtual StatusCode | stop () |
Stop (from RUNNING to INITIALIZED). More... | |
virtual StatusCode | finalize () |
Finalize (from INITIALIZED to CONFIGURED). More... | |
virtual StatusCode | terminate () |
Initialization (from CONFIGURED to OFFLINE). More... | |
virtual StatusCode | reinitialize () |
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More... | |
virtual StatusCode | restart () |
Initialization (from RUNNING to RUNNING, via INITIALIZED). More... | |
virtual Gaudi::StateMachine::State | FSMState () const |
Get the current state. More... | |
virtual Gaudi::StateMachine::State | targetFSMState () const |
When we are in the middle of a transition, get the state where the transition is leading us. More... | |
virtual StatusCode | sysInitialize () |
Initialize AlgTool. More... | |
virtual StatusCode | sysStart () |
Start AlgTool. More... | |
virtual StatusCode | sysStop () |
Stop AlgTool. More... | |
virtual StatusCode | sysFinalize () |
Finalize AlgTool. More... | |
virtual StatusCode | sysReinitialize () |
Initialize AlgTool. More... | |
virtual StatusCode | sysRestart () |
Start AlgTool. More... | |
virtual StatusCode | setProperty (const Property &p) |
Default implementations for IProperty interface. More... | |
virtual StatusCode | setProperty (const std::string &s) |
Set the property by string. More... | |
virtual StatusCode | setProperty (const std::string &n, const std::string &v) |
Set the property by std::string. More... | |
virtual StatusCode | getProperty (Property *p) const |
Get the property by property. More... | |
virtual const Property & | getProperty (const std::string &name) const |
Get the property by name. More... | |
virtual StatusCode | getProperty (const std::string &n, std::string &v) const |
Get the property by std::string. More... | |
virtual const std::vector < Property * > & | getProperties () const |
Get list of properties. More... | |
PropertyMgr * | getPropertyMgr () |
template<class TYPE > | |
StatusCode | setProperty (const std::string &name, const TYPE &value) |
set the property form the value More... | |
AlgTool (const std::string &type, const std::string &name, const IInterface *parent) | |
Standard Constructor. More... | |
ISvcLocator * | serviceLocator () const |
Retrieve pointer to service locator. More... | |
ISvcLocator * | svcLoc () const |
shortcut for the method service locator More... | |
IMessageSvc * | msgSvc () const |
Retrieve pointer to message 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... | |
void | declInterface (const InterfaceID &, void *) |
declare interface More... | |
template<class T > | |
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const |
Declare the named property. More... | |
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const |
Declare remote named properties. More... | |
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... | |
![]() | |
virtual | ~extend_interfaces3 () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IAlgTool, 3, 0) | |
InterfaceID. More... | |
virtual | ~IAlgTool () |
Virtual destructor. More... | |
virtual unsigned long | refCount () const =0 |
Current number of reference counts. More... | |
![]() | |
DeclareInterfaceID (INamedInterface, 1, 0) | |
InterfaceID. More... | |
virtual | ~INamedInterface () |
Virtual destructor (always needed for abstract classes). More... | |
![]() | |
virtual void * | i_cast (const InterfaceID &) const =0 |
main cast function More... | |
virtual std::vector< std::string > | getInterfaceNames () const =0 |
Returns a vector of strings containing the names of all the implemented interfaces. More... | |
virtual unsigned long | addRef ()=0 |
Increment the reference count of Interface instance. More... | |
virtual unsigned long | release ()=0 |
Release Interface instance. More... | |
virtual | ~IInterface () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IProperty, 2, 0) | |
InterfaceID. More... | |
![]() | |
DeclareInterfaceID (IStateful, 1, 0) | |
InterfaceID. More... | |
virtual | ~IStateful () |
Protected Member Functions | |
int | outputLevel () const |
get tool's output level More... | |
IntegerProperty & | outputLevelProperty () |
Accessor for the Message level property. More... | |
void | initOutputLevel (Property &prop) |
callback for output level property More... | |
virtual | ~AlgTool () |
Private Types | |
typedef std::list< std::pair < InterfaceID, void * > > | InterfaceList |
Private Member Functions | |
StatusCode | service_i (const std::string &algName, bool createIf, const InterfaceID &iid, void **ppSvc) const |
implementation of service method More... | |
StatusCode | service_i (const std::string &svcType, const std::string &svcName, const InterfaceID &iid, void **ppS) const |
Friends | |
class | ToolSvc |
Additional Inherited Members | |
![]() | |
static const InterfaceID & | interfaceID () |
Return an instance of InterfaceID identifying the interface. More... | |
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).
typedef Gaudi::PluginService::Factory<IAlgTool*, const std::string&, const std::string&, const IInterface*> AlgTool::Factory |
|
private |
AlgTool::AlgTool | ( | const std::string & | type, |
const std::string & | name, | ||
const IInterface * | parent | ||
) |
Standard Constructor.
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 179 of file AlgTool.cpp.
|
protectedvirtual |
Definition at line 568 of file AlgTool.cpp.
IAuditorSvc * AlgTool::auditorSvc | ( | ) | const |
Access the auditor service.
Definition at line 604 of file AlgTool.cpp.
|
inlinevirtual |
Configuration (from OFFLINE to CONFIGURED).
Implements IAlgTool.
Definition at line 57 of file AlgTool.h.
|
inline |
Declare monitoring information.
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 277 of file AlgTool.h.
|
inline |
Declare monitoring information (special case)
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 292 of file AlgTool.h.
|
inline |
Declare the named property.
name | the property name |
property | the property itself, |
doc | the documentation string |
Definition at line 234 of file AlgTool.h.
|
inline |
Declare remote named properties.
Definition at line 242 of file AlgTool.h.
void AlgTool::declInterface | ( | const InterfaceID & | iid, |
void * | ii | ||
) |
|
virtual |
Finalize (from INITIALIZED to CONFIGURED).
Implements IAlgTool.
Reimplemented in GaudiHistos< GaudiTool >, GaudiCommon< AlgTool >, GaudiTuples< GaudiHistoTool >, GaudiTool, GaudiHistoTool, GaudiTupleTool, PartitionSwitchTool, SequencerTimerTool, DataStreamTool, FuncMinimum, GslErrorCount, DataSvcFileEntriesTool, and EqSolver.
Definition at line 434 of file AlgTool.cpp.
|
inlinevirtual |
|
virtual |
Get list of properties.
Implements IProperty.
Definition at line 140 of file AlgTool.cpp.
|
virtual |
Get the property by property.
Implements IProperty.
Definition at line 120 of file AlgTool.cpp.
|
virtual |
Get the property by name.
Implements IProperty.
Definition at line 127 of file AlgTool.cpp.
|
virtual |
Get the property by std::string.
Implements IProperty.
Definition at line 133 of file AlgTool.cpp.
|
inline |
|
virtual |
Initialization (from CONFIGURED to INITIALIZED).
Implements IAlgTool.
Reimplemented in GaudiHistos< GaudiTool >, GaudiCommon< AlgTool >, GaudiTuples< GaudiHistoTool >, GaudiTool, GaudiHistoTool, GaudiTupleTool, SequencerTimerTool, FuncMinimum, PartitionSwitchTool, DataStreamTool, EqSolver, and DataSvcFileEntriesTool.
Definition at line 307 of file AlgTool.cpp.
|
protected |
callback for output level property
Definition at line 617 of file AlgTool.cpp.
|
inline |
Access the monitor service.
NULL | No monitor service is present |
non-NULL | A monitor service is present and available to be used |
Definition at line 261 of file AlgTool.h.
IMessageSvc * AlgTool::msgSvc | ( | ) | const |
|
virtual |
Retrieve full identifying name of the concrete tool object.
Implements INamedInterface.
Definition at line 51 of file AlgTool.cpp.
|
inlineprotected |
|
inlineprotected |
|
virtual |
|
virtual |
Query for a given interface.
Implements IInterface.
Reimplemented in extends2< AlgTool, IDODAlgMapper, IDODNodeMapper >, extends2< AlgTool, IDataStoreLeaves, IIncidentListener >, extends1< AlgTool, IDataStreamTool >, extends1< GaudiTool, IFuncMinimum >, extends1< AlgTool, IGslErrorHandler >, extends1< AlgTool, IFileAccess >, extends1< AlgTool, IPartitionControl >, and extends1< GaudiTool, IEqSolver >.
Definition at line 18 of file AlgTool.cpp.
|
virtual |
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
Implements IAlgTool.
Definition at line 482 of file AlgTool.cpp.
|
virtual |
Initialization (from RUNNING to RUNNING, via INITIALIZED).
Implements IAlgTool.
Definition at line 548 of file AlgTool.cpp.
|
inline |
Access a service by name, creating it if it doesn't already exist.
Definition at line 179 of file AlgTool.h.
|
inline |
Access a service by name, type creating it if it doesn't already exist.
Definition at line 186 of file AlgTool.h.
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 598 of file AlgTool.cpp.
|
private |
implementation of service method
Definition at line 580 of file AlgTool.cpp.
|
private |
Definition at line 590 of file AlgTool.cpp.
ISvcLocator * AlgTool::serviceLocator | ( | ) | const |
Retrieve pointer to service locator.
Definition at line 72 of file AlgTool.cpp.
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 147 of file AlgTool.cpp.
|
virtual |
Default implementations for IProperty interface.
Implements IProperty.
Definition at line 99 of file AlgTool.cpp.
|
virtual |
Set the property by string.
Implements IProperty.
Definition at line 106 of file AlgTool.cpp.
|
virtual |
Set the property by std::string.
Implements IProperty.
Definition at line 113 of file AlgTool.cpp.
|
inline |
set the property form the value
Note: the interface IProperty allows setting of the properties either directly from other properties or from strings only
This is very convenient in resetting of the default properties in the derived classes. E.g. without this method one needs to convert everything into strings to use IProperty::setProperty
For simple cases it is more or less ok, but for complicated properties it is just ugly..
name | name of the property |
value | value of the property |
Definition at line 141 of file AlgTool.h.
|
virtual |
Start (from INITIALIZED to RUNNING).
Implements IAlgTool.
Definition at line 351 of file AlgTool.cpp.
|
virtual |
Stop (from RUNNING to INITIALIZED).
Implements IAlgTool.
Definition at line 393 of file AlgTool.cpp.
|
inline |
shortcut for the method service locator
Definition at line 159 of file AlgTool.h.
|
virtual |
Finalize AlgTool.
Implements IAlgTool.
Definition at line 401 of file AlgTool.cpp.
|
virtual |
Initialize AlgTool.
Implements IAlgTool.
Definition at line 273 of file AlgTool.cpp.
|
virtual |
Initialize AlgTool.
Implements IAlgTool.
Definition at line 442 of file AlgTool.cpp.
|
virtual |
Start AlgTool.
Implements IAlgTool.
Definition at line 507 of file AlgTool.cpp.
|
virtual |
Start AlgTool.
Implements IAlgTool.
Definition at line 317 of file AlgTool.cpp.
|
virtual |
Stop AlgTool.
Implements IAlgTool.
Definition at line 359 of file AlgTool.cpp.
|
inlinevirtual |
When we are in the middle of a transition, get the state where the transition is leading us.
Otherwise it returns the same state as state().
Implements IStateful.
Definition at line 66 of file AlgTool.h.
|
inlinevirtual |
Initialization (from CONFIGURED to OFFLINE).
Implements IAlgTool.
Definition at line 62 of file AlgTool.h.
IToolSvc * AlgTool::toolSvc | ( | ) | const |
The standard ToolSvc service, Return a pointer to the service if present.
Definition at line 86 of file AlgTool.cpp.
|
virtual |
Retrieve type (concrete class) of the sub-algtool.
Implements IAlgTool.
Definition at line 58 of file AlgTool.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
|
private |
|
mutableprivate |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |