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