Gaudi Framework, version v20r2

Generated: 18 Jul 2008

AlgTool Class Reference

#include <GaudiKernel/AlgTool.h>

Inheritance diagram for AlgTool:

Inheritance graph
[legend]
Collaboration diagram for AlgTool:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Specific methods for doing something usefull should be implemented in the concrete tools. Sub-types of this class could implement an additional interface for behaviour common to sets of concrete tools (for example vertexers).

Author:
Gloria Corti

Pere Mato

Definition at line 35 of file AlgTool.h.

Public Member Functions

virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvUnknown)
 Query for a given interface.
virtual unsigned long addRef ()
 Reference Interface instance.
virtual unsigned long release ()
 Release Interface instance.
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 ()
 Configuration (from OFFLINE to CONFIGURED).
virtual StatusCode initialize ()
 Initialization (from CONFIGURED to INITIALIZED).
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING).
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED).
virtual StatusCode finalize ()
 Finalize (from INITIALIZED to CONFIGURED).
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE).
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED).
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state.
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us.
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)
 Set the property by string.
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string.
virtual StatusCode getProperty (Property *p) const
 Get the property by property.
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name.
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string.
virtual const std::vector<
Property * > & 
getProperties () const
 Get list of properties.
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 methos 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.
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
virtual unsigned long refCount () const
 Current number of refCounts.
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.
unsigned long m_refCount
 Reference counter.
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

Classes

class  declareInterface


Member Typedef Documentation

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

Definition at line 327 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 215 of file AlgTool.cpp.

References PropertyWithValue< TYPE >::assign(), declareProperty(), Property::declareUpdateHandler(), std::basic_string< _CharT, _Traits, _Alloc >::empty(), getGaudiThreadIDfromName(), Gaudi::Utils::getProperty(), initOutputLevel(), StatusCode::isFailure(), m_auditInit, m_auditorFinalize, m_auditorInitialize, m_auditorStart, m_auditorStop, m_messageSvc, m_monitorSvcName, m_outputLevel, m_svcLocator, m_threadID, msgSvc(), name(), parent(), ISvcLocator::service(), serviceLocator(), type(), System::typeinfoName(), and PropertyWithValue< TYPE >::value().

00219   : m_outputLevel ( MSG::NIL )
00220   , m_type          ( type )
00221   , m_name          ( name )
00222   , m_parent        ( parent )
00223   , m_refCount      ( 1 )
00224   , m_svcLocator    ( 0 )
00225   , m_messageSvc    ( 0 )
00226   , m_ptoolSvc      ( 0 )
00227   , m_pMonitorSvc   ( NULL )
00228   , m_propertyMgr   ( new PropertyMgr() )
00229   , m_interfaceList (       )
00230   , m_threadID      (       )
00231   , m_pAuditorSvc   ( 0     )
00232   , m_auditInit     ( false )
00233   , m_state         ( Gaudi::StateMachine::CONFIGURED )
00234   , m_targetState   ( Gaudi::StateMachine::CONFIGURED )
00235 {
00236   declareProperty( "MonitorService", m_monitorSvcName = "MonitorSvc" );
00237 
00238   { // get the "OutputLevel" property from parent
00239     const Property* _p = Gaudi::Utils::getProperty ( parent , "OutputLevel") ;
00240     if ( 0 != _p ) { m_outputLevel.assign( *_p ) ; }
00241     declareProperty ( "OutputLevel"     , m_outputLevel ) ;
00242      m_outputLevel.declareUpdateHandler(&AlgTool::initOutputLevel, this);
00243   }
00244 
00245   IInterface* _p = const_cast<IInterface*> ( parent ) ;
00246 
00247   if      ( Algorithm* _alg = dynamic_cast<Algorithm*> ( _p ) )
00248   {
00249     m_svcLocator  = _alg -> serviceLocator  () ;
00250     m_messageSvc  = _alg -> msgSvc          () ;
00251     m_threadID    = getGaudiThreadIDfromName ( _alg -> name() ) ;
00252   }
00253   else if ( Service*   _svc = dynamic_cast<Service*>  ( _p ) )
00254   {
00255     m_svcLocator  = _svc -> serviceLocator () ;
00256     m_messageSvc  = _svc -> msgSvc         () ;
00257     m_threadID    = getGaudiThreadIDfromName ( _svc -> name() ) ;
00258   }
00259   else if ( AlgTool*   _too = dynamic_cast<AlgTool*>  ( _p ) )
00260   {
00261     m_svcLocator  = _too -> m_svcLocator;
00262     m_messageSvc  = _too -> m_messageSvc;
00263     m_threadID    = getGaudiThreadIDfromName ( _too ->m_threadID ) ;
00264   }
00265   else if ( Auditor*   _aud = dynamic_cast<Auditor*>  ( _p ) )
00266   {
00267     m_svcLocator  = _aud -> serviceLocator() ;
00268     m_messageSvc  = _aud -> msgSvc()         ;
00269     m_threadID    = getGaudiThreadIDfromName ( _aud -> name() )    ;
00270   }
00271   else
00272   {
00273     throw GaudiException
00274       ( "Failure to create tool '"
00275         + type + "/" + name + "': illegal parent type '"
00276         + System::typeinfoName(typeid(*_p)) + "'", "AlgTool", 0 );
00277   }
00278 
00279 
00280   { // audit tools
00281     IProperty *appMgr = 0 ;
00282     StatusCode sc = m_svcLocator->service("ApplicationMgr", appMgr) ;
00283     if  (sc.isFailure() || 0 == appMgr )
00284     { throw GaudiException("Could not locate ApplicationMgr","AlgTool",0); }
00285     const Property* p = Gaudi::Utils::getProperty( appMgr , "AuditTools");
00286     if ( 0 != p ) { m_auditInit.assign ( *p ) ; }
00287     declareProperty ( "AuditTools", m_auditInit );
00288     bool audit = m_auditInit.value();
00289     // Declare common AlgTool properties with their defaults
00290     declareProperty ( "AuditInitialize" , m_auditorInitialize = audit ) ;
00291     declareProperty ( "AuditStart"      , m_auditorStart      = audit ) ;
00292     declareProperty ( "AuditStop"       , m_auditorStop       = audit ) ;
00293     declareProperty ( "AuditFinalize"   , m_auditorFinalize   = audit ) ;
00294   }
00295 
00296   // check thread ID and try if tool name indicates thread ID
00297   if ( m_threadID.empty() )
00298   { m_threadID = getGaudiThreadIDfromName ( AlgTool::name() ) ; }
00299 }

