| The Gaudi Framework v32r1 (f65d50dc)

Algorithm.h
Go to the documentation of this file.
1 #pragma once
2 // ============================================================================
3 // Include files
4 // ============================================================================
5 #include "GaudiKernel/IAlgorithm.h"
6 #include "GaudiKernel/IMessageSvc.h"
7 #include "GaudiKernel/IProperty.h"
8 #include "GaudiKernel/IService.h"
9 #include "GaudiKernel/IStateful.h"
10 #include "GaudiKernel/ISvcLocator.h"
11 #include "GaudiKernel/ITimelineSvc.h"
12
13 #include <string>
14 #include <vector>
15
16 // Extra include files (forward declarations should be sufficient)
17 #include "GaudiKernel/CommonMessaging.h"
18 #include "GaudiKernel/CounterHolder.h"
19 #include "GaudiKernel/DataObjID.h" // must be include before Property.h, which is included in PropertyHolder.h
20 #include "GaudiKernel/IAlgContextSvc.h"
21 #include "GaudiKernel/IAuditorSvc.h"
22 #include "GaudiKernel/IChronoStatSvc.h"
23 #include "GaudiKernel/IConversionSvc.h"
24 #include "GaudiKernel/IDataProviderSvc.h"
25 #include "GaudiKernel/IExceptionSvc.h"
26 #include "GaudiKernel/IHistogramSvc.h"
27 #include "GaudiKernel/IHiveWhiteBoard.h"
28 #include "GaudiKernel/IMonitorSvc.h"
29 #include "GaudiKernel/INTupleSvc.h"
30 #include "GaudiKernel/IRndmGenSvc.h"
31 #include "GaudiKernel/IToolSvc.h"
32 #include "GaudiKernel/Property.h"
33 #include "GaudiKernel/PropertyHolder.h"
34 #include "GaudiKernel/System.h"
35 #include "GaudiKernel/ToolHandle.h"
36 #include <Gaudi/PluginService.h>
37
38 // For concurrency
39 #include "GaudiKernel/DataHandle.h"
40 #include "GaudiKernel/DataHandleHolderBase.h"
41 #include "GaudiKernel/EventContext.h"
42 #include "GaudiKernel/IAlgExecStateSvc.h"
43
44 class IAlgTool;
45 class ToolHandleInfo;
46 class AlgorithmManager;
47
48 #ifndef PACKAGE_VERSION
49 # define PACKAGE_VERSION "unknown"
50 #endif
51 namespace Gaudi {
52 namespace Details {
53 bool getDefaultAuditorValue( ISvcLocator* loc );
54 }
55
79 class GAUDI_API Algorithm
80 : public DataHandleHolderBase<CounterHolder<
81 PropertyHolder<CommonMessaging<implements<IAlgorithm, IDataHandleHolder, IProperty, IStateful>>>>> {
82 public:
83 #ifndef __REFLEX__
84 typedef Gaudi::PluginService::Factory<IAlgorithm*( const std::string&, ISvcLocator* )> Factory;
85 #endif
86 friend AlgorithmManager;
87
92 Algorithm( const std::string& name, ISvcLocator* svcloc, const std::string& version = PACKAGE_VERSION );
93
99 StatusCode sysStart() override;
100
106 StatusCode sysInitialize() override;
107
113 StatusCode sysReinitialize() override;
114
119 StatusCode sysRestart() override;
120
128 StatusCode sysExecute( const EventContext& ctx ) override;
129
133 StatusCode sysStop() override;
134
139 StatusCode sysFinalize() override;
140
146 StatusCode sysBeginRun() override;
147
153 StatusCode sysEndRun() override;
154
162 const std::string& name() const override;
163 const Gaudi::StringKey& nameKey() const override;
164
167 const std::string& type() const override { return m_type; }
168 void setType( const std::string& type ) override { m_type = type; } // BH, TODO: move to proper place
169
170 const std::string& version() const override;
171
172 unsigned int index() const override;
173
175 StatusCode configure() override { return StatusCode::SUCCESS; }
177 StatusCode terminate() override { return StatusCode::SUCCESS; }
178
180 StatusCode initialize() override { return StatusCode::SUCCESS; }
182 StatusCode start() override { return StatusCode::SUCCESS; }
184 StatusCode stop() override { return StatusCode::SUCCESS; }
186 StatusCode finalize() override { return StatusCode::SUCCESS; }
188 StatusCode reinitialize() override;
190 StatusCode restart() override;
192 Gaudi::StateMachine::State FSMState() const override { return m_state; }
194 Gaudi::StateMachine::State targetFSMState() const override { return m_targetState; }
195
199 [[deprecated( "try using Algorithm::Start instead" )]] StatusCode beginRun() override;
200
202 [[deprecated( "try using Algorithm::Stop instead" )]] StatusCode endRun() override;
203
205 bool isEnabled() const override;
206
208 bool isSequence() const override { return false; }
209
211 unsigned int errorCount() const;
212
214 template <class T>
215 StatusCode service( const std::string& name, T*& psvc, bool createIf = true ) const {
216 return service_i( name, createIf, T::interfaceID(), (void**)&psvc );
217 }
218
220 template <class T>
221 StatusCode service( const std::string& svcType, const std::string& svcName, T*& psvc ) const {
222 return service_i( svcType, svcName, T::interfaceID(), reinterpret_cast<void**>( &psvc ) );
223 }
224
226 SmartIF<IService> service( const std::string& name, const bool createIf = true, const bool quiet = false ) const;
227
228 template <class T>
229 SmartIF<T> service( const std::string& name, bool createIf = true, bool quiet = false ) const {
230 return service( name, createIf, quiet ).as<T>();
231 }
232
236 SmartIF<IAuditorSvc>& auditorSvc() const;
237
241 SmartIF<IChronoStatSvc>& chronoSvc() const;
242 [[deprecated( "use chronoSvc() instead" )]] SmartIF<IChronoStatSvc>& chronoStatService() const {
243 return chronoSvc();
244 }
245
249 SmartIF<IDataProviderSvc>& detSvc() const;
250 [[deprecated( "use detSvc() instead" )]] SmartIF<IDataProviderSvc>& detDataService() const { return detSvc(); }
251
255 SmartIF<IConversionSvc>& detCnvSvc() const;
256 [[deprecated( "use detCnvSvc() instead" )]] SmartIF<IConversionSvc>& detDataCnvService() const {
257 return detCnvSvc();
258 }
259
263 SmartIF<IDataProviderSvc>& eventSvc() const;
265 SmartIF<IDataProviderSvc>& evtSvc() const { return eventSvc(); }
266 [[deprecated( "use eventSvc() instead" )]] SmartIF<IDataProviderSvc>& eventDataService() const {
267 return eventSvc();
268 }
269
273 SmartIF<IConversionSvc>& eventCnvSvc() const;
274 [[deprecated( "use eventCnvSvc() instead" )]] SmartIF<IConversionSvc>& eventDataCnvService() const {
275 return eventCnvSvc();
276 }
277
281 SmartIF<IHistogramSvc>& histoSvc() const;
282 [[deprecated( "use histoSvc() instead" )]] SmartIF<IHistogramSvc>& histogramDataService() const {
283 return histoSvc();
284 }
285
289 SmartIF<INTupleSvc>& ntupleSvc() const;
290 [[deprecated( "use ntupleSvc() instead" )]] SmartIF<INTupleSvc>& ntupleService() const { return ntupleSvc(); }
291
295 SmartIF<IRndmGenSvc>& randSvc() const;
296
298 SmartIF<IToolSvc>& toolSvc() const;
299
301 SmartIF<IExceptionSvc>& exceptionSvc() const;
302
304 SmartIF<IAlgContextSvc>& contextSvc() const;
305
306 SmartIF<ITimelineSvc>& timelineSvc() const;
307
313 SmartIF<ISvcLocator>& serviceLocator() const override;
315 SmartIF<ISvcLocator>& svcLoc() const { return serviceLocator(); }
316
317 SmartIF<IHiveWhiteBoard>& whiteboard() const;
318
319 SmartIF<IAlgExecStateSvc>& algExecStateSvc() const;
320
322 bool registerContext() const { return m_registerContext; }
323
331 StatusCode setProperties();
332
333 // ==========================================================================
334 using PropertyHolderImpl::declareProperty;
335
336 // declare Tools to the Algorithms
337 template <class T>
338 Gaudi::Details::PropertyBase* declareProperty( const std::string& name, ToolHandle<T>& hndl,
339 const std::string& doc = "none" ) {
340 this->declareTool( hndl, hndl.typeAndName() ).ignore();
341 return PropertyHolderImpl::declareProperty( name, hndl, doc );
342 }
343
344 // ==========================================================================
345 // declare ToolHandleArrays to the Algorithms
346
347 template <class T>
348 Gaudi::Details::PropertyBase* declareProperty( const std::string& name, ToolHandleArray<T>& hndlArr,
349 const std::string& doc = "none" ) {
350 addToolsArray( hndlArr );
351 return PropertyHolderImpl::declareProperty( name, hndlArr, doc );
352 }
353
354 // ==========================================================================
364 inline SmartIF<IMonitorSvc>& monitorSvc() const {
365 // If not already located try to locate it without forcing a creation
366 if ( !m_pMonitorSvc ) {
367 m_pMonitorSvc = service( m_monitorSvcName, false, true ); // do not create and be quiet
368 }
369 return m_pMonitorSvc;
370 }
371
377 template <class T>
378 void declareInfo( const std::string& name, const T& var, const std::string& desc ) const {
379 IMonitorSvc* mS = monitorSvc().get();
380 if ( mS ) mS->declareInfo( name, var, desc, this );
381 }
382
390 void declareInfo( const std::string& name, const std::string& format, const void* var, int size,
391 const std::string& desc ) const {
392 IMonitorSvc* mS = monitorSvc().get();
393 if ( mS ) mS->declareInfo( name, format, var, size, desc, this );
394 }
395
396 public:
397 void acceptDHVisitor( IDataHandleVisitor* ) const override;
398
399 public:
400 void registerTool( IAlgTool* tool ) const;
401 void deregisterTool( IAlgTool* tool ) const;
402
403 template <class T>
404 StatusCode declareTool( ToolHandle<T>& handle, bool createIf = true ) {
405 return this->declareTool( handle, handle.typeAndName(), createIf );
406 }
407
408 template <class T>
409 StatusCode declareTool( ToolHandle<T>& handle, std::string toolTypeAndName, bool createIf = true ) {
410
411 StatusCode sc = handle.initialize( toolTypeAndName, handle.isPublic() ? nullptr : this, createIf );
412 if ( UNLIKELY( !sc ) ) {
413 throw GaudiException{std::string{"Cannot create handle for "} + ( handle.isPublic() ? "public" : "private" ) +
414 " tool " + toolTypeAndName,
415 name(), sc};
416 }
417
418 m_toolHandles.push_back( &handle );
419
420 return sc;
421 }
422
423 template <class T>
424 void addToolsArray( ToolHandleArray<T>& hndlArr ) {
425 m_toolHandleArrays.push_back( &hndlArr );
426 }
427
428 const std::vector<IAlgTool*>& tools() const;
429
430 // Return the I/O-boundness flag
431 bool isIOBound() const { return m_isIOBound; }
432 // Set the I/O-boundness flag
433 void setIOBound( bool value ) { m_isIOBound = value; }
434
435 protected:
436 std::vector<IAlgTool*>& tools();
437
438 // // adds declared in- and outputs of subAlgorithms to own DOHs
439 // void addSubAlgorithmDataObjectHandles();
440
441 private:
442 // place IAlgTools defined via ToolHandles in m_tools
443 void initToolHandles() const;
444
445 public:
446 // /// Specifies the clonability of the algorithm
447 // bool isClonable() const override { return false; }
448
450 unsigned int cardinality() const override { return m_cardinality; }
451
452 const std::vector<std::string>& neededResources() const override { return m_neededResources; }
453
454 protected:
456 bool isInitialized() const override { return Gaudi::StateMachine::INITIALIZED == m_state; }
457
459 bool isFinalized() const override { return Gaudi::StateMachine::CONFIGURED == m_state; }
460
462 void setIndex( const unsigned int& idx ) override;
463
464 public:
466 AlgExecState& execState( const EventContext& ctx ) const override;
467
469 std::ostream& toControlFlowExpression( std::ostream& os ) const override;
470
471 private:
472 unsigned int maxErrors() const { return m_errorMax; }
473
474 protected:
475 bool isReEntrant() const override { return true; }
476
477 private:
478 Gaudi::StringKey m_name;
479 std::string m_type;
480 std::string m_version;
481 unsigned int m_index = 0;
482
483 // tools used by algorithm
484 mutable std::vector<IAlgTool*> m_tools;
485 mutable std::vector<BaseToolHandle*> m_toolHandles;
486 mutable std::vector<GaudiHandleArrayBase*> m_toolHandleArrays;
487
488 private:
489 template <typename IFace>
490 SmartIF<IFace>& get_svc_( SmartIF<IFace>& p, const char* service_name ) const;
491
492 mutable SmartIF<IMessageSvc> m_MS;
493 mutable SmartIF<IDataProviderSvc> m_EDS;
494 mutable SmartIF<IHiveWhiteBoard> m_WB;
495 mutable SmartIF<IConversionSvc> m_ECS;
496 mutable SmartIF<IDataProviderSvc> m_DDS;
497 mutable SmartIF<IConversionSvc> m_DCS;
498 mutable SmartIF<IHistogramSvc> m_HDS;
499 mutable SmartIF<INTupleSvc> m_NTS;
500 mutable SmartIF<IChronoStatSvc> m_CSS;
501 mutable SmartIF<IRndmGenSvc> m_RGS;
502 mutable SmartIF<IExceptionSvc> m_EXS;
503 mutable SmartIF<IAuditorSvc> m_pAuditorSvc;
504 mutable SmartIF<IToolSvc> m_ptoolSvc;
505 mutable SmartIF<IMonitorSvc> m_pMonitorSvc;
506 mutable SmartIF<IAlgContextSvc> m_contextSvc;
507
508 mutable SmartIF<ITimelineSvc> m_timelineSvc;
509 mutable SmartIF<IAlgExecStateSvc> m_aess;
510
511 SmartIF<ISvcLocator> m_pSvcLocator;
512
513 protected:
515 std::unique_ptr<IDataHandleVisitor> m_updateDataHandles;
516
517 private:
518 // Properties
519 Gaudi::Property<int> m_outputLevel{
520 this, "OutputLevel", MSG::NIL,
521 [this]( Gaudi::Details::PropertyBase& ) { this->updateMsgStreamOutputLevel( this->m_outputLevel ); },
522 "output level"};
523 Gaudi::Property<bool> m_isEnabled{this, "Enable", true, "should the algorithm be executed or not"};
524
525 Gaudi::Property<unsigned int> m_errorMax{this, "ErrorMax", 1, "[[deprecated]] max number of errors"};
526
527 Gaudi::Property<bool> m_auditInit{this, "AuditAlgorithms", Details::getDefaultAuditorValue( m_pSvcLocator ),
528 "[[deprecated]] unused"};
529 Gaudi::Property<bool> m_auditorInitialize{this, "AuditInitialize", m_auditInit.value(),
530 "trigger auditor on initialize()"};
531 Gaudi::Property<bool> m_auditorReinitialize{this, "AuditReinitialize", m_auditInit.value(),
532 "trigger auditor on reinitialize()"};
533 Gaudi::Property<bool> m_auditorRestart{this, "AuditRestart", m_auditInit.value(), "trigger auditor on restart()"};
534 Gaudi::Property<bool> m_auditorExecute{this, "AuditExecute", m_auditInit.value(), "trigger auditor on execute()"};
535 Gaudi::Property<bool> m_auditorFinalize{this, "AuditFinalize", m_auditInit.value(),
536 "trigger auditor on finalize()"};
537 Gaudi::Property<bool> m_auditorBeginRun{this, "AuditBeginRun", m_auditInit.value(),
538 "trigger auditor on beginRun()"};
539 Gaudi::Property<bool> m_auditorEndRun{this, "AuditEndRun", m_auditInit.value(), "trigger auditor on endRun()"};
540 Gaudi::Property<bool> m_auditorStart{this, "AuditStart", m_auditInit.value(), "trigger auditor on start()"};
541 Gaudi::Property<bool> m_auditorStop{this, "AuditStop", m_auditInit.value(), "trigger auditor on stop()"};
542
543 Gaudi::Property<bool> m_doTimeline{this, "Timeline", true, "send events to TimelineSvc"};
544
545 Gaudi::Property<std::string> m_monitorSvcName{this, "MonitorService", "MonitorSvc",
546 "name to use for Monitor Service"};
547
548 Gaudi::Property<bool> m_registerContext{this, "RegisterForContextService", false,
549 "flag to enforce the registration for Algorithm Context Service"};
550
551 Gaudi::Property<int> m_cardinality{this, "Cardinality", 0, "how many clones to create - 0 means algo is reentrant"};
552 Gaudi::Property<std::vector<std::string>> m_neededResources{
553 this, "NeededResources", {}, "named resources needed during event looping"};
554
555 Gaudi::Property<bool> m_isIOBound{this, "IsIOBound", false,
556 "if the algorithm is I/O-bound (in the broad sense of Von Neumann bottleneck)"};
557
558 // The default should be changed to "false" for v29
559 Gaudi::Property<bool> m_filterCircDeps{this, "FilterCircularDependencies", true,
560 "filter out circular data dependencies"};
561
562 mutable bool m_toolHandlesInit = false;
563
564 Gaudi::StateMachine::State m_state = Gaudi::StateMachine::CONFIGURED;
565 Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::CONFIGURED;
566 bool m_isFinalized;
567
569 bool m_beginRunCalled;
570 bool m_endRunCalled;
571
573 StatusCode service_i( const std::string& svcName, bool createIf, const InterfaceID& iid, void** ppSvc ) const;
574 StatusCode service_i( const std::string& svcType, const std::string& svcName, const InterfaceID& iid,
575 void** ppSvc ) const;
576
578 Algorithm( const Algorithm& a ) = delete;
579
581 Algorithm& operator=( const Algorithm& rhs ) = delete;
582 };
583 } // namespace Gaudi
ToolHandle::typeAndName
std::string typeAndName() const override
Definition: ToolHandle.h:260
Gaudi::Algorithm::declareTool
StatusCode declareTool(ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
Definition: Algorithm.h:409
Gaudi::Algorithm::m_pAuditorSvc
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: Algorithm.h:503
AlgorithmManager
The AlgorithmManager class is in charge of the creation of concrete instances of Algorithms.
Definition: AlgorithmManager.h:31
System.h
Gaudi::Algorithm::addToolsArray
void addToolsArray(ToolHandleArray< T > &hndlArr)
Definition: Algorithm.h:424
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:96
details::size
constexpr auto size(const T &, Args &&...) noexcept
Definition: AnyDataWrapper.h:14
PropertyHolder.h
Gaudi::Algorithm::service
StatusCode service(const std::string &svcType, const std::string &svcName, T *&psvc) const
Access a service by name and type, creating it if it doesn't already exist.
Definition: Algorithm.h:221
Gaudi::Algorithm::m_aess
SmartIF< IAlgExecStateSvc > m_aess
Alg execution state mgr.
Definition: Algorithm.h:509
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
Gaudi::Algorithm::isIOBound
bool isIOBound() const
Definition: Algorithm.h:431
SmartIF< IService >
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109
Gaudi::StateMachine::CONFIGURED
Definition: StateMachine.h:14
IAlgExecStateSvc.h
Gaudi::Algorithm::m_updateDataHandles
std::unique_ptr< IDataHandleVisitor > m_updateDataHandles
Hook for for derived classes to provide a custom visitor for data handles.
Definition: Algorithm.h:515
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:352
AtlasMCRecoFullPrecedenceDump.whiteboard
whiteboard
Definition: AtlasMCRecoFullPrecedenceDump.py:27
Gaudi::Algorithm::m_EXS
SmartIF< IExceptionSvc > m_EXS
Exception Handler Service.
Definition: Algorithm.h:502
Gaudi::Algorithm::start
StatusCode start() override
the default (empty) implementation of IStateful::start() method
Definition: Algorithm.h:182
Gaudi::Algorithm::m_contextSvc
SmartIF< IAlgContextSvc > m_contextSvc
Algorithm Context Service.
Definition: Algorithm.h:506
IAlgorithm.h
IAuditorSvc.h
Gaudi::Algorithm::eventDataCnvService
SmartIF< IConversionSvc > & eventDataCnvService() const
Definition: Algorithm.h:274
Gaudi::Algorithm::m_CSS
SmartIF< IChronoStatSvc > m_CSS
Chrono & Stat Service.
Definition: Algorithm.h:500
Gaudi::Algorithm::declareInfo
void declareInfo(const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const
Declare monitoring information (special case)
Definition: Algorithm.h:390
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
Gaudi::Algorithm::isReEntrant
bool isReEntrant() const override
Definition: Algorithm.h:475
Gaudi::Algorithm::evtSvc
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
Definition: Algorithm.h:265
EventContext.h
ToolHandleArray
Array of Handles to be used in lieu of vector of naked pointers to tools.
Definition: ToolHandle.h:350
Gaudi::Algorithm::m_DDS
SmartIF< IDataProviderSvc > m_DDS
Detector data service.
Definition: Algorithm.h:496
Gaudi::Algorithm::detDataCnvService
SmartIF< IConversionSvc > & detDataCnvService() const
Definition: Algorithm.h:256
Gaudi::Algorithm::m_endRunCalled
bool m_endRunCalled
Definition: Algorithm.h:570
Gaudi::Algorithm::histogramDataService
SmartIF< IHistogramSvc > & histogramDataService() const
Definition: Algorithm.h:282
Gaudi::Algorithm::detDataService
SmartIF< IDataProviderSvc > & detDataService() const
Definition: Algorithm.h:250
Gaudi::StateMachine::State
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm,...
Definition: StateMachine.h:12
Gaudi::Algorithm::declareInfo
void declareInfo(const std::string &name, const T &var, const std::string &desc) const
Declare monitoring information.
Definition: Algorithm.h:378
Gaudi::Algorithm::m_ptoolSvc
SmartIF< IToolSvc > m_ptoolSvc
ToolSvc Service.
Definition: Algorithm.h:504
IToolSvc.h
EventContext
This class represents an entry point to all the event specific data.
Definition: EventContext.h:24
Gaudi::StringKey
The helper class to represent the efficient "key" for access.
Definition: StringKey.h:34
Gaudi::Algorithm::eventDataService
SmartIF< IDataProviderSvc > & eventDataService() const
Definition: Algorithm.h:266
std::string
STL class.
CounterHolder.h
Gaudi::Algorithm::monitorSvc
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
Definition: Algorithm.h:364
Gaudi::Algorithm::setType
void setType(const std::string &type) override
Definition: Algorithm.h:168
InterfaceID
Interface ID class.
Definition: IInterface.h:29
PACKAGE_VERSION
#define PACKAGE_VERSION
Definition: Algorithm.h:49
Gaudi::Algorithm::initialize
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Definition: Algorithm.h:180
Gaudi::Algorithm::m_version
std::string m_version
Algorithm's version.
Definition: Algorithm.h:480
Gaudi::Algorithm::declareTool
StatusCode declareTool(ToolHandle< T > &handle, bool createIf=true)
Definition: Algorithm.h:404
IDataProviderSvc.h
Gaudi::Algorithm::service
SmartIF< T > service(const std::string &name, bool createIf=true, bool quiet=false) const
Definition: Algorithm.h:229
Gaudi::Algorithm::declareProperty
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
Definition: Algorithm.h:338
IMonitorSvc
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:23
Gaudi::Algorithm::service
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Algorithm.h:215
Gaudi::Details::getDefaultAuditorValue
bool getDefaultAuditorValue(ISvcLocator *loc)
Definition: Algorithm.cpp:36
Gaudi::Algorithm::m_ECS
SmartIF< IConversionSvc > m_ECS
Event conversion service.
Definition: Algorithm.h:495
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
ToolHandleInfo::isPublic
bool isPublic() const noexcept
Definition: ToolHandle.h:40
Gaudi::Property::value
const ValueType & value() const
Backward compatibility (.
Definition: Property.h:526
Gaudi::Algorithm::type
const std::string & type() const override
The type of the algorithm object.
Definition: Algorithm.h:167
gaudirun.type
type
Definition: gaudirun.py:142
ITimelineSvc.h
Gaudi::Algorithm::setIOBound
void setIOBound(bool value)
Definition: Algorithm.h:433
Gaudi::Algorithm::m_HDS
SmartIF< IHistogramSvc > m_HDS
Histogram data service.
Definition: Algorithm.h:498
DataHandleHolderBase
Definition: DataHandleHolderBase.h:24
CommonMessaging.h
Gaudi::Algorithm::m_MS
SmartIF< IMessageSvc > m_MS
Message service.
Definition: Algorithm.h:492
Gaudi::Algorithm::finalize
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
Definition: Algorithm.h:186
Gaudi::Algorithm::m_pSvcLocator
SmartIF< ISvcLocator > m_pSvcLocator
Pointer to service locator service.
Definition: Algorithm.h:511
Gaudi::Algorithm::terminate
StatusCode terminate() override
Dummy implementation of IStateful::terminate() method.
Definition: Algorithm.h:177
Gaudi::Algorithm::Factory
Gaudi::PluginService::Factory< IAlgorithm *(const std::string &, ISvcLocator *)> Factory
Definition: Algorithm.h:84
Gaudi::Algorithm::m_tools
std::vector< IAlgTool * > m_tools
Definition: Algorithm.h:484
MSG::NIL
Definition: IMessageSvc.h:15
Gaudi::Algorithm::m_DCS
SmartIF< IConversionSvc > m_DCS
Detector conversion service.
Definition: Algorithm.h:497
IMessageSvc.h
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
Gaudi::Algorithm::m_EDS
SmartIF< IDataProviderSvc > m_EDS
Event data service.
Definition: Algorithm.h:493
Gaudi::Algorithm::declareProperty
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
Definition: Algorithm.h:348
IStateful.h
Gaudi::Algorithm::registerContext
bool registerContext() const
register for Algorithm Context Service?
Definition: Algorithm.h:322
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:28
IService.h
DataHandleHolderBase.h
DataObjID.h
Gaudi::Algorithm::neededResources
const std::vector< std::string > & neededResources() const override
Definition: Algorithm.h:452
Gaudi::Algorithm::m_beginRunCalled
bool m_beginRunCalled
temporary flags to check if derived class's begin/endRun methods called
Definition: Algorithm.h:569
Gaudi::Algorithm::m_NTS
SmartIF< INTupleSvc > m_NTS
N tuple service.
Definition: Algorithm.h:499
IMonitorSvc.h
PluginService.h
IDataHandleVisitor
Definition: IDataHandleHolder.h:35
ToolHandle
Handle to be used in lieu of naked pointers to tools.
Definition: ToolHandle.h:125
ToolHandle::initialize
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:200
IAlgContextSvc.h
Gaudi::Algorithm::m_RGS
SmartIF< IRndmGenSvc > m_RGS
Random Number Generator Service.
Definition: Algorithm.h:501
Gaudi::Algorithm::isInitialized
bool isInitialized() const override
Has the Algorithm already been initialized?
Definition: Algorithm.h:456
IProperty.h
std::vector< IAlgTool * >
IRndmGenSvc.h
IMonitorSvc::declareInfo
virtual void declareInfo(const std::string &name, const bool &var, const std::string &desc, const IInterface *owner)=0
Declare monitoring information.
std::unique_ptr< IDataHandleVisitor >
IConversionSvc.h
IHiveWhiteBoard.h
Property.h
Gaudi::Algorithm::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: Algorithm.h:505
Gaudi::Algorithm::m_type
std::string m_type
Algorithm's type.
Definition: Algorithm.h:479
IAlgTool
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
ToolHandle.h
Gaudi::Algorithm::maxErrors
unsigned int maxErrors() const
Definition: Algorithm.h:472
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:79
Gaudi::Algorithm::svcLoc
SmartIF< ISvcLocator > & svcLoc() const
shortcut for method serviceLocator
Definition: Algorithm.h:315
Gaudi::Algorithm::AlgorithmManager
friend AlgorithmManager
Definition: Algorithm.h:86
Gaudi::Algorithm::m_timelineSvc
SmartIF< ITimelineSvc > m_timelineSvc
Timeline Service.
Definition: Algorithm.h:508
Gaudi::Algorithm::isSequence
bool isSequence() const override
Are we a Sequence?
Definition: Algorithm.h:208
Gaudi::Algorithm::FSMState
Gaudi::StateMachine::State FSMState() const override
returns the current state of the algorithm
Definition: Algorithm.h:192
Gaudi::Algorithm::m_name
Gaudi::StringKey m_name
Algorithm's name for identification.
Definition: Algorithm.h:478
IChronoStatSvc.h
Gaudi::Algorithm::isFinalized
bool isFinalized() const override
Has the Algorithm already been finalized?
Definition: Algorithm.h:459
Gaudi::Algorithm::m_WB
SmartIF< IHiveWhiteBoard > m_WB
Event data service (whiteboard)
Definition: Algorithm.h:494
Gaudi::Algorithm::m_isFinalized
bool m_isFinalized
Algorithm has been finalized flag.
Definition: Algorithm.h:566
DataHandle.h
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71
Gaudi::Algorithm::cardinality
unsigned int cardinality() const override
Return the cardinality.
Definition: Algorithm.h:450
Gaudi::Algorithm::configure
StatusCode configure() override
Dummy implementation of IStateful::configure() method.
Definition: Algorithm.h:175
AlgExecState
Definition: IAlgExecStateSvc.h:27
Gaudi::Algorithm::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: Algorithm.h:486
std::ostream
STL class.
ISvcLocator.h
Gaudi::Algorithm::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: Algorithm.h:485
Gaudi::Algorithm::stop
StatusCode stop() override
the default (empty) implementation of IStateful::stop() method
Definition: Algorithm.h:184
Gaudi::Algorithm::targetFSMState
Gaudi::StateMachine::State targetFSMState() const override
returns the state the algorithm will be in after the ongoing transition
Definition: Algorithm.h:194
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
Gaudi::Algorithm::chronoStatService
SmartIF< IChronoStatSvc > & chronoStatService() const
Definition: Algorithm.h:242
ToolHandleInfo
General info and helper functions for toolhandles and arrays.
Definition: ToolHandle.h:31
Gaudi::Algorithm::ntupleService
SmartIF< INTupleSvc > & ntupleService() const
Definition: Algorithm.h:290
IExceptionSvc.h
INTupleSvc.h
IHistogramSvc.h