Gaudi Framework, version v23r9

Home   Generated: Thu Jul 18 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | 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:
Inheritance graph
[legend]
Collaboration diagram for AlgTool:
Collaboration graph
[legend]

Classes

class  declareInterface
 

Public Member Functions

virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvUnknown)
 Query for a given interface.
 
virtual const std::stringname () const
 Retrieve full identifying name of the concrete tool object.
 
virtual const std::stringtype () const
 Retrieve type (concrete class) of the sub-algtool.
 
virtual const IInterfaceparent () const
 Retrieve parent of the sub-algtool.
 
virtual StatusCode configure ()
 
virtual StatusCode initialize ()
 
virtual StatusCode start ()
 
virtual StatusCode stop ()
 
virtual StatusCode finalize ()
 
virtual StatusCode terminate ()
 
virtual StatusCode reinitialize ()
 
virtual StatusCode restart ()
 
virtual Gaudi::StateMachine::State FSMState () const
 
virtual Gaudi::StateMachine::State targetFSMState () const
 
virtual StatusCode sysInitialize ()
 Initialize AlgTool.
 
virtual StatusCode sysStart ()
 Start AlgTool.
 
virtual StatusCode sysStop ()
 Stop AlgTool.
 
virtual StatusCode sysFinalize ()
 Finalize AlgTool.
 
virtual StatusCode sysReinitialize ()
 Initialize AlgTool.
 
virtual StatusCode sysRestart ()
 Start AlgTool.
 
virtual StatusCode setProperty (const Property &p)
 Default implementations for IProperty interface.
 
virtual StatusCode setProperty (const std::string &s)
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 
virtual StatusCode getProperty (Property *p) const
 
virtual const PropertygetProperty (const std::string &name) const
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 
virtual const std::vector
< Property * > & 
getProperties () const
 
PropertyMgrgetPropertyMgr ()
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 
 AlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Constructor.
 
ISvcLocatorserviceLocator () const
 Retrieve pointer to service locator.
 
ISvcLocatorsvcLoc () const
 shortcut for the method service locator
 
IMessageSvcmsgSvc () const
 Retrieve pointer to message service.
 
IToolSvctoolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present.
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified in the jobOptions via the job option service.
 
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.
 
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.
 
SmartIF< IServiceservice (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")
 
void declInterface (const InterfaceID &, void *)
 declare interface
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property.
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties.
 
IAuditorSvcauditorSvc () const
 Access the auditor service.
 
IMonitorSvcmonitorSvc () const
 Access the monitor service.
 
template<class T >
void declareInfo (const std::string &name, const T &var, const std::string &desc) const
 Declare monitoring information.
 
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)
 

Protected Member Functions

int outputLevel () const
 get tool's output level
 
IntegerPropertyoutputLevelProperty ()
 Accessor for the Message level property.
 
void initOutputLevel (Property &prop)
 callback for output level property
 
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
 
StatusCode service_i (const std::string &svcType, const std::string &svcName, const InterfaceID &iid, void **ppS) const
 

Private Attributes

IntegerProperty m_outputLevel
 AlgTool output level.
 
std::string m_type
 AlgTool type (concrete class name)
 
const std::string m_name
 AlgTool full name.
 
const IInterfacem_parent
 AlgTool parent.
 
ISvcLocatorm_svcLocator
 Pointer to Service Locator service.
 
IMessageSvcm_messageSvc
 Message service.
 
IToolSvcm_ptoolSvc
 Tool service.
 
IMonitorSvcm_pMonitorSvc
 Online Monitoring Service.
 
std::string m_monitorSvcName
 Name to use for Monitor Service.
 
PropertyMgrm_propertyMgr
 Property Manager.
 
InterfaceList m_interfaceList
 Interface list.
 
std::string m_threadID
 Thread Id for Alg Tool.
 
IAuditorSvcm_pAuditorSvc
 Auditor Service.
 
BooleanProperty m_auditInit
 
bool m_auditorInitialize
 flag for auditors in "initialize()"
 