AlgTool::~AlgTool (  )  [protected, virtual]

Definition at line 599 of file AlgTool.cpp.

References m_pAuditorSvc, m_pMonitorSvc, m_propertyMgr, m_ptoolSvc, IInterface::release(), and IMonitorSvc::undeclareAll().

00601 {
00602   delete m_propertyMgr;
00603   if( m_ptoolSvc ) m_ptoolSvc->release();
00604   if( m_pAuditorSvc ) m_pAuditorSvc->release();
00605   if ( m_pMonitorSvc ) { m_pMonitorSvc->undeclareAll(this); m_pMonitorSvc->release(); }
00606 }


Member Function Documentation

StatusCode AlgTool::queryInterface ( const InterfaceID riid,
void **  ppvUnknown 
) [virtual]

Query for a given interface.

Implements IInterface.

Reimplemented in PartitionSwitchTool.

Definition at line 40 of file AlgTool.cpp.

References StatusCode::FAILURE, IInterface::interfaceID(), INamedInterface::interfaceID(), IStateful::interfaceID(), IProperty::interfaceID(), and IAlgTool::interfaceID().

Referenced by PartitionSwitchTool::queryInterface().

00043 {
00044   if ( 0 == ppvi ) { return StatusCode::FAILURE ; } // RETURN
00045   //
00046   if      ( IAlgTool        ::interfaceID() .versionMatch ( riid ) )
00047   { *ppvi = static_cast<IAlgTool*>        ( this ) ; }
00048   else if ( IProperty       ::interfaceID() .versionMatch ( riid ) )
00049   { *ppvi = static_cast<IProperty*>       ( this ) ; }
00050   else if ( IStateful       ::interfaceID() . versionMatch ( riid ) )   
00051   { *ppvi = static_cast<IStateful*>       ( this ) ; }
00052   else if ( INamedInterface ::interfaceID() .versionMatch ( riid ) )
00053   { *ppvi = static_cast<INamedInterface*> ( this ) ; }
00054   else if ( IInterface      ::interfaceID() .versionMatch ( riid ) )
00055   { *ppvi = static_cast<IInterface*>      ( this ) ; }
00056   else
00057   {
00058     for ( InterfaceList::iterator it = m_interfaceList.begin() ;
00059           m_interfaceList.end() != it ; ++it )
00060     {
00061       if ( !it->first.versionMatch ( riid ) ) { continue ; }
00062       // OK
00063       *ppvi = it->second ;
00064       addRef() ;
00065       return SUCCESS ;     // RETURN
00066     }
00067     *ppvi = 0 ;
00068     return NO_INTERFACE ;  // RETURN
00069   }
00070   // increment the reference counter
00071   addRef() ;
00072   //
00073   return SUCCESS;
00074 }

unsigned long AlgTool::addRef (  )  [virtual]

Reference Interface instance.

Implements IInterface.

Definition at line 20 of file AlgTool.cpp.

References m_refCount.

Referenced by PartitionSwitchTool::queryInterface().

00022 {
00023   m_refCount++;
00024   return m_refCount;
00025 }

unsigned long AlgTool::release (  )  [virtual]

Release Interface instance.

Implements IInterface.

Definition at line 28 of file AlgTool.cpp.

References count(), and m_refCount.

00030 {
00031   unsigned long count = --m_refCount;
00032   if( count <= 0) {
00033     delete this;
00034   }
00035   return count;
00036 }

const std::string & AlgTool::name (  )  const [virtual]

Retrieve full identifying name of the concrete tool object.

Implements INamedInterface.

Definition at line 84 of file AlgTool.cpp.

References m_name.

Referenced by PartitionSwitchTool::_check(), DataStreamTool::addStream(), GFALDataStreamTool::addStreams(), SequencerTimerTool::addTimer(), AlgTool(), auditorSvc(), DataStreamTool::clear(), DataStreamTool::connectStream(), DataStreamTool::createSelector(), declareInfo(), declareProperty(), declareRemoteProperty(), GslErrorCount::finalize(), FuncMinimum::finalize(), EqSolver::finalize(), GFALDataStreamTool::finalize(), SequencerTimerTool::finalize(), DataStreamTool::finalizeStream(), GFALDataStreamTool::firstBlockStage(), SequencerTimerTool::indexByName(), PartitionSwitchTool::initialize(), DataStreamTool::initialize(), FuncMinimum::initialize(), EqSolver::initialize(), GFALDataStreamTool::initialize(), GFALDataStreamTool::nextBlockStage(), operator<<(), HistorySvc::registerAlgTool(), reinitialize(), restart(), service(), service_i(), GFALDataStreamTool::setBlocks(), setProperties(), setProperty(), sysFinalize(), sysInitialize(), sysReinitialize(), sysRestart(), sysStart(), sysStop(), toolSvc(), GFALDataStreamTool::updateBlockStatus(), GFALDataStreamTool::updateStreams(), and GFALDataStreamTool::updateStreamTurls().

