| The Gaudi Framework v30r0 (c919700c)

- 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 class AlgorithmManager;
49
50 #ifndef PACKAGE_VERSION
51 #define PACKAGE_VERSION "unknown"
52 #endif
53
79 class GAUDI_API Algorithm
80 : public DataHandleHolderBase<
81 PropertyHolder<CommonMessaging<implements<IAlgorithm, IDataHandleHolder, IProperty, IStateful>>>>
82 {
83 public:
84 #ifndef __REFLEX__
85 typedef Gaudi::PluginService::Factory<IAlgorithm*, const std::string&, ISvcLocator*> Factory;
86 #endif
87 friend AlgorithmManager;
88
93 Algorithm( const std::string& name, ISvcLocator* svcloc, const std::string& version = PACKAGE_VERSION );
94
100 StatusCode sysStart() override;
101
107 StatusCode sysInitialize() override;
108
114 StatusCode sysReinitialize() override;
115
120 StatusCode sysRestart() override;
121
129 StatusCode sysExecute( const EventContext& ctx ) override;
130
134 StatusCode sysStop() override;
135
140 StatusCode sysFinalize() override;
141
147 StatusCode sysBeginRun() override;
148
154 StatusCode sysEndRun() override;
155
163 const std::string& name() const override;
164 const Gaudi::StringKey& nameKey() const override;
165
168 const std::string& type() const override { return m_type; }
169 void setType( const std::string& type ) override { m_type = type; } // BH, TODO: move to proper place
170
171 const std::string& version() const override;
172
173 unsigned int index() const override;
174
176 StatusCode configure() override { return StatusCode::SUCCESS; }
178 StatusCode terminate() override { return StatusCode::SUCCESS; }
179
181 StatusCode initialize() override { return StatusCode::SUCCESS; }
183 StatusCode start() override { return StatusCode::SUCCESS; }
185 StatusCode stop() override { return StatusCode::SUCCESS; }
187 StatusCode finalize() override { return StatusCode::SUCCESS; }
189 StatusCode reinitialize() override;
191 StatusCode restart() override;
193 Gaudi::StateMachine::State FSMState() const override { return m_state; }
195 Gaudi::StateMachine::State targetFSMState() const override { return m_targetState; }
196
198 bool isExecuted() const override;
199
201 void setExecuted( bool state ) const override;
202
206 void resetExecuted() override;
207
211 StatusCode beginRun() override;
212
214 StatusCode endRun() override;
215
217 bool isEnabled() const override;
218
220 bool isSequence() const override { return false; }
221
223 bool filterPassed() const override;
224
226 void setFilterPassed( bool state ) const override;
227
229 unsigned int errorCount() const;
230
232 template <class T>
233 StatusCode service( const std::string& name, T*& psvc, bool createIf = true ) const
234 {
235 return service_i( name, createIf, T::interfaceID(), (void**)&psvc );
236 }
237
239 template <class T>
240 StatusCode service( const std::string& svcType, const std::string& svcName, T*& psvc ) const
241 {
242 return service_i( svcType, svcName, T::interfaceID(), (void**)&psvc );
243 }
244
246 SmartIF<IService> service( const std::string& name, const bool createIf = true, const bool quiet = false ) const;
247
248 template <class T>
249 SmartIF<T> service( const std::string& name, bool createIf = true, bool quiet = false ) const
250 {
251 return service( name, createIf, quiet ).as<T>();
252 }
253
257 SmartIF<IAuditorSvc>& auditorSvc() const;
258
262 SmartIF<IChronoStatSvc>& chronoSvc() const;
263 [[deprecated( "use chronoSvc() instead" )]] SmartIF<IChronoStatSvc>& chronoStatService() const { return chronoSvc(); }
264
268 SmartIF<IDataProviderSvc>& detSvc() const;
269 [[deprecated( "use detSvc() instead" )]] SmartIF<IDataProviderSvc>& detDataService() const { return detSvc(); }
270
274 SmartIF<IConversionSvc>& detCnvSvc() const;
275 [[deprecated( "use detCnvSvc() instead" )]] SmartIF<IConversionSvc>& detDataCnvService() const { return detCnvSvc(); }
276
280 SmartIF<IDataProviderSvc>& eventSvc() const;
282 SmartIF<IDataProviderSvc>& evtSvc() const { return eventSvc(); }
283 [[deprecated( "use eventSvc() instead" )]] SmartIF<IDataProviderSvc>& eventDataService() const { return eventSvc(); }
284
288 SmartIF<IConversionSvc>& eventCnvSvc() const;
289 [[deprecated( "use eventCnvSvc() instead" )]] SmartIF<IConversionSvc>& eventDataCnvService() const
290 {
291 return eventCnvSvc();
292 }
293
297 SmartIF<IHistogramSvc>& histoSvc() const;
298 [[deprecated( "use histoSvc() instead" )]] SmartIF<IHistogramSvc>& histogramDataService() const { return histoSvc(); }
299
303 SmartIF<INTupleSvc>& ntupleSvc() const;
304 [[deprecated( "use ntupleSvc() instead" )]] SmartIF<INTupleSvc>& ntupleService() const { return ntupleSvc(); }
305
309 SmartIF<IRndmGenSvc>& randSvc() const;
310
312 SmartIF<IToolSvc>& toolSvc() const;
313
315 SmartIF<IExceptionSvc>& exceptionSvc() const;
316
318 SmartIF<IAlgContextSvc>& contextSvc() const;
319
320 SmartIF<ITimelineSvc>& timelineSvc() const;
321
327 SmartIF<ISvcLocator>& serviceLocator() const override;
329 SmartIF<ISvcLocator>& svcLoc() const { return serviceLocator(); }
330
331 SmartIF<IHiveWhiteBoard>& whiteboard() const;
332
333 SmartIF<IAlgExecStateSvc>& algExecStateSvc() const;
334
336 bool registerContext() const { return m_registerContext; }
337
350 StatusCode createSubAlgorithm( const std::string& type, const std::string& name, Algorithm*& pSubAlg );
351
353 const std::vector<Algorithm*>* subAlgorithms() const;
354
356 std::vector<Algorithm*>* subAlgorithms();
357
365 StatusCode setProperties();
366
367 // ==========================================================================
368 using PropertyHolderImpl::declareProperty;
369
370 // declare Tools to the Algorithms
371 template <class T>
372 Gaudi::Details::PropertyBase* declareProperty( const std::string& name, ToolHandle<T>& hndl,
373 const std::string& doc = "none" )
374 {
375 this->declareTool( hndl, hndl.typeAndName() ).ignore();
376 return PropertyHolderImpl::declareProperty( name, hndl, doc );
377 }
378
379 // ==========================================================================
380 // declare ToolHandleArrays to the Algorithms
381
382 template <class T>
383 Gaudi::Details::PropertyBase* declareProperty( const std::string& name, ToolHandleArray<T>& hndlArr,
384 const std::string& doc = "none" )
385 {
386 addToolsArray( hndlArr );
387 return PropertyHolderImpl::declareProperty( name, hndlArr, doc );
388 }
389
390 // ==========================================================================
400 inline SmartIF<IMonitorSvc>& monitorSvc() const
401 {
402 // If not already located try to locate it without forcing a creation
403 if ( !m_pMonitorSvc ) {
404 m_pMonitorSvc = service( m_monitorSvcName, false, true ); // do not create and be quiet
405 }
406 return m_pMonitorSvc;
407 }
408
414 template <class T>
415 void declareInfo( const std::string& name, const T& var, const std::string& desc ) const
416 {
417 IMonitorSvc* mS = monitorSvc().get();
418 if ( mS ) mS->declareInfo( name, var, desc, this );
419 }
420
428 void declareInfo( const std::string& name, const std::string& format, const void* var, int size,
429 const std::string& desc ) const
430 {
431 IMonitorSvc* mS = monitorSvc().get();
432 if ( mS ) mS->declareInfo( name, format, var, size, desc, this );
433 }
434
435 public:
436 // For concurrency
438 const EventContext& getContext() const override { return m_event_context; }
439
440 public:
441 virtual void acceptDHVisitor( IDataHandleVisitor* ) const override;
442
443 void commitHandles() override;
444
445 public:
446 void registerTool( IAlgTool* tool ) const;
447 void deregisterTool( IAlgTool* tool ) const;
448
449 template <class T>
450 StatusCode declareTool( ToolHandle<T>& handle, std::string toolTypeAndName, bool createIf = true )
451 {
452
453 StatusCode sc = handle.initialize( toolTypeAndName, handle.isPublic() ? nullptr : this, createIf );
454 if ( UNLIKELY( !sc ) ) {
455 throw GaudiException{std::string{"Cannot create handle for "} + ( handle.isPublic() ? "public" : "private" ) +
456 " tool " + toolTypeAndName,
457 name(), sc};
458 }
459
460 m_toolHandles.push_back( &handle );
461
462 return sc;
463 }
464
465 template <class T>
466 void addToolsArray( ToolHandleArray<T>& hndlArr )
467 {
468 m_toolHandleArrays.push_back( &hndlArr );
469 }
470
471 const std::vector<IAlgTool*>& tools() const;
472
473 // Return the I/O-boundness flag
474 bool isIOBound() const { return m_isIOBound; }
475 // Set the I/O-boundness flag
476 void setIOBound( bool value ) { m_isIOBound = value; }
477
478 protected:
479 std::vector<IAlgTool*>& tools();
480
481 // // adds declared in- and outputs of subAlgorithms to own DOHs
482 // void addSubAlgorithmDataObjectHandles();
483
484 private:
485 // place IAlgTools defined via ToolHandles in m_tools
486 void initToolHandles() const;
487
488 public:
489 // /// Specifies the clonability of the algorithm
490 // bool isClonable() const override { return false; }
491
493 unsigned int cardinality() const override { return m_cardinality; }
494
495 const std::vector<std::string>& neededResources() const override { return m_neededResources; }
496
497 protected:
499 bool isInitialized() const override { return Gaudi::StateMachine::INITIALIZED == m_state; }
500
502 bool isFinalized() const override { return Gaudi::StateMachine::CONFIGURED == m_state; }
503
505 void setIndex( const unsigned int& idx ) override;
506
507 public:
509 std::ostream& toControlFlowExpression( std::ostream& os ) const override;
510
511 private:
512 unsigned int maxErrors() const { return m_errorMax; }
513
514 private:
515 Gaudi::StringKey m_name;
516 std::string m_type;
517 std::string m_version;
518 unsigned int m_index;
519 EventContext m_event_context;
520 std::vector<Algorithm*> m_subAlgms;
521
522 // tools used by algorithm
523 mutable std::vector<IAlgTool*> m_tools;
524 mutable std::vector<BaseToolHandle*> m_toolHandles;
525 mutable std::vector<GaudiHandleArrayBase*> m_toolHandleArrays;
526
527 private:
528 template <typename IFace>
529 SmartIF<IFace>& get_svc_( SmartIF<IFace>& p, const char* service_name ) const;
530
531 mutable SmartIF<IMessageSvc> m_MS;
532 mutable SmartIF<IDataProviderSvc> m_EDS;
533 mutable SmartIF<IHiveWhiteBoard> m_WB;
534 mutable SmartIF<IConversionSvc> m_ECS;
535 mutable SmartIF<IDataProviderSvc> m_DDS;
536 mutable SmartIF<IConversionSvc> m_DCS;
537 mutable SmartIF<IHistogramSvc> m_HDS;
538 mutable SmartIF<INTupleSvc> m_NTS;
539 mutable SmartIF<IChronoStatSvc> m_CSS;
540 mutable SmartIF<IRndmGenSvc> m_RGS;
541 mutable SmartIF<IExceptionSvc> m_EXS;
542 mutable SmartIF<IAuditorSvc> m_pAuditorSvc;
543 mutable SmartIF<IToolSvc> m_ptoolSvc;
544 mutable SmartIF<IMonitorSvc> m_pMonitorSvc;
545 mutable SmartIF<IAlgContextSvc> m_contextSvc;
546
547 mutable SmartIF<ITimelineSvc> m_timelineSvc;
548 mutable SmartIF<IAlgExecStateSvc> m_aess;
549
550 SmartIF<ISvcLocator> m_pSvcLocator;
551
552 protected:
554 std::unique_ptr<IDataHandleVisitor> m_updateDataHandles;
555
556 private:
557 // Properties
558 Gaudi::Property<int> m_outputLevel{this, "OutputLevel", MSG::NIL, "output level"};
559 Gaudi::Property<bool> m_isEnabled{this, "Enable", true, "should the algorithm be executed or not"};
560
561 Gaudi::Property<unsigned int> m_errorMax{this, "ErrorMax", 1, "[[deprecated]] max number of errors"};
562
563 Gaudi::Property<bool> m_auditInit{this, "AuditAlgorithms", false, "[[deprecated]] unused"};
564 Gaudi::Property<bool> m_auditorInitialize{this, "AuditInitialize", false, "trigger auditor on initialize()"};
565 Gaudi::Property<bool> m_auditorReinitialize{this, "AuditReinitialize", false, "trigger auditor on reinitialize()"};
566 Gaudi::Property<bool> m_auditorRestart{this, "AuditRestart", false, "trigger auditor on restart()"};
567 Gaudi::Property<bool> m_auditorExecute{this, "AuditExecute", false, "trigger auditor on execute()"};
568 Gaudi::Property<bool> m_auditorFinalize{this, "AuditFinalize", false, "trigger auditor on finalize()"};
569 Gaudi::Property<bool> m_auditorBeginRun{this, "AuditBeginRun", false, "trigger auditor on beginRun()"};
570 Gaudi::Property<bool> m_auditorEndRun{this, "AuditEndRun", false, "trigger auditor on endRun()"};
571 Gaudi::Property<bool> m_auditorStart{this, "AuditStart", false, "trigger auditor on start()"};
572 Gaudi::Property<bool> m_auditorStop{this, "AuditStop", false, "trigger auditor on stop()"};
573
574 Gaudi::Property<bool> m_doTimeline{this, "Timeline", true, "send events to TimelineSvc"};
575
576 Gaudi::Property<std::string> m_monitorSvcName{this, "MonitorService", "MonitorSvc",
577 "name to use for Monitor Service"};
578
579 Gaudi::Property<bool> m_registerContext{this, "RegisterForContextService", false,
580 "flag to enforce the registration for Algorithm Context Service"};
581
582 Gaudi::Property<int> m_cardinality{this, "Cardinality", 1, "how many clones to create - 0 means algo is reentrant"};
583 Gaudi::Property<std::vector<std::string>> m_neededResources{
584 this, "NeededResources", {}, "named resources needed during event looping"};
585
586 Gaudi::Property<bool> m_isIOBound{this, "IsIOBound", false,
587 "if the algorithm is I/O-bound (in the broad sense of Von Neumann bottleneck)"};
588
589 // The default should be changed to "false" for v29
590 Gaudi::Property<bool> m_filterCircDeps{this, "FilterCircularDependencies", true,
591 "filter out circular data dependencies"};
592
593 std::mutex m_lock;
594
595 bool m_filterPassed = true;
596 bool m_isExecuted = false;
597
598 mutable bool m_toolHandlesInit = false;
599
600 Gaudi::StateMachine::State m_state = Gaudi::StateMachine::CONFIGURED;
601 Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::CONFIGURED;
602 bool m_isFinalized;
603
605 StatusCode service_i( const std::string& svcName, bool createIf, const InterfaceID& iid, void** ppSvc ) const;
606 StatusCode service_i( const std::string& svcType, const std::string& svcName, const InterfaceID& iid,
607 void** ppSvc ) const;
608
610 Algorithm( const Algorithm& a );
611
613 Algorithm& operator=( const Algorithm& rhs );
614 };
615
616 #ifndef GAUDI_NEW_PLUGIN_SERVICE
617 template <class T>
618 class AlgFactory
619 {
620 public:
621 #ifndef __REFLEX__
622 template <typename S, typename... Args>
623 static typename S::ReturnType create( Args&&... args )
624 {
625 return new T( std::forward<Args>( args )... );
626 }
627 #endif
628 };
629
630 // Macros to declare component factories
631 #define DECLARE_ALGORITHM_FACTORY( x ) DECLARE_FACTORY_WITH_CREATOR( x, AlgFactory<x>, Algorithm::Factory )
632 #define DECLARE_NAMED_ALGORITHM_FACTORY( x, n ) \
633 DECLARE_FACTORY_WITH_CREATOR_AND_ID( x, AlgFactory<x>, #n, Algorithm::Factory )
634 #define DECLARE_NAMESPACE_ALGORITHM_FACTORY( n, x ) DECLARE_ALGORITHM_FACTORY( n::x )
635
636 #else
637
638 // Macros to declare component factories
639 #define DECLARE_ALGORITHM_FACTORY( x ) DECLARE_COMPONENT( x )
640 #define DECLARE_NAMED_ALGORITHM_FACTORY( x, n ) DECLARE_COMPONENT_WITH_ID( x, #n )
641 #define DECLARE_NAMESPACE_ALGORITHM_FACTORY( n, x ) DECLARE_COMPONENT( n::x )
642
643 #endif
644
645 #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:240
AlgorithmManager
The AlgorithmManager class is in charge of the creation of concrete instances of Algorithms.
Definition: AlgorithmManager.h:31
System.h
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:128
PropertyHolder.h
StatusCode::SUCCESS
Definition: StatusCode.h:29
Algorithm::eventDataService
SmartIF< IDataProviderSvc > & eventDataService() const
Definition: Algorithm.h:283
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:17
SmartIF< IService >
Algorithm::AlgorithmManager
friend AlgorithmManager
Definition: Algorithm.h:87
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:532
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:329
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:428
Gaudi::StateMachine::CONFIGURED
Definition: StateMachine.h:16
IAlgExecStateSvc.h
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:32
compareRootHistos.state
state
Definition: compareRootHistos.py:424
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:542
Algorithm::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: Algorithm.h:525
AtlasMCRecoFullPrecedenceDump.whiteboard
whiteboard
Definition: AtlasMCRecoFullPrecedenceDump.py:30
Algorithm::setIOBound
void setIOBound(bool value)
Definition: Algorithm.h:476
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:502
Algorithm::addToolsArray
void addToolsArray(ToolHandleArray< T > &hndlArr)
Definition: Algorithm.h:466
Algorithm::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: Algorithm.h:524
IAlgorithm.h
IAuditorSvc.h
Algorithm::terminate
StatusCode terminate() override
Dummy implementation of IStateful::terminate() method.
Definition: Algorithm.h:178
Algorithm::m_subAlgms
std::vector< Algorithm * > m_subAlgms
Sub algorithms.
Definition: Algorithm.h:520
Algorithm::finalize
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
Definition: Algorithm.h:187
Algorithm::m_HDS
SmartIF< IHistogramSvc > m_HDS
Histogram data service.
Definition: Algorithm.h:537
Algorithm::detDataService
SmartIF< IDataProviderSvc > & detDataService() const
Definition: Algorithm.h:269
EventContext.h
Algorithm::Factory
Gaudi::PluginService::Factory< IAlgorithm *, const std::string &, ISvcLocator * > Factory
Definition: Algorithm.h:85
Algorithm::m_CSS
SmartIF< IChronoStatSvc > m_CSS
Chrono & Stat Service.
Definition: Algorithm.h:539
Algorithm::m_tools
std::vector< IAlgTool * > m_tools
Definition: Algorithm.h:523
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:383
Algorithm::m_contextSvc
SmartIF< IAlgContextSvc > m_contextSvc
Algorithm Context Service.
Definition: Algorithm.h:545
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:304
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:517
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:554
Algorithm::m_timelineSvc
SmartIF< ITimelineSvc > m_timelineSvc
Timeline Service.
Definition: Algorithm.h:547
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:195
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:263
Algorithm::service
SmartIF< T > service(const std::string &name, bool createIf=true, bool quiet=false) const
Definition: Algorithm.h:249
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
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:246
gaudirun.type
type
Definition: gaudirun.py:133
ITimelineSvc.h
Algorithm::m_index
unsigned int m_index
Algorithm&#39;s index.
Definition: Algorithm.h:518
DataHandleHolderBase
Definition: DataHandleHolderBase.h:25
CommonMessaging.h
Algorithm::getContext
const EventContext & getContext() const override
get the context
Definition: Algorithm.h:438
Algorithm::m_MS
SmartIF< IMessageSvc > m_MS
Message service.
Definition: Algorithm.h:531
MSG::NIL
Definition: IMessageSvc.h:16
Algorithm::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: Algorithm.h:544
PACKAGE_VERSION
#define PACKAGE_VERSION
Definition: Algorithm.h:51
Algorithm::m_name
Gaudi::StringKey m_name
Algorithm&#39;s name for identification.
Definition: Algorithm.h:515
Algorithm::setType
void setType(const std::string &type) override
Definition: Algorithm.h:169
Algorithm::m_DCS
SmartIF< IConversionSvc > m_DCS
Detector conversion service.
Definition: Algorithm.h:536
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:602
Algorithm::m_event_context
EventContext m_event_context
Definition: Algorithm.h:519
Algorithm::monitorSvc
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
Definition: Algorithm.h:400
IStateful.h
DataObjIDProperty.h
IService.h
DataHandleHolderBase.h
Algorithm::m_ECS
SmartIF< IConversionSvc > m_ECS
Event conversion service.
Definition: Algorithm.h:534
Algorithm::m_NTS
SmartIF< INTupleSvc > m_NTS
N tuple service.
Definition: Algorithm.h:538
Algorithm::declareInfo
void declareInfo(const std::string &name, const T &var, const std::string &desc) const
Declare monitoring information.
Definition: Algorithm.h:415
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:208
IAlgContextSvc.h
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:79
IProperty.h
Algorithm::evtSvc
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
Definition: Algorithm.h:282
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:533
std::unique_ptr< IDataHandleVisitor >
IConversionSvc.h
Algorithm::isIOBound
bool isIOBound() const
Definition: Algorithm.h:474
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:220
Algorithm::isInitialized
bool isInitialized() const override
Has the Algorithm already been initialized?
Definition: Algorithm.h:499
Algorithm::declareTool
StatusCode declareTool(ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
Definition: Algorithm.h:450
Algorithm::registerContext
bool registerContext() const
register for Algorithm Context Service?
Definition: Algorithm.h:336
Algorithm::m_type
std::string m_type
Algorithm&#39;s type.
Definition: Algorithm.h:516
AlgFactory::create
static S::ReturnType create(Args &&...args)
Definition: Algorithm.h:623
Property.h
Algorithm::initialize
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Definition: Algorithm.h:181
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:543
Algorithm::neededResources
const std::vector< std::string > & neededResources() const override
Definition: Algorithm.h:495
Algorithm::cardinality
unsigned int cardinality() const override
Return the cardinality.
Definition: Algorithm.h:493
Algorithm::start
StatusCode start() override
the default (empty) implementation of IStateful::start() method
Definition: Algorithm.h:183
AlgFactory
Definition: Algorithm.h:618
Algorithm::m_EXS
SmartIF< IExceptionSvc > m_EXS
Exception Handler Service.
Definition: Algorithm.h:541
IChronoStatSvc.h
Algorithm::m_pSvcLocator
SmartIF< ISvcLocator > m_pSvcLocator
Pointer to service locator service.
Definition: Algorithm.h:550
Algorithm::m_lock
std::mutex m_lock
for re-entrant Algs
Definition: Algorithm.h:593
Algorithm::declareProperty
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
Definition: Algorithm.h:372
Algorithm::m_RGS
SmartIF< IRndmGenSvc > m_RGS
Random Number Generator Service.
Definition: Algorithm.h:540
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:233
Algorithm::stop
StatusCode stop() override
the default (empty) implementation of IStateful::stop() method
Definition: Algorithm.h:185
Algorithm::m_DDS
SmartIF< IDataProviderSvc > m_DDS
Detector data service.
Definition: Algorithm.h:535
Algorithm::m_aess
SmartIF< IAlgExecStateSvc > m_aess
Alg execution state mgr.
Definition: Algorithm.h:548
Algorithm::type
const std::string & type() const override
The type of the algorithm object.
Definition: Algorithm.h:168
Algorithm::maxErrors
unsigned int maxErrors() const
Definition: Algorithm.h:512
Algorithm::eventDataCnvService
SmartIF< IConversionSvc > & eventDataCnvService() const
Definition: Algorithm.h:289
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:176
Algorithm::histogramDataService
SmartIF< IHistogramSvc > & histogramDataService() const
Definition: Algorithm.h:298
ToolHandleInfo
General info and helper functions for toolhandles and arrays.
Definition: ToolHandle.h:25
Algorithm::detDataCnvService
SmartIF< IConversionSvc > & detDataCnvService() const
Definition: Algorithm.h:275
IExceptionSvc.h
Algorithm::FSMState
Gaudi::StateMachine::State FSMState() const override
returns the current state of the algorithm
Definition: Algorithm.h:193
INTupleSvc.h
IHistogramSvc.h