bool m_auditorStart
 flag for auditors in "start()"
 
bool m_auditorStop
 flag for auditors in "stop()"
 
bool m_auditorFinalize
 flag for auditors in "finalize()"
 
bool m_auditorReinitialize
 flag for auditors in "reinitialize()"
 
bool m_auditorRestart
 flag for auditors in "restart()"
 
Gaudi::StateMachine::State m_state
 state of the Tool
 
Gaudi::StateMachine::State m_targetState
 state of the Tool
 

Friends

class ToolSvc
 

Additional Inherited Members

- Public Types inherited from implements3< IAlgTool, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class.
 
typedef extend_interfaces3
< IAlgTool, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 

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

Member Typedef Documentation

Definition at line 314 of file AlgTool.h.

Constructor & Destructor Documentation

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

Standard Constructor.

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

Definition at line 179 of file AlgTool.cpp.

, m_type ( type )
, m_name ( name )
, m_parent ( parent )
, m_svcLocator ( 0 )
, m_messageSvc ( 0 )
, m_ptoolSvc ( 0 )
, m_pMonitorSvc ( NULL )
, m_threadID ( )
, m_pAuditorSvc ( 0 )
, m_auditInit ( false )
{
addRef(); // Initial count set to 1
declareProperty( "MonitorService", m_monitorSvcName = "MonitorSvc" );
{ // get the "OutputLevel" property from parent
const Property* _p = Gaudi::Utils::getProperty ( parent , "OutputLevel") ;
if ( 0 != _p ) { m_outputLevel.assign( *_p ) ; }
declareProperty ( "OutputLevel" , m_outputLevel ) ;
}
IInterface* _p = const_cast<IInterface*> ( parent ) ;
if ( Algorithm* _alg = dynamic_cast<Algorithm*> ( _p ) )
{
m_messageSvc = _alg -> msgSvc () ;
}
else if ( Service* _svc = dynamic_cast<Service*> ( _p ) )
{
m_messageSvc = _svc -> msgSvc () ;
}
else if ( AlgTool* _too = dynamic_cast<AlgTool*> ( _p ) )
{
}
else if ( Auditor* _aud = dynamic_cast<Auditor*> ( _p ) )
{
m_messageSvc = _aud -> msgSvc() ;
}
else
{
( "Failure to create tool '"
+ type + "/" + name + "': illegal parent type '"
+ System::typeinfoName(typeid(*_p)) + "'", "AlgTool", 0 );
}
{ // audit tools
if ( !appMgr.isValid() ) {
throw GaudiException("Could not locate ApplicationMgr","AlgTool",0);
}
const Property* p = Gaudi::Utils::getProperty( appMgr , "AuditTools");
if ( 0 != p ) { m_auditInit.assign ( *p ) ; }
declareProperty ( "AuditTools", m_auditInit );
bool audit = m_auditInit.value();
// Declare common AlgTool properties with their defaults
declareProperty ( "AuditInitialize" , m_auditorInitialize = audit ) ;
declareProperty ( "AuditStart" , m_auditorStart = audit ) ;
declareProperty ( "AuditStop" , m_auditorStop = audit ) ;
declareProperty ( "AuditFinalize" , m_auditorFinalize = audit ) ;
}
// check thread ID and try if tool name indicates thread ID
if ( m_threadID.empty() )
}
AlgTool::~AlgTool ( )
protectedvirtual

Definition at line 569 of file AlgTool.cpp.

Member Function Documentation

IAuditorSvc * AlgTool::auditorSvc ( ) const

Access the auditor service.

Definition at line 605 of file AlgTool.cpp.

{
//---------------------------------------------------------------------------
if ( 0 == m_pAuditorSvc ) {
StatusCode sc = service( "AuditorSvc", m_pAuditorSvc, true );
if( sc.isFailure() ) {
throw GaudiException("Service [AuditorSvc] not found", name(), sc);
}
}
return m_pAuditorSvc;
}
virtual StatusCode AlgTool::configure ( )
inlinevirtual