00086 {
00087   return m_name;
00088 }

const std::string & AlgTool::type (  )  const [virtual]

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

Implements IAlgTool.

Definition at line 91 of file AlgTool.cpp.

References m_type.

Referenced by AlgTool(), and service().

00093 {
00094   return m_type;
00095 }

const IInterface * AlgTool::parent (  )  const [virtual]

Retrieve parent of the sub-algtool.

Implements IAlgTool.

Definition at line 98 of file AlgTool.cpp.

References m_parent.

Referenced by AlgTool().

00100 {
00101   return m_parent;
00102 }

virtual StatusCode AlgTool::configure (  )  [inline, virtual]

Configuration (from OFFLINE to CONFIGURED).

Implements IAlgTool.

Definition at line 60 of file AlgTool.h.

References StatusCode::SUCCESS.

00060 { return StatusCode::SUCCESS; }

StatusCode AlgTool::initialize (  )  [virtual]

Initialization (from CONFIGURED to INITIALIZED).

Implements IAlgTool.

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

Definition at line 337 of file AlgTool.cpp.

References StatusCode::SUCCESS.

Referenced by PartitionSwitchTool::initialize(), DataStreamTool::initialize(), reinitialize(), and sysInitialize().

00339 {
00340   // For the time being there is nothing to be done here.
00341   // Setting the properties is done by the ToolSvc calling setProperties()
00342   // explicitly.
00343   return StatusCode::SUCCESS;
00344 }

StatusCode AlgTool::start (  )  [virtual]

Start (from INITIALIZED to RUNNING).

Implements IAlgTool.

Definition at line 382 of file AlgTool.cpp.

References StatusCode::SUCCESS.

Referenced by restart(), and sysStart().

00384 {
00385   // For the time being there is nothing to be done here.
00386   return StatusCode::SUCCESS;
00387 }

StatusCode AlgTool::stop (  )  [virtual]

Stop (from RUNNING to INITIALIZED).

Implements IAlgTool.

Definition at line 425 of file AlgTool.cpp.

References StatusCode::SUCCESS.

Referenced by restart(), and sysStop().

00427 {
00428   // For the time being there is nothing to be done here.
00429   return StatusCode::SUCCESS;
00430 }

StatusCode AlgTool::finalize (  )  [virtual]

Finalize (from INITIALIZED to CONFIGURED).

Implements IAlgTool.

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

Definition at line 468 of file AlgTool.cpp.

References StatusCode::SUCCESS.

Referenced by PartitionSwitchTool::finalize(), DataStreamTool::finalize(), GslErrorCount::finalize(), reinitialize(), and sysFinalize().

00470 {
00471   // For the time being there is nothing to be done here.
00472   return StatusCode::SUCCESS;
00473 }

virtual StatusCode AlgTool::terminate (  )  [inline, virtual]

Initialization (from CONFIGURED to OFFLINE).

Implements IAlgTool.

Definition at line 65 of file AlgTool.h.

References StatusCode::SUCCESS.

00065 { return StatusCode::SUCCESS; }

StatusCode AlgTool::reinitialize (  )  [virtual]

Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).

Implements IAlgTool.

Definition at line 517 of file AlgTool.cpp.

References endreq(), MSG::ERROR, finalize(), initialize(), StatusCode::isFailure(), msgSvc(), name(), and StatusCode::SUCCESS.

Referenced by sysReinitialize().

00519 {
00520   // Default implementation is finalize+initialize
00521   StatusCode sc = finalize();
00522   if (sc.isFailure()) {
00523     MsgStream log ( msgSvc() , name() );
00524     log << MSG::ERROR << "reinitialize(): cannot be finalized" << endreq;
00525     return sc;
00526   }
00527   sc = initialize();
00528   if (sc.isFailure()) {
00529     MsgStream log ( msgSvc() , name() );
00530     log << MSG::ERROR << "reinitialize(): cannot be initialized" << endreq;
00531     return sc;
00532   }
00533   return StatusCode::SUCCESS;
00534 }

StatusCode AlgTool::restart (  )  [virtual]

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Implements IAlgTool.

Definition at line 579 of file AlgTool.cpp.

References endreq(), MSG::ERROR, StatusCode::isFailure(), msgSvc(), name(), start(), stop(), and StatusCode::SUCCESS.

Referenced by sysRestart().

00581 {
00582   // Default implementation is stop+start
00583   StatusCode sc = stop();
00584   if (sc.isFailure()) {
00585     MsgStream log ( msgSvc() , name() );
00586     log << MSG::ERROR << "restart(): cannot be stopped" << endreq;
00587     return sc;
00588   }
00589   sc = start();
00590   if (sc.isFailure()) {
00591     MsgStream log ( msgSvc() , name() );
00592     log << MSG::ERROR << "restart(): cannot be started" << endreq;
00593     return sc;
00594   }
00595   return StatusCode::SUCCESS;
00596 }

virtual Gaudi::StateMachine::State AlgTool::FSMState (  )  const [inline, virtual]

Get the current state.

Implements IAlgTool.

Definition at line 68 of file AlgTool.h.

References m_state.

Referenced by sysReinitialize(), and sysRestart().

00068 { return m_state; }

virtual Gaudi::StateMachine::State AlgTool::targetFSMState (  )  const [inline, virtual]

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

References m_targetState.

00069 { return m_targetState; }

StatusCode AlgTool::sysInitialize (  )  [virtual]

Initialize AlgTool.

Implements IAlgTool.

Definition at line 302 of file AlgTool.cpp.

