| The Gaudi Framework v28r2-patches (bc4ad17a)

- 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 <string>
16 #include <vector>
17 #include <mutex>
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<PropertyHolder<CommonMessaging<implements<IAlgorithm, IDataHandleHolder, IProperty, IStateful>>>>
80 {
81 public:
82 #ifndef __REFLEX__
83 typedef Gaudi::PluginService::Factory<IAlgorithm*, const std::string&, ISvcLocator*> Factory;
84 #endif
85
90 Algorithm( const std::string& name, ISvcLocator* svcloc, const std::string& version = PACKAGE_VERSION );
91
97 StatusCode sysStart() override;
98
104 StatusCode sysInitialize() override;
105
111 StatusCode sysReinitialize() override;
112
117 StatusCode sysRestart() override;
118
126 StatusCode sysExecute(const EventContext& ctx) override;
127
131 StatusCode sysStop() override;
132
137 StatusCode sysFinalize() override;
138
144 StatusCode sysBeginRun() override;
145
151 StatusCode sysEndRun() override;
152
160 const std::string& name() const override;
161 const Gaudi::StringKey& nameKey() const override;
162
165 const std::string& type() const override { return m_type; }
166 void setType( const std::string& type ) override { m_type = type; } // BH, TODO: move to proper place
167
168 const std::string& version() const override;
169
170 unsigned int index() const override;
171
173 StatusCode configure() override { return StatusCode::SUCCESS; }
175 StatusCode terminate() override { return StatusCode::SUCCESS; }
176
178 StatusCode initialize() override { return StatusCode::SUCCESS; }
180 StatusCode start() override { return StatusCode::SUCCESS; }
182 StatusCode stop() override { return StatusCode::SUCCESS; }
184 StatusCode finalize() override { return StatusCode::SUCCESS; }
186 StatusCode reinitialize() override;
188 StatusCode restart() override;
190 Gaudi::StateMachine::State FSMState() const override { return m_state; }
192 Gaudi::StateMachine::State targetFSMState() const override { return m_targetState; }
193
195 bool isExecuted() const override;
196
198 void setExecuted( bool state ) override;
199
203 void resetExecuted() override;
204
208 StatusCode beginRun() override;
209
211 StatusCode endRun() override;
212
214 bool isEnabled() const override;
215
217 bool filterPassed() const override;
218
220 void setFilterPassed( bool state ) override;
221
223 unsigned int errorCount() const;
224
226 template <class T>
227 StatusCode service( const std::string& name, T*& psvc, bool createIf = true ) const
228 {
229 return service_i( name, createIf, T::interfaceID(), (void**)&psvc );
230 }
231
233 template <class T>
234 StatusCode service( const std::string& svcType, const std::string& svcName, T*& psvc ) const
235 {
236 return service_i( svcType, svcName, T::interfaceID(), (void**)&psvc );
237 }
238
240 SmartIF<IService> service( const std::string& name, const bool createIf = true, const bool quiet = false ) const;
241
242 template <class T>
243 SmartIF<T> service( const std::string& name, bool createIf = true, bool quiet = false ) const
244 {
245 return service( name, createIf, quiet ).as<T>();
246 }
247
251 SmartIF<IAuditorSvc>& auditorSvc() const;
252
256 SmartIF<IChronoStatSvc>& chronoSvc() const;
257 [[deprecated( "use chronoSvc() instead" )]] SmartIF<IChronoStatSvc>& chronoStatService() const { return chronoSvc(); }
258
262 SmartIF<IDataProviderSvc>& detSvc() const;
263 [[deprecated( "use detSvc() instead" )]] SmartIF<IDataProviderSvc>& detDataService() const { return detSvc(); }
264
268 SmartIF<IConversionSvc>& detCnvSvc() const;
269 [[deprecated( "use detCnvSvc() instead" )]] SmartIF<IConversionSvc>& detDataCnvService() const { return detCnvSvc(); }
270
274 SmartIF<IDataProviderSvc>& eventSvc() const;
276 SmartIF<IDataProviderSvc>& evtSvc() const { return eventSvc(); }
277 [[deprecated( "use eventSvc() instead" )]] SmartIF<IDataProviderSvc>& eventDataService() const { return eventSvc(); }
278
282 SmartIF<IConversionSvc>& eventCnvSvc() const;
283 [[deprecated( "use eventCnvSvc() instead" )]] SmartIF<IConversionSvc>& eventDataCnvService() const
284 {
285 return eventCnvSvc();
286 }
287
291 SmartIF<IHistogramSvc>& histoSvc() const;
292 [[deprecated( "use histoSvc() instead" )]] SmartIF<IHistogramSvc>& histogramDataService() const { return histoSvc(); }
293
297 SmartIF<INTupleSvc>& ntupleSvc() const;
298 [[deprecated( "use ntupleSvc() instead" )]] SmartIF<INTupleSvc>& ntupleService() const { return ntupleSvc(); }
299
303 SmartIF<IRndmGenSvc>& randSvc() const;
304
306 SmartIF<IToolSvc>& toolSvc() const;
307
309 SmartIF<IExceptionSvc>& exceptionSvc() const;
310
312 SmartIF<IAlgContextSvc>& contextSvc() const;
313
314 SmartIF<ITimelineSvc>& timelineSvc() const;
315
321 SmartIF<ISvcLocator>& serviceLocator() const override;
323 SmartIF<ISvcLocator>& svcLoc() const { return serviceLocator(); }
324
325 SmartIF<IHiveWhiteBoard>& whiteboard() const;
326
327 SmartIF<IAlgExecStateSvc>& algExecStateSvc() const;
328
330 bool registerContext() const { return m_registerContext; }
331
344 StatusCode createSubAlgorithm( const std::string& type, const std::string& name, Algorithm*& pSubAlg );
345
347 const std::vector<Algorithm*>* subAlgorithms() const;
348
350 std::vector<Algorithm*>* subAlgorithms();
351
359 StatusCode setProperties();
360
361 // ==========================================================================
362 using PropertyHolderImpl::declareProperty;
363
364 // declare Tools to the Algorithms
365 template <class T>
366 Gaudi::Details::PropertyBase* declareProperty( const std::string& name, ToolHandle<T>& hndl,
367 const std::string& doc = "none" )
368 {
369 this->declareTool( hndl ).ignore();
370 return PropertyHolderImpl::declareProperty( name, hndl, doc );
371 }
372
373 // ==========================================================================
374 // declare ToolHandleArrays to the Algorithms
375
376 template <class T>
377 Gaudi::Details::PropertyBase* declareProperty( const std::string& name, ToolHandleArray<T>& hndlArr,
378 const std::string& doc = "none" )
379 {
380 m_toolHandleArrays.push_back( &hndlArr );
381 return PropertyHolderImpl::declareProperty( name, hndlArr, doc );
382 }
383
384 // ==========================================================================
394 inline SmartIF<IMonitorSvc>& monitorSvc() const
395 {
396 // If not already located try to locate it without forcing a creation
397 if ( !m_pMonitorSvc ) {
398 m_pMonitorSvc = service( m_monitorSvcName, false, true ); // do not create and be quiet
399 }
400 return m_pMonitorSvc;
401 }
402
408 template <class T>
409 void declareInfo( const std::string& name, const T& var, const std::string& desc ) const
410 {
411 IMonitorSvc* mS = monitorSvc().get();
412 if ( mS ) mS->declareInfo( name, var, desc, this );
413 }
414
422 void declareInfo( const std::string& name, const std::string& format, const void* var, int size,
423 const std::string& desc ) const
424 {
425 IMonitorSvc* mS = monitorSvc().get();
426 if ( mS ) mS->declareInfo( name, format, var, size, desc, this );
427 }
428
429 public:
430 // For concurrency
432 const EventContext& getContext() const override { return m_event_context; }
433
434 public:
435
436 virtual void acceptDHVisitor( IDataHandleVisitor* ) const override;
437
438 void commitHandles() override;
439
440 public:
441 void registerTool( IAlgTool* tool ) const;
442 void deregisterTool( IAlgTool* tool ) const;
443
444 template <class T>
445 StatusCode declareTool( ToolHandle<T>& handle, std::string toolTypeAndName = "", bool createIf = true )
446 {
447
448 if ( toolTypeAndName == "" ) toolTypeAndName = handle.typeAndName();
449
450 StatusCode sc = handle.initialize( toolTypeAndName, handle.isPublic() ? nullptr : this, createIf );
451 if ( UNLIKELY( !sc ) ) {
452 throw GaudiException{std::string{"Cannot create handle for "} + ( handle.isPublic() ? "public" : "private" ) +
453 " tool " + toolTypeAndName,
454 name(), sc};
455 }
456
457 m_toolHandles.push_back( &handle );
458
459 return sc;
460 }
461
462 const std::vector<IAlgTool*>& tools() const;
463
464 // Return the I/O-boundness flag
465 bool isIOBound() const { return m_isIOBound; }
466 // Set the I/O-boundness flag
467 void setIOBound( bool value ) { m_isIOBound = value; }
468
469 protected:
470 std::vector<IAlgTool*>& tools();
471
472 // // adds declared in- and outputs of subAlgorithms to own DOHs
473 // void addSubAlgorithmDataObjectHandles();
474
475 private:
476 // place IAlgTools defined via ToolHandles in m_tools
477 void initToolHandles() const;
478
479 public:
481 bool isClonable() const override { return m_isClonable; }
482
484 unsigned int cardinality() const override { return m_cardinality; }
485
486 const std::vector<std::string>& neededResources() const override { return m_neededResources; }
487
488 protected:
490 bool isInitialized() const override { return Gaudi::StateMachine::INITIALIZED == m_state; }
491
493 bool isFinalized() const override { return Gaudi::StateMachine::CONFIGURED == m_state; }
494
496 void setIndex( const unsigned int& idx ) override;
497
498 public:
500 std::ostream& toControlFlowExpression(std::ostream& os) const override;
501
502 private:
503
504 unsigned int maxErrors() const { return m_errorMax; }
505
506 private:
507 Gaudi::StringKey m_name;
508 std::string m_type;
509 std::string m_version;
510 unsigned int m_index;
511 EventContext m_event_context;
512 std::vector<Algorithm*> m_subAlgms;
513
514 // tools used by algorithm
515 mutable std::vector<IAlgTool*> m_tools;
516 mutable std::vector<BaseToolHandle*> m_toolHandles;
517 mutable std::vector<GaudiHandleArrayBase*> m_toolHandleArrays;
518
519 private:
520 template <typename IFace>
521 SmartIF<IFace>& get_svc_( SmartIF<IFace>& p, const char* service_name ) const;
522
523 mutable SmartIF<IMessageSvc> m_MS;
524 mutable SmartIF<IDataProviderSvc> m_EDS;
525 mutable SmartIF<IHiveWhiteBoard> m_WB;
526 mutable SmartIF<IConversionSvc> m_ECS;
527 mutable SmartIF<IDataProviderSvc> m_DDS;
528 mutable SmartIF<IConversionSvc> m_DCS;
529 mutable SmartIF<IHistogramSvc> m_HDS;
530 mutable SmartIF<INTupleSvc> m_NTS;
531 mutable SmartIF<IChronoStatSvc> m_CSS;
532 mutable SmartIF<IRndmGenSvc> m_RGS;
533 mutable SmartIF<IExceptionSvc> m_EXS;
534 mutable SmartIF<IAuditorSvc> m_pAuditorSvc;
535 mutable SmartIF<IToolSvc> m_ptoolSvc;
536 mutable SmartIF<IMonitorSvc> m_pMonitorSvc;
537 mutable SmartIF<IAlgContextSvc> m_contextSvc;
538
539 mutable SmartIF<ITimelineSvc> m_timelineSvc;
540 mutable SmartIF<IAlgExecStateSvc> m_aess;
541
542 SmartIF<ISvcLocator> m_pSvcLocator;
543
544 protected:
546 std::unique_ptr<IDataHandleVisitor> m_updateDataHandles;
547
548 private:
549 // Properties
550 Gaudi::Property<int> m_outputLevel{this, "OutputLevel", MSG::NIL, "output level"};
551 Gaudi::Property<bool> m_isEnabled{this, "Enable", true, "should the algorithm be executed or not"};
552
553 Gaudi::Property<unsigned int> m_errorMax{this, "ErrorMax", 1, "[[deprecated]] max number of errors"};
554
555 Gaudi::Property<bool> m_auditInit{this, "AuditAlgorithms", false, "[[deprecated]] unused"};
556 Gaudi::Property<bool> m_auditorInitialize{this, "AuditInitialize", false, "trigger auditor on initialize()"};
557 Gaudi::Property<bool> m_auditorReinitialize{this, "AuditReinitialize", false, "trigger auditor on reinitialize()"};
558 Gaudi::Property<bool> m_auditorRestart{this, "AuditRestart", false, "trigger auditor on restart()"};
559 Gaudi::Property<bool> m_auditorExecute{this, "AuditExecute", false, "trigger auditor on execute()"};
560 Gaudi::Property<bool> m_auditorFinalize{this, "AuditFinalize", false, "trigger auditor on finalize()"};
561 Gaudi::Property<bool> m_auditorBeginRun{this, "AuditBeginRun", false, "trigger auditor on beginRun()"};
562 Gaudi::Property<bool> m_auditorEndRun{this, "AuditEndRun", false, "trigger auditor on endRun()"};
563 Gaudi::Property<bool> m_auditorStart{this, "AuditStart", false, "trigger auditor on start()"};
564 Gaudi::Property<bool> m_auditorStop{this, "AuditStop", false, "trigger auditor on stop()"};
565
566 Gaudi::Property<bool> m_doTimeline{this, "Timeline", true, "send events to TimelineSvc"};
567
568 Gaudi::Property<std::string> m_monitorSvcName{this, "MonitorService", "MonitorSvc",
569 "name to use for Monitor Service"};
570
571 Gaudi::Property<bool> m_registerContext{this, "RegisterForContextService", false,
572 "flag to enforce the registration for Algorithm Context Service"};
573
574 Gaudi::Property<bool> m_isClonable{this, "IsClonable", false, "thread-safe enough for cloning?"};
575 Gaudi::Property<int> m_cardinality{this, "Cardinality", 1, "how many clones to create - 0 means algo is reentrant"};
576 Gaudi::Property<std::vector<std::string>> m_neededResources{
577 this, "NeededResources", {}, "named resources needed during event looping"};
578
579 Gaudi::Property<bool> m_isIOBound{this, "IsIOBound", false,
580 "if the algorithm is I/O-bound (in the broad sense of Von Neumann bottleneck)"};
581
582 std::mutex m_lock;
583
584 bool m_filterPassed = true;
585 bool m_isExecuted = false;
586
587 mutable bool m_toolHandlesInit = false;
588
589 Gaudi::StateMachine::State m_state = Gaudi::StateMachine::CONFIGURED;
590 Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::CONFIGURED;
591 bool m_isFinalized;
592
594 StatusCode service_i( const std::string& svcName, bool createIf, const InterfaceID& iid, void** ppSvc ) const;
595 StatusCode service_i( const std::string& svcType, const std::string& svcName, const InterfaceID& iid,
596 void** ppSvc ) const;
597
599 Algorithm( const Algorithm& a );
600
602 Algorithm& operator=( const Algorithm& rhs );
603 };
604
605 #ifndef GAUDI_NEW_PLUGIN_SERVICE
606 template <class T>
607 class AlgFactory
608 {
609 public:
610 #ifndef __REFLEX__
611 template <typename S, typename... Args>
612 static typename S::ReturnType create( Args&&... args )
613 {
614 return new T( std::forward<Args>( args )... );
615 }
616 #endif
617 };
618
619 // Macros to declare component factories
620 #define DECLARE_ALGORITHM_FACTORY( x ) DECLARE_FACTORY_WITH_CREATOR( x, AlgFactory<x>, Algorithm::Factory )
621 #define DECLARE_NAMED_ALGORITHM_FACTORY( x, n ) \
622 DECLARE_FACTORY_WITH_CREATOR_AND_ID( x, AlgFactory<x>, #n, Algorithm::Factory )
623 #define DECLARE_NAMESPACE_ALGORITHM_FACTORY( n, x ) DECLARE_ALGORITHM_FACTORY( n::x )
624
625 #else
626
627 // Macros to declare component factories
628 #define DECLARE_ALGORITHM_FACTORY( x ) DECLARE_COMPONENT( x )
629 #define DECLARE_NAMED_ALGORITHM_FACTORY( x, n ) DECLARE_COMPONENT_WITH_ID( x, #n )
630 #define DECLARE_NAMESPACE_ALGORITHM_FACTORY( n, x ) DECLARE_COMPONENT( n::x )
631
632 #endif
633
634 #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:234
System.h
PropertyHolder.h
Algorithm::eventDataService
SmartIF< IDataProviderSvc > & eventDataService() const
Definition: Algorithm.h:277
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
StatusCode::SUCCESS
Definition: StatusCode.h:30
SmartIF< IService >
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
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:524
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
Algorithm::svcLoc
SmartIF< ISvcLocator > & svcLoc() const
shortcut for method serviceLocator
Definition: Algorithm.h:323
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:422
Gaudi::StateMachine::CONFIGURED
Definition: StateMachine.h:14
IAlgExecStateSvc.h
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
compareRootHistos.state
state
Definition: compareRootHistos.py:348
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:314
Algorithm::m_pAuditorSvc
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: Algorithm.h:534
Algorithm::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: Algorithm.h:517
Algorithm::setIOBound
void setIOBound(bool value)
Definition: Algorithm.h:467
gaudirun.args
args
Definition: gaudirun.py:236
ToolHandleInfo::isPublic
bool isPublic() const noexcept
Definition: ToolHandle.h:38
Algorithm::isFinalized
bool isFinalized() const override
Has the Algorithm already been finalized?
Definition: Algorithm.h:493
Algorithm::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: Algorithm.h:516
IAlgorithm.h
IAuditorSvc.h
Algorithm::terminate
StatusCode terminate() override
Dummy implementation of IStateful::terminate() method.
Definition: Algorithm.h:175
Algorithm::m_subAlgms
std::vector< Algorithm * > m_subAlgms
Sub algorithms.
Definition: Algorithm.h:512
Algorithm::finalize
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
Definition: Algorithm.h:184
Algorithm::m_HDS
SmartIF< IHistogramSvc > m_HDS
Histogram data service.
Definition: Algorithm.h:529
Gaudi::Functional::deprecated
struct deprecated("use MergingTransformer instead")]] ListTransformer
Definition: ListTransformer.h:9
Algorithm::detDataService
SmartIF< IDataProviderSvc > & detDataService() const
Definition: Algorithm.h:263
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
EventContext.h
Algorithm::Factory
Gaudi::PluginService::Factory< IAlgorithm *, const std::string &, ISvcLocator * > Factory
Definition: Algorithm.h:83
Algorithm::m_CSS
SmartIF< IChronoStatSvc > m_CSS
Chrono & Stat Service.
Definition: Algorithm.h:531
Algorithm::m_tools
std::vector< IAlgTool * > m_tools
Definition: Algorithm.h:515
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:377
Algorithm::m_contextSvc
SmartIF< IAlgContextSvc > m_contextSvc
Algorithm Context Service.
Definition: Algorithm.h:537
Gaudi::StateMachine::State
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
Definition: StateMachine.h:12
Algorithm::ntupleService
SmartIF< INTupleSvc > & ntupleService() const
Definition: Algorithm.h:298
Algorithm::declareTool
StatusCode declareTool(ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
Definition: Algorithm.h:445
IToolSvc.h
EventContext
This class represents an entry point to all the event specific data.
Definition: EventContext.h:25
Algorithm::m_version
std::string m_version
Algorithm&#39;s version.
Definition: Algorithm.h:509
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:546
Algorithm::m_timelineSvc
SmartIF< ITimelineSvc > m_timelineSvc
Timeline Service.
Definition: Algorithm.h:539
InterfaceID
Interface ID class.
Definition: IInterface.h:30
SmartIF::as
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Definition: SmartIF.h:110
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:192
IMonitorSvc
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:21
Algorithm::chronoStatService
SmartIF< IChronoStatSvc > & chronoStatService() const
Definition: Algorithm.h:257
Algorithm::service
SmartIF< T > service(const std::string &name, bool createIf=true, bool quiet=false) const
Definition: Algorithm.h:243
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:227
gaudirun.type
type
Definition: gaudirun.py:125
ITimelineSvc.h
Algorithm::m_index
unsigned int m_index
Algorithm&#39;s index.
Definition: Algorithm.h:510
DataHandleHolderBase
Definition: DataHandleHolderBase.h:25
CommonMessaging.h
Algorithm::getContext
const EventContext & getContext() const override
get the context
Definition: Algorithm.h:432
Algorithm::m_MS
SmartIF< IMessageSvc > m_MS
Message service.
Definition: Algorithm.h:523
MSG::NIL
Definition: IMessageSvc.h:16
Algorithm::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: Algorithm.h:536
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:507
Algorithm::setType
void setType(const std::string &type) override
Definition: Algorithm.h:166
Algorithm::m_DCS
SmartIF< IConversionSvc > m_DCS
Detector conversion service.
Definition: Algorithm.h:528
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:591
Algorithm::m_event_context
EventContext m_event_context
Definition: Algorithm.h:511
Algorithm::monitorSvc
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
Definition: Algorithm.h:394
IStateful.h
DataObjIDProperty.h
IService.h
DataHandleHolderBase.h
Algorithm::m_ECS
SmartIF< IConversionSvc > m_ECS
Event conversion service.
Definition: Algorithm.h:526
Algorithm::m_NTS
SmartIF< INTupleSvc > m_NTS
N tuple service.
Definition: Algorithm.h:530
Algorithm::declareInfo
void declareInfo(const std::string &name, const T &var, const std::string &desc) const
Declare monitoring information.
Definition: Algorithm.h:409
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:188
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:276
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:525
std::unique_ptr< IDataHandleVisitor >
IConversionSvc.h
Algorithm::isIOBound
bool isIOBound() const
Definition: Algorithm.h:465
Gaudi::PluginService::Factory
Class wrapping the signature for a factory with any number of arguments.
Definition: PluginService.h:47
IHiveWhiteBoard.h
AtlasMCRecoScenario.whiteboard
whiteboard
Definition: AtlasMCRecoScenario.py:17
Algorithm::isInitialized
bool isInitialized() const override
Has the Algorithm already been initialized?
Definition: Algorithm.h:490
Algorithm::registerContext
bool registerContext() const
register for Algorithm Context Service?
Definition: Algorithm.h:330
Algorithm::m_type
std::string m_type
Algorithm&#39;s type.
Definition: Algorithm.h:508
AlgFactory::create
static S::ReturnType create(Args &&...args)
Definition: Algorithm.h:612
Property.h
Algorithm::initialize
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Definition: Algorithm.h:178
Algorithm::isClonable
bool isClonable() const override
Specifies the clonability of the algorithm.
Definition: Algorithm.h:481
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:535
Algorithm::neededResources
const std::vector< std::string > & neededResources() const override
Definition: Algorithm.h:486
Algorithm::cardinality
unsigned int cardinality() const override
Return the cardinality.
Definition: Algorithm.h:484
Algorithm::start
StatusCode start() override
the default (empty) implementation of IStateful::start() method
Definition: Algorithm.h:180
AlgFactory
Definition: Algorithm.h:607
Algorithm::m_EXS
SmartIF< IExceptionSvc > m_EXS
Exception Handler Service.
Definition: Algorithm.h:533
IChronoStatSvc.h
Algorithm::m_pSvcLocator
SmartIF< ISvcLocator > m_pSvcLocator
Pointer to service locator service.
Definition: Algorithm.h:542
Algorithm::m_lock
std::mutex m_lock
for re-entrant Algs
Definition: Algorithm.h:582
Algorithm::declareProperty
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
Definition: Algorithm.h:366
Algorithm::m_RGS
SmartIF< IRndmGenSvc > m_RGS
Random Number Generator Service.
Definition: Algorithm.h:532
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:227
Algorithm::stop
StatusCode stop() override
the default (empty) implementation of IStateful::stop() method
Definition: Algorithm.h:182
Algorithm::m_DDS
SmartIF< IDataProviderSvc > m_DDS
Detector data service.
Definition: Algorithm.h:527
Algorithm::m_aess
SmartIF< IAlgExecStateSvc > m_aess
Alg execution state mgr.
Definition: Algorithm.h:540
Algorithm::type
const std::string & type() const override
The type of the algorithm object.
Definition: Algorithm.h:165
Algorithm::maxErrors
unsigned int maxErrors() const
Definition: Algorithm.h:504
Algorithm::eventDataCnvService
SmartIF< IConversionSvc > & eventDataCnvService() const
Definition: Algorithm.h:283
DataHandle.h
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
std::ostream
STL class.
ISvcLocator.h
Algorithm::configure
StatusCode configure() override
Dummy implementation of IStateful::configure() method.
Definition: Algorithm.h:173
Algorithm::histogramDataService
SmartIF< IHistogramSvc > & histogramDataService() const
Definition: Algorithm.h:292
ToolHandleInfo
General info and helper functions for toolhandles and arrays.
Definition: ToolHandle.h:25
Algorithm::detDataCnvService
SmartIF< IConversionSvc > & detDataCnvService() const
Definition: Algorithm.h:269
IExceptionSvc.h
Algorithm::FSMState
Gaudi::StateMachine::State FSMState() const override
returns the current state of the algorithm
Definition: Algorithm.h:190
INTupleSvc.h
IHistogramSvc.h