Definition at line 50 of file AlgTool.h.

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

Declare monitoring information.

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

Definition at line 270 of file AlgTool.h.

{
if ( mS ) mS->declareInfo(name, var, desc, this);
}
void AlgTool::declareInfo ( const std::string name,
const std::string format,
const void *  var,
int  size,
const std::string desc 
) const
inline

Declare monitoring information (special case)

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

Definition at line 285 of file AlgTool.h.

{
if ( mS ) mS->declareInfo(name, format, var, size, desc, this);
}
template<class T >
Property* AlgTool::declareProperty ( const std::string name,
T &  property,
const std::string doc = "none" 
) const
inline

Declare the named property.

MyTool ( const std::string& type ,
const std::string& name ,
const IInterface* parent )
: AlgTool ( type , name , pSvc )
, m_property1 ( ... )
, m_property2 ( ... )
{
// declare the property
declareProperty( "Property1" , m_property1 , "Doc for property #1" ) ;
// declare the property and attach the handler to it
declareProperty( "Property2" , m_property2 , "Doc for property #2" )
-> declareUpdateHandler( &MyTool::handler_2 ) ;
}
See Also
PropertyMgr
PropertyMgr::declareProperty
Parameters
namethe property name
propertythe property itself,
docthe documentation string
Returns
the actual property objects

Definition at line 227 of file AlgTool.h.

{
return m_propertyMgr -> declareProperty ( name , property , doc ) ;
}
Property* AlgTool::declareRemoteProperty ( const std::string name,
IProperty rsvc,
const std::string rname = "" 
) const
inline

Declare remote named properties.

Definition at line 235 of file AlgTool.h.

{
return m_propertyMgr-> declareRemoteProperty ( name , rsvc , rname ) ;
}
void AlgTool::declInterface ( const InterfaceID iid,
void *  ii 
)

declare interface

Definition at line 43 of file AlgTool.cpp.

StatusCode AlgTool::finalize ( )
virtual
virtual Gaudi::StateMachine::State AlgTool::FSMState ( ) const
inlinevirtual

Definition at line 58 of file AlgTool.h.

{ return m_state; }
const std::vector< Property * > & AlgTool::getProperties ( ) const
virtual

Definition at line 140 of file AlgTool.cpp.

StatusCode AlgTool::getProperty ( Property p) const
virtual

Definition at line 120 of file AlgTool.cpp.

{
}
const Property & AlgTool::getProperty ( const std::string name) const
virtual

Definition at line 127 of file AlgTool.cpp.

{
}
StatusCode AlgTool::getProperty ( const std::string n,
std::string v 
) const
virtual

Definition at line 133 of file AlgTool.cpp.

{
return m_propertyMgr->getProperty(n,v);
}
PropertyMgr* AlgTool::getPropertyMgr ( )
inline

Definition at line 88 of file AlgTool.h.

{ return m_propertyMgr; }
StatusCode AlgTool::initialize ( )
virtual

Reimplemented in GaudiHistos< GaudiTool >, GaudiCommon< AlgTool >, GaudiTuples< GaudiHistoTool >, GaudiTool, GaudiHistoTool, GaudiTupleTool, FuncMinimum, SequencerTimerTool, EqSolver, PartitionSwitchTool, DataStreamTool, and DataSvcFileEntriesTool.

Definition at line 302 of file AlgTool.cpp.

{
// For the time being there is nothing to be done here.
// Setting the properties is done by the ToolSvc calling setProperties()
// explicitly.
}
void AlgTool::initOutputLevel ( Property prop)
protected

callback for output level property

Definition at line 618 of file AlgTool.cpp.

{
//-----------------------------------------------------------------------------
// do nothing... yet ?
}
IMonitorSvc* AlgTool::monitorSvc ( ) const
inline

Access the monitor service.

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

Definition at line 254 of file AlgTool.h.

