AlgTool.cpp
Go to the documentation of this file.
1 // Include files
2 #include "GaudiKernel/AlgTool.h"
7 
9 #include "GaudiKernel/Service.h"
10 #include "GaudiKernel/Auditor.h"
11 #include "GaudiKernel/System.h"
15 #include "GaudiKernel/Guards.h"
16 #include "GaudiKernel/ToolHandle.h"
18 
19 //------------------------------------------------------------------------------
20 namespace {
21 template <typename FUN>
22 StatusCode attempt( AlgTool& tool, const char* label, FUN&& fun ) {
23  try { return fun(); }
24  catch( const GaudiException& Exception ) {
25  MsgStream log ( tool.msgSvc(), tool.name() + "." + label );
26  log << MSG::FATAL << " Exception with tag=" << Exception.tag()
27  << " is caught" << endmsg;
28  log << MSG::ERROR << Exception << endmsg;
29  }
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  }
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 //------------------------------------------------------------------------------
45 ( const InterfaceID& riid,
46  void** ppvi )
47 //------------------------------------------------------------------------------
48 {
49  if ( !ppvi ) { return StatusCode::FAILURE ; } // RETURN
50  StatusCode sc = base_class::queryInterface(riid,ppvi);
51  if (sc.isSuccess()) return sc;
52  auto i = std::find_if( std::begin(m_interfaceList), std::end(m_interfaceList),
54  return item.first.versionMatch(riid);
55  } );
56  if ( i == std::end(m_interfaceList) ) {
57  *ppvi = nullptr ;
58  return NO_INTERFACE ; // RETURN
59  }
60  *ppvi = i->second ;
61  addRef() ;
62  return SUCCESS ; // RETURN
63 }
64 //------------------------------------------------------------------------------
65 const std::string& AlgTool::name() const
66 //------------------------------------------------------------------------------
67 {
68  return m_name;
69 }
70 
71 //------------------------------------------------------------------------------
72 const std::string& AlgTool::type() const
73 //------------------------------------------------------------------------------
74 {
75  return m_type;
76 }
77 
78 //------------------------------------------------------------------------------
80 //------------------------------------------------------------------------------
81 {
82  return m_parent;
83 }
84 
85 //------------------------------------------------------------------------------
87 //------------------------------------------------------------------------------
88 {
89  return m_svcLocator;
90 }
91 
92 // ============================================================================
93 // accessor to event service service
94 // ============================================================================
96 {
97  if ( !m_evtSvc ) {
98  m_evtSvc = service("EventDataSvc", true);
99  if ( !m_evtSvc ) {
100  throw GaudiException("Service [EventDataSvc] not found", name(), StatusCode::FAILURE);
101  }
102  }
103  return m_evtSvc.get();
104 }
105 //------------------------------------------------------------------------------
107 //------------------------------------------------------------------------------
108 {
109  if ( !m_ptoolSvc ) {
110  m_ptoolSvc = service( "ToolSvc", true );
111  if( !m_ptoolSvc ) {
112  throw GaudiException("Service [ToolSvc] not found", name(), StatusCode::FAILURE);
113  }
114  }
115  return m_ptoolSvc.get();
116 }
117 
118 //------------------------------------------------------------------------------
120 //------------------------------------------------------------------------------
121 {
122  return m_propertyMgr->setProperty(p);
123 }
124 
125 //------------------------------------------------------------------------------
127 //------------------------------------------------------------------------------
128 {
129  return m_propertyMgr->setProperty(s);
130 }
131 
132 //------------------------------------------------------------------------------
134 //------------------------------------------------------------------------------
135 {
136  return m_propertyMgr->setProperty(n,v);
137 }
138 
139 //------------------------------------------------------------------------------
141 //------------------------------------------------------------------------------
142 {
143  return m_propertyMgr->getProperty(p);
144 }
145 
146 //------------------------------------------------------------------------------
148 {
149  return m_propertyMgr->getProperty(n);
150 }
151 
152 //------------------------------------------------------------------------------
154 //------------------------------------------------------------------------------
155 {
156  return m_propertyMgr->getProperty(n,v);
157 }
158 
159 //------------------------------------------------------------------------------
161 //------------------------------------------------------------------------------
162 {
163  return m_propertyMgr->getProperties();
164 }
165 
167  return m_propertyMgr->hasProperty(name);
168 }
169 
170 //------------------------------------------------------------------------------
172 //------------------------------------------------------------------------------
173 {
174  if( !m_svcLocator ) return StatusCode::FAILURE;
175  auto jos = m_svcLocator->service<IJobOptionsSvc>("JobOptionsSvc");
176  if( !jos ) return StatusCode::FAILURE;
177 
178  // set first generic Properties
179  StatusCode sc = jos->setMyProperties( getGaudiThreadGenericName(name()), this );
180  if( sc.isFailure() ) return StatusCode::FAILURE;
181 
182  // set specific Properties
183  if (isGaudiThreaded(name())) {
184  if(jos->setMyProperties( name(), this ).isFailure()) {
185  return StatusCode::FAILURE;
186  }
187  }
189  return StatusCode::SUCCESS;
190 }
191 
192 //------------------------------------------------------------------------------
194  const std::string& name,
195  const IInterface* parent)
196 //------------------------------------------------------------------------------
197  : m_type ( type )
198  , m_name ( name )
199  , m_parent ( parent )
200  , m_propertyMgr ( new PropertyMgr() )
201 {
202  addRef(); // Initial count set to 1
203 
204  declareProperty( "MonitorService", m_monitorSvcName = "MonitorSvc" );
205 
206  { // get the "OutputLevel" property from parent
207  const Property* _p = Gaudi::Utils::getProperty ( parent , "OutputLevel") ;
208  if ( _p ) { m_outputLevel.assign( *_p ) ; }
209  declareProperty ( "OutputLevel" , m_outputLevel ) ;
211  }
212 
213  IInterface* _p = const_cast<IInterface*> ( parent ) ;
214 
215  if ( Algorithm* _alg = dynamic_cast<Algorithm*> ( _p ) )
216  {
217  m_svcLocator = _alg -> serviceLocator () ;
218  m_threadID = getGaudiThreadIDfromName ( _alg -> name() ) ;
219  }
220  else if ( Service* _svc = dynamic_cast<Service*> ( _p ) )
221  {
222  m_svcLocator = _svc -> serviceLocator () ;
223  m_threadID = getGaudiThreadIDfromName ( _svc -> name() ) ;
224  }
225  else if ( AlgTool* _too = dynamic_cast<AlgTool*> ( _p ) )
226  {
227  m_svcLocator = _too -> serviceLocator ();
229  }
230  else if ( Auditor* _aud = dynamic_cast<Auditor*> ( _p ) )
231  {
232  m_svcLocator = _aud -> serviceLocator() ;
233  m_threadID = getGaudiThreadIDfromName ( _aud -> name() ) ;
234  }
235  else
236  {
237  throw GaudiException
238  ( "Failure to create tool '"
239  + type + "/" + name + "': illegal parent type '"
240  + System::typeinfoName(typeid(*_p)) + "'", "AlgTool", 0 );
241  }
242 
243 
244  { // audit tools
245  auto appMgr = m_svcLocator->service<IProperty>("ApplicationMgr");
246  if ( !appMgr ) {
247  throw GaudiException("Could not locate ApplicationMgr","AlgTool",0);
248  }
249  const Property* p = Gaudi::Utils::getProperty( appMgr , "AuditTools");
250  if ( p ) { m_auditInit.assign ( *p ) ; }
251  declareProperty ( "AuditTools", m_auditInit );
252  bool audit = m_auditInit.value();
253  // Declare common AlgTool properties with their defaults
254  declareProperty ( "AuditInitialize" , m_auditorInitialize = audit ) ;
255  declareProperty ( "AuditStart" , m_auditorStart = audit ) ;
256  declareProperty ( "AuditStop" , m_auditorStop = audit ) ;
257  declareProperty ( "AuditFinalize" , m_auditorFinalize = audit ) ;
258  }
259 
260  //declare Extra input and output properties
261  declareProperty( "ExtraInputs", m_extInputDataObjs);
262  declareProperty( "ExtraOutputs", m_extOutputDataObjs);
263 
264 
265  // check thread ID and try if tool name indicates thread ID
266  if ( m_threadID.empty() )
268 }
269 
270 //-----------------------------------------------------------------------------
272 //-----------------------------------------------------------------------------
273  return attempt( *this, "sysInitialize", [&]() {
275  Gaudi::Guards::AuditorGuard guard(this,
276  // check if we want to audit the initialize
277  m_auditorInitialize ? auditorSvc() : nullptr,
280  if (!sc) return sc;
281 
285 
286  return sc;
287  } );
288 }
289 //------------------------------------------------------------------------------
291 //------------------------------------------------------------------------------
292 {
293  // For the time being there is nothing to be done here.
294  // Setting the properties is done by the ToolSvc calling setProperties()
295  // explicitly.
296  return StatusCode::SUCCESS;
297 }
298 
299 //-----------------------------------------------------------------------------
301 //-----------------------------------------------------------------------------
302  return attempt( *this, "sysInitialize", [&]() {
304  Gaudi::Guards::AuditorGuard guard(this,
305  // check if we want to audit the initialize
306  m_auditorStart ? auditorSvc() : nullptr,
308  StatusCode sc = start();
309  if (sc.isSuccess()) m_state = m_targetState;
310  return sc;
311  } );
312 }
313 
314 //------------------------------------------------------------------------------
316 //------------------------------------------------------------------------------
317 {
318  // For the time being there is nothing to be done here.
319  return StatusCode::SUCCESS;
320 }
321 
322 //-----------------------------------------------------------------------------
324 //-----------------------------------------------------------------------------
325  return attempt( *this, "sysStop", [&]() {
327  Gaudi::Guards::AuditorGuard guard(this,
328  // check if we want to audit the initialize
329  m_auditorStop ? auditorSvc() : nullptr,
331  StatusCode sc = stop();
332  if (sc.isSuccess()) m_state = m_targetState;
333  return sc;
334  } );
335 }
336 
337 //------------------------------------------------------------------------------
339 //------------------------------------------------------------------------------
340 {
341  // For the time being there is nothing to be done here.
342  return StatusCode::SUCCESS;
343 }
344 
345 //-----------------------------------------------------------------------------
347 //-----------------------------------------------------------------------------
348  return attempt( *this, "sysFinalize", [&]() {
350  Gaudi::Guards::AuditorGuard guard(this,
351  // check if we want to audit the initialize
352  m_auditorFinalize ? auditorSvc() : nullptr,
354  StatusCode sc = finalize();
355  if (sc.isSuccess()) m_state = m_targetState;
356  return sc;
357  } );
358 }
359 //------------------------------------------------------------------------------
361 //------------------------------------------------------------------------------
362 {
363  // For the time being there is nothing to be done here.
364  return StatusCode::SUCCESS;
365 }
366 
367 //-----------------------------------------------------------------------------
369 //-----------------------------------------------------------------------------
370 
371  // Check that the current status is the correct one.
373  error()
374  << "sysReinitialize(): cannot reinitialize tool not initialized"
375  << endmsg;
376  return StatusCode::FAILURE;
377  }
378 
379  return attempt(*this, "SysReinitialize()", [&]() {
380  Gaudi::Guards::AuditorGuard guard(this,
381  // check if we want to audit the initialize
382  m_auditorReinitialize ? auditorSvc() : nullptr,
384  return reinitialize();
385  } );
386 
387 }
388 
389 //------------------------------------------------------------------------------
391 //------------------------------------------------------------------------------
392 {
393  /* @TODO
394  * MCl 2008-10-23: the implementation of reinitialize as finalize+initialize
395  * is causing too many problems
396  *
397  // Default implementation is finalize+initialize
398  StatusCode sc = finalize();
399  if (sc.isFailure()) {
400  error() << "reinitialize(): cannot be finalized" << endmsg;
401  return sc;
402  }
403  sc = initialize();
404  if (sc.isFailure()) {
405  error() << "reinitialize(): cannot be initialized" << endmsg;
406  return sc;
407  }
408  */
409  return StatusCode::SUCCESS;
410 }
411 
412 //-----------------------------------------------------------------------------
414 //-----------------------------------------------------------------------------
415 
416  // Check that the current status is the correct one.
418  error()
419  << "sysRestart(): cannot reinitialize tool not started"
420  << endmsg;
421  return StatusCode::FAILURE;
422  }
423 
424  return attempt(*this, "sysRestart", [&]() {
426  Gaudi::Guards::AuditorGuard guard(this,
427  // check if we want to audit the initialize
428  m_auditorRestart ? auditorSvc() : nullptr,
430  return restart();
431  } );
432 }
433 
434 //------------------------------------------------------------------------------
436 //------------------------------------------------------------------------------
437 {
438  // Default implementation is stop+start
439  StatusCode sc = stop();
440  if (sc.isFailure()) {
441  error() << "restart(): cannot be stopped" << endmsg;
442  return sc;
443  }
444  sc = start();
445  if (sc.isFailure()) {
446  error() << "restart(): cannot be started" << endmsg;
447  return sc;
448  }
449  return StatusCode::SUCCESS;
450 }
451 
452 //------------------------------------------------------------------------------
454 //------------------------------------------------------------------------------
455 {
456  if( m_pMonitorSvc ) { m_pMonitorSvc->undeclareAll(this); }
457 }
458 
459 
461 
462  IAlgTool* tool(0);
463  for (auto thArr : m_toolHandleArrays) {
464  if (! thArr->retrieved()) {
466  debug() << "ToolHandleArray " << thArr->propertyName()
467  << " not used: not registering any of its Tools" << endmsg;
468  } else {
470  debug() << "Registering all Tools in ToolHandleArray "
471  << thArr->propertyName() ;
472  for (auto th_name : thArr->typesAndNames()) {
474  debug() << std::endl << " + " << th_name;
475  if (toolSvc()->retrieveTool(th_name, tool, this).isSuccess()) {
477  debug() << " (private)";
478  m_tools.push_back(tool);
479  } else if (toolSvc()->retrieveTool(th_name, tool, 0).isSuccess()) {
481  debug() << " (public)";
482  m_tools.push_back(tool);
483  } else {
485  debug() << " - ERROR" << endmsg;
486  warning() << "Error retrieving Tool " << th_name
487  << " in ToolHandleArray" << thArr->propertyName()
488  << ". Not registered" << endmsg;
489  }
490  }
492  }
493  }
494 
495  for(auto th : m_toolHandles){
496  tool = th->get();
497  if(tool){
498  m_tools.push_back(tool);
500  debug() << "Adding "
501  << (th->isPublic() ? "Public" : "Private" )
502  << " ToolHandle tool " << tool->name()
503  << " (" << tool->type() << ")" << endmsg;
504  } else {
506  debug() << "ToolHandle " << th->typeAndName() << " not used" << endmsg;
507  }
508  }
509  m_toolHandlesInit = true;
510 }
511 
514  initToolHandles();
515 
516  return m_tools;
517 }
518 
521  initToolHandles();
522 
523  return m_tools;
524 }
525 
526 //------------------------------------------------------------------------------
530  bool createIf,
531  const InterfaceID& iid,
532  void** ppSvc) const {
533  const ServiceLocatorHelper helper(*serviceLocator(), *this);
534  return helper.getService(svcName, createIf, iid, ppSvc);
535 }
536 
537 //------------------------------------------------------------------------------
540  const std::string& svcName,
541  const InterfaceID& iid,
542  void** ppSvc) const {
543  const ServiceLocatorHelper helper(*serviceLocator(), *this);
544  return helper.createService(svcType, svcName, iid, ppSvc);
545 }
546 
547 SmartIF<IService> AlgTool::service(const std::string& name, const bool createIf, const bool quiet) const {
548  const ServiceLocatorHelper helper(*serviceLocator(), *this);
549  return helper.service(name, quiet, createIf);
550 }
551 
552 //-----------------------------------------------------------------------------
554 //---------------------------------------------------------------------------
555  if ( !m_pAuditorSvc ) {
556  m_pAuditorSvc = service( "AuditorSvc", true );
557  if( !m_pAuditorSvc ) {
558  throw GaudiException("Service [AuditorSvc] not found", name(), StatusCode::FAILURE);
559  }
560  }
561  return m_pAuditorSvc.get();
562 }
563 
564 //-----------------------------------------------------------------------------
565 void
567  //-----------------------------------------------------------------------------
568  vis->visit(this);
569 
570  for (auto tool : tools()) {
571  AlgTool *at = dynamic_cast<AlgTool*>(tool);
572  vis->visit(at);
573  }
574 
575 }
576 
577 //-----------------------------------------------------------------------------
578 void
580  //-----------------------------------------------------------------------------
581 
582  for (auto h : m_outputHandles) {
583  h->commit();
584  }
585 
586  for (auto t : m_tools) {
587  AlgTool* at = dynamic_cast<AlgTool*>(t);
588  if (at != 0) at->commitHandles();
589  }
590 
591 }
The interface implemented by the IToolSvc base class.
Definition: IToolSvc.h:18
#define UNLIKELY(x)
Definition: Kernel.h:126
std::vector< IAlgTool * > m_tools
Definition: AlgTool.h:496
std::vector< BaseToolHandle * > m_toolHandles
Definition: AlgTool.h:497
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:487
T empty(T...args)
Define general base for Gaudi exception.
bool m_toolHandlesInit
Definition: AlgTool.h:499
std::string m_type
AlgTool type (concrete class name)
Definition: AlgTool.h:481
void commitHandles() override
Definition: AlgTool.cpp:579
StatusCode initialize() override
Definition: AlgTool.cpp:290
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:529
virtual Property & declareUpdateHandler(std::function< void(Property &)> fun)
set new callback for update
Definition: Property.cpp:72
StatusCode setProperty(const Property &p) override
set the property form another property
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
T endl(T...args)
const IInterface * m_parent
AlgTool parent.
Definition: AlgTool.h:483
IToolSvc * toolSvc() const
The standard ToolSvc service, Return a pointer to the service if present.
Definition: AlgTool.cpp:106
StatusCode sysReinitialize() override
Initialize AlgTool.
Definition: AlgTool.cpp:368
IntegerProperty m_outputLevel
AlgTool output level.
Definition: AlgTool.h:480
T end(T...args)
GAUDI_API Property * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Definition: Property.cpp:278
Data provider interface definition.
~AlgTool() override
Definition: AlgTool.cpp:453
Property manager helper class.
Definition: PropertyMgr.h:37
StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown) override
Query for a given interface.
Definition: AlgTool.cpp:45
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
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 retrieveTool(const std::string &type, T *&tool, const IInterface *parent=nullptr, bool createIf=true)
Retrieve specified tool sub-type with tool dependent part of the name automatically assigned...
Definition: IToolSvc.h:145
StatusCode setProperties()
Method for setting declared properties to the values specified in the jobOptions via the job option s...
Definition: AlgTool.cpp:171
StatusCode sysStart() override
Start AlgTool.
Definition: AlgTool.cpp:300
Gaudi::StateMachine::State FSMState() const override
Definition: AlgTool.h:78
virtual const std::string & name() const =0
Retrieve the name of the instance.
STL class.
StatusCode sysStop() override
Stop AlgTool.
Definition: AlgTool.cpp:323
StatusCode getProperty(Property *p) const override
get the property
bool hasProperty(const std::string &name) const override
Definition: AlgTool.cpp:166
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: AlgTool.cpp:86
std::string m_monitorSvcName
Name to use for Monitor Service.
Definition: AlgTool.h:488
StatusCode finalize() override
Definition: AlgTool.cpp:360
const std::string m_name
AlgTool full name.
Definition: AlgTool.h:482
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)
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:193
SmartIF< PropertyMgr > m_propertyMgr
Property Manager.
Definition: AlgTool.h:490
Main interface for the JobOptions service.
string type
Definition: gaudirun.py:151
StatusCode setProperty(const Property &p) override
Default implementations for IProperty interface.
Definition: AlgTool.cpp:119
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
T what(T...args)
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
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: AlgTool.h:249
Definition of the basic interface.
Definition: IInterface.h:234
const std::vector< Property * > & getProperties() const override
get all properties
std::string m_threadID
Thread Id for Alg Tool.
Definition: AlgTool.h:493
StatusCode service(const std::string &name, T *&svc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: AlgTool.h:195
virtual const std::string & tag() const
name tag for the exception, or exception type
StatusCode restart() override
Definition: AlgTool.cpp:435
SmartIF< IToolSvc > m_ptoolSvc
Tool service.
Definition: AlgTool.h:486
virtual const std::string & type() const =0
The type of an AlgTool, meaning the concrete AlgTool class.
const std::vector< IAlgTool * > & tools() const
Definition: AlgTool.cpp:512
STL class.
const TYPE & value() const
explicit conversion
Definition: Property.h:341
bool m_auditorFinalize
flag for auditors in "finalize()"
Definition: AlgTool.h:517
IDataProviderSvc * evtSvc() const
accessor to event service service
Definition: AlgTool.cpp:95
virtual void acceptDHVisitor(IDataHandleVisitor *) const override
Definition: AlgTool.cpp:566
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: AlgTool.h:511
T get(T...args)
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:74
T find_if(T...args)
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
bool assign(const Property &source) override
get the value from another property
Definition: Property.h:269
Gaudi::StateMachine::State m_state
state of the Tool
Definition: AlgTool.h:521
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
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
std::vector< Gaudi::DataHandle * > m_outputHandles
Definition: AlgTool.h:330
T begin(T...args)
double fun(const std::vector< double > &x)
Definition: PFuncTest.cpp:26
bool m_auditorReinitialize
flag for auditors in "reinitialize()"
Definition: AlgTool.h:518
Base class from which all the concrete tool classes should be derived.
Definition: AlgTool.h:45
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
SmartIF< ISvcLocator > m_svcLocator
Pointer to Service Locator service.
Definition: AlgTool.h:484
string s
Definition: gaudirun.py:245
SmartIF< IDataProviderSvc > m_evtSvc
Event data service.
Definition: AlgTool.h:485
bool hasProperty(const std::string &name) const override
Return true if we have a property with the given name.
tuple item
print s1,s2
Definition: ana.py:146
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool m_auditorRestart
flag for auditors in "restart()"
Definition: AlgTool.h:519
tuple appMgr
Definition: IOTest.py:83
const std::vector< Property * > & getProperties() const override
Definition: AlgTool.cpp:160
const std::string & type() const override
Retrieve type (concrete class) of the sub-algtool.
Definition: AlgTool.cpp:72
SmartIF< IService > service(const std::string &name, const bool quiet=false, const bool createIf=true) const
StatusCode reinitialize() override
Definition: AlgTool.cpp:390
DataObjIDColl m_extInputDataObjs
Definition: AlgTool.h:333
StatusCode stop() override
Definition: AlgTool.cpp:338
BooleanProperty m_auditInit
Definition: AlgTool.h:513
StatusCode sysInitialize() override
Initialize AlgTool.
Definition: AlgTool.cpp:271
bool m_auditorStart
flag for auditors in "start()"
Definition: AlgTool.h:515
Gaudi::StateMachine::State m_targetState
state of the Tool
Definition: AlgTool.h:522
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:21
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
StatusCode getProperty(Property *p) const override
Definition: AlgTool.cpp:140
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
bool m_auditorStop
flag for auditors in "stop()"
Definition: AlgTool.h:516
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.
list i
Definition: ana.py:128
void initToolHandles() const
Definition: AlgTool.cpp:460
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:65
StatusCode getService(const std::string &name, bool createIf, const InterfaceID &iid, void **ppSvc) const
bool m_auditorInitialize
flag for auditors in "initialize()"
Definition: AlgTool.h:514
IAuditorSvc * auditorSvc() const
Access the auditor service.
Definition: AlgTool.cpp:553
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode sysFinalize() override
Finalize AlgTool.
Definition: AlgTool.cpp:346
GAUDI_API std::string getGaudiThreadGenericName(const std::string &name)
helper function to extract Gaudi instance name from thread copy name
Definition: ThreadGaudi.cpp:50
DataObjIDColl m_extOutputDataObjs
Definition: AlgTool.h:333
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: AlgTool.h:498
std::unique_ptr< IDataHandleVisitor > m_updateDataHandles
Hook for for derived classes to provide a custom visitor for data handles.
Definition: AlgTool.h:416
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:413
StatusCode start() override
Definition: AlgTool.cpp:315
const IInterface * parent() const override
Retrieve parent of the sub-algtool.
Definition: AlgTool.cpp:79