The Gaudi Framework  v30r5 (c7afbd0d)
AlgTool.cpp
Go to the documentation of this file.
1 // Include files
2 #include "GaudiKernel/AlgTool.h"
7 
9 #include "GaudiKernel/Auditor.h"
12 #include "GaudiKernel/Guards.h"
13 #include "GaudiKernel/Service.h"
15 #include "GaudiKernel/System.h"
16 #include "GaudiKernel/ToolHandle.h"
17 
18 //------------------------------------------------------------------------------
19 namespace
20 {
21  template <typename FUN>
22  StatusCode attempt( AlgTool& tool, const char* label, FUN&& fun )
23  {
24  try {
25  return fun();
26  } catch ( const GaudiException& Exception ) {
27  MsgStream log( tool.msgSvc(), tool.name() + "." + label );
28  log << MSG::FATAL << " Exception with tag=" << Exception.tag() << " is caught" << endmsg;
29  log << MSG::ERROR << Exception << endmsg;
30  } catch ( const std::exception& Exception ) {
31  MsgStream log( tool.msgSvc(), tool.name() + "." + label );
32  log << MSG::FATAL << " Standard std::exception is caught" << endmsg;
33  log << MSG::ERROR << Exception.what() << endmsg;
34  } catch ( ... ) {
35  MsgStream log( tool.msgSvc(), tool.name() + "." + label );
36  log << MSG::FATAL << "UNKNOWN Exception is caught" << endmsg;
37  }
38  return StatusCode::FAILURE;
39  }
40 }
41 
42 //------------------------------------------------------------------------------
43 StatusCode AlgTool::queryInterface( const InterfaceID& riid, void** ppvi )
44 //------------------------------------------------------------------------------
45 {
46  if ( !ppvi ) {
47  return StatusCode::FAILURE;
48  } // RETURN
49  StatusCode sc = base_class::queryInterface( riid, ppvi );
50  if ( sc.isSuccess() ) return sc;
52  [&]( const std::pair<InterfaceID, void*>& item ) { return item.first.versionMatch( riid ); } );
53  if ( i == std::end( m_interfaceList ) ) {
54  *ppvi = nullptr;
55  return Status::NO_INTERFACE; // RETURN
56  }
57  *ppvi = i->second;
58  addRef();
59  return StatusCode::SUCCESS; // RETURN
60 }
61 //------------------------------------------------------------------------------
62 const std::string& AlgTool::name() const
63 //------------------------------------------------------------------------------
64 {
65  return m_name;
66 }
67 
68 //------------------------------------------------------------------------------
69 const std::string& AlgTool::type() const
70 //------------------------------------------------------------------------------
71 {
72  return m_type;
73 }
74 
75 //------------------------------------------------------------------------------
77 //------------------------------------------------------------------------------
78 {
79  return m_parent;
80 }
81 
82 //------------------------------------------------------------------------------
84 //------------------------------------------------------------------------------
85 {
86  return m_svcLocator;
87 }
88 
89 // ============================================================================
90 // accessor to event service service
91 // ============================================================================
93 {
94  if ( !m_evtSvc ) {
95  m_evtSvc = service( "EventDataSvc", true );
96  if ( !m_evtSvc ) {
97  throw GaudiException( "Service [EventDataSvc] not found", name(), StatusCode::FAILURE );
98  }
99  }
100  return m_evtSvc.get();
101 }
102 //------------------------------------------------------------------------------
104 //------------------------------------------------------------------------------
105 {
106  if ( !m_ptoolSvc ) {
107  m_ptoolSvc = service( "ToolSvc", true );
108  if ( !m_ptoolSvc ) {
109  throw GaudiException( "Service [ToolSvc] not found", name(), StatusCode::FAILURE );
110  }
111  }
112  return m_ptoolSvc.get();
113 }
114 
115 //------------------------------------------------------------------------------
117 //------------------------------------------------------------------------------
118 {
119  if ( !m_svcLocator ) return StatusCode::FAILURE;
120  auto jos = m_svcLocator->service<IJobOptionsSvc>( "JobOptionsSvc" );
121  if ( !jos ) return StatusCode::FAILURE;
122 
123  return jos->setMyProperties( name(), this );
124 }
125 
126 //------------------------------------------------------------------------------
128  //------------------------------------------------------------------------------
129  : m_type( type ),
130  m_name( name ),
131  m_parent( parent )
132 {
133  addRef(); // Initial count set to 1
134 
135  IInterface* _p = const_cast<IInterface*>( parent );
136 
137  if ( Algorithm* _alg = dynamic_cast<Algorithm*>( _p ) ) {
138  m_svcLocator = _alg->serviceLocator();
139  } else if ( Service* _svc = dynamic_cast<Service*>( _p ) ) {
140  m_svcLocator = _svc->serviceLocator();
141  } else if ( AlgTool* _too = dynamic_cast<AlgTool*>( _p ) ) {
142  m_svcLocator = _too->serviceLocator();
143  } else if ( Auditor* _aud = dynamic_cast<Auditor*>( _p ) ) {
144  m_svcLocator = _aud->serviceLocator();
145  } else {
146  throw GaudiException( "Failure to create tool '" + type + "/" + name + "': illegal parent type '" +
147  System::typeinfoName( typeid( *_p ) ) + "'",
148  "AlgTool", StatusCode::FAILURE );
149  }
150 
151  // inherit output level from parent
152  { // get the "OutputLevel" property from parent
153  SmartIF<IProperty> pprop( _p );
154  if ( pprop && pprop->hasProperty( "OutputLevel" ) ) {
155  m_outputLevel.assign( pprop->getProperty( "OutputLevel" ) );
156  }
157  }
158 
159  {
160  // Auditor monitoring properties
161  // Initialize the default value from ApplicationMgr AuditAlgorithms
162  Gaudi::Property<bool> audit( false );
163  // note that here we need that the service locator is already defined
164  auto appMgr = serviceLocator()->service<IProperty>( "ApplicationMgr" );
165  if ( appMgr && appMgr->hasProperty( "AuditTools" ) ) {
166  audit.assign( appMgr->getProperty( "AuditTools" ) );
167  }
168  m_auditInit = audit;
169  m_auditorInitialize = audit;
170  m_auditorStart = audit;
171  m_auditorStop = audit;
172  m_auditorFinalize = audit;
173  m_auditorReinitialize = audit;
174  m_auditorRestart = audit;
175  }
176 }
177 
178 //-----------------------------------------------------------------------------
180 {
181  //-----------------------------------------------------------------------------
182  return attempt( *this, "sysInitialize", [&]() {
184  Gaudi::Guards::AuditorGuard guard( this,
185  // check if we want to audit the initialize
187  StatusCode sc = initialize();
188  if ( !sc ) return sc;
189 
192 
193  // check for explicit circular data dependencies in declared handles
194  DataObjIDColl out;
195  for ( auto& h : outputHandles() ) {
196  if ( !h->objKey().empty() ) out.emplace( h->fullKey() );
197  }
198  for ( auto& h : inputHandles() ) {
199  if ( !h->objKey().empty() && out.find( h->fullKey() ) != out.end() ) {
200  error() << "Explicit circular data dependency found for id " << h->fullKey() << endmsg;
201  sc = StatusCode::FAILURE;
202  }
203  }
204 
205  if ( !sc ) return sc;
206 
207  // visit all sub-tools, build full set
209  acceptDHVisitor( &avis );
210 
211  // initialize handles
212  initDataHandleHolder(); // this should 'freeze' the handle configuration.
213 
214  return sc;
215  } );
216 }
217 //------------------------------------------------------------------------------
219 //------------------------------------------------------------------------------
220 {
221  // For the time being there is nothing to be done here.
222  // Setting the properties is done by the ToolSvc calling setProperties()
223  // explicitly.
224  return StatusCode::SUCCESS;
225 }
226 
227 //-----------------------------------------------------------------------------
229 {
230  //-----------------------------------------------------------------------------
231  return attempt( *this, "sysStart", [&]() {
233  Gaudi::Guards::AuditorGuard guard( this,
234  // check if we want to audit the initialize
235  m_auditorStart ? auditorSvc() : nullptr, IAuditor::Start );
236  StatusCode sc = start();
237  if ( sc.isSuccess() ) m_state = m_targetState;
238  return sc;
239  } );
240 }
241 
242 //------------------------------------------------------------------------------
244 //------------------------------------------------------------------------------
245 {
246  // For the time being there is nothing to be done here.
247  return StatusCode::SUCCESS;
248 }
249 
250 //-----------------------------------------------------------------------------
252 {
253  //-----------------------------------------------------------------------------
254  return attempt( *this, "sysStop", [&]() {
256  Gaudi::Guards::AuditorGuard guard( this,
257  // check if we want to audit the initialize
258  m_auditorStop ? auditorSvc() : nullptr, IAuditor::Stop );
259  StatusCode sc = stop();
260  if ( sc.isSuccess() ) m_state = m_targetState;
261  return sc;
262  } );
263 }
264 
265 //------------------------------------------------------------------------------
267 //------------------------------------------------------------------------------
268 {
269  // For the time being there is nothing to be done here.
270  return StatusCode::SUCCESS;
271 }
272 
273 //-----------------------------------------------------------------------------
275 {
276  //-----------------------------------------------------------------------------
277  return attempt( *this, "sysFinalize", [&]() {
279  Gaudi::Guards::AuditorGuard guard( this,
280  // check if we want to audit the initialize
282  StatusCode sc = finalize();
283  if ( sc.isSuccess() ) m_state = m_targetState;
284  return sc;
285  } );
286 }
287 //------------------------------------------------------------------------------
289 //------------------------------------------------------------------------------
290 {
291  // For the time being there is nothing to be done here.
292  return StatusCode::SUCCESS;
293 }
294 
295 //-----------------------------------------------------------------------------
297 {
298  //-----------------------------------------------------------------------------
299 
300  // Check that the current status is the correct one.
302  error() << "sysReinitialize(): cannot reinitialize tool not initialized" << endmsg;
303  return StatusCode::FAILURE;
304  }
305 
306  return attempt( *this, "SysReinitialize()", [&]() {
307  Gaudi::Guards::AuditorGuard guard( this,
308  // check if we want to audit the initialize
310  return reinitialize();
311  } );
312 }
313 
314 //------------------------------------------------------------------------------
316 //------------------------------------------------------------------------------
317 {
318  /* @TODO
319  * MCl 2008-10-23: the implementation of reinitialize as finalize+initialize
320  * is causing too many problems
321  *
322  // Default implementation is finalize+initialize
323  StatusCode sc = finalize();
324  if (sc.isFailure()) {
325  error() << "reinitialize(): cannot be finalized" << endmsg;
326  return sc;
327  }
328  sc = initialize();
329  if (sc.isFailure()) {
330  error() << "reinitialize(): cannot be initialized" << endmsg;
331  return sc;
332  }
333  */
334  return StatusCode::SUCCESS;
335 }
336 
337 //-----------------------------------------------------------------------------
339 {
340  //-----------------------------------------------------------------------------
341 
342  // Check that the current status is the correct one.
344  error() << "sysRestart(): cannot reinitialize tool not started" << endmsg;
345  return StatusCode::FAILURE;
346  }
347 
348  return attempt( *this, "sysRestart", [&]() {
350  Gaudi::Guards::AuditorGuard guard( this,
351  // check if we want to audit the initialize
353  return restart();
354  } );
355 }
356 
357 //------------------------------------------------------------------------------
359 //------------------------------------------------------------------------------
360 {
361  // Default implementation is stop+start
362  StatusCode sc = stop();
363  if ( sc.isFailure() ) {
364  error() << "restart(): cannot be stopped" << endmsg;
365  return sc;
366  }
367  sc = start();
368  if ( sc.isFailure() ) {
369  error() << "restart(): cannot be started" << endmsg;
370  return sc;
371  }
372  return StatusCode::SUCCESS;
373 }
374 
375 //------------------------------------------------------------------------------
377 //------------------------------------------------------------------------------
378 {
379  if ( m_pMonitorSvc ) {
380  m_pMonitorSvc->undeclareAll( this );
381  }
382 }
383 
385 {
386 
387  IAlgTool* tool = nullptr;
388  for ( auto thArr : m_toolHandleArrays ) {
389  if ( !thArr->retrieved() ) {
390  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
391  debug() << "ToolHandleArray " << thArr->propertyName() << " not used: not registering any of its Tools"
392  << endmsg;
393  } else {
394  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
395  debug() << "Registering all Tools in ToolHandleArray " << thArr->propertyName() << endmsg;
396  // Iterate over its tools:
397  for ( auto toolHandle : thArr->getBaseArray() ) {
398  // Try to cast it into a BaseToolHandle pointer:
399  BaseToolHandle* bth = dynamic_cast<BaseToolHandle*>( toolHandle );
400  if ( bth ) {
401  // If the cast was successful, the code is pretty simple:
402  tool = bth->get();
403  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
404  debug() << "Adding " << ( bth->isPublic() ? "public" : "private" ) << " ToolHandle tool " << tool->name()
405  << " (" << tool->type() << ") from ToolHandleArray " << thArr->propertyName() << endmsg;
406  }
407  m_tools.push_back( tool );
408  } else {
409  // If it wasn't for some strange reason, then fall back on the
410  // logic implemented previously:
411  if ( toolSvc()->retrieveTool( toolHandle->typeAndName(), tool, this, false ).isSuccess() ) {
412  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
413  debug() << "Adding private"
414  << " ToolHandle tool " << tool->name() << " (" << tool->type() << ") from ToolHandleArray "
415  << thArr->propertyName() << endmsg;
416  }
417  m_tools.push_back( tool );
418  } else if ( toolSvc()->retrieveTool( toolHandle->typeAndName(), tool, 0, false ).isSuccess() ) {
419  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
420  debug() << "Adding public"
421  << " ToolHandle tool " << tool->name() << " (" << tool->type() << ") from ToolHandleArray "
422  << thArr->propertyName() << endmsg;
423  }
424  m_tools.push_back( tool );
425  } else {
426  warning() << "Error retrieving Tool " << toolHandle->typeAndName() << " in ToolHandleArray "
427  << thArr->propertyName() << ". Not registered" << endmsg;
428  }
429  }
430  }
431  }
432  }
433 
434  for ( auto th : m_toolHandles ) {
435  if ( !th->isEnabled() ) {
436  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) && !th->typeAndName().empty() )
437  debug() << "ToolHandle " << th->typeAndName() << " not used" << endmsg;
438  continue;
439  }
440  if ( !th->get() ) {
441  auto sc = th->retrieve();
442  if ( UNLIKELY( sc.isFailure() ) ) {
443  throw GaudiException( "Failed to retrieve tool " + th->typeAndName(), this->name(), StatusCode::FAILURE );
444  }
445  }
446  tool = th->get();
447  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
448  debug() << "Adding " << ( th->isPublic() ? "public" : "private" ) << " ToolHandle tool " << tool->name() << " ("
449  << tool->type() << ")" << endmsg;
450  m_tools.push_back( tool );
451  }
452  m_toolHandlesInit = true;
453 }
454 
456 {
458 
459  return m_tools;
460 }
461 
463 {
465 
466  return m_tools;
467 }
468 
469 //------------------------------------------------------------------------------
471 StatusCode AlgTool::service_i( const std::string& svcName, bool createIf, const InterfaceID& iid, void** ppSvc ) const
472 {
473  const ServiceLocatorHelper helper( *serviceLocator(), *this );
474  return helper.getService( svcName, createIf, iid, ppSvc );
475 }
476 
477 //------------------------------------------------------------------------------
478 StatusCode AlgTool::service_i( const std::string& svcType, const std::string& svcName, const InterfaceID& iid,
479  void** ppSvc ) const
480 {
481  const ServiceLocatorHelper helper( *serviceLocator(), *this );
482  return helper.createService( svcType, svcName, iid, ppSvc );
483 }
484 
485 SmartIF<IService> AlgTool::service( const std::string& name, const bool createIf, const bool quiet ) const
486 {
487  const ServiceLocatorHelper helper( *serviceLocator(), *this );
488  return helper.service( name, quiet, createIf );
489 }
490 
491 //-----------------------------------------------------------------------------
493 {
494  //---------------------------------------------------------------------------
495  if ( !m_pAuditorSvc ) {
496  m_pAuditorSvc = service( "AuditorSvc", true );
497  if ( !m_pAuditorSvc ) {
498  throw GaudiException( "Service [AuditorSvc] not found", name(), StatusCode::FAILURE );
499  }
500  }
501  return m_pAuditorSvc.get();
502 }
503 
504 //-----------------------------------------------------------------------------
506 {
507  //-----------------------------------------------------------------------------
508  vis->visit( this );
509 
510  for ( auto tool : tools() ) vis->visit( dynamic_cast<AlgTool*>( tool ) );
511 }
The interface implemented by the IToolSvc base class.
Definition: IToolSvc.h:19
#define UNLIKELY(x)
Definition: Kernel.h:89
constexpr static const auto FAILURE
Definition: StatusCode.h:88
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
an helper to share the implementation of service() among the various kernel base classes ...
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: AlgTool.h:300
Define general base for Gaudi exception.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: AlgTool.cpp:83
void acceptDHVisitor(IDataHandleVisitor *) const override
Definition: AlgTool.cpp:505
Gaudi::Property< bool > m_auditorStart
Definition: AlgTool.h:316
bool m_toolHandlesInit
Definition: AlgTool.h:326
std::string m_type
AlgTool type (concrete class name)
Definition: AlgTool.h:293
Implementation of property with value of concrete type.
Definition: Property.h:383
StatusCode initialize() override
Definition: AlgTool.cpp:218
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
Definition: AlgTool.cpp:471
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:332
virtual const std::string & type() const =0
The type of an AlgTool, meaning the concrete AlgTool class.
bool isPublic() const noexcept
Definition: ToolHandle.h:41
bool isSuccess() const
Definition: StatusCode.h:287
virtual bool hasProperty(const std::string &name) const =0
Return true if we have a property with the given name.
const IInterface * m_parent
AlgTool parent.
Definition: AlgTool.h:295
IToolSvc * toolSvc() const
The standard ToolSvc service, Return a pointer to the service if present.
Definition: AlgTool.cpp:103
Non-templated base class for actual ToolHandle<T>.
Definition: ToolHandle.h:71
void initDataHandleHolder()
initializes all handles - called by the sysInitialize method of any descendant of this ...
StatusCode sysReinitialize() override
Initialize AlgTool.
Definition: AlgTool.cpp:296
T end(T...args)
virtual StatusCode getProperty(Gaudi::Details::PropertyBase *p) const =0
Get the property by property.
Gaudi::Property< bool > m_auditorReinitialize
Definition: AlgTool.h:319
Data provider interface definition.
~AlgTool() override
Definition: AlgTool.cpp:376
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:323
StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown) override
Query for a given interface.
Definition: AlgTool.cpp:43
bool isFailure() const
Definition: StatusCode.h:139
StatusCode setProperties()
Method for setting declared properties to the values specified in the jobOptions via the job option s...
Definition: AlgTool.cpp:116
StatusCode sysStart() override
Start AlgTool.
Definition: AlgTool.cpp:228
STL class.
StatusCode sysStop() override
Stop AlgTool.
Definition: AlgTool.cpp:251
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:82
StatusCode finalize() override
Definition: AlgTool.cpp:288
const std::string m_name
AlgTool full name.
Definition: AlgTool.h:294
virtual void visit(const IDataHandleHolder *)=0
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:79
T push_back(T...args)
Gaudi::StateMachine::State FSMState() const override
Definition: AlgTool.h:75
Interface ID class.
Definition: IInterface.h:29
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
AlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
Definition: AlgTool.cpp:127
Main interface for the JobOptions service.
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
T what(T...args)
Gaudi::Property< int > m_outputLevel
Definition: AlgTool.h:307
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
Definition of the basic interface.
Definition: IInterface.h:277
StatusCode service(const std::string &name, T *&svc, bool createIf=true) const
Access a service by name, creating it if it doesn&#39;t already exist.
Definition: AlgTool.h:129
Gaudi::Property< bool > m_auditorStop
Definition: AlgTool.h:317
virtual const std::string & tag() const
name tag for the exception, or exception type
StatusCode restart() override
Definition: AlgTool.cpp:358
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
SmartIF< IToolSvc > m_ptoolSvc
Tool service.
Definition: AlgTool.h:299
const std::vector< IAlgTool * > & tools() const
Definition: AlgTool.cpp:455
STL class.
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
IDataProviderSvc * evtSvc() const
accessor to event service service
Definition: AlgTool.cpp:92
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: AlgTool.h:301
Gaudi::Property< bool > m_auditorRestart
Definition: AlgTool.h:320
T get(T...args)
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:79
T find_if(T...args)
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:62
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:333
State GAUDI_API ChangeState(const Transition transition, const State state)
Function to get the new state according to the required transition, checking if the transition is all...
std::vector< BaseToolHandle * > m_toolHandles
Definition: AlgTool.h:324
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
T begin(T...args)
Gaudi::Property< bool > m_auditInit
Definition: AlgTool.h:314
double fun(const std::vector< double > &x)
Definition: PFuncTest.cpp:26
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:47
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
const IInterface * parent() const override
Retrieve parent of the sub-algtool.
Definition: AlgTool.cpp:76
T emplace(T...args)
SmartIF< ISvcLocator > m_svcLocator
Pointer to Service Locator service.
Definition: AlgTool.h:297
appMgr
Definition: IOTest.py:94
SmartIF< IDataProviderSvc > m_evtSvc
Event data service.
Definition: AlgTool.h:298
bool assign(const Details::PropertyBase &source) override
get the value from another property
Definition: Property.h:742
SmartIF< IService > service(const std::string &name, const bool quiet=false, const bool createIf=true) const
Gaudi::Property< bool > m_auditorInitialize
Definition: AlgTool.h:315
StatusCode reinitialize() override
Definition: AlgTool.cpp:315
InterfaceList m_interfaceList
Interface list.
Definition: AlgTool.h:303
const IAlgTool * get() const
Definition: ToolHandle.h:86
StatusCode stop() override
Definition: AlgTool.cpp:266
StatusCode sysInitialize() override
Initialize AlgTool.
Definition: AlgTool.cpp:179
StatusCode queryInterface(const InterfaceID &iid, void **pinterface) override
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:334
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:20
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:215
The interface implemented by the IAuditorSvc base class.
Definition: IAuditorSvc.h:15
Base class for all services.
Definition: Service.h:36
virtual void undeclareAll(const IInterface *owner)=0
Undeclare monitoring information.
void initToolHandles() const
Definition: AlgTool.cpp:384
StatusCode getService(const std::string &name, bool createIf, const InterfaceID &iid, void **ppSvc) const
const std::string & type() const override
Retrieve type (concrete class) of the sub-algtool.
Definition: AlgTool.cpp:69
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:492
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
virtual const std::string & name() const =0
Retrieve the name of the instance.
StatusCode sysFinalize() override
Finalize AlgTool.
Definition: AlgTool.cpp:274
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: AlgTool.h:325
std::unique_ptr< IDataHandleVisitor > m_updateDataHandles
Hook for for derived classes to provide a custom visitor for data handles.
Definition: AlgTool.h:234
Gaudi::Property< bool > m_auditorFinalize
Definition: AlgTool.h:318
StatusCode createService(const std::string &name, const InterfaceID &iid, void **ppSvc) const
Base class from which all concrete auditor classes should be derived.
Definition: Auditor.h:35
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
StatusCode sysRestart() override
Start AlgTool.
Definition: AlgTool.cpp:338
StatusCode start() override
Definition: AlgTool.cpp:243