{
// If not already located try to locate it without forcing a creation
if ( !m_pMonitorSvc ){
}
return m_pMonitorSvc;
}
IMessageSvc * AlgTool::msgSvc ( ) const

Retrieve pointer to message service.

Definition at line 79 of file AlgTool.cpp.

{
return m_messageSvc;
}
const std::string & AlgTool::name ( ) const
virtual

Retrieve full identifying name of the concrete tool object.

Definition at line 51 of file AlgTool.cpp.

{
return m_name;
}
int AlgTool::outputLevel ( ) const
inlineprotected

get tool's output level

Definition at line 298 of file AlgTool.h.

{ return (int)m_outputLevel ; }
IntegerProperty& AlgTool::outputLevelProperty ( )
inlineprotected

Accessor for the Message level property.

Definition at line 301 of file AlgTool.h.

{ return m_outputLevel; }
const IInterface * AlgTool::parent ( ) const
virtual

Retrieve parent of the sub-algtool.

Definition at line 65 of file AlgTool.cpp.

{
return m_parent;
}
StatusCode AlgTool::queryInterface ( const InterfaceID riid,
void **  ppvUnknown 
)
virtual

Query for a given interface.

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.

{
if ( 0 == ppvi ) { return StatusCode::FAILURE ; } // RETURN
StatusCode sc = base_class::queryInterface(riid,ppvi);
if (sc.isSuccess()) {
return sc;
}
else {
m_interfaceList.end() != it ; ++it )
{
if ( !it->first.versionMatch ( riid ) ) { continue ; }
// OK
*ppvi = it->second ;
addRef() ;
return SUCCESS ; // RETURN
}
*ppvi = 0 ;
return NO_INTERFACE ; // RETURN
}
// cannot reach this point
}
StatusCode AlgTool::reinitialize ( )
virtual

Definition at line 482 of file AlgTool.cpp.

{
/* @TODO
* MCl 2008-10-23: the implementation of reinitialize as finalize+initialize
* is causing too many problems
*
// Default implementation is finalize+initialize
StatusCode sc = finalize();
if (sc.isFailure()) {
MsgStream log ( msgSvc() , name() );
log << MSG::ERROR << "reinitialize(): cannot be finalized" << endmsg;
return sc;
}
sc = initialize();
if (sc.isFailure()) {
MsgStream log ( msgSvc() , name() );
log << MSG::ERROR << "reinitialize(): cannot be initialized" << endmsg;
return sc;
}
*/
}
StatusCode AlgTool::restart ( )
virtual

Definition at line 549 of file AlgTool.cpp.

{
// Default implementation is stop+start
if (sc.isFailure()) {
MsgStream log ( msgSvc() , name() );
log << MSG::ERROR << "restart(): cannot be stopped" << endmsg;
return sc;
}
sc = start();
if (sc.isFailure()) {
MsgStream log ( msgSvc() , name() );
log << MSG::ERROR << "restart(): cannot be started" << endmsg;
return sc;
}
}
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 172 of file AlgTool.h.

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

{
return service_i(type, name, T::interfaceID(), (void**)&svc);
}
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 599 of file AlgTool.cpp.

{
const ServiceLocatorHelper helper(*serviceLocator(), *this);
return helper.service(name, quiet, createIf);
}
StatusCode AlgTool::service_i ( const std::string algName,
bool  createIf,
const InterfaceID iid,
void **  ppSvc 
) const
private

implementation of service method

Definition at line 581 of file AlgTool.cpp.

{
const ServiceLocatorHelper helper(*serviceLocator(), *this);
return helper.getService(svcName, createIf, iid, ppSvc);
}
StatusCode AlgTool::service_i ( const std::string svcType,
const std::string svcName,
const InterfaceID iid,
void **  ppS 
) const
private

Definition at line 591 of file AlgTool.cpp.

{
const ServiceLocatorHelper helper(*serviceLocator(), *this);
return helper.createService(svcType, svcName, iid, ppSvc);
}
ISvcLocator * AlgTool::serviceLocator ( ) const

Retrieve pointer to service locator.