References auditorSvc(), Gaudi::StateMachine::ChangeState(), endreq(), MSG::ERROR, StatusCode::FAILURE, MSG::FATAL, initialize(), IAuditor::Initialize, Gaudi::StateMachine::INITIALIZE, StatusCode::isSuccess(), m_auditorInitialize, m_state, m_targetState, msgSvc(), name(), GaudiException::tag(), and std::exception::what().

00302                                   {
00303   //-----------------------------------------------------------------------------
00304   StatusCode sc;
00305 
00306   try {
00307     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::INITIALIZE,m_state);
00308     Gaudi::Guards::AuditorGuard guard(this,
00309                                       // check if we want to audit the initialize
00310                                       (m_auditorInitialize) ? auditorSvc() : 0,
00311                                       IAuditor::Initialize);
00312     sc = initialize();
00313     if (sc.isSuccess())
00314       m_state = m_targetState;
00315     return sc;
00316   }
00317   catch( const GaudiException& Exception ) {
00318     MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
00319     log << MSG::FATAL << " Exception with tag=" << Exception.tag()
00320         << " is caught " << endreq;
00321     log << MSG::ERROR << Exception  << endreq;
00322   }
00323   catch( const std::exception& Exception ) {
00324     MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
00325     log << MSG::FATAL << " Standard std::exception is caught " << endreq;
00326     log << MSG::ERROR << Exception.what()  << endreq;
00327   }
00328   catch( ... ) {
00329     MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
00330     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
00331   }
00332   return StatusCode::FAILURE ;
00333 
00334 }

StatusCode AlgTool::sysStart (  )  [virtual]

Start AlgTool.

Implements IAlgTool.

Definition at line 347 of file AlgTool.cpp.

References auditorSvc(), Gaudi::StateMachine::ChangeState(), endreq(), MSG::ERROR, StatusCode::FAILURE, MSG::FATAL, StatusCode::isSuccess(), m_auditorStart, m_state, m_targetState, msgSvc(), name(), start(), IAuditor::Start, Gaudi::StateMachine::START, GaudiException::tag(), and std::exception::what().

00347                              {
00348   //-----------------------------------------------------------------------------
00349   StatusCode sc;
00350 
00351   try {
00352     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::START,m_state);
00353     Gaudi::Guards::AuditorGuard guard(this,
00354                                       // check if we want to audit the initialize
00355                                       (m_auditorStart) ? auditorSvc() : 0,
00356                                       IAuditor::Start);
00357     sc = start();
00358     if (sc.isSuccess())
00359       m_state = m_targetState;
00360     return sc;
00361   }
00362   catch( const GaudiException& Exception ) {
00363     MsgStream log ( msgSvc() , name() + ".sysStart()" );
00364     log << MSG::FATAL << " Exception with tag=" << Exception.tag()
00365         << " is caught " << endreq;
00366     log << MSG::ERROR << Exception  << endreq;
00367   }
00368   catch( const std::exception& Exception ) {
00369     MsgStream log ( msgSvc() , name() + ".sysStart()" );
00370     log << MSG::FATAL << " Standard std::exception is caught " << endreq;
00371     log << MSG::ERROR << Exception.what()  << endreq;
00372   }
00373   catch( ... ) {
00374     MsgStream log ( msgSvc() , name() + ".sysStart()" );
00375     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
00376   }
00377   return StatusCode::FAILURE ;
00378 
00379 }

StatusCode AlgTool::sysStop (  )  [virtual]

Stop AlgTool.

Implements IAlgTool.

Definition at line 390 of file AlgTool.cpp.

References auditorSvc(), Gaudi::StateMachine::ChangeState(), endreq(), MSG::ERROR, StatusCode::FAILURE, MSG::FATAL, StatusCode::isSuccess(), m_auditorStop, m_state, m_targetState, msgSvc(), name(), stop(), IAuditor::Stop, Gaudi::StateMachine::STOP, GaudiException::tag(), and std::exception::what().

00390                             {
00391   //-----------------------------------------------------------------------------
00392   StatusCode sc;
00393 
00394   try {
00395     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::STOP,m_state);
00396     Gaudi::Guards::AuditorGuard guard(this,
00397                                       // check if we want to audit the initialize
00398                                       (m_auditorStop) ? auditorSvc() : 0,
00399                                       IAuditor::Stop);
00400     sc = stop();
00401     if (sc.isSuccess())
00402       m_state = m_targetState;
00403     return sc;
00404   }
00405   catch( const GaudiException& Exception ) {
00406     MsgStream log ( msgSvc() , name() + ".sysStop()" );
00407     log << MSG::FATAL << " Exception with tag=" << Exception.tag()
00408         << " is caught " << endreq;
00409     log << MSG::ERROR << Exception  << endreq;
00410   }
00411   catch( const std::exception& Exception ) {
00412     MsgStream log ( msgSvc() , name() + ".sysStop()" );
00413     log << MSG::FATAL << " Standard std::exception is caught " << endreq;
00414     log << MSG::ERROR << Exception.what()  << endreq;
00415   }
00416   catch( ... ) {
00417     MsgStream log ( msgSvc() , name() + ".sysStop()" );
00418     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
00419   }
00420   return StatusCode::FAILURE ;
00421 
00422 }

StatusCode AlgTool::sysFinalize (  )  [virtual]

Finalize AlgTool.

Implements IAlgTool.

Definition at line 433 of file AlgTool.cpp.

References auditorSvc(), Gaudi::StateMachine::ChangeState(), endreq(), MSG::ERROR, StatusCode::FAILURE, MSG::FATAL, finalize(), IAuditor::Finalize, Gaudi::StateMachine::FINALIZE, StatusCode::isSuccess(), m_auditorFinalize, m_state, m_targetState, msgSvc(), name(), GaudiException::tag(), and std::exception::what().

