The Gaudi Framework  v30r3 (a5ef0a68)
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  // initialize output level from MessageSvc and initialize messaging (before enabling update handler)
152  m_outputLevel.value() = setUpMessaging();
153  m_outputLevel.declareUpdateHandler(
155 
156  // inherit output level from parent
157  { // get the "OutputLevel" property from parent
158  SmartIF<IProperty> pprop( _p );
159  if ( pprop && pprop->hasProperty( "OutputLevel" ) ) {
160  m_outputLevel.assign( pprop->getProperty( "OutputLevel" ) );
161  }
162  }
163 
164  {
165  // Auditor monitoring properties
166  // Initialize the default value from ApplicationMgr AuditAlgorithms
167  Gaudi::Property<bool> audit( false );
168  // note that here we need that the service locator is already defined
169  auto appMgr = serviceLocator()->service<IProperty>( "ApplicationMgr" );
170  if ( appMgr && appMgr->hasProperty( "AuditTools" ) ) {
171  audit.assign( appMgr->getProperty( "AuditTools" ) );
172  }
173  m_auditInit = audit;
174  m_auditorInitialize = audit;
175  m_auditorStart = audit;
176  m_auditorStop = audit;
177  m_auditorFinalize = audit;
178  m_auditorReinitialize = audit;
179  m_auditorRestart = audit;
180  }
181 }
182 
183 //-----------------------------------------------------------------------------
185 {
186  //-----------------------------------------------------------------------------
187  return attempt( *this, "sysInitialize", [&]() {
189  Gaudi::Guards::AuditorGuard guard( this,
190  // check if we want to audit the initialize
192  StatusCode sc = initialize();
193  if ( !sc ) return sc;
194 
197 
198  // check for explicit circular data dependencies in declared handles
199  DataObjIDColl out;
200  for ( auto& h : outputHandles() ) {
201  if ( !h->objKey().empty() ) out.emplace( h->fullKey() );
202  }
203  for ( auto& h : inputHandles() ) {
204  if ( !h->objKey().empty() && out.find( h->fullKey() ) != out.end() ) {
205  error() << "Explicit circular data dependency found for id " << h->fullKey() << endmsg;
206  sc = StatusCode::FAILURE;
207  }
208  }
209 
210  if ( !sc ) return sc;
211 
212  // visit all sub-tools, build full set
214  acceptDHVisitor( &avis );
215 
216  // initialize handles
217  initDataHandleHolder(); // this should 'freeze' the handle configuration.
218 
219  return sc;
220  } );
221 }
222 //------------------------------------------------------------------------------
224 //------------------------------------------------------------------------------
225 {
226  // For the time being there is nothing to be done here.
227  // Setting the properties is done by the ToolSvc calling setProperties()
228  // explicitly.
229  return StatusCode::SUCCESS;
230 }
231 
232 //-----------------------------------------------------------------------------
234 {
235  //-----------------------------------------------------------------------------
236  return attempt( *this, "sysStart", [&]() {
238  Gaudi::Guards::AuditorGuard guard( this,
239  // check if we want to audit the initialize
240  m_auditorStart ? auditorSvc() : nullptr, IAuditor::Start );
241  StatusCode sc = start();
242  if ( sc.isSuccess() ) m_state = m_targetState;
243  return sc;
244  } );
245 }
246 
247 //------------------------------------------------------------------------------
249 //------------------------------------------------------------------------------
250 {
251  // For the time being there is nothing to be done here.
252  return StatusCode::SUCCESS;
253 }
254 
255 //-----------------------------------------------------------------------------
257 {
258  //-----------------------------------------------------------------------------
259  return attempt( *this, "sysStop", [&]() {
261  Gaudi::Guards::AuditorGuard guard( this,
262  // check if we want to audit the initialize
263  m_auditorStop ? auditorSvc() : nullptr, IAuditor::Stop );
264  StatusCode sc = stop();
265  if ( sc.isSuccess() ) m_state = m_targetState;
266  return sc;
267  } );
268 }
269 
270 //------------------------------------------------------------------------------
272 //------------------------------------------------------------------------------
273 {
274  // For the time being there is nothing to be done here.
275  return StatusCode::SUCCESS;
276 }
277 
278 //-----------------------------------------------------------------------------
280 {
281  //-----------------------------------------------------------------------------
282  return attempt( *this, "sysFinalize", [&]() {
284  Gaudi::Guards::AuditorGuard guard( this,
285  // check if we want to audit the initialize
287  StatusCode sc = finalize();
288  if ( sc.isSuccess() ) m_state = m_targetState;
289  return sc;
290  } );
291 }
292 //------------------------------------------------------------------------------
294 //------------------------------------------------------------------------------
295 {
296  // For the time being there is nothing to be done here.
297  return StatusCode::SUCCESS;
298 }
299 
300 //-----------------------------------------------------------------------------
302 {
303  //-----------------------------------------------------------------------------
304 
305  // Check that the current status is the correct one.
307  error() << "sysReinitialize(): cannot reinitialize tool not initialized" << endmsg;
308  return StatusCode::FAILURE;
309  }
310 
311  return attempt( *this, "SysReinitialize()", [&]() {
312  Gaudi::Guards::AuditorGuard guard( this,
313  // check if we want to audit the initialize
315  return reinitialize();
316  } );
317 }
318 
319 //------------------------------------------------------------------------------
321 //------------------------------------------------------------------------------
322 {
323  /* @TODO
324  * MCl 2008-10-23: the implementation of reinitialize as finalize+initialize
325  * is causing too many problems
326  *
327  // Default implementation is finalize+initialize
328  StatusCode sc = finalize();
329  if (sc.isFailure()) {
330  error() << "reinitialize(): cannot be finalized" << endmsg;
331  return sc;
332  }
333  sc = initialize();
334  if (sc.isFailure()) {
335  error() << "reinitialize(): cannot be initialized" << endmsg;
336  return sc;
337  }
338  */
339  return StatusCode::SUCCESS;
340 }
341 
342 //-----------------------------------------------------------------------------
344 {
345  //-----------------------------------------------------------------------------
346 
347  // Check that the current status is the correct one.
349  error() << "sysRestart(): cannot reinitialize tool not started" << endmsg;
350  return StatusCode::FAILURE;
351  }
352 
353  return attempt( *this, "sysRestart", [&]() {
355  Gaudi::Guards::AuditorGuard guard( this,
356  // check if we want to audit the initialize
358  return restart();
359  } );
360 }
361 
362 //------------------------------------------------------------------------------
364 //------------------------------------------------------------------------------
365 {
366  // Default implementation is stop+start
367  StatusCode sc = stop();
368  if ( sc.isFailure() ) {
369  error() << "restart(): cannot be stopped" << endmsg;
370  return sc;
371  }
372  sc = start();
373  if ( sc.isFailure() ) {
374  error() << "restart(): cannot be started" << endmsg;
375  return sc;
376  }
377  return StatusCode::SUCCESS;
378 }
379 
380 //------------------------------------------------------------------------------
382 //------------------------------------------------------------------------------
383 {
384  if ( m_pMonitorSvc ) {
385  m_pMonitorSvc->undeclareAll( this );
386  }
387 }
388 
390 {
391 
392  IAlgTool* tool = nullptr;
393  for ( auto thArr : m_toolHandleArrays ) {
394  if ( !thArr->retrieved() ) {
395  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
396  debug() << "ToolHandleArray " << thArr->propertyName() << " not used: not registering any of its Tools"
397  << endmsg;
398  } else {
399  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
400  debug() << "Registering all Tools in ToolHandleArray " << thArr->propertyName() << endmsg;
401  // Iterate over its tools:
402  for ( auto toolHandle : thArr->getBaseArray() ) {
403  // Try to cast it into a BaseToolHandle pointer:
404  BaseToolHandle* bth = dynamic_cast<BaseToolHandle*>( toolHandle );
405  if ( bth ) {
406  // If the cast was successful, the code is pretty simple:
407  tool = bth->get();
408  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
409  debug() << "Adding " << ( bth->isPublic() ? "public" : "private" ) << " ToolHandle tool " << tool->name()
410  << " (" << tool->type() << ") from ToolHandleArray " << thArr->propertyName() << endmsg;
411  }
412  m_tools.push_back( tool );
413  } else {
414  // If it wasn't for some strange reason, then fall back on the
415  // logic implemented previously:
416  if ( toolSvc()->retrieveTool( toolHandle->typeAndName(), tool, this, false ).isSuccess() ) {
417  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
418  debug() << "Adding private"
419  << " ToolHandle tool " << tool->name() << " (" << tool->type() << ") from ToolHandleArray "
420  << thArr->propertyName() << endmsg;
421  }
422  m_tools.push_back( tool );
423  } else if ( toolSvc()->retrieveTool( toolHandle->typeAndName(), tool, 0, false ).isSuccess() ) {
424  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
425  debug() << "Adding public"
426  << " ToolHandle tool " << tool->name() << " (" << tool->type() << ") from ToolHandleArray "
427  << thArr->propertyName() << endmsg;
428  }
429  m_tools.push_back( tool );
430  } else {
431  warning() << "Error retrieving Tool " << toolHandle->typeAndName() << " in ToolHandleArray "
432  << thArr->propertyName() << ". Not registered" << endmsg;
433  }
434  }
435  }
436  }
437  }
438 
439  for ( auto th : m_toolHandles ) {
440  if ( !th->isEnabled() ) {
441  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) && !th->typeAndName().empty() )
442  debug() << "ToolHandle " << th->typeAndName() << " not used" << endmsg;
443  continue;
444  }
445  if ( !th->get() ) {
446  auto sc = th->retrieve();
447  if ( UNLIKELY( sc.isFailure() ) ) {
448  throw GaudiException( "Failed to retrieve tool " + th->typeAndName(), this->name(), StatusCode::FAILURE );
449  }
450  }
451  tool = th->get();
452  if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
453  debug() << "Adding " << ( th->isPublic() ? "public" : "private" ) << " ToolHandle tool " << tool->name() << " ("
454  << tool->type() << ")" << endmsg;
455  m_tools.push_back( tool );
456  }
457  m_toolHandlesInit = true;
458 }
459 
461 {
463 
464  return m_tools;
465 }
466 
468 {
470 
471  return m_tools;
472 }
473 
474 //------------------------------------------------------------------------------
476 StatusCode AlgTool::service_i( const std::string& svcName, bool createIf, const InterfaceID& iid, void** ppSvc ) const
477 {
478  const ServiceLocatorHelper helper( *serviceLocator(), *this );
479  return helper.getService( svcName, createIf, iid, ppSvc );
480 }
481 
482 //------------------------------------------------------------------------------
483 StatusCode AlgTool::service_i( const std::string& svcType, const std::string& svcName, const InterfaceID& iid,
484  void** ppSvc ) const
485 {
486  const ServiceLocatorHelper helper( *serviceLocator(), *this );
487  return helper.createService( svcType, svcName, iid, ppSvc );
488 }
489 
490 SmartIF<IService> AlgTool::service( const std::string& name, const bool createIf, const bool quiet ) const
491 {
492  const ServiceLocatorHelper helper( *serviceLocator(), *this );
493  return helper.service( name, quiet, createIf );
494 }
495 
496 //-----------------------------------------------------------------------------
498 {
499  //---------------------------------------------------------------------------
500  if ( !m_pAuditorSvc ) {
501  m_pAuditorSvc = service( "AuditorSvc", true );
502  if ( !m_pAuditorSvc ) {
503  throw GaudiException( "Service [AuditorSvc] not found", name(), StatusCode::FAILURE );
504  }
505  }
506  return m_pAuditorSvc.get();
507 }
508 
509 //-----------------------------------------------------------------------------
511 {
512  //-----------------------------------------------------------------------------
513  vis->visit( this );
514 
515  for ( auto tool : tools() ) vis->visit( dynamic_cast<AlgTool*>( tool ) );
516 }
The interface implemented by the IToolSvc base class.
Definition: IToolSvc.h:19
#define UNLIKELY(x)
Definition: Kernel.h:122
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:510
Gaudi::Property< bool > m_auditorStart
Definition: AlgTool.h:313
bool m_toolHandlesInit
Definition: AlgTool.h:323
std::string m_type
AlgTool type (concrete class name)
Definition: AlgTool.h:293
Implementation of property with value of concrete type.
Definition: Property.h:381
StatusCode initialize() override
Definition: AlgTool.cpp:223
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:476
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:301
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:316
Data provider interface definition.
~AlgTool() override
Definition: AlgTool.cpp:381
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:320
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:233
STL class.
StatusCode sysStop() override
Stop AlgTool.
Definition: AlgTool.cpp:256
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:82
StatusCode finalize() override
Definition: AlgTool.cpp:293
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:306
void updateMsgStreamOutputLevel(int level)
Update the output level of the cached MsgStream.
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:314
virtual const std::string & tag() const
name tag for the exception, or exception type
StatusCode restart() override
Definition: AlgTool.cpp:363
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
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:460
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:317
T get(T...args)
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
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:330
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:321
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
T begin(T...args)
Gaudi::Property< bool > m_auditInit
Definition: AlgTool.h:311
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:701
SmartIF< IService > service(const std::string &name, const bool quiet=false, const bool createIf=true) const
Gaudi::Property< bool > m_auditorInitialize
Definition: AlgTool.h:312
StatusCode reinitialize() override
Definition: AlgTool.cpp:320
InterfaceList m_interfaceList
Interface list.
Definition: AlgTool.h:303
const IAlgTool * get() const
Definition: ToolHandle.h:86
StatusCode stop() override
Definition: AlgTool.cpp:271
StatusCode sysInitialize() override
Initialize AlgTool.
Definition: AlgTool.cpp:184
StatusCode queryInterface(const InterfaceID &iid, void **pinterface) override
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:331
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:389
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:497
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:279
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: AlgTool.h:322
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:315
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:343
StatusCode start() override
Definition: AlgTool.cpp:248