Definition at line 72 of file AlgTool.cpp.

{
return m_svcLocator;
}
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.

{
if( m_svcLocator == 0) {
}
if( !jos.isValid() ) return StatusCode::FAILURE;
// set first generic Properties
StatusCode sc = jos->setMyProperties( getGaudiThreadGenericName(name()), this );
if( sc.isFailure() ) return StatusCode::FAILURE;
// set specific Properties
if(jos->setMyProperties( name(), this ).isFailure()) {
}
}
// Change my own outputlevel
if ( 0 != m_messageSvc )
{
{ m_messageSvc -> setOutputLevel ( name () , m_outputLevel ) ; }
}
}
StatusCode AlgTool::setProperty ( const Property p)
virtual

Default implementations for IProperty interface.

Definition at line 99 of file AlgTool.cpp.

{
}
StatusCode AlgTool::setProperty ( const std::string s)
virtual

Definition at line 106 of file AlgTool.cpp.

{
}
StatusCode AlgTool::setProperty ( const std::string n,
const std::string v 
)
virtual

Definition at line 113 of file AlgTool.cpp.

{
return m_propertyMgr->setProperty(n,v);
}
template<class TYPE >
StatusCode AlgTool::setProperty ( const std::string name,
const TYPE &  value 
)
inline

set the property form the value

std::vector<double> data = ... ;
setProperty( "Data" , data ) ;
setProperty( "Cuts" , cuts ) ;
setProperty( "Dictionary" , dict ) ;

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

setProperty ( "OutputLevel" , "1" ) ;
setProperty ( "Enable" , "True" ) ;
setProperty ( "ErrorMax" , "10" ) ;

For simple cases it is more or less ok, but for complicated properties it is just ugly..

Parameters
namename of the property
valuevalue of the property
See Also
Gaudi::Utils::setProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 134 of file AlgTool.h.

{ return Gaudi::Utils::setProperty ( m_propertyMgr , name , value ) ; }
StatusCode AlgTool::start ( )
virtual

Definition at line 347 of file AlgTool.cpp.

{
// For the time being there is nothing to be done here.
}
StatusCode AlgTool::stop ( )
virtual

Definition at line 390 of file AlgTool.cpp.

{
// For the time being there is nothing to be done here.
}
ISvcLocator* AlgTool::svcLoc ( ) const
inline

shortcut for the method service locator

Definition at line 152 of file AlgTool.h.

{ return serviceLocator() ; }
StatusCode AlgTool::sysFinalize ( )
virtual

Finalize AlgTool.

Definition at line 398 of file AlgTool.cpp.