00433                                 {
00434   //-----------------------------------------------------------------------------
00435 
00436   StatusCode sc;
00437 
00438   try {
00439     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::FINALIZE,m_state);
00440     Gaudi::Guards::AuditorGuard guard(this,
00441                                       // check if we want to audit the initialize
00442                                       (m_auditorFinalize) ? auditorSvc() : 0,
00443                                       IAuditor::Finalize);
00444     sc = finalize();
00445     if (sc.isSuccess())
00446       m_state = m_targetState;
00447     return sc;
00448   }
00449   catch( const GaudiException& Exception ) {
00450     MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
00451     log << MSG::FATAL << " Exception with tag=" << Exception.tag()
00452         << " is caught " << endreq;
00453     log << MSG::ERROR << Exception  << endreq;
00454   }
00455   catch( const std::exception& Exception ) {
00456     MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
00457     log << MSG::FATAL << " Standard std::exception is caught " << endreq;
00458     log << MSG::ERROR << Exception.what()  << endreq;
00459   }
00460   catch( ... ) {
00461     MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
00462     log << MSG::FATAL << "UNKNOWN Exception is caught " << endreq;
00463   }
00464   return StatusCode::FAILURE;
00465 
00466 }

StatusCode AlgTool::sysReinitialize (  )  [virtual]

Initialize AlgTool.

Implements IAlgTool.

Definition at line 476 of file AlgTool.cpp.

References auditorSvc(), endreq(), MSG::ERROR, StatusCode::FAILURE, MSG::FATAL, FSMState(), Gaudi::StateMachine::INITIALIZED, m_auditorReinitialize, msgSvc(), name(), reinitialize(), IAuditor::ReInitialize, GaudiException::tag(), and std::exception::what().

00476                                     {
00477   //-----------------------------------------------------------------------------
00478   StatusCode sc;
00479 
00480   // Check that the current status is the correct one.
00481   if ( Gaudi::StateMachine::INITIALIZED != FSMState() ) {
00482     MsgStream log ( msgSvc() , name() );
00483     log << MSG::ERROR
00484         << "sysReinitialize(): cannot reinitialize tool not initialized"
00485         << endreq;
00486     return StatusCode::FAILURE;
00487   }
00488   
00489   try {
00490     Gaudi::Guards::AuditorGuard guard(this,
00491                                       // check if we want to audit the initialize
00492                                       (m_auditorReinitialize) ? auditorSvc() : 0,
00493                                       IAuditor::ReInitialize);
00494     sc = reinitialize();
00495     return sc;
00496   }
00497   catch( const GaudiException& Exception ) {
00498     MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
00499     log << MSG::FATAL << " Exception with tag=" << Exception.tag()
00500         << " is caught" << endreq;
00501     log << MSG::ERROR << Exception  << endreq;
00502   }
00503   catch( const std::exception& Exception ) {
00504     MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
00505     log << MSG::FATAL << " Standard std::exception is caught" << endreq;
00506     log << MSG::ERROR << Exception.what()  << endreq;
00507   }
00508   catch( ... ) {
00509     MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
00510     log << MSG::FATAL << "UNKNOWN Exception is caught" << endreq;
00511   }
00512   return StatusCode::FAILURE ;
00513 
00514 }

StatusCode AlgTool::sysRestart (  )  [virtual]

Start AlgTool.

Implements IAlgTool.

Definition at line 537 of file AlgTool.cpp.

References auditorSvc(), Gaudi::StateMachine::ChangeState(), endreq(), MSG::ERROR, StatusCode::FAILURE, MSG::FATAL, FSMState(), m_auditorRestart, m_state, m_targetState, msgSvc(), name(), restart(), IAuditor::ReStart, Gaudi::StateMachine::RUNNING, Gaudi::StateMachine::START, GaudiException::tag(), and std::exception::what().

00537                                {
00538   //-----------------------------------------------------------------------------
00539   StatusCode sc;
00540 
00541   // Check that the current status is the correct one.
00542   if ( Gaudi::StateMachine::RUNNING != FSMState() ) {
00543     MsgStream log ( msgSvc() , name() );
00544     log << MSG::ERROR
00545         << "sysRestart(): cannot reinitialize tool not started"
00546         << endreq;
00547     return StatusCode::FAILURE;
00548   }
00549   
00550   try {
00551     m_targetState = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::START,m_state);
00552     Gaudi::Guards::AuditorGuard guard(this,
00553                                       // check if we want to audit the initialize
00554                                       (m_auditorRestart) ? auditorSvc() : 0,
00555                                       IAuditor::ReStart);
00556     sc = restart();
00557     return sc;
00558   }
00559   catch( const GaudiException& Exception ) {
00560     MsgStream log ( msgSvc() , name() + ".sysRestart()" );
00561     log << MSG::FATAL << " Exception with tag=" << Exception.tag()
00562         << " is caught" << endreq;
00563     log << MSG::ERROR << Exception  << endreq;
00564   }
00565   catch( const std::exception& Exception ) {
00566     MsgStream log ( msgSvc() , name() + ".sysRestart()" );
00567     log << MSG::FATAL << " Standard std::exception is caught" << endreq;
00568     log << MSG::ERROR << Exception.what()  << endreq;
00569   }
00570   catch( ... ) {
00571     MsgStream log ( msgSvc() , name() + ".sysRestart()" );
00572     log << MSG::FATAL << "UNKNOWN Exception is caught" << endreq;
00573   }
00574   return StatusCode::FAILURE ;
00575 
00576 }

StatusCode AlgTool::setProperty ( const Property p  )  [virtual]

Default implementations for IProperty interface.

Implements IProperty.

Definition at line 132 of file AlgTool.cpp.

References m_propertyMgr, and PropertyMgr::setProperty().

