![]() |
The Gaudi Framework
v27r1
|
Base class from which all the concrete tool classes should be derived. More...
#include <GaudiKernel/AlgTool.h>
Public Types | |
typedef Gaudi::PluginService::Factory< IAlgTool *, const std::string &, const std::string &, const IInterface * > | Factory |
![]() | |
using | base_class = CommonMessaging |
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... | |
StatusCode | setProperty (const Property &p) override |
Default implementations for IProperty interface. More... | |
StatusCode | setProperty (const std::string &s) override |
StatusCode | setProperty (const std::string &n, const std::string &v) override |
StatusCode | getProperty (Property *p) const override |
const Property & | getProperty (const std::string &name) const override |
StatusCode | getProperty (const std::string &n, std::string &v) const override |
const std::vector< Property * > & | getProperties () const override |
bool | hasProperty (const std::string &name) const override |
PropertyMgr * | getPropertyMgr () const |
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... | |
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 > | |
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... | |
template<class T > | |
Property * | declareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none") const |
template<class T > | |
StatusCode | declareTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true) |
template<class T > | |
Property * | declareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none") const |
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
virtual const DataObjIDColl & | extraInputDeps () const override |
virtual const DataObjIDColl & | extraOutputDeps () const override |
virtual void | acceptDHVisitor (IDataHandleVisitor *) const override |
DataObjIDColl | inputDataObjs () const |
DataObjIDColl | outputDataObjs () const |
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 | |
![]() | |
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... | |
Protected Member Functions | |
template<typename I > | |
void | declareInterface (I *i) |
virtual void | declareInput (Gaudi::DataHandle *im) override |
virtual void | declareOutput (Gaudi::DataHandle *im) override |
std::vector< IAlgTool * > & | tools () |
![]() | |
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... | |
SmartIF< PropertyMgr > | m_propertyMgr |
Property Manager. More... | |
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 |
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 193 of file AlgTool.cpp.
|
override |
Definition at line 453 of file AlgTool.cpp.
|
overridevirtual |
Definition at line 566 of file AlgTool.cpp.
IAuditorSvc * AlgTool::auditorSvc | ( | ) | const |
Access the auditor service.
Definition at line 553 of file AlgTool.cpp.
|
override |
Definition at line 579 of file AlgTool.cpp.
|
inlineoverride |
Definition at line 70 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 450 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 465 of file AlgTool.h.
|
inlineoverrideprotectedvirtual |
|
inlineprotected |
|
inlineoverrideprotectedvirtual |
|
inline |
Declare used private tool.
handle | ToolHandle<T> |
toolTypeAndName | |
parent,default | public tool |
create | if necessary, default true |
Definition at line 391 of file AlgTool.h.
|
inline |
Declare the named property.
name | the property name |
property | the property itself, |
doc | the documentation string |
Definition at line 249 of file AlgTool.h.
|
inline |
Definition at line 266 of file AlgTool.h.
|
inline |
Definition at line 291 of file AlgTool.h.
|
inline |
Declare used public tool.
handle | ToolHandle<T> |
toolTypeAndName | |
parent,default | public tool |
create | if necessary, default true |
Definition at line 365 of file AlgTool.h.
|
inline |
Declare remote named properties.
Definition at line 257 of file AlgTool.h.
|
inline |
Definition at line 278 of file AlgTool.h.
|
inline |
Definition at line 345 of file AlgTool.h.
IDataProviderSvc * AlgTool::evtSvc | ( | ) | const |
accessor to event service service
Definition at line 95 of file AlgTool.cpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
override |
Definition at line 360 of file AlgTool.cpp.
|
inlineoverride |
|
override |
Definition at line 160 of file AlgTool.cpp.
|
override |
Definition at line 140 of file AlgTool.cpp.
|
override |
Definition at line 147 of file AlgTool.cpp.
|
override |
Definition at line 153 of file AlgTool.cpp.
|
inline |
Definition at line 109 of file AlgTool.h.
|
override |
Definition at line 166 of file AlgTool.cpp.
|
override |
Definition at line 290 of file AlgTool.cpp.
|
private |
Definition at line 460 of file AlgTool.cpp.
|
inline |
|
inlineoverridevirtual |
|
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 437 of file AlgTool.h.
|
override |
Retrieve full identifying name of the concrete tool object.
Definition at line 65 of file AlgTool.cpp.
|
inline |
|
inlineoverridevirtual |
|
override |
|
override |
Query for a given interface.
Definition at line 45 of file AlgTool.cpp.
|
inline |
Definition at line 339 of file AlgTool.h.
|
override |
Definition at line 390 of file AlgTool.cpp.
|
override |
Definition at line 435 of file AlgTool.cpp.
|
inline |
Access a service by name, creating it if it doesn't already exist.
Definition at line 195 of file AlgTool.h.
|
inline |
Access a service by name, type creating it if it doesn't already exist.
Definition at line 202 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 547 of file AlgTool.cpp.
|
inline |
Definition at line 210 of file AlgTool.h.
|
private |
flag indicating whether ToolHandle tools have been added to m_tools
implementation of service method
Definition at line 529 of file AlgTool.cpp.
|
private |
Definition at line 539 of file AlgTool.cpp.
|
override |
Retrieve pointer to service locator.
Definition at line 86 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 171 of file AlgTool.cpp.
|
override |
Default implementations for IProperty interface.
Definition at line 119 of file AlgTool.cpp.
|
override |
Definition at line 126 of file AlgTool.cpp.
|
override |
Definition at line 133 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 155 of file AlgTool.h.
|
override |
Definition at line 315 of file AlgTool.cpp.
|
override |
Definition at line 338 of file AlgTool.cpp.
|
inline |
shortcut for the method service locator
Definition at line 173 of file AlgTool.h.
|
override |
Finalize AlgTool.
Definition at line 346 of file AlgTool.cpp.
|
override |
Initialize AlgTool.
Definition at line 271 of file AlgTool.cpp.
|
override |
Initialize AlgTool.
Definition at line 368 of file AlgTool.cpp.
|
override |
Start AlgTool.
Definition at line 413 of file AlgTool.cpp.
|
override |
Start AlgTool.
Definition at line 300 of file AlgTool.cpp.
|
override |
Stop AlgTool.
Definition at line 323 of file AlgTool.cpp.
|
inlineoverride |
Definition at line 79 of file AlgTool.h.
|
inlineoverride |
Definition at line 75 of file AlgTool.h.
const std::vector< IAlgTool * > & AlgTool::tools | ( | ) | const |
Definition at line 512 of file AlgTool.cpp.
|
protected |
Definition at line 519 of file AlgTool.cpp.
IToolSvc * AlgTool::toolSvc | ( | ) | const |
The standard ToolSvc service, Return a pointer to the service if present.
Definition at line 106 of file AlgTool.cpp.
|
override |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
|
protected |
|
private |
|
mutableprivate |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
private |
|
protected |