| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Algorithm.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_ALGORITHM_H
2 #define GAUDIKERNEL_ALGORITHM_H
3 // ============================================================================
4 // Include files
5 // ============================================================================
6 #include "GaudiKernel/IAlgorithm.h"
7 #include "GaudiKernel/IMessageSvc.h"
8 #include "GaudiKernel/IProperty.h"
9 #include "GaudiKernel/IService.h"
10 #include "GaudiKernel/IStateful.h"
11 #include "GaudiKernel/ISvcLocator.h"
12 #include "GaudiKernel/ITimelineSvc.h"
13 #include "GaudiKernel/PropertyHolder.h"
14
15 #include <mutex>
16 #include <string>
17 #include <vector>
18
19 // Extra include files (forward declarations should be sufficient)
20 #include "GaudiKernel/CommonMessaging.h"
21 #include "GaudiKernel/IAlgContextSvc.h"
22 #include "GaudiKernel/IAuditorSvc.h"
23 #include "GaudiKernel/IChronoStatSvc.h"
24 #include "GaudiKernel/IConversionSvc.h"
25 #include "GaudiKernel/IDataProviderSvc.h"
26 #include "GaudiKernel/IExceptionSvc.h"
27 #include "GaudiKernel/IHistogramSvc.h"
28 #include "GaudiKernel/IHiveWhiteBoard.h"
29 #include "GaudiKernel/IMonitorSvc.h"
30 #include "GaudiKernel/INTupleSvc.h"
31 #include "GaudiKernel/IRndmGenSvc.h"
32 #include "GaudiKernel/IToolSvc.h"
33 #include "GaudiKernel/Property.h"
34 #include "GaudiKernel/System.h"
35 #include "GaudiKernel/ToolHandle.h"
36 #include <Gaudi/PluginService.h>
37
38 #include "GaudiKernel/DataObjIDProperty.h"
39
40 // For concurrency
41 #include "GaudiKernel/DataHandle.h"
42 #include "GaudiKernel/DataHandleHolderBase.h"
43 #include "GaudiKernel/EventContext.h"
44 #include "GaudiKernel/IAlgExecStateSvc.h"
45
46 class IAlgTool;
47 class ToolHandleInfo;
48
49 #ifndef PACKAGE_VERSION
50 #define PACKAGE_VERSION "unknown"
51 #endif
52
78 class GAUDI_API Algorithm
79 : public DataHandleHolderBase<
80 PropertyHolder<CommonMessaging<implements<IAlgorithm, IDataHandleHolder, IProperty, IStateful>>>>
81 {
82 public:
83 #ifndef __REFLEX__
84 typedef Gaudi::PluginService::Factory<IAlgorithm*, const std::string&, ISvcLocator*> Factory;
85 #endif
86
91 Algorithm( const std::string& name, ISvcLocator* svcloc, const std::string& version = PACKAGE_VERSION );
92
98 StatusCode sysStart() override;
99
105 StatusCode sysInitialize() override;
106
112 StatusCode sysReinitialize() override;
113
118 StatusCode sysRestart() override;
119
127 StatusCode sysExecute( const EventContext& ctx ) override;
128
132 StatusCode sysStop() override;
133
138 StatusCode sysFinalize() override;
139
145 StatusCode sysBeginRun() override;
146
152 StatusCode sysEndRun() override;
153
161 const std::string& name() const override;
162 const Gaudi::StringKey& nameKey() const override;
163
166 const std::string& type() const override { return m_type; }
167 void setType( const std::string& type ) override { m_type = type; } // BH, TODO: move to proper place
168
169 const std::string& version() const override;
170
171 unsigned int index() const override;
172
174 StatusCode configure() override { return StatusCode::SUCCESS; }
176 StatusCode terminate() override { return StatusCode::SUCCESS; }
177
179 StatusCode initialize() override { return StatusCode::SUCCESS; }
181 StatusCode start() override { return StatusCode::SUCCESS; }
183 StatusCode stop() override { return StatusCode::SUCCESS; }
185 StatusCode finalize() override { return StatusCode::SUCCESS; }
187 StatusCode reinitialize() override;
189 StatusCode restart() override;
191 Gaudi::StateMachine::State FSMState() const override { return m_state; }
193 Gaudi::StateMachine::State targetFSMState() const override { return m_targetState; }
194
196 bool isExecuted() const override;
197
199 void setExecuted( bool state ) const override;
200
204 void resetExecuted() override;
205
209 StatusCode beginRun() override;
210
212 StatusCode endRun() override;
213
215 bool isEnabled() const override;
216
218 bool isSequence() const override { return false; }
219
221 bool filterPassed() const override;
222
224 void setFilterPassed( bool state ) const override;
225
227 unsigned int errorCount() const;
228
230 template <class T>
231 StatusCode service( const std::string& name, T*& psvc, bool createIf = true ) const
232 {
233 return service_i( name, createIf, T::interfaceID(), (void**)&psvc );
234 }
235
237 template <class T>
238 StatusCode service( const std::string& svcType, const std::string& svcName, T*& psvc ) const
239 {
240 return service_i( svcType, svcName, T::interfaceID(), (void**)&psvc );
241 }
242
244 SmartIF<IService> service( const std::string& name, const bool createIf = true, const bool quiet = false ) const;
245
246 template <class T>
247 SmartIF<T> service( const std::string& name, bool createIf = true, bool quiet = false ) const
248 {
249 return service( name, createIf, quiet ).as<T>();
250 }
251
255 SmartIF<IAuditorSvc>& auditorSvc() const;
256
260 SmartIF<IChronoStatSvc>& chronoSvc() const;
261 [[deprecated( "use chronoSvc() instead" )]] SmartIF<IChronoStatSvc>& chronoStatService() const { return chronoSvc(); }
262
266 SmartIF<IDataProviderSvc>& detSvc() const;
267 [[deprecated( "use detSvc() instead" )]] SmartIF<IDataProviderSvc>& detDataService() const { return detSvc(); }
268
272 SmartIF<IConversionSvc>& detCnvSvc() const;
273 [[deprecated( "use detCnvSvc() instead" )]] SmartIF<IConversionSvc>& detDataCnvService() const { return detCnvSvc(); }
274
278 SmartIF<IDataProviderSvc>& eventSvc() const;
280 SmartIF<IDataProviderSvc>& evtSvc() const { return eventSvc(); }
281 [[deprecated( "use eventSvc() instead" )]] SmartIF<IDataProviderSvc>& eventDataService() const { return eventSvc(); }
282
286 SmartIF<IConversionSvc>& eventCnvSvc() const;
287 [[deprecated( "use eventCnvSvc() instead" )]] SmartIF<IConversionSvc>& eventDataCnvService() const
288 {
289 return eventCnvSvc();
290 }
291
295 SmartIF<IHistogramSvc>& histoSvc() const;
296 [[deprecated( "use histoSvc() instead" )]] SmartIF<IHistogramSvc>& histogramDataService() const { return histoSvc(); }
297
301 SmartIF<INTupleSvc>& ntupleSvc() const;
302 [[deprecated( "use ntupleSvc() instead" )]] SmartIF<INTupleSvc>& ntupleService() const { return ntupleSvc(); }
303
307 SmartIF<IRndmGenSvc>& randSvc() const;
308
310 SmartIF<IToolSvc>& toolSvc() const;
311
313 SmartIF<IExceptionSvc>& exceptionSvc() const;
314
316 SmartIF<IAlgContextSvc>& contextSvc() const;
317
318 SmartIF<ITimelineSvc>& timelineSvc() const;
319
325 SmartIF<ISvcLocator>& serviceLocator() const override;
327 SmartIF<ISvcLocator>& svcLoc() const { return serviceLocator(); }
328
329 SmartIF<IHiveWhiteBoard>& whiteboard() const;
330
331 SmartIF<IAlgExecStateSvc>& algExecStateSvc() const;
332
334 bool registerContext() const { return m_registerContext; }
335
348 StatusCode createSubAlgorithm( const std::string& type, const std::string& name, Algorithm*& pSubAlg );
349
351 const std::vector<Algorithm*>* subAlgorithms() const;
352
354 std::vector<Algorithm*>* subAlgorithms();
355
363 StatusCode setProperties();
364
365 // ==========================================================================
366 using PropertyHolderImpl::declareProperty;
367
368 // declare Tools to the Algorithms
369 template <class T>
370 Gaudi::Details::PropertyBase* declareProperty( const std::string& name, ToolHandle<T>& hndl,
371 const std::string& doc = "none" )
372 {
373 this->declareTool( hndl, hndl.typeAndName() ).ignore();
374 return PropertyHolderImpl::declareProperty( name, hndl, doc );
375 }
376
377 // ==========================================================================
378 // declare ToolHandleArrays to the Algorithms
379
380 template <class T>
381 Gaudi::Details::PropertyBase* declareProperty( const std::string& name, ToolHandleArray<T>& hndlArr,
382 const std::string& doc = "none" )
383 {
384 addToolsArray( hndlArr );
385 return PropertyHolderImpl::declareProperty( name, hndlArr, doc );
386 }
387
388 // ==========================================================================
398 inline SmartIF<IMonitorSvc>& monitorSvc() const
399 {
400 // If not already located try to locate it without forcing a creation
401 if ( !m_pMonitorSvc ) {
402 m_pMonitorSvc = service( m_monitorSvcName, false, true ); // do not create and be quiet
403 }
404 return m_pMonitorSvc;
405 }
406
412 template <class T>
413 void declareInfo( const std::string& name, const T& var, const std::string& desc ) const
414 {
415 IMonitorSvc* mS = monitorSvc().get();
416 if ( mS ) mS->declareInfo( name, var, desc, this );
417 }
418
426 void declareInfo( const std::string& name, const std::string& format, const void* var, int size,
427 const std::string& desc ) const
428 {
429 IMonitorSvc* mS = monitorSvc().get();
430 if ( mS ) mS->declareInfo( name, format, var, size, desc, this );
431 }
432
433 public:
434 // For concurrency
436 const EventContext& getContext() const override { return m_event_context; }
437
438 public:
439 virtual void acceptDHVisitor( IDataHandleVisitor* ) const override;
440
441 void commitHandles() override;
442
443 public:
444 void registerTool( IAlgTool* tool ) const;
445 void deregisterTool( IAlgTool* tool ) const;
446
447 template <class T>
448 StatusCode declareTool( ToolHandle<T>& handle, std::string toolTypeAndName, bool createIf = true )
449 {
450
451 StatusCode sc = handle.initialize( toolTypeAndName, handle.isPublic() ? nullptr : this, createIf );
452 if ( UNLIKELY( !sc ) ) {
453 throw GaudiException{std::string{"Cannot create handle for "} + ( handle.isPublic() ? "public" : "private" ) +
454 " tool " + toolTypeAndName,
455 name(), sc};
456 }
457
458 m_toolHandles.push_back( &handle );
459
460 return sc;
461 }
462
463 template <class T>
464 void addToolsArray( ToolHandleArray<T>& hndlArr )
465 {
466 m_toolHandleArrays.push_back( &hndlArr );
467 }
468
469 const std::vector<IAlgTool*>& tools() const;
470
471 // Return the I/O-boundness flag
472 bool isIOBound() const { return m_isIOBound; }
473 // Set the I/O-boundness flag
474 void setIOBound( bool value ) { m_isIOBound = value; }
475
476 protected:
477 std::vector<IAlgTool*>& tools();
478
479 // // adds declared in- and outputs of subAlgorithms to own DOHs
480 // void addSubAlgorithmDataObjectHandles();
481
482 private:
483 // place IAlgTools defined via ToolHandles in m_tools
484 void initToolHandles() const;
485
486 public:
487 // /// Specifies the clonability of the algorithm
488 // bool isClonable() const override { return false; }
489
491 unsigned int cardinality() const override { return m_cardinality; }
492
493 const std::vector<std::string>& neededResources() const override { return m_neededResources; }
494
495 protected:
497 bool isInitialized() const override { return Gaudi::StateMachine::INITIALIZED == m_state; }
498
500 bool isFinalized() const override { return Gaudi::StateMachine::CONFIGURED == m_state; }
501
503 void setIndex( const unsigned int& idx ) override;
504
505 public:
507 std::ostream& toControlFlowExpression( std::ostream& os ) const override;
508
509 private:
510 unsigned int maxErrors() const { return m_errorMax; }
511
512 private:
513 Gaudi::StringKey m_name;
514 std::string m_type;
515 std::string m_version;
516 unsigned int m_index;
517 EventContext m_event_context;
518 std::vector<Algorithm*> m_subAlgms;
519
520 // tools used by algorithm
521 mutable std::vector<IAlgTool*> m_tools;
522 mutable std::vector<BaseToolHandle*> m_toolHandles;
523 mutable std::vector<GaudiHandleArrayBase*> m_toolHandleArrays;
524
525 private:
526 template <typename IFace>
527 SmartIF<IFace>& get_svc_( SmartIF<IFace>& p, const char* service_name ) const;
528
529 mutable SmartIF<IMessageSvc> m_MS;
530 mutable SmartIF<IDataProviderSvc> m_EDS;
531 mutable SmartIF<IHiveWhiteBoard> m_WB;
532 mutable SmartIF<IConversionSvc> m_ECS;
533 mutable SmartIF<IDataProviderSvc> m_DDS;
534 mutable SmartIF<IConversionSvc> m_DCS;
535 mutable SmartIF<IHistogramSvc> m_HDS;
536 mutable SmartIF<INTupleSvc> m_NTS;
537 mutable SmartIF<IChronoStatSvc> m_CSS;
538 mutable SmartIF<IRndmGenSvc> m_RGS;
539 mutable SmartIF<IExceptionSvc> m_EXS;
540 mutable SmartIF<IAuditorSvc> m_pAuditorSvc;
541 mutable SmartIF<IToolSvc> m_ptoolSvc;
542 mutable SmartIF<IMonitorSvc> m_pMonitorSvc;
543 mutable SmartIF<IAlgContextSvc> m_contextSvc;
544
545 mutable SmartIF<ITimelineSvc> m_timelineSvc;
546 mutable SmartIF<IAlgExecStateSvc> m_aess;
547
548 SmartIF<ISvcLocator> m_pSvcLocator;
549
550 protected:
552 std::unique_ptr<IDataHandleVisitor> m_updateDataHandles;
553
554 private:
555 // Properties
556 Gaudi::Property<int> m_outputLevel{this, "OutputLevel", MSG::NIL, "output level"};
557 Gaudi::Property<bool> m_isEnabled{this, "Enable", true, "should the algorithm be executed or not"};
558
559 Gaudi::Property<unsigned int> m_errorMax{this, "ErrorMax", 1, "[[deprecated]] max number of errors"};
560
561 Gaudi::Property<bool> m_auditInit{this, "AuditAlgorithms", false, "[[deprecated]] unused"};
562 Gaudi::Property<bool> m_auditorInitialize{this, "AuditInitialize", false, "trigger auditor on initialize()"};
563 Gaudi::Property<bool> m_auditorReinitialize{this, "AuditReinitialize", false, "trigger auditor on reinitialize()"};
564 Gaudi::Property<bool> m_auditorRestart{this, "AuditRestart", false, "trigger auditor on restart()"};
565 Gaudi::Property<bool> m_auditorExecute{this, "AuditExecute", false, "trigger auditor on execute()"};
566 Gaudi::Property<bool> m_auditorFinalize{this, "AuditFinalize", false, "trigger auditor on finalize()"};
567 Gaudi::Property<bool> m_auditorBeginRun{this, "AuditBeginRun", false, "trigger auditor on beginRun()"};
568 Gaudi::Property<bool> m_auditorEndRun{this, "AuditEndRun", false, "trigger auditor on endRun()"};
569 Gaudi::Property<bool> m_auditorStart{this, "AuditStart", false, "trigger auditor on start()"};
570 Gaudi::Property<bool> m_auditorStop{this, "AuditStop", false, "trigger auditor on stop()"};
571
572 Gaudi::Property<bool> m_doTimeline{this, "Timeline", true, "send events to TimelineSvc"};
573
574 Gaudi::Property<std::string> m_monitorSvcName{this, "MonitorService", "MonitorSvc",
575 "name to use for Monitor Service"};
576
577 Gaudi::Property<bool> m_registerContext{this, "RegisterForContextService", false,
578 "flag to enforce the registration for Algorithm Context Service"};
579
580 Gaudi::Property<int> m_cardinality{this, "Cardinality", 1, "how many clones to create - 0 means algo is reentrant"};
581 Gaudi::Property<std::vector<std::string>> m_neededResources{
582 this, "NeededResources", {}, "named resources needed during event looping"};
583
584 Gaudi::Property<bool> m_isIOBound{this, "IsIOBound", false,
585 "if the algorithm is I/O-bound (in the broad sense of Von Neumann bottleneck)"};
586
587 // The default should be changed to "false" for v29
588 Gaudi::Property<bool> m_filterCircDeps{this, "FilterCircularDependencies", true,
589 "filter out circular data dependencies"};
590
591 std::mutex m_lock;
592
593 bool m_filterPassed = true;
594 bool m_isExecuted = false;
595
596 mutable bool m_toolHandlesInit = false;
597
598 Gaudi::StateMachine::State m_state = Gaudi::StateMachine::CONFIGURED;
599 Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::CONFIGURED;
600 bool m_isFinalized;
601
603 StatusCode service_i( const std::string& svcName, bool createIf, const InterfaceID& iid, void** ppSvc ) const;
604 StatusCode service_i( const std::string& svcType, const std::string& svcName, const InterfaceID& iid,
605 void** ppSvc ) const;
606
608 Algorithm( const Algorithm& a );
609
611 Algorithm& operator=( const Algorithm& rhs );
612 };
613
614 #ifndef GAUDI_NEW_PLUGIN_SERVICE
615 template <class T>
616 class AlgFactory
617 {
618 public:
619 #ifndef __REFLEX__
620 template <typename S, typename... Args>
621 static typename S::ReturnType create( Args&&... args )
622 {
623 return new T( std::forward<Args>( args )... );
624 }
625 #endif
626 };
627
628 // Macros to declare component factories
629 #define DECLARE_ALGORITHM_FACTORY( x ) DECLARE_FACTORY_WITH_CREATOR( x, AlgFactory<x>, Algorithm::Factory )
630 #define DECLARE_NAMED_ALGORITHM_FACTORY( x, n ) \
631 DECLARE_FACTORY_WITH_CREATOR_AND_ID( x, AlgFactory<x>, #n, Algorithm::Factory )
632 #define DECLARE_NAMESPACE_ALGORITHM_FACTORY( n, x ) DECLARE_ALGORITHM_FACTORY( n::x )
633
634 #else
635
636 // Macros to declare component factories
637 #define DECLARE_ALGORITHM_FACTORY( x ) DECLARE_COMPONENT( x )
638 #define DECLARE_NAMED_ALGORITHM_FACTORY( x, n ) DECLARE_COMPONENT_WITH_ID( x, #n )
639 #define DECLARE_NAMESPACE_ALGORITHM_FACTORY( n, x ) DECLARE_COMPONENT( n::x )
640
641 #endif
642
643 #endif // GAUDIKERNEL_ALGORITHM_H
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&#39;t already exist.
Definition: Algorithm.h:238
System.h
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:128
PropertyHolder.h
Algorithm::eventDataService
SmartIF< IDataProviderSvc > & eventDataService() const
Definition: Algorithm.h:281
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:17
StatusCode::SUCCESS
Definition: StatusCode.h:31
SmartIF< IService >
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
Algorithm::m_EDS
SmartIF< IDataProviderSvc > m_EDS
Event data service.
Definition: Algorithm.h:530
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:120
Algorithm::svcLoc
SmartIF< ISvcLocator > & svcLoc() const
shortcut for method serviceLocator
Definition: Algorithm.h:327
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:426
Gaudi::StateMachine::CONFIGURED
Definition: StateMachine.h:16
IAlgExecStateSvc.h
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:32
compareRootHistos.state
state
Definition: compareRootHistos.py:422
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:319
Algorithm::m_pAuditorSvc
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: Algorithm.h:540
Algorithm::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: Algorithm.h:523
AtlasMCRecoFullPrecedenceDump.whiteboard
whiteboard
Definition: AtlasMCRecoFullPrecedenceDump.py:30
Algorithm::setIOBound
void setIOBound(bool value)
Definition: Algorithm.h:474
gaudirun.args
args
Definition: gaudirun.py:244
ToolHandleInfo::isPublic
bool isPublic() const noexcept
Definition: ToolHandle.h:37
Algorithm::isFinalized
bool isFinalized() const override
Has the Algorithm already been finalized?
Definition: Algorithm.h:500
Algorithm::addToolsArray
void addToolsArray(ToolHandleArray< T > &hndlArr)
Definition: Algorithm.h:464
Algorithm::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: Algorithm.h:522
IAlgorithm.h
IAuditorSvc.h
Algorithm::terminate
StatusCode terminate() override
Dummy implementation of IStateful::terminate() method.
Definition: Algorithm.h:176
Algorithm::m_subAlgms
std::vector< Algorithm * > m_subAlgms
Sub algorithms.
Definition: Algorithm.h:518
Algorithm::finalize
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
Definition: Algorithm.h:185
Algorithm::m_HDS
SmartIF< IHistogramSvc > m_HDS
Histogram data service.
Definition: Algorithm.h:535
Algorithm::detDataService
SmartIF< IDataProviderSvc > & detDataService() const
Definition: Algorithm.h:267
EventContext.h
Algorithm::Factory
Gaudi::PluginService::Factory< IAlgorithm *, const std::string &, ISvcLocator * > Factory
Definition: Algorithm.h:84
Algorithm::m_CSS
SmartIF< IChronoStatSvc > m_CSS
Chrono & Stat Service.
Definition: Algorithm.h:537
Algorithm::m_tools
std::vector< IAlgTool * > m_tools
Definition: Algorithm.h:521
ToolHandleArray
Array of Handles to be used in lieu of vector of naked pointers to tools.
Definition: PropertyHolder.h:34
Algorithm::declareProperty
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
Definition: Algorithm.h:381
Algorithm::m_contextSvc
SmartIF< IAlgContextSvc > m_contextSvc
Algorithm Context Service.
Definition: Algorithm.h:543
Gaudi::StateMachine::State
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
Definition: StateMachine.h:14
Algorithm::ntupleService
SmartIF< INTupleSvc > & ntupleService() const
Definition: Algorithm.h:302
IToolSvc.h
EventContext
This class represents an entry point to all the event specific data.
Definition: EventContext.h:24
Algorithm::m_version
std::string m_version
Algorithm&#39;s version.
Definition: Algorithm.h:515
Gaudi::StringKey
The helper class to represent the efficient "key" for access.
Definition: StringKey.h:35
std::mutex
operator=
PropertyMgr & operator=(const PropertyMgr &)=delete
std::string
STL class.
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:552
Algorithm::m_timelineSvc
SmartIF< ITimelineSvc > m_timelineSvc
Timeline Service.
Definition: Algorithm.h:545
InterfaceID
Interface ID class.
Definition: IInterface.h:29
SmartIF::as
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Definition: SmartIF.h:115
IDataProviderSvc.h
Algorithm::targetFSMState
Gaudi::StateMachine::State targetFSMState() const override
returns the state the algorithm will be in after the ongoing transition
Definition: Algorithm.h:193
IMonitorSvc
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:24
Algorithm::chronoStatService
SmartIF< IChronoStatSvc > & chronoStatService() const
Definition: Algorithm.h:261
Algorithm::service
SmartIF< T > service(const std::string &name, bool createIf=true, bool quiet=false) const
Definition: Algorithm.h:247
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
declareProperty
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, TYPE &value, const std::string &doc="none")
Declare a property (templated)
ToolHandle::typeAndName
std::string typeAndName() const override
Definition: ToolHandle.h:223
gaudirun.type
type
Definition: gaudirun.py:133
ITimelineSvc.h
Algorithm::m_index
unsigned int m_index
Algorithm&#39;s index.
Definition: Algorithm.h:516
DataHandleHolderBase
Definition: DataHandleHolderBase.h:25
CommonMessaging.h
Algorithm::getContext
const EventContext & getContext() const override
get the context
Definition: Algorithm.h:436
Algorithm::m_MS
SmartIF< IMessageSvc > m_MS
Message service.
Definition: Algorithm.h:529
MSG::NIL
Definition: IMessageSvc.h:16
Algorithm::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: Algorithm.h:542
PACKAGE_VERSION
#define PACKAGE_VERSION
Definition: Algorithm.h:50
Algorithm::m_name
Gaudi::StringKey m_name
Algorithm&#39;s name for identification.
Definition: Algorithm.h:513
Algorithm::setType
void setType(const std::string &type) override
Definition: Algorithm.h:167
Algorithm::m_DCS
SmartIF< IConversionSvc > m_DCS
Detector conversion service.
Definition: Algorithm.h:534
IMessageSvc.h
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
Algorithm::m_isFinalized
bool m_isFinalized
Algorithm has been finalized flag.
Definition: Algorithm.h:600
Algorithm::m_event_context
EventContext m_event_context
Definition: Algorithm.h:517
Algorithm::monitorSvc
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
Definition: Algorithm.h:398
IStateful.h
DataObjIDProperty.h
IService.h
DataHandleHolderBase.h
Algorithm::m_ECS
SmartIF< IConversionSvc > m_ECS
Event conversion service.
Definition: Algorithm.h:532
Algorithm::m_NTS
SmartIF< INTupleSvc > m_NTS
N tuple service.
Definition: Algorithm.h:536
Algorithm::declareInfo
void declareInfo(const std::string &name, const T &var, const std::string &desc) const
Declare monitoring information.
Definition: Algorithm.h:413
IMonitorSvc.h
PluginService.h
IDataHandleVisitor
Definition: IDataHandleHolder.h:38
ToolHandle
Handle to be used in lieu of naked pointers to tools.
Definition: PropertyHolder.h:30
ToolHandle::initialize
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:185
IAlgContextSvc.h
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
IProperty.h
Algorithm::evtSvc
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
Definition: Algorithm.h:280
std::vector< Algorithm * >
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.
Algorithm::m_WB
SmartIF< IHiveWhiteBoard > m_WB
Event data service (whiteboard)
Definition: Algorithm.h:531
std::unique_ptr< IDataHandleVisitor >
IConversionSvc.h
Algorithm::isIOBound
bool isIOBound() const
Definition: Algorithm.h:472
Gaudi::PluginService::Factory
Class wrapping the signature for a factory with any number of arguments.
Definition: PluginService.h:45
IHiveWhiteBoard.h
Algorithm::isSequence
bool isSequence() const override
Are we a Sequence?
Definition: Algorithm.h:218
Algorithm::isInitialized
bool isInitialized() const override
Has the Algorithm already been initialized?
Definition: Algorithm.h:497
Algorithm::declareTool
StatusCode declareTool(ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
Definition: Algorithm.h:448
Algorithm::registerContext
bool registerContext() const
register for Algorithm Context Service?
Definition: Algorithm.h:334
Algorithm::m_type
std::string m_type
Algorithm&#39;s type.
Definition: Algorithm.h:514
AlgFactory::create
static S::ReturnType create(Args &&...args)
Definition: Algorithm.h:621
Property.h
Algorithm::initialize
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Definition: Algorithm.h:179
IAlgTool
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
ToolHandle.h
Algorithm::m_ptoolSvc
SmartIF< IToolSvc > m_ptoolSvc
ToolSvc Service.
Definition: Algorithm.h:541
Algorithm::neededResources
const std::vector< std::string > & neededResources() const override
Definition: Algorithm.h:493
Algorithm::cardinality
unsigned int cardinality() const override
Return the cardinality.
Definition: Algorithm.h:491
Algorithm::start
StatusCode start() override
the default (empty) implementation of IStateful::start() method
Definition: Algorithm.h:181
AlgFactory
Definition: Algorithm.h:616
Algorithm::m_EXS
SmartIF< IExceptionSvc > m_EXS
Exception Handler Service.
Definition: Algorithm.h:539
IChronoStatSvc.h
Algorithm::m_pSvcLocator
SmartIF< ISvcLocator > m_pSvcLocator
Pointer to service locator service.
Definition: Algorithm.h:548
Algorithm::m_lock
std::mutex m_lock
for re-entrant Algs
Definition: Algorithm.h:591
Algorithm::declareProperty
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
Definition: Algorithm.h:370
Algorithm::m_RGS
SmartIF< IRndmGenSvc > m_RGS
Random Number Generator Service.
Definition: Algorithm.h:538
Algorithm::service
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn&#39;t already exist.
Definition: Algorithm.h:231
Algorithm::stop
StatusCode stop() override
the default (empty) implementation of IStateful::stop() method
Definition: Algorithm.h:183
Algorithm::m_DDS
SmartIF< IDataProviderSvc > m_DDS
Detector data service.
Definition: Algorithm.h:533
Algorithm::m_aess
SmartIF< IAlgExecStateSvc > m_aess
Alg execution state mgr.
Definition: Algorithm.h:546
Algorithm::type
const std::string & type() const override
The type of the algorithm object.
Definition: Algorithm.h:166
Algorithm::maxErrors
unsigned int maxErrors() const
Definition: Algorithm.h:510
Algorithm::eventDataCnvService
SmartIF< IConversionSvc > & eventDataCnvService() const
Definition: Algorithm.h:287
DataHandle.h
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
std::ostream
STL class.
ISvcLocator.h
Algorithm::configure
StatusCode configure() override
Dummy implementation of IStateful::configure() method.
Definition: Algorithm.h:174
Algorithm::histogramDataService
SmartIF< IHistogramSvc > & histogramDataService() const
Definition: Algorithm.h:296
ToolHandleInfo
General info and helper functions for toolhandles and arrays.
Definition: ToolHandle.h:25
Algorithm::detDataCnvService
SmartIF< IConversionSvc > & detDataCnvService() const
Definition: Algorithm.h:273
IExceptionSvc.h
Algorithm::FSMState
Gaudi::StateMachine::State FSMState() const override
returns the current state of the algorithm
Definition: Algorithm.h:191
INTupleSvc.h
IHistogramSvc.h