00134 {
00135   return m_propertyMgr->setProperty(p);
00136 }

StatusCode AlgTool::setProperty ( const std::string s  )  [virtual]

Set the property by string.

Implements IProperty.

Definition at line 139 of file AlgTool.cpp.

References m_propertyMgr, Gaudi::Units::s, and PropertyMgr::setProperty().

00141 {
00142   return m_propertyMgr->setProperty(s);
00143 }

StatusCode AlgTool::setProperty ( const std::string n,
const std::string v 
) [virtual]

Set the property by std::string.

Implements IProperty.

Definition at line 146 of file AlgTool.cpp.

References m_propertyMgr, and PropertyMgr::setProperty().

00148 {
00149   return m_propertyMgr->setProperty(n,v);
00150 }

StatusCode AlgTool::getProperty ( Property p  )  const [virtual]

Get the property by property.

Implements IProperty.

Definition at line 153 of file AlgTool.cpp.

00155 {
00156   return m_propertyMgr->getProperty(p);
00157 }

const Property & AlgTool::getProperty ( const std::string name  )  const [virtual]

Get the property by name.

Implements IProperty.

Definition at line 160 of file AlgTool.cpp.

References PropertyMgr::getProperty(), and m_propertyMgr.

00161 {
00162   return m_propertyMgr->getProperty(n);
00163 }

StatusCode AlgTool::getProperty ( const std::string n,
std::string v 
) const [virtual]

Get the property by std::string.

Implements IProperty.

Definition at line 166 of file AlgTool.cpp.

00168 {
00169   return m_propertyMgr->getProperty(n,v);
00170 }

const std::vector< Property * > & AlgTool::getProperties (  )  const [virtual]

Get list of properties.

Implements IProperty.

Definition at line 173 of file AlgTool.cpp.

References PropertyMgr::getProperties(), and m_propertyMgr.

00175 {
00176   return m_propertyMgr->getProperties();
00177 }

PropertyMgr* AlgTool::getPropertyMgr (  )  [inline]

Definition at line 98 of file AlgTool.h.

References m_propertyMgr.

00098 { return m_propertyMgr; }

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 ) ;
  
  std::map<std::string,double> cuts = ... ;
  setProperty( "Cuts" , cuts ) ;

  std::map<std::string,std::string> dict = ... ;
  setProperty( "Dictionary" , dict ) ;

Note: the interface IProperty allows setting of the properties either directly from other properties or from strings only

This is very convinient 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:
name name of the property
value value of the property
See also:
Gaudi::Utils::setProperty
Author:
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2007-05-13

Definition at line 144 of file AlgTool.h.

References m_propertyMgr, name(), and Gaudi::Utils::setProperty().

00146   { return Gaudi::Utils::setProperty ( m_propertyMgr , name , value ) ; }

ISvcLocator * AlgTool::serviceLocator (  )  const

Retrieve pointer to service locator.

Definition at line 105 of file AlgTool.cpp.

References m_svcLocator.

Referenced by AlgTool(), DataStreamTool::createSelector(), DataStreamTool::createStream(), DataStreamTool::initialize(), service_i(), and svcLoc().

00107 {
00108   return m_svcLocator;
00109 }

ISvcLocator* AlgTool::svcLoc (  )  const [inline]

shortcut for the methos service locator

Definition at line 162 of file AlgTool.h.

References serviceLocator().

00162 { return serviceLocator() ; }

IMessageSvc * AlgTool::msgSvc (  )  const

Retrieve pointer to message service.

Definition at line 112 of file AlgTool.cpp.

References m_messageSvc.

Referenced by PartitionSwitchTool::_check(), DataStreamTool::addStream(), GFALDataStreamTool::addStreams(), AlgTool(), DataStreamTool::clear(), DataStreamTool::connectStream(), DataStreamTool::createSelector(), GslErrorCount::finalize(), FuncMinimum::finalize(), EqSolver::finalize(), GFALDataStreamTool::finalize(), GFALDataStreamTool::firstBlockStage(), PartitionSwitchTool::initialize(), DataStreamTool::initialize(), FuncMinimum::initialize(), EqSolver::initialize(), GFALDataStreamTool::initialize(), GFALDataStreamTool::nextBlockStage(), reinitialize(), restart(), service_i(), GFALDataStreamTool::setBlocks(), sysFinalize(), sysInitialize(), sysReinitialize(), sysRestart(), sysStart(), sysStop(), GFALDataStreamTool::updateBlockStatus(), and GFALDataStreamTool::updateStreamTurls().

00114 {
00115   return m_messageSvc;
00116 }

IToolSvc * AlgTool::toolSvc (  )  const

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

Definition at line 119 of file AlgTool.cpp.

References StatusCode::isFailure(), m_ptoolSvc, name(), and service().

00121 {
00122   if ( 0 == m_ptoolSvc ) {
00123     StatusCode sc = service( "ToolSvc", m_ptoolSvc, true );
00124     if( sc.isFailure() ) {
00125       throw GaudiException("Service [ToolSvc] not found", name(), sc);
00126     }
00127   }
00128   return m_ptoolSvc;
00129 }

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

References StatusCode::FAILURE, getGaudiThreadGenericName(), StatusCode::isFailure(), isGaudiThreaded(), StatusCode::isSuccess(), m_messageSvc, m_outputLevel, m_svcLocator, name(), MSG::NIL, outputLevel(), IInterface::release(), ISvcLocator::service(), IJobOptionsSvc::setMyProperties(), and StatusCode::SUCCESS.

Referenced by ToolSvc::create().

