2 #include "GaudiKernel/AlgTool.h"
3 #include "GaudiKernel/IMessageSvc.h"
4 #include "GaudiKernel/ISvcLocator.h"
5 #include "GaudiKernel/IJobOptionsSvc.h"
7 #include "GaudiKernel/Algorithm.h"
8 #include "GaudiKernel/Service.h"
9 #include "GaudiKernel/Auditor.h"
10 #include "GaudiKernel/System.h"
11 #include "GaudiKernel/GaudiException.h"
12 #include "GaudiKernel/ServiceLocatorHelper.h"
13 #include "GaudiKernel/ThreadGaudi.h"
14 #include "GaudiKernel/Guards.h"
28 for ( InterfaceList::iterator it = m_interfaceList.begin() ;
29 m_interfaceList.end() != it ; ++it )
31 if ( !it->first.versionMatch ( riid ) ) { continue ; }
123 return m_propertyMgr->getProperty(p);
136 return m_propertyMgr->getProperty(
n,v);
162 if(jos->setMyProperties(
name(),
this ).isFailure()) {
180 const std::string& name,
183 : m_outputLevel ( MSG::
NIL )
186 , m_parent ( parent )
190 , m_pMonitorSvc ( NULL )
192 , m_interfaceList ( )
194 , m_pAuditorSvc ( 0 )
195 , m_auditInit ( false )
196 , m_auditorInitialize(false)
197 , m_auditorStart(false)
198 , m_auditorStop(false)
199 , m_auditorFinalize(false)
200 , m_auditorReinitialize(false)
201 , m_auditorRestart(false)
218 if (
Algorithm* _alg = dynamic_cast<Algorithm*> ( _p ) )
224 else if (
Service* _svc = dynamic_cast<Service*> ( _p ) )
230 else if (
AlgTool* _too = dynamic_cast<AlgTool*> ( _p ) )
236 else if (
Auditor* _aud = dynamic_cast<Auditor*> ( _p ) )
245 (
"Failure to create tool '"
246 + type +
"/" + name +
"': illegal parent type '"
253 if ( !
appMgr.isValid() ) {
254 throw GaudiException(
"Could not locate ApplicationMgr",
"AlgTool",0);
278 Gaudi::Guards::AuditorGuard guard(
this,
289 log <<
MSG::FATAL <<
" Exception with tag=" << Exception.
tag()
290 <<
" is caught " <<
endmsg;
293 catch(
const std::exception& Exception ) {
322 Gaudi::Guards::AuditorGuard guard(
this,
333 log <<
MSG::FATAL <<
" Exception with tag=" << Exception.
tag()
334 <<
" is caught " <<
endmsg;
337 catch(
const std::exception& Exception ) {
364 Gaudi::Guards::AuditorGuard guard(
this,
375 log <<
MSG::FATAL <<
" Exception with tag=" << Exception.
tag()
376 <<
" is caught " <<
endmsg;
379 catch(
const std::exception& Exception ) {
406 Gaudi::Guards::AuditorGuard guard(
this,
417 log <<
MSG::FATAL <<
" Exception with tag=" << Exception.
tag()
418 <<
" is caught " <<
endmsg;
421 catch(
const std::exception& Exception ) {
449 <<
"sysReinitialize(): cannot reinitialize tool not initialized"
455 Gaudi::Guards::AuditorGuard guard(
this,
464 log <<
MSG::FATAL <<
" Exception with tag=" << Exception.
tag()
465 <<
" is caught" <<
endmsg;
468 catch(
const std::exception& Exception ) {
514 <<
"sysRestart(): cannot reinitialize tool not started"
521 Gaudi::Guards::AuditorGuard guard(
this,
530 log <<
MSG::FATAL <<
" Exception with tag=" << Exception.
tag()
531 <<
" is caught" <<
endmsg;
534 catch(
const std::exception& Exception ) {
583 void** ppSvc)
const {
585 return helper.
getService(svcName, createIf, iid, ppSvc);
591 const std::string& svcName,
593 void** ppSvc)
const {
600 return helper.
service(name, quiet, createIf);