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