00182 {
00183   IJobOptionsSvc* jos;
00184   if( m_svcLocator == 0) {
00185     return StatusCode::FAILURE;
00186   }
00187   StatusCode sc = m_svcLocator->service("JobOptionsSvc", jos);
00188   if( !sc.isSuccess() )  return StatusCode::FAILURE;
00189 
00190   // set first generic Properties
00191   sc = jos->setMyProperties( getGaudiThreadGenericName(name()), this );
00192   if( sc.isFailure() ) return StatusCode::FAILURE;
00193 
00194   // set specific Properties
00195   if (isGaudiThreaded(name())) {
00196     if(jos->setMyProperties( name(), this ).isFailure()) {
00197       return StatusCode::FAILURE;
00198     }
00199   }
00200   jos->release();
00201 
00202 
00203   // Change my own outputlevel
00204   if ( 0 != m_messageSvc )
00205   {
00206     if ( MSG::NIL != m_outputLevel )
00207     { m_messageSvc -> setOutputLevel ( name () , m_outputLevel ) ; }
00208     m_outputLevel = m_messageSvc -> outputLevel ( name () ) ;
00209   }
00210 
00211   return StatusCode::SUCCESS;
00212 }

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

References name(), and service_i().

Referenced by auditorSvc(), PartitionSwitchTool::initialize(), and toolSvc().

00182                                                                  {
00183     return service_i(name, createIf, T::interfaceID(), (void**)&svc);
00184   }

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

References name(), service_i(), and type().

00189                                                                                    {
00190     return service_i(type, name, T::interfaceID(), (void**)&svc);
00191   }

void AlgTool::declInterface ( const InterfaceID ,
void *   
)

declare interface

Definition at line 76 of file AlgTool.cpp.

References m_interfaceList, std::make_pair(), and std::list< _Tp, _Alloc >::push_back().

00078 {
00079   m_interfaceList.push_back(std::make_pair(iid, ii));
00080 }

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 fro property #1" ) ;

     // declare the property and attach the handler  to it
     declareProperty( "Property2" , m_property2 , "Doc for property #2" ) 
        -> declareUpdateHandler( &MyAlg::handler_2 ) ;
  
   }

See also:
PropertyMgr

PropertyMgr::declareProperty

Parameters:
name the property name
property the property itself,
doc the documentation string
Returns:
the actual property objects

Definition at line 234 of file AlgTool.h.

References m_propertyMgr, and name().

Referenced by AlgTool(), EqSolver::EqSolver(), FuncMinimum::FuncMinimum(), GaudiTool::GaudiTool(), HbookTool::HbookTool(), and PartitionSwitchTool::PartitionSwitchTool().

00237   {
00238     return m_propertyMgr -> declareProperty ( name , property , doc ) ;
00239   }

Property* AlgTool::declareRemoteProperty ( const std::string name,
IProperty rsvc,
const std::string rname = "" 
) const [inline]

Declare remote named properties.

Definition at line 242 of file AlgTool.h.

References m_propertyMgr, and name().

00245   {
00246     return m_propertyMgr-> declareRemoteProperty ( name , rsvc , rname ) ;
00247   }

IAuditorSvc * AlgTool::auditorSvc (  )  const

Access the auditor service.

Definition at line 633 of file AlgTool.cpp.

References StatusCode::isFailure(), m_pAuditorSvc, name(), and service().

Referenced by sysFinalize(), sysInitialize(), sysReinitialize(), sysRestart(), sysStart(), and sysStop().

00633                                        {
00634 //---------------------------------------------------------------------------
00635   if ( 0 == m_pAuditorSvc ) {
00636     StatusCode sc = service( "AuditorSvc", m_pAuditorSvc, true );
00637     if( sc.isFailure() ) {
00638       throw GaudiException("Service [AuditorSvc] not found", name(), sc);
00639     }
00640   }
00641   return m_pAuditorSvc;
00642 }

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

References IMonitorSvc::interfaceID(), m_monitorSvcName, m_pMonitorSvc, and service_i().

Referenced by declareInfo().

00262   {
00263     // If not already located try to locate it without forcing a creation
00264     if ( !m_pMonitorSvc ){
00265       service_i( m_monitorSvcName, false,
00266                  IMonitorSvc::interfaceID(), pp_cast<void>(&m_pMonitorSvc) );
00267     }
00268     return m_pMonitorSvc;
00269   }

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

References IMonitorSvc::declareInfo(), monitorSvc(), and name().

00280   {
00281     IMonitorSvc* mS = monitorSvc();
00282     if ( mS ) mS->declareInfo(name, var, desc, this);
00283   }

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

References IMonitorSvc::declareInfo(), format(), monitorSvc(), and name().

00297   {
00298     IMonitorSvc* mS = monitorSvc();
00299     if ( mS ) mS->declareInfo(name, format, var, size, desc, this);
00300   }

int AlgTool::outputLevel (  )  const [inline, protected]

get tool's output level

Definition at line 305 of file AlgTool.h.

References m_outputLevel.

Referenced by DataStreamTool::initializeStream(), and setProperties().

00305 { return (int)m_outputLevel ; }

virtual unsigned long AlgTool::refCount (  )  const [inline, protected, virtual]

Current number of refCounts.

Avoids having to call addRef() + release() to get current refCount. Used in ToolSvc.

Implements IAlgTool.

Definition at line 311 of file AlgTool.h.

References m_refCount.

00311 { return m_refCount; }

IntegerProperty& AlgTool::outputLevelProperty (  )  [inline, protected]

Accessor for the Message level property.

Definition at line 314 of file AlgTool.h.

References m_outputLevel.

00314 { return m_outputLevel; }

void AlgTool::initOutputLevel ( Property prop  )  [protected]

callback for output level property

Definition at line 646 of file AlgTool.cpp.

Referenced by AlgTool().

00646                                                  {
00647 //-----------------------------------------------------------------------------
00648    // do nothing... yet ?
00649 }