{
//-----------------------------------------------------------------------------
try {
Gaudi::Guards::AuditorGuard guard(this,
// check if we want to audit the initialize
sc = finalize();
if (sc.isSuccess())
return sc;
}
catch( const GaudiException& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
log << MSG::FATAL << " Exception with tag=" << Exception.tag()
<< " is caught " << endmsg;
log << MSG::ERROR << Exception << endmsg;
}
catch( const std::exception& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
log << MSG::FATAL << " Standard std::exception is caught " << endmsg;
log << MSG::ERROR << Exception.what() << endmsg;
}
catch( ... ) {
MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
log << MSG::FATAL << "UNKNOWN Exception is caught " << endmsg;
}
}
StatusCode AlgTool::sysInitialize ( )
virtual

Initialize AlgTool.

Definition at line 267 of file AlgTool.cpp.

{
//-----------------------------------------------------------------------------
try {
Gaudi::Guards::AuditorGuard guard(this,
// check if we want to audit the initialize
sc = initialize();
if (sc.isSuccess())
return sc;
}
catch( const GaudiException& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
log << MSG::FATAL << " Exception with tag=" << Exception.tag()
<< " is caught " << endmsg;
log << MSG::ERROR << Exception << endmsg;
}
catch( const std::exception& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
log << MSG::FATAL << " Standard std::exception is caught " << endmsg;
log << MSG::ERROR << Exception.what() << endmsg;
}
catch( ... ) {
MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
log << MSG::FATAL << "UNKNOWN Exception is caught " << endmsg;
}
}
StatusCode AlgTool::sysReinitialize ( )
virtual

Initialize AlgTool.

Definition at line 441 of file AlgTool.cpp.

{
//-----------------------------------------------------------------------------
// Check that the current status is the correct one.
MsgStream log ( msgSvc() , name() );
<< "sysReinitialize(): cannot reinitialize tool not initialized"
<< endmsg;
}
try {
Gaudi::Guards::AuditorGuard guard(this,
// check if we want to audit the initialize
sc = reinitialize();
return sc;
}
catch( const GaudiException& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
log << MSG::FATAL << " Exception with tag=" << Exception.tag()
<< " is caught" << endmsg;
log << MSG::ERROR << Exception << endmsg;
}
catch( const std::exception& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
log << MSG::FATAL << " Standard std::exception is caught" << endmsg;
log << MSG::ERROR << Exception.what() << endmsg;
}
catch( ... ) {
MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
log << MSG::FATAL << "UNKNOWN Exception is caught" << endmsg;
}
}
StatusCode AlgTool::sysRestart ( )
virtual

Start AlgTool.

Definition at line 507 of file AlgTool.cpp.

{
//-----------------------------------------------------------------------------
// Check that the current status is the correct one.
MsgStream log ( msgSvc() , name() );
<< "sysRestart(): cannot reinitialize tool not started"
<< endmsg;
}
try {
Gaudi::Guards::AuditorGuard guard(this,
// check if we want to audit the initialize
sc = restart();
return sc;
}
catch( const GaudiException& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysRestart()" );
log << MSG::FATAL << " Exception with tag=" << Exception.tag()
<< " is caught" << endmsg;
log << MSG::ERROR << Exception << endmsg;
}
catch( const std::exception& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysRestart()" );
log << MSG::FATAL << " Standard std::exception is caught" << endmsg;
log << MSG::ERROR << Exception.what() << endmsg;
}
catch( ... ) {
MsgStream log ( msgSvc() , name() + ".sysRestart()" );
log << MSG::FATAL << "UNKNOWN Exception is caught" << endmsg;
}
}
StatusCode AlgTool::sysStart ( )
virtual

Start AlgTool.

Definition at line 312 of file AlgTool.cpp.

{
//-----------------------------------------------------------------------------
try {
Gaudi::Guards::AuditorGuard guard(this,
// check if we want to audit the initialize
sc = start();
if (sc.isSuccess())
return sc;
}
catch( const GaudiException& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysStart()" );
log << MSG::FATAL << " Exception with tag=" << Exception.tag()
<< " is caught " << endmsg;
log << MSG::ERROR << Exception << endmsg;
}
catch( const std::exception& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysStart()" );
log << MSG::FATAL << " Standard std::exception is caught " << endmsg;
log << MSG::ERROR << Exception.what() << endmsg;
}
catch( ... ) {
MsgStream log ( msgSvc() , name() + ".sysStart()" );
log << MSG::FATAL << "UNKNOWN Exception is caught " << endmsg;
}
}
StatusCode AlgTool::sysStop ( )
virtual

Stop AlgTool.

Definition at line 355 of file AlgTool.cpp.

{
//-----------------------------------------------------------------------------
try {
Gaudi::Guards::AuditorGuard guard(this,
// check if we want to audit the initialize
sc = stop();
if (sc.isSuccess())
return sc;
}
catch( const GaudiException& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysStop()" );
log << MSG::FATAL << " Exception with tag=" << Exception.tag()
<< " is caught " << endmsg;
log << MSG::ERROR << Exception << endmsg;
}
catch( const std::exception& Exception ) {
MsgStream log ( msgSvc() , name() + ".sysStop()" );
log << MSG::FATAL << " Standard std::exception is caught " << endmsg;
log << MSG::ERROR << Exception.what() << endmsg;
}
catch( ... ) {
MsgStream log ( msgSvc() , name() + ".sysStop()" );
log << MSG::FATAL << "UNKNOWN Exception is caught " << endmsg;
}
}
virtual Gaudi::StateMachine::State AlgTool::targetFSMState ( ) const
inlinevirtual

Definition at line 59 of file AlgTool.h.

{ return m_targetState; }
virtual StatusCode AlgTool::terminate ( )
inlinevirtual

Definition at line 55 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.

{
if ( 0 == m_ptoolSvc ) {
StatusCode sc = service( "ToolSvc", m_ptoolSvc, true );
if( sc.isFailure() ) {
throw GaudiException("Service [ToolSvc] not found", name(), sc);
}
}
return m_ptoolSvc;
}
const std::string & AlgTool::type ( ) const
virtual

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

Definition at line 58 of file AlgTool.cpp.

{
return m_type;
}

Friends And Related Function Documentation

friend class ToolSvc
friend

Definition at line 34 of file AlgTool.h.

Member Data Documentation

BooleanProperty AlgTool::m_auditInit
private

Definition at line 340 of file AlgTool.h.

bool AlgTool::m_auditorFinalize
private

flag for auditors in "finalize()"

Definition at line 344 of file AlgTool.h.

bool AlgTool::m_auditorInitialize
private

flag for auditors in "initialize()"

Definition at line 341 of file AlgTool.h.

bool AlgTool::m_auditorReinitialize
private

flag for auditors in "reinitialize()"

Definition at line 345 of file AlgTool.h.

bool AlgTool::m_auditorRestart
private

flag for auditors in "restart()"

Definition at line 346 of file AlgTool.h.

bool AlgTool::m_auditorStart
private

flag for auditors in "start()"

Definition at line 342 of file AlgTool.h.

bool AlgTool::m_auditorStop
private

flag for auditors in "stop()"

Definition at line 343 of file AlgTool.h.

InterfaceList AlgTool::m_interfaceList
private

Interface list.

Definition at line 325 of file AlgTool.h.

IMessageSvc* AlgTool::m_messageSvc
mutableprivate

Message service.

Definition at line 320 of file AlgTool.h.

std::string AlgTool::m_monitorSvcName
private

Name to use for Monitor Service.

Definition at line 323 of file AlgTool.h.

const std::string AlgTool::m_name
private

AlgTool full name.

Definition at line 317 of file AlgTool.h.

IntegerProperty AlgTool::m_outputLevel
private

AlgTool output level.

Definition at line 315 of file AlgTool.h.

const IInterface* AlgTool::m_parent
private

AlgTool parent.

Definition at line 318 of file AlgTool.h.

IAuditorSvc* AlgTool::m_pAuditorSvc
mutableprivate

Auditor Service.

Definition at line 338 of file AlgTool.h.

IMonitorSvc* AlgTool::m_pMonitorSvc
mutableprivate

Online Monitoring Service.

Definition at line 322 of file AlgTool.h.

PropertyMgr* AlgTool::m_propertyMgr
private

Property Manager.

Definition at line 324 of file AlgTool.h.

IToolSvc* AlgTool::m_ptoolSvc
mutableprivate

Tool service.

Definition at line 321 of file AlgTool.h.

Gaudi::StateMachine::State AlgTool::m_state
private

state of the Tool

Definition at line 348 of file AlgTool.h.

ISvcLocator* AlgTool::m_svcLocator
mutableprivate

Pointer to Service Locator service.

Definition at line 319 of file AlgTool.h.

Gaudi::StateMachine::State AlgTool::m_targetState
private

state of the Tool

Definition at line 349 of file AlgTool.h.

std::string AlgTool::m_threadID
private

Thread Id for Alg Tool.

Definition at line 326 of file AlgTool.h.

std::string AlgTool::m_type
private

AlgTool type (concrete class name)

Definition at line 316 of file AlgTool.h.


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

Generated at Thu Jul 18 2013 12:18:07 for Gaudi Framework, version v23r9 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004