The Gaudi Framework  master (37c0b60a)
AlgTool.cpp
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 // Include files
12 #include <GaudiKernel/AlgTool.h>
16 
17 #include <Gaudi/Algorithm.h>
18 #include <GaudiKernel/Auditor.h>
21 #include <GaudiKernel/Guards.h>
22 #include <GaudiKernel/Service.h>
24 #include <GaudiKernel/System.h>
25 #include <GaudiKernel/ToolHandle.h>
26 
27 //------------------------------------------------------------------------------
28 namespace {
29  template <typename FUN>
30  StatusCode attempt( AlgTool& tool, const char* label, FUN&& fun ) {
31  try {
32  return fun();
33  } catch ( const GaudiException& Exception ) {
34  MsgStream log( tool.msgSvc(), tool.name() + "." + label );
35  log << MSG::FATAL << " Exception with tag=" << Exception.tag() << " is caught" << endmsg;
36  log << MSG::ERROR << Exception << endmsg;
37  } catch ( const std::exception& Exception ) {
38  MsgStream log( tool.msgSvc(), tool.name() + "." + label );
39  log << MSG::FATAL << " Standard std::exception is caught" << endmsg;
40  log << MSG::ERROR << Exception.what() << endmsg;
41  } catch ( ... ) {
42  MsgStream log( tool.msgSvc(), tool.name() + "." + label );
43  log << MSG::FATAL << "UNKNOWN Exception is caught" << endmsg;
44  }
45  return StatusCode::FAILURE;
46  }
47 } // namespace
48 
49 //------------------------------------------------------------------------------
50 StatusCode AlgTool::queryInterface( const InterfaceID& riid, void** ppvi )
51 //------------------------------------------------------------------------------
52 {
53  if ( !ppvi ) { return StatusCode::FAILURE; } // RETURN
54  StatusCode sc = base_class::queryInterface( riid, ppvi );
55  if ( sc.isSuccess() ) return sc;
57  [&]( const std::pair<InterfaceID, void*>& item ) { return item.first.versionMatch( riid ); } );
58  if ( i == std::end( m_interfaceList ) ) {
59  *ppvi = nullptr;
60  return Status::NO_INTERFACE; // RETURN
61  }
62  *ppvi = i->second;
63  addRef();
64  return StatusCode::SUCCESS; // RETURN
65 }
66 //------------------------------------------------------------------------------
67 const std::string& AlgTool::name() const
68 //------------------------------------------------------------------------------
69 {
70  return m_name;
71 }
72 
73 //------------------------------------------------------------------------------
74 const std::string& AlgTool::type() const
75 //------------------------------------------------------------------------------
76 {
77  return m_type;
78 }
79 
80 //------------------------------------------------------------------------------
82 //------------------------------------------------------------------------------
83 {
84  return m_parent;
85 }
86 
87 //------------------------------------------------------------------------------
89 //------------------------------------------------------------------------------
90 {
91  return m_svcLocator;
92 }
93 
94 // ============================================================================
95 // accessor to event service service
96 // ============================================================================
98  if ( !m_evtSvc ) {
99  m_evtSvc = service( "EventDataSvc", true );
100  if ( !m_evtSvc ) { throw GaudiException( "Service [EventDataSvc] not found", name(), StatusCode::FAILURE ); }
101  }
102  return m_evtSvc.get();
103 }
104 //------------------------------------------------------------------------------
106 //------------------------------------------------------------------------------
107 {
108  if ( !m_ptoolSvc ) {
109  m_ptoolSvc = service( "ToolSvc", true );
110  if ( !m_ptoolSvc ) { throw GaudiException( "Service [ToolSvc] not found", name(), StatusCode::FAILURE ); }
111  }
112  return m_ptoolSvc.get();
113 }
114 
115 //------------------------------------------------------------------------------
117  //------------------------------------------------------------------------------
118  : m_type( std::move( type ) ), m_name( std::move( name ) ), m_parent( parent ) {
119  addRef(); // Initial count set to 1
120 
121  IInterface* _p = const_cast<IInterface*>( parent );
122 
123  if ( Gaudi::Algorithm* _alg = dynamic_cast<Gaudi::Algorithm*>( _p ) ) {
124  m_svcLocator = _alg->serviceLocator();
125  } else if ( Service* _svc = dynamic_cast<Service*>( _p ) ) {
126  m_svcLocator = _svc->serviceLocator();
127  } else if ( AlgTool* _too = dynamic_cast<AlgTool*>( _p ) ) {
128  m_svcLocator = _too->serviceLocator();
129  } else if ( Auditor* _aud = dynamic_cast<Auditor*>( _p ) ) {
130  m_svcLocator = _aud->serviceLocator();
131  } else {
132  throw GaudiException( "Failure to create tool '" + m_type + "/" + m_name + "': illegal parent type '" +
133  System::typeinfoName( typeid( *_p ) ) + "'",
134  "AlgTool", StatusCode::FAILURE );
135  }
136 
137  // inherit output level from parent
138  // get the "OutputLevel" property from parent
139  if ( SmartIF<IProperty> pprop( _p ); pprop && pprop->hasProperty( "OutputLevel" ) ) {
140  m_outputLevel.assign( pprop->getProperty( "OutputLevel" ) );
141  }
142 
143  // Auditor monitoring properties
144  // Initialize the default value from ApplicationMgr AuditAlgorithms
145  Gaudi::Property<bool> audit( false );
146  // note that here we need that the service locator is already defined
147  if ( auto appMgr = serviceLocator()->service<IProperty>( "ApplicationMgr" );
148  appMgr && appMgr->hasProperty( "AuditTools" ) ) {
149  audit.assign( appMgr->getProperty( "AuditTools" ) );
150  }
151  m_auditInit = audit;
152  m_auditorInitialize = audit;
153  m_auditorStart = audit;
154  m_auditorStop = audit;
155  m_auditorFinalize = audit;
156  m_auditorReinitialize = audit;
157  m_auditorRestart = audit;
158 }
159 
160 //-----------------------------------------------------------------------------
162  //-----------------------------------------------------------------------------
163  return attempt( *this, "sysInitialize", [&]() {
165  Gaudi::Guards::AuditorGuard guard( this,
166  // check if we want to audit the initialize
168  StatusCode sc = initialize();
169  if ( !sc ) return sc;
170 
173 
174  // check for explicit circular data dependencies in declared handles
176  for ( auto& h : outputHandles() ) {
177  if ( !h->objKey().empty() ) out.emplace( h->fullKey() );
178  }
179  for ( auto& h : inputHandles() ) {
180  if ( !h->objKey().empty() && out.find( h->fullKey() ) != out.end() ) {
181  error() << "Explicit circular data dependency found for id " << h->fullKey() << endmsg;
182  sc = StatusCode::FAILURE;
183  }
184  }
185 
186  if ( !sc ) return sc;
187 
188  // visit all sub-tools, build full set
190  acceptDHVisitor( &avis );
191 
192  // initialize handles
193  initDataHandleHolder(); // this should 'freeze' the handle configuration.
194 
195  return sc;
196  } );
197 }
198 //------------------------------------------------------------------------------
200 //------------------------------------------------------------------------------
201 {
202  // For the time being there is nothing to be done here.
203  // Setting the properties is done by the ToolSvc calling setProperties()
204  // explicitly.
205  return StatusCode::SUCCESS;
206 }
207 
208 //-----------------------------------------------------------------------------
210  //-----------------------------------------------------------------------------
211  return attempt( *this, "sysStart", [&]() {
213  Gaudi::Guards::AuditorGuard guard( this,
214  // check if we want to audit the initialize
215  m_auditorStart ? auditorSvc() : nullptr, IAuditor::Start );
216  StatusCode sc = start();
217  if ( sc.isSuccess() ) m_state = m_targetState;
218  return sc;
219  } );
220 }
221 
222 //------------------------------------------------------------------------------
224 //------------------------------------------------------------------------------
225 {
226  // For the time being there is nothing to be done here.
227  return StatusCode::SUCCESS;
228 }
229 
230 //-----------------------------------------------------------------------------
232  //-----------------------------------------------------------------------------
233  return attempt( *this, "sysStop", [&]() {
235  Gaudi::Guards::AuditorGuard guard( this,
236  // check if we want to audit the initialize
237  m_auditorStop ? auditorSvc() : nullptr, IAuditor::Stop );
238  StatusCode sc = stop();
239  if ( sc.isSuccess() ) m_state = m_targetState;
240  return sc;
241  } );
242 }
243 
244 //------------------------------------------------------------------------------
246 //------------------------------------------------------------------------------
247 {
248  // For the time being there is nothing to be done here.
249  return StatusCode::SUCCESS;
250 }
251 
252 //-----------------------------------------------------------------------------
254  //-----------------------------------------------------------------------------
255  return attempt( *this, "sysFinalize", [&]() {
257  Gaudi::Guards::AuditorGuard guard( this,
258  // check if we want to audit the initialize
260  StatusCode sc = finalize();
261  if ( sc.isSuccess() ) m_state = m_targetState;
262  return sc;
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  // Check that the current status is the correct one.
279  error() << "sysReinitialize(): cannot reinitialize tool not initialized" << endmsg;
280  return StatusCode::FAILURE;
281  }
282 
283  return attempt( *this, "SysReinitialize()", [&]() {
284  Gaudi::Guards::AuditorGuard guard( this,
285  // check if we want to audit the initialize
287  return reinitialize();
288  } );
289 }
290 
291 //------------------------------------------------------------------------------
293 //------------------------------------------------------------------------------
294 {
295  /* @TODO
296  * MCl 2008-10-23: the implementation of reinitialize as finalize+initialize
297  * is causing too many problems
298  *
299  // Default implementation is finalize+initialize
300  StatusCode sc = finalize();
301  if (sc.isFailure()) {
302  error() << "reinitialize(): cannot be finalized" << endmsg;
303  return sc;
304  }
305  sc = initialize();
306  if (sc.isFailure()) {
307  error() << "reinitialize(): cannot be initialized" << endmsg;
308  return sc;
309  }
310  */
311  return StatusCode::SUCCESS;
312 }
313 
314 //-----------------------------------------------------------------------------
316  //-----------------------------------------------------------------------------
317 
318  // Check that the current status is the correct one.
320  error() << "sysRestart(): cannot reinitialize tool not started" << endmsg;
321  return StatusCode::FAILURE;
322  }
323 
324  return attempt( *this, "sysRestart", [&]() {
326  Gaudi::Guards::AuditorGuard guard( this,
327  // check if we want to audit the initialize
329  return restart();
330  } );
331 }
332 
333 //------------------------------------------------------------------------------
335 //------------------------------------------------------------------------------
336 {
337  // Default implementation is stop+start
338  StatusCode sc = stop();
339  if ( sc.isFailure() ) {
340  error() << "restart(): cannot be stopped" << endmsg;
341  return sc;
342  }
343  sc = start();
344  if ( sc.isFailure() ) {
345  error() << "restart(): cannot be started" << endmsg;
346  return sc;
347  }
348  return StatusCode::SUCCESS;
349 }
350 
351 //------------------------------------------------------------------------------
353 //------------------------------------------------------------------------------
354 {
355  if ( m_pMonitorSvc ) { m_pMonitorSvc->undeclareAll( this ); }
356 }
357 
359  auto init_one = [&]( BaseToolHandle* th ) {
360  if ( !th->isEnabled() ) {
361  if ( msgLevel( MSG::DEBUG ) && !th->typeAndName().empty() )
362  debug() << "ToolHandle " << th->typeAndName() << " not used" << endmsg;
363  return;
364  }
365  if ( !th->get() ) {
366  auto sc = th->retrieve();
367  if ( sc.isFailure() ) {
368  throw GaudiException( "Failed to retrieve tool " + th->typeAndName(), this->name(), StatusCode::FAILURE );
369  }
370  }
371  auto* tool = th->get();
372  if ( msgLevel( MSG::DEBUG ) )
373  debug() << "Adding " << ( th->isPublic() ? "public" : "private" ) << " ToolHandle tool " << tool->name() << " ("
374  << tool->type() << ")" << endmsg;
376  };
377 
378  for ( auto thArr : m_toolHandleArrays ) {
379  if ( msgLevel( MSG::DEBUG ) )
380  debug() << "Registering all Tools in ToolHandleArray " << thArr->propertyName() << endmsg;
381  // Iterate over its tools:
382  for ( auto toolHandle : thArr->getBaseArray() ) {
383  // Try to cast it into a BaseToolHandle pointer:
384  BaseToolHandle* bth = dynamic_cast<BaseToolHandle*>( toolHandle );
385  if ( bth ) {
386  init_one( bth );
387  } else {
388  error() << "Error retrieving Tool " << toolHandle->typeAndName() << " in ToolHandleArray "
389  << thArr->propertyName() << ". Not registered" << endmsg;
390  }
391  }
392  }
393 
394  for ( BaseToolHandle* th : m_toolHandles ) init_one( th );
395 
396  m_toolHandlesInit = true;
397 }
398 
401 
402  return m_tools;
403 }
404 
407 
408  return m_tools;
409 }
410 
411 //------------------------------------------------------------------------------
413 StatusCode AlgTool::service_i( std::string_view svcName, bool createIf, const InterfaceID& iid, void** ppSvc ) const {
414  const ServiceLocatorHelper helper( *serviceLocator(), *this );
415  return helper.getService( svcName, createIf, iid, ppSvc );
416 }
417 
418 //------------------------------------------------------------------------------
419 StatusCode AlgTool::service_i( std::string_view svcType, std::string_view svcName, const InterfaceID& iid,
420  void** ppSvc ) const {
421  const ServiceLocatorHelper helper( *serviceLocator(), *this );
422  return helper.createService( svcType, svcName, iid, ppSvc );
423 }
424 
425 SmartIF<IService> AlgTool::service( std::string_view name, const bool createIf, const bool quiet ) const {
426  const ServiceLocatorHelper helper( *serviceLocator(), *this );
427  return helper.service( name, quiet, createIf );
428 }
429 
430 //-----------------------------------------------------------------------------
432  //---------------------------------------------------------------------------
433  if ( !m_pAuditorSvc ) {
434  m_pAuditorSvc = service( "AuditorSvc", true );
435  if ( !m_pAuditorSvc ) { throw GaudiException( "Service [AuditorSvc] not found", name(), StatusCode::FAILURE ); }
436  }
437  return m_pAuditorSvc.get();
438 }
439 
440 //-----------------------------------------------------------------------------
442  //-----------------------------------------------------------------------------
443  vis->visit( this );
444 
445  for ( auto tool : tools() ) vis->visit( dynamic_cast<AlgTool*>( tool ) );
446 }
ServiceLocatorHelper::service
SmartIF< IService > service(std::string_view name, const bool quiet=false, const bool createIf=true) const
Definition: ServiceLocatorHelper.cpp:50
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
AlgTool::m_auditorFinalize
Gaudi::Property< bool > m_auditorFinalize
Definition: AlgTool.h:315
IAuditor::ReStart
@ ReStart
Definition: IAuditor.h:34
AlgTool::m_auditorRestart
Gaudi::Property< bool > m_auditorRestart
Definition: AlgTool.h:317
std::string
STL class.
AlgTool::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: AlgTool.h:296
std::exception
STL class.
Gaudi.Configuration.log
log
Definition: Configuration.py:28
AlgTool::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: AlgTool.h:321
AlgTool::sysFinalize
StatusCode sysFinalize() override
Finalize AlgTool.
Definition: AlgTool.cpp:253
AlgTool::m_state
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:331
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:314
AlgTool::m_updateDataHandles
std::unique_ptr< IDataHandleVisitor > m_updateDataHandles
Hook for for derived classes to provide a custom visitor for data handles.
Definition: AlgTool.h:233
AlgTool::m_toolHandlesInit
bool m_toolHandlesInit
Definition: AlgTool.h:323
std::unordered_set< DataObjID, DataObjID_Hasher >
System.h
AlgTool::m_auditorStop
Gaudi::Property< bool > m_auditorStop
Definition: AlgTool.h:314
std::pair< InterfaceID, void * >
AlgTool::m_auditorReinitialize
Gaudi::Property< bool > m_auditorReinitialize
Definition: AlgTool.h:316
GaudiException.h
AlgTool::parent
const IInterface * parent() const override
Retrieve parent of the sub-algtool.
Definition: AlgTool.cpp:81
std::vector< IAlgTool * >
Gaudi::StateMachine::FINALIZE
@ FINALIZE
Definition: StateMachine.h:38
std::find_if
T find_if(T... args)
AlgTool::m_svcLocator
SmartIF< ISvcLocator > m_svcLocator
Pointer to Service Locator service.
Definition: AlgTool.h:293
AlgTool::restart
StatusCode restart() override
Definition: AlgTool.cpp:334
AlgTool::AlgTool
AlgTool(std::string type, std::string name, const IInterface *parent)
Standard Constructor.
Definition: AlgTool.cpp:116
GaudiException
Definition: GaudiException.h:31
AlgTool::m_evtSvc
SmartIF< IDataProviderSvc > m_evtSvc
Event data service.
Definition: AlgTool.h:294
AlgTool::m_auditorInitialize
Gaudi::Property< bool > m_auditorInitialize
Definition: AlgTool.h:312
AlgTool::type
const std::string & type() const override
Retrieve type (concrete class) of the sub-algtool.
Definition: AlgTool.cpp:74
std::unique_ptr::get
T get(T... args)
AlgTool::reinitialize
StatusCode reinitialize() override
Definition: AlgTool.cpp:292
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::outputHandles
std::vector< Gaudi::DataHandle * > outputHandles() const override
Definition: DataHandleHolderBase.h:41
AlgTool::acceptDHVisitor
void acceptDHVisitor(IDataHandleVisitor *) const override
Definition: AlgTool.cpp:441
Gaudi::Property::assign
bool assign(const Details::PropertyBase &source) override
get the value from another property
Definition: Property.h:370
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:315
AlgTool::m_tools
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:320
AlgTool::sysInitialize
StatusCode sysInitialize() override
Initialize AlgTool.
Definition: AlgTool.cpp:161
AlgTool::initialize
StatusCode initialize() override
Definition: AlgTool.cpp:199
AlgTool::m_targetState
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:332
AlgTool::sysReinitialize
StatusCode sysReinitialize() override
Initialize AlgTool.
Definition: AlgTool.cpp:274
DHHVisitor
Definition: DataHandleHolderVisitor.h:21
IMessageSvc.h
CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:148
AlgTool::auditorSvc
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:431
AlgTool::FSMState
Gaudi::StateMachine::State FSMState() const override
Definition: AlgTool.h:90
AlgTool::name
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:67
Service
Definition: Service.h:46
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::m_outputDataObjs
DataObjIDColl m_outputDataObjs
Definition: DataHandleHolderBase.h:98
Gaudi::Guards::AuditorGuard
Definition: Guards.h:213
Gaudi::StateMachine::INITIALIZE
@ INITIALIZE
Definition: StateMachine.h:35
std::vector::push_back
T push_back(T... args)
AlgTool::m_parent
const IInterface * m_parent
AlgTool parent.
Definition: AlgTool.h:291
IAuditor::Finalize
@ Finalize
Definition: IAuditor.h:34
bug_34121.tool
tool
Definition: bug_34121.py:18
Auditor
Definition: Auditor.h:43
AlgTool::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: AlgTool.cpp:88
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::initDataHandleHolder
void initDataHandleHolder()
initializes all handles - called by the sysInitialize method of any descendant of this
Definition: DataHandleHolderBase.h:94
StatusCode
Definition: StatusCode.h:65
IAuditor::Stop
@ Stop
Definition: IAuditor.h:34
IAuditor::Initialize
@ Initialize
Definition: IAuditor.h:34
IAuditor::ReInitialize
@ ReInitialize
Definition: IAuditor.h:34
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:90
AlgSequencer.h
h
Definition: AlgSequencer.py:31
AlgTool::m_type
std::string m_type
AlgTool type (concrete class name)
Definition: AlgTool.h:289
DataHandleHolderVisitor.h
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::m_inputDataObjs
DataObjIDColl m_inputDataObjs
Definition: DataHandleHolderBase.h:98
ServiceLocatorHelper
an helper to share the implementation of service() among the various kernel base classes
Definition: ServiceLocatorHelper.h:27
AlgTool::sysStop
StatusCode sysStop() override
Stop AlgTool.
Definition: AlgTool.cpp:231
ServiceLocatorHelper::getService
StatusCode getService(std::string_view name, bool createIf, const InterfaceID &iid, void **ppSvc) const
Definition: ServiceLocatorHelper.h:52
AlgTool::m_ptoolSvc
SmartIF< IToolSvc > m_ptoolSvc
Tool service.
Definition: AlgTool.h:295
AlgTool::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: AlgTool.h:322
Algorithm.h
SmartIF< ISvcLocator >
AlgTool::sysRestart
StatusCode sysRestart() override
Start AlgTool.
Definition: AlgTool.cpp:315
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
AlgTool::toolSvc
IToolSvc * toolSvc() const
The standard ToolSvc service, Return a pointer to the service if present.
Definition: AlgTool.cpp:105
Gaudi::StateMachine::RUNNING
@ RUNNING
Definition: StateMachine.h:26
MsgStream
Definition: MsgStream.h:33
MSG::FATAL
@ FATAL
Definition: IMessageSvc.h:25
IDataHandleVisitor
Definition: IDataHandleHolder.h:46
Service.h
DataHandleHolderBase< PropertyHolder< CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > > > >::inputHandles
std::vector< Gaudi::DataHandle * > inputHandles() const override
Definition: DataHandleHolderBase.h:38
Gaudi::StateMachine::ChangeState
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:19
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:129
IAuditor::Start
@ Start
Definition: IAuditor.h:34
AlgTool::m_interfaceList
InterfaceList m_interfaceList
Interface list.
Definition: AlgTool.h:299
gaudirun.type
type
Definition: gaudirun.py:160
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
AlgTool::service
StatusCode service(std::string_view name, T *&svc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: AlgTool.h:137
IAuditorSvc
Definition: IAuditorSvc.h:25
AlgTool
Definition: AlgTool.h:62
BaseToolHandle
Definition: ToolHandle.h:80
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:86
AlgTool::evtSvc
IDataProviderSvc * evtSvc() const
accessor to event service service
Definition: AlgTool.cpp:97
AlgTool::tools
const std::vector< IAlgTool * > & tools() const
Definition: AlgTool.cpp:399
ServiceLocatorHelper.h
std::begin
T begin(T... args)
AlgTool::queryInterface
StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown) override
Query for a given interface.
Definition: AlgTool.cpp:50
ToolHandle.h
std
STL namespace.
Gaudi::StateMachine::INITIALIZED
@ INITIALIZED
Definition: StateMachine.h:25
MSG::ERROR
@ ERROR
Definition: IMessageSvc.h:25
IInterface
Definition: IInterface.h:239
AlgTool::m_auditInit
Gaudi::Property< bool > m_auditInit
Definition: AlgTool.h:311
Gaudi::StateMachine::START
@ START
Definition: StateMachine.h:36
AlgTool::sysStart
StatusCode sysStart() override
Start AlgTool.
Definition: AlgTool.cpp:209
AlgTool::m_name
const std::string m_name
AlgTool full name.
Definition: AlgTool.h:290
AlgTool::m_pAuditorSvc
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: AlgTool.h:297
AlgTool.h
std::end
T end(T... args)
IDataProviderSvc
Definition: IDataProviderSvc.h:53
InterfaceID
Definition: IInterface.h:39
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
Guards.h
ISvcLocator.h
Gaudi::Details::Property::ParsingErrorPolicy::Exception
@ Exception
AlgTool::stop
StatusCode stop() override
Definition: AlgTool.cpp:245
ServiceLocatorHelper::createService
StatusCode createService(std::string_view name, const InterfaceID &iid, void **ppSvc) const
Definition: ServiceLocatorHelper.cpp:33
AlgTool::m_outputLevel
Gaudi::Property< int > m_outputLevel
Definition: AlgTool.h:303
IToolSvc
Definition: IToolSvc.h:29
AlgTool::~AlgTool
~AlgTool() override
Definition: AlgTool.cpp:352
IOTest.appMgr
appMgr
Definition: IOTest.py:105
AlgTool::m_auditorStart
Gaudi::Property< bool > m_auditorStart
Definition: AlgTool.h:313
Gaudi::Property< bool >
IDataManagerSvc.h
AlgTool::start
StatusCode start() override
Definition: AlgTool.cpp:223
AlgTool::service_i
StatusCode service_i(std::string_view algName, bool createIf, const InterfaceID &iid, void **ppSvc) const
flag indicating whether ToolHandle tools have been added to m_tools
Definition: AlgTool.cpp:413
Gaudi::StateMachine::STOP
@ STOP
Definition: StateMachine.h:37
IDataHandleVisitor::visit
virtual void visit(const IDataHandleHolder *)=0
AlgTool::initToolHandles
void initToolHandles() const
Definition: AlgTool.cpp:358
PrepareBase.out
out
Definition: PrepareBase.py:20
Auditor.h
AlgTool::finalize
StatusCode finalize() override
Definition: AlgTool.cpp:266