StatusCode AlgTool::service_i ( const std::string algName,
bool  createIf,
const InterfaceID iid,
void **  ppSvc 
) const [private]

implementation of service method

Definition at line 611 of file AlgTool.cpp.

References ServiceLocatorHelper::getService(), msgSvc(), name(), and serviceLocator().

Referenced by monitorSvc(), and service().

00614                                        {
00615   MsgStream log(msgSvc(), name());
00616   ServiceLocatorHelper helper(*serviceLocator(), log, name());
00617   return helper.getService(svcName, createIf, iid, ppSvc);
00618 }

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

Definition at line 622 of file AlgTool.cpp.

References ServiceLocatorHelper::createService(), msgSvc(), name(), and serviceLocator().

00625                                        {
00626 
00627   MsgStream log(msgSvc(), name());
00628   ServiceLocatorHelper helper(*serviceLocator(), log, name());
00629   return  helper.createService(svcType, svcName, iid, ppSvc);
00630 }


Friends And Related Function Documentation

friend class ToolSvc [friend]

Definition at line 38 of file AlgTool.h.


Member Data Documentation

IntegerProperty AlgTool::m_outputLevel [private]

AlgTool output level.

Definition at line 328 of file AlgTool.h.

Referenced by AlgTool(), outputLevel(), outputLevelProperty(), and setProperties().

std::string AlgTool::m_type [private]

AlgTool type (concrete class name).

Reimplemented in EqSolver, and FuncMinimum.

Definition at line 329 of file AlgTool.h.

Referenced by type().

const std::string AlgTool::m_name [private]

AlgTool full name.

Definition at line 330 of file AlgTool.h.

Referenced by name().

const IInterface* AlgTool::m_parent [private]

AlgTool parent.

Definition at line 331 of file AlgTool.h.

Referenced by parent().

unsigned long AlgTool::m_refCount [private]

Reference counter.

Definition at line 332 of file AlgTool.h.

Referenced by addRef(), refCount(), and release().

ISvcLocator* AlgTool::m_svcLocator [mutable, private]

Pointer to Service Locator service.

Definition at line 333 of file AlgTool.h.

Referenced by AlgTool(), serviceLocator(), and setProperties().

IMessageSvc* AlgTool::m_messageSvc [mutable, private]

Message service.

Definition at line 334 of file AlgTool.h.

Referenced by AlgTool(), msgSvc(), and setProperties().

IToolSvc* AlgTool::m_ptoolSvc [mutable, private]

Tool service.

Definition at line 335 of file AlgTool.h.

Referenced by toolSvc(), and ~AlgTool().

IMonitorSvc* AlgTool::m_pMonitorSvc [mutable, private]

Online Monitoring Service.

Definition at line 336 of file AlgTool.h.

Referenced by monitorSvc(), and ~AlgTool().

std::string AlgTool::m_monitorSvcName [private]

Name to use for Monitor Service.

Definition at line 337 of file AlgTool.h.

Referenced by AlgTool(), and monitorSvc().

PropertyMgr* AlgTool::m_propertyMgr [private]

Property Manager.

Definition at line 338 of file AlgTool.h.

Referenced by declareProperty(), declareRemoteProperty(), getProperties(), getProperty(), getPropertyMgr(), setProperty(), and ~AlgTool().

InterfaceList AlgTool::m_interfaceList [private]

Interface list.

Definition at line 339 of file AlgTool.h.

Referenced by declInterface().

std::string AlgTool::m_threadID [private]

Thread Id for Alg Tool.

Definition at line 340 of file AlgTool.h.

Referenced by AlgTool().

IAuditorSvc* AlgTool::m_pAuditorSvc [mutable, private]

Auditor Service.

Definition at line 352 of file AlgTool.h.

Referenced by auditorSvc(), and ~AlgTool().

BooleanProperty AlgTool::m_auditInit [private]

Definition at line 354 of file AlgTool.h.

Referenced by AlgTool().

bool AlgTool::m_auditorInitialize [private]

flag for auditors in "initialize()"

Definition at line 355 of file AlgTool.h.

Referenced by AlgTool(), and sysInitialize().

bool AlgTool::m_auditorStart [private]

flag for auditors in "start()"

Definition at line 356 of file AlgTool.h.

Referenced by AlgTool(), and sysStart().

bool AlgTool::m_auditorStop [private]

flag for auditors in "stop()"

Definition at line 357 of file AlgTool.h.

Referenced by AlgTool(), and sysStop().

bool AlgTool::m_auditorFinalize [private]

flag for auditors in "finalize()"

Definition at line 358 of file AlgTool.h.

Referenced by AlgTool(), and sysFinalize().

bool AlgTool::m_auditorReinitialize [private]

flag for auditors in "reinitialize()"

Definition at line 359 of file AlgTool.h.

Referenced by sysReinitialize().

bool AlgTool::m_auditorRestart [private]

flag for auditors in "restart()"

Definition at line 360 of file AlgTool.h.

Referenced by sysRestart().

Gaudi::StateMachine::State AlgTool::m_state [private]

state of the Tool

Definition at line 362 of file AlgTool.h.

Referenced by FSMState(), sysFinalize(), sysInitialize(), sysRestart(), sysStart(), and sysStop().

Gaudi::StateMachine::State AlgTool::m_targetState [private]

state of the Tool

Definition at line 363 of file AlgTool.h.

Referenced by sysFinalize(), sysInitialize(), sysRestart(), sysStart(), sysStop(), and targetFSMState().


The documentation for this class was generated from the following files:
Generated at Fri Jul 18 12:06:46 2008 for Gaudi Framework, version v20r2 by Doxygen version 1.5.1 written by Dimitri van Heesch, © 1997-2004