| The Gaudi Framework v27r1

- 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/IProperty.h"
7 #include "GaudiKernel/IAlgorithm.h"
8 #include "GaudiKernel/IService.h"
9 #include "GaudiKernel/PropertyMgr.h"
10 #include "GaudiKernel/ISvcLocator.h"
11 #include "GaudiKernel/IMessageSvc.h"
12 #include "GaudiKernel/IStateful.h"
13 #include "GaudiKernel/ITimelineSvc.h"
14
15 #include <string>
16 #include <vector>
17
18 // Extra include files (forward declarations should be sufficient)
19 #include "GaudiKernel/IDataProviderSvc.h"
20 #include "GaudiKernel/IHiveWhiteBoard.h"
21 #include "GaudiKernel/IHistogramSvc.h"
22 #include "GaudiKernel/IConversionSvc.h"
23 #include "GaudiKernel/INTupleSvc.h"
24 #include "GaudiKernel/IChronoStatSvc.h"
25 #include "GaudiKernel/IRndmGenSvc.h"
26 #include "GaudiKernel/IAuditorSvc.h"
27 #include "GaudiKernel/IToolSvc.h"
28 #include "GaudiKernel/IMonitorSvc.h"
29 #include "GaudiKernel/IExceptionSvc.h"
30 #include "GaudiKernel/IAlgContextSvc.h"
31 #include "GaudiKernel/Property.h"
32 #include "GaudiKernel/System.h"
33 #include <Gaudi/PluginService.h>
34 #include "GaudiKernel/ToolHandle.h"
35 #include "GaudiKernel/CommonMessaging.h"
36
37 // For concurrency
38 #include "GaudiKernel/EventContext.h"
39 #include "GaudiKernel/DataHandle.h"
40 #include "GaudiKernel/IDataHandleHolder.h"
41
42 class IAlgTool;
43 class ToolHandleInfo;
44
45 #ifndef PACKAGE_VERSION
46 #define PACKAGE_VERSION "unknown"
47 #endif
48
74 class GAUDI_API Algorithm: public CommonMessaging<implements<IAlgorithm,
75 IDataHandleHolder,
76 IProperty,
77 IStateful>> {
78 public:
79 #ifndef __REFLEX__
80 typedef Gaudi::PluginService::Factory<IAlgorithm*,
81 const std::string&,
82 ISvcLocator*> Factory;
83 #endif
84
89 Algorithm( const std::string& name, ISvcLocator *svcloc,
90 const std::string& version=PACKAGE_VERSION );
92 ~Algorithm() override = default;
93
99 StatusCode sysStart() override;
100
106 StatusCode sysInitialize() override;
107
108
114 StatusCode sysReinitialize() override;
115
120 StatusCode sysRestart() override;
121
129 StatusCode sysExecute() 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 ) override;
202
206 void resetExecuted( ) override;
207
211 StatusCode beginRun() override;
212
214 StatusCode endRun() override;
215
216
218 bool isEnabled( ) const override;
219
221 bool filterPassed( ) const override;
222
224 void setFilterPassed( bool state ) override;
225
227 inline int errorCount() const { return m_errorCount; }
228
230 template <class T>
231 StatusCode service
232 ( const std::string& name, T*& psvc, bool createIf = true ) const {
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,
239 T*& psvc) const {
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 return service(name,createIf,quiet).as<T>();
249 }
250
254 SmartIF<IAuditorSvc>& auditorSvc() const;
255
259 SmartIF<IChronoStatSvc>& chronoSvc() const;
261 SmartIF<IChronoStatSvc>& chronoStatService() const;
262
266 SmartIF<IDataProviderSvc>& detSvc() const;
267
269 SmartIF<IDataProviderSvc>& detDataService() const;
270
274 SmartIF<IConversionSvc>& detCnvSvc() const;
275
277 SmartIF<IConversionSvc>& detDataCnvService() const;
278
282 SmartIF<IDataProviderSvc>& eventSvc() const;
284 SmartIF<IDataProviderSvc>& evtSvc () const { return eventSvc() ; }
286 SmartIF<IDataProviderSvc>& eventDataService() const;
287
291 SmartIF<IConversionSvc>& eventCnvSvc() const;
293 SmartIF<IConversionSvc>& eventDataCnvService() const;
294
298 SmartIF<IHistogramSvc>& histoSvc() const;
300 SmartIF<IHistogramSvc>& histogramDataService() const;
301
305 SmartIF<INTupleSvc>& ntupleSvc() const;
306
308 SmartIF<INTupleSvc>& ntupleService() const;
309
313 // SmartIF<IAIDATupleSvc>& atupleSvc() const;
314
315
319 SmartIF<IRndmGenSvc>& randSvc() const;
320
322 SmartIF<IToolSvc>& toolSvc() const;
323
325 SmartIF<IExceptionSvc>& exceptionSvc() const;
326
328 SmartIF<IAlgContextSvc>& contextSvc() const ;
329
330 SmartIF<ITimelineSvc>& timelineSvc() const ;
331
337 SmartIF<ISvcLocator>& serviceLocator() const override;
339 SmartIF<ISvcLocator>& svcLoc () const { return serviceLocator() ; }
340
341 SmartIF<IHiveWhiteBoard>& whiteboard() const;
342
344 bool registerContext() const { return m_registerContext ; }
345
358 StatusCode createSubAlgorithm( const std::string& type,
359 const std::string& name, Algorithm*& pSubAlg );
360
362 const std::vector<Algorithm*>* subAlgorithms() const;
363
365 std::vector<Algorithm*>* subAlgorithms() ;
366
368 StatusCode setProperty( const Property& p ) override;
370 StatusCode setProperty( const std::string& s ) override;
372 StatusCode setProperty( const std::string& n, const std::string& v) override;
374 StatusCode getProperty(Property* p) const override;
376 const Property& getProperty( const std::string& name) const override;
378 StatusCode getProperty( const std::string& n, std::string& v ) const override;
380 const std::vector<Property*>& getProperties( ) const override;
382 bool hasProperty(const std::string& name) const override;
383
384 inline PropertyMgr * getPropertyMgr() { return m_propertyMgr; }
385
393 StatusCode setProperties();
394 // ==========================================================================
424 template <class T>
425 Property* declareProperty
426 ( const std::string& name ,
427 T& property ,
428 const std::string& doc = "none" ) const
429 {
430 return m_propertyMgr->declareProperty(name, property, doc);
431 }
432 // ==========================================================================
434 Property* declareRemoteProperty
435 ( const std::string& name ,
436 IProperty* rsvc ,
437 const std::string& rname = "" ) const
438 {
439 return m_propertyMgr -> declareRemoteProperty ( name , rsvc , rname );
440 }
441
442 // ==========================================================================
443 // declare Tools to the Algorithms
444
445 template <class T>
446 Property* declareProperty(const std::string& name,
447 ToolHandle<T>& hndl,
448 const std::string& doc = "none" ) const {
449
450 Algorithm* a = const_cast<Algorithm*>(this);
451 a->declareTool(hndl).ignore();
452
453 return m_propertyMgr->declareProperty(name, hndl, doc);
454
455 }
456
457 // ==========================================================================
458 // declare ToolHandleArrays to the Algorithms
459
460 template <class T>
461 Property* declareProperty(const std::string& name,
462 ToolHandleArray<T>& hndlArr,
463 const std::string& doc = "none" ) const {
464 m_toolHandleArrays.push_back( &hndlArr );
465 return m_propertyMgr->declareProperty(name, hndlArr, doc);
466 }
467
468 // ==========================================================================
478 inline SmartIF<IMonitorSvc>& monitorSvc() const
479 {
480 // If not already located try to locate it without forcing a creation
481 if ( !m_pMonitorSvc ){
482 m_pMonitorSvc = service(m_monitorSvcName, false, true); // do not create and be quiet
483 }
484 return m_pMonitorSvc;
485 }
486
492 template <class T>
493 void declareInfo( const std::string& name,
494 const T& var,
495 const std::string& desc ) const
496 {
497 IMonitorSvc* mS = monitorSvc().get();
498 if ( mS ) mS->declareInfo(name, var, desc, this);
499 }
500
508 void declareInfo( const std::string& name,
509 const std::string& format,
510 const void* var,
511 int size,
512 const std::string& desc ) const
513 {
514 IMonitorSvc* mS = monitorSvc().get();
515 if ( mS ) mS->declareInfo(name, format, var, size, desc, this);
516 }
517
518 // ==========================================================================
519 public:
520 // ==========================================================================
562 template <class TYPE>
563 StatusCode setProperty
564 ( const std::string& name ,
565 const TYPE& value )
566 { return Gaudi::Utils::setProperty ( m_propertyMgr.get() , name , value ) ; }
567 // ==========================================================================
568
569 // For concurrency
571 EventContext* getContext() const {return m_event_context;}
572
574 void setContext(EventContext* context){m_event_context = context;}
575
576 // From IDataHandleHolder:
577
578 protected:
579 virtual void declareInput(Gaudi::DataHandle* im) override {
580 m_inputHandles.push_back(im);
581 }
582 virtual void declareOutput(Gaudi::DataHandle* im) override {
583 m_outputHandles.push_back(im);
584 }
585
586 public:
587 virtual std::vector<Gaudi::DataHandle*> inputHandles() const override { return m_inputHandles; }
588 virtual std::vector<Gaudi::DataHandle*> outputHandles() const override { return m_outputHandles; }
589
590 virtual const DataObjIDColl& extraInputDeps() const override {
591 return m_extInputDataObjs;
592 }
593 virtual const DataObjIDColl& extraOutputDeps() const override {
594 return m_extOutputDataObjs;
595 }
596
597 virtual void acceptDHVisitor(IDataHandleVisitor*) const override ;
598
599 const DataObjIDColl& inputDataObjs() const { return m_inputDataObjs; }
600 const DataObjIDColl& outputDataObjs() const { return m_outputDataObjs; }
601
602 void commitHandles() override;
603
604 private:
605 std::vector<Gaudi::DataHandle*> m_inputHandles, m_outputHandles;
606 DataObjIDColl m_inputDataObjs, m_outputDataObjs;
607
608 DataObjIDColl m_extInputDataObjs, m_extOutputDataObjs;
609
610 public:
611
612 void registerTool(IAlgTool * tool) const;
613 void deregisterTool(IAlgTool * tool) const;
614
615 template<class T>
616 StatusCode declareTool(ToolHandle<T> &handle,
617 std::string toolTypeAndName = "",
618 bool createIf = true) {
619
620 if (toolTypeAndName == "")
621 toolTypeAndName = handle.typeAndName();
622
623 StatusCode sc = handle.initialize(toolTypeAndName,
624 handle.isPublic() ? nullptr : this,
625 createIf);
626 if (UNLIKELY(!sc)) {
627 throw GaudiException{std::string{"Cannot create handle for "} +
628 (handle.isPublic() ? "public" : "private") +
629 " tool " + toolTypeAndName,
630 name(), sc};
631 }
632
633 m_toolHandles.push_back(&handle);
634
635 return sc;
636 }
637
638 const std::vector<IAlgTool *> & tools() const;
639
640 protected:
641
642 std::vector<IAlgTool *> & tools();
643
644
645 // // adds declared in- and outputs of subAlgorithms to own DOHs
646 // void addSubAlgorithmDataObjectHandles();
647
648 private:
649 //place IAlgTools defined via ToolHandles in m_tools
650 void initToolHandles() const;
651
652 public:
653
655 bool isClonable () const override { return m_isClonable; }
656
658 unsigned int cardinality () const override { return m_cardinality; }
659
660 const std::vector<std::string>& neededResources () const override { return m_neededResources; }
661
662 protected:
663
665 bool isInitialized( ) const override { return Gaudi::StateMachine::INITIALIZED == m_state; }
666
668 bool isFinalized( ) const override{ return Gaudi::StateMachine::CONFIGURED == m_state; }
669
671 EventContext* m_event_context;
672
674 void setIndex(const unsigned int& idx) override;
675
676 private:
677
678 Gaudi::StringKey m_name;
679 std::string m_type;
680 std::string m_version;
681 unsigned int m_index;
682 std::vector<Algorithm *> m_subAlgms;
683
684 //tools used by algorithm
685 mutable std::vector<IAlgTool *> m_tools;
686 mutable std::vector<BaseToolHandle *> m_toolHandles;
687 mutable std::vector<GaudiHandleArrayBase*> m_toolHandleArrays;
688
689
690 private:
691 mutable SmartIF<IMessageSvc> m_MS;
692 mutable SmartIF<IDataProviderSvc> m_EDS;
693 mutable SmartIF<IHiveWhiteBoard> m_WB;
694 mutable SmartIF<IConversionSvc> m_ECS;
695 mutable SmartIF<IDataProviderSvc> m_DDS;
696 mutable SmartIF<IConversionSvc> m_DCS;
697 mutable SmartIF<IHistogramSvc> m_HDS;
698 mutable SmartIF<INTupleSvc> m_NTS;
699 // mutable SmartIF<IAIDATupleSvc> m_ATS; ///< AIDA tuple service
700 mutable SmartIF<IChronoStatSvc> m_CSS;
701 mutable SmartIF<IRndmGenSvc> m_RGS;
702 mutable SmartIF<IExceptionSvc> m_EXS;
703 mutable SmartIF<IAuditorSvc> m_pAuditorSvc;
704 mutable SmartIF<IToolSvc> m_ptoolSvc;
705 mutable SmartIF<IMonitorSvc> m_pMonitorSvc;
706 mutable SmartIF<IAlgContextSvc> m_contextSvc ;
707
708 mutable SmartIF<ITimelineSvc> m_timelineSvc ;
709
710 bool m_registerContext = false ;
711 std::string m_monitorSvcName;
712 SmartIF<ISvcLocator> m_pSvcLocator;
713 protected:
714 SmartIF<PropertyMgr> m_propertyMgr;
715
717 std::unique_ptr<IDataHandleVisitor> m_updateDataHandles;
718
719 private:
720 IntegerProperty m_outputLevel;
721 int m_errorMax;
722 int m_errorCount;
723 BooleanProperty m_auditInit;
724 bool m_auditorInitialize;
725 bool m_auditorReinitialize;
726 bool m_auditorRestart;
727 bool m_auditorExecute;
728 bool m_auditorFinalize;
729 bool m_auditorBeginRun;
730 bool m_auditorEndRun;
731 bool m_auditorStart;
732 bool m_auditorStop;
733 bool m_filterPassed = true;
734 bool m_isEnabled = true;
735 bool m_isExecuted = false;
736 mutable bool m_toolHandlesInit = false;
737 Gaudi::StateMachine::State m_state = Gaudi::StateMachine::CONFIGURED;
738 Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::CONFIGURED;
739 bool m_isFinalized;
740
741 bool m_doTimeline; // send events to TimelineSvc
742
743 bool m_isClonable;
744 unsigned int m_cardinality;
745 std::vector<std::string> m_neededResources;
746
748 StatusCode service_i(const std::string& svcName,
749 bool createIf,
750 const InterfaceID& iid,
751 void** ppSvc) const;
752 StatusCode service_i(const std::string& svcType,
753 const std::string& svcName,
754 const InterfaceID& iid,
755 void** ppSvc) const;
756
758 Algorithm(const Algorithm& a);
759
761 Algorithm& operator=(const Algorithm& rhs);
762 };
763
764 #ifndef GAUDI_NEW_PLUGIN_SERVICE
765 template <class T>
766 class AlgFactory {
767 public:
768 #ifndef __REFLEX__
769 template <typename S, typename... Args>
770 static typename S::ReturnType create(Args&&... args) {
771 return new T(std::forward<Args>(args)...);
772 }
773 #endif
774 };
775
776 // Macros to declare component factories
777 #define DECLARE_ALGORITHM_FACTORY(x) \
778 DECLARE_FACTORY_WITH_CREATOR(x, AlgFactory< x >, Algorithm::Factory)
779 #define DECLARE_NAMED_ALGORITHM_FACTORY(x, n) \
780 DECLARE_FACTORY_WITH_CREATOR_AND_ID(x, AlgFactory< x >, \
781 #n, Algorithm::Factory)
782 #define DECLARE_NAMESPACE_ALGORITHM_FACTORY(n, x) \
783 DECLARE_ALGORITHM_FACTORY(n::x)
784
785 #else
786
787 // Macros to declare component factories
788 #define DECLARE_ALGORITHM_FACTORY(x) DECLARE_COMPONENT(x)
789 #define DECLARE_NAMED_ALGORITHM_FACTORY(x, n) DECLARE_COMPONENT_WITH_ID(x, #n)
790 #define DECLARE_NAMESPACE_ALGORITHM_FACTORY(n, x) DECLARE_COMPONENT(n::x)
791
792 #endif
793
794 #endif //GAUDIKERNEL_ALGORITHM_H
ToolHandle::typeAndName
std::string typeAndName() const override
Definition: ToolHandle.h:199
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:238
compareRootHistos.state
tuple state
Definition: compareRootHistos.py:348
Gaudi::Utils::setProperty
StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
Definition: Property.h:1187
System.h
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
IDataHandleHolder.h
Algorithm::declareOutput
virtual void declareOutput(Gaudi::DataHandle *im) override
Definition: Algorithm.h:582
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
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:692
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:339
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:508
Gaudi::StateMachine::CONFIGURED
Definition: StateMachine.h:14
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
Algorithm::extraInputDeps
virtual const DataObjIDColl & extraInputDeps() const override
Definition: Algorithm.h:590
Algorithm::m_pAuditorSvc
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: Algorithm.h:703
Algorithm::m_toolHandleArrays
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
Definition: Algorithm.h:687
Algorithm::m_auditInit
BooleanProperty m_auditInit
global flag for auditors
Definition: Algorithm.h:723
Algorithm::m_toolHandles
std::vector< BaseToolHandle * > m_toolHandles
Definition: Algorithm.h:686
Algorithm::inputDataObjs
const DataObjIDColl & inputDataObjs() const
Definition: Algorithm.h:599
IAlgorithm.h
IAuditorSvc.h
Gaudi::Utils::hasProperty
GAUDI_API bool hasProperty(const IProperty *p, const std::string &name)
simple function which check the existence of the property with the given name.
Definition: Property.cpp:159
Algorithm::terminate
StatusCode terminate() override
Dummy implementation of IStateful::terminate() method.
Definition: Algorithm.h:178
Algorithm::finalize
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
Definition: Algorithm.h:187
Algorithm::m_tools
std::vector< IAlgTool * > m_tools
Definition: Algorithm.h:685
Algorithm::m_HDS
SmartIF< IHistogramSvc > m_HDS
Histogram data service.
Definition: Algorithm.h:697
EventContext.h
Algorithm::Factory
Gaudi::PluginService::Factory< IAlgorithm *, const std::string &, ISvcLocator * > Factory
Definition: Algorithm.h:82
Algorithm::errorCount
int errorCount() const
Get the number of failures of the algorithm.
Definition: Algorithm.h:227
Algorithm::m_CSS
SmartIF< IChronoStatSvc > m_CSS
Chrono & Stat Service.
Definition: Algorithm.h:700
Algorithm::declareInput
virtual void declareInput(Gaudi::DataHandle *im) override
Definition: Algorithm.h:579
ToolHandleArray
Array of Handles to be used in lieu of vector of naked pointers to tools.
Definition: PropertyMgr.h:24
Algorithm::m_auditorBeginRun
bool m_auditorBeginRun
flag for auditors in "beginRun()"
Definition: Algorithm.h:729
Algorithm::m_contextSvc
SmartIF< IAlgContextSvc > m_contextSvc
Algorithm Context Service.
Definition: Algorithm.h:706
Gaudi::StateMachine::State
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
Definition: StateMachine.h:12
Algorithm::getContext
EventContext * getContext() const
get the context
Definition: Algorithm.h:571
Algorithm::type
const std::string & type() const override
The type of the algorithm object.
Definition: Algorithm.h:168
Algorithm::isFinalized
bool isFinalized() const override
Has the Algorithm already been finalized?
Definition: Algorithm.h:668
getProperty
const char *PyHelper() getProperty(IInterface *p, char *name)
Definition: Bootstrap.cpp:258
Algorithm::declareTool
StatusCode declareTool(ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
Definition: Algorithm.h:616
merge_files.sc
int sc
Definition: merge_files.py:167
Algorithm::declareProperty
Property * declareProperty(const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none") const
Definition: Algorithm.h:461
PropertyMgr
Property manager helper class.
Definition: PropertyMgr.h:37
Algorithm::m_doTimeline
bool m_doTimeline
Definition: Algorithm.h:741
IToolSvc.h
EventContext
This class represents an entry point to all the event specific data.
Definition: EventContext.h:25
GaudiPluginService.cpluginsvc.n
list n
Definition: cpluginsvc.py:217
Algorithm::neededResources
const std::vector< std::string > & neededResources() const override
Definition: Algorithm.h:660
Algorithm::m_version
std::string m_version
Algorithm's version.
Definition: Algorithm.h:680
Gaudi::StringKey
The helper class to represent the efficient "key" for access.
Definition: StringKey.h:35
Algorithm::m_errorMax
int m_errorMax
Algorithm Max number of errors.
Definition: Algorithm.h:721
Algorithm::setContext
void setContext(EventContext *context)
set the context
Definition: Algorithm.h:574
Algorithm::isClonable
bool isClonable() const override
Specifies the clonability of the algorithm.
Definition: Algorithm.h:655
Algorithm::m_errorCount
int m_errorCount
Algorithm error counter.
Definition: Algorithm.h:722
Algorithm::m_outputDataObjs
DataObjIDColl m_outputDataObjs
Definition: Algorithm.h:606
Algorithm::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Definition: Algorithm.h:588
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:717
Algorithm::m_timelineSvc
SmartIF< ITimelineSvc > m_timelineSvc
Timeline Service.
Definition: Algorithm.h:708
SimpleProperty< int >
AthenaScenario.whiteboard
tuple whiteboard
Definition: AthenaScenario.py:77
Algorithm::m_outputHandles
std::vector< Gaudi::DataHandle * > m_outputHandles
Definition: Algorithm.h:605
InterfaceID
Interface ID class.
Definition: IInterface.h:30
Algorithm::getPropertyMgr
PropertyMgr * getPropertyMgr()
Definition: Algorithm.h:384
IDataProviderSvc.h
gaudirun.type
string type
Definition: gaudirun.py:151
Algorithm::m_auditorExecute
bool m_auditorExecute
flag for auditors in "execute()"
Definition: Algorithm.h:727
IMonitorSvc
Definition of the IMonitorSvc interface, which publishes Gaudi variables to outside monitoring proces...
Definition: IMonitorSvc.h:21
Algorithm::m_isClonable
bool m_isClonable
The algorithm clonability of the algorithm.
Definition: Algorithm.h:743
Algorithm::service
SmartIF< T > service(const std::string &name, bool createIf=true, bool quiet=false) const
Definition: Algorithm.h:247
StatusCode::SUCCESS
Definition: StatusCode.h:30
Algorithm::m_auditorReinitialize
bool m_auditorReinitialize
flag for auditors in "Reinitialize()"
Definition: Algorithm.h:725
Algorithm::m_neededResources
std::vector< std::string > m_neededResources
The named resources needed during event looping.
Definition: Algorithm.h:745
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
ITimelineSvc.h
Algorithm::m_index
unsigned int m_index
Algorithm's index.
Definition: Algorithm.h:681
CommonMessaging.h
Algorithm::m_MS
SmartIF< IMessageSvc > m_MS
Message service.
Definition: Algorithm.h:691
Gaudi::DataHandle
Definition: DataHandle.h:27
Algorithm::m_pMonitorSvc
SmartIF< IMonitorSvc > m_pMonitorSvc
Online Monitoring Service.
Definition: Algorithm.h:705
setProperty
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:254
PACKAGE_VERSION
#define PACKAGE_VERSION
Definition: Algorithm.h:46
Algorithm::m_name
Gaudi::StringKey m_name
Algorithm's name for identification.
Definition: Algorithm.h:678
dump_component_properties.value
list value
Definition: dump_component_properties.py:12
Algorithm::setType
void setType(const std::string &type) override
Definition: Algorithm.h:169
std::unordered_set< DataObjID, DataObjID_Hasher >
Algorithm::m_DCS
SmartIF< IConversionSvc > m_DCS
Detector conversion service.
Definition: Algorithm.h:696
IMessageSvc.h
Algorithm::m_isFinalized
bool m_isFinalized
Algorithm has been finalized flag.
Definition: Algorithm.h:739
Algorithm::monitorSvc
SmartIF< IMonitorSvc > & monitorSvc() const
Access the monitor service.
Definition: Algorithm.h:478
IStateful.h
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:25
IService.h
Algorithm::m_ECS
SmartIF< IConversionSvc > m_ECS
Event conversion service.
Definition: Algorithm.h:694
Algorithm::declareProperty
Property * declareProperty(const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none") const
Definition: Algorithm.h:446
Algorithm::m_NTS
SmartIF< INTupleSvc > m_NTS
N tuple service.
Definition: Algorithm.h:698
Algorithm::declareInfo
void declareInfo(const std::string &name, const T &var, const std::string &desc) const
Declare monitoring information.
Definition: Algorithm.h:493
Algorithm::m_auditorRestart
bool m_auditorRestart
flag for auditors in "Restart()"
Definition: Algorithm.h:726
IMonitorSvc.h
PluginService.h
ToolHandleInfo::isPublic
bool isPublic() const
Definition: ToolHandle.h:34
IDataHandleVisitor
Definition: IDataHandleHolder.h:38
ToolHandle
Handle to be used in lieu of naked pointers to tools.
Definition: PropertyMgr.h:22
ToolHandle::initialize
StatusCode initialize(const std::string &toolTypeAndName, const IInterface *parent=nullptr, bool createIf=true)
Definition: ToolHandle.h:157
Algorithm::m_auditorStart
bool m_auditorStart
flag for auditors in "initialize()"
Definition: Algorithm.h:731
IAlgContextSvc.h
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:74
Algorithm::m_extOutputDataObjs
DataObjIDColl m_extOutputDataObjs
Definition: Algorithm.h:608
IProperty.h
Algorithm::evtSvc
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
Definition: Algorithm.h:284
Property
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
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:693
std::unique_ptr< IDataHandleVisitor >
gaudirun.args
list args
Definition: gaudirun.py:290
Algorithm::FSMState
Gaudi::StateMachine::State FSMState() const override
returns the current state of the algorithm
Definition: Algorithm.h:193
IConversionSvc.h
Algorithm::isInitialized
bool isInitialized() const override
Has the Algorithm already been initialized?
Definition: Algorithm.h:665
Gaudi::PluginService::Factory
Class wrapping the signature for a factory with any number of arguments.
Definition: PluginService.h:47
IHiveWhiteBoard.h
Algorithm::registerContext
bool registerContext() const
register for Algorithm Context Service?
Definition: Algorithm.h:344
Algorithm::m_type
std::string m_type
Algorithm's type.
Definition: Algorithm.h:679
AlgFactory::create
static S::ReturnType create(Args &&...args)
Definition: Algorithm.h:770
Algorithm::m_cardinality
unsigned int m_cardinality
The maximum number of clones that can exist.
Definition: Algorithm.h:744
Property.h
PropertyMgr.h
Algorithm::initialize
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Definition: Algorithm.h:181
Algorithm::m_auditorInitialize
bool m_auditorInitialize
flag for auditors in "initialize()"
Definition: Algorithm.h:724
Algorithm::m_outputLevel
IntegerProperty m_outputLevel
Algorithm output level.
Definition: Algorithm.h:720
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:704
gaudirun.s
string s
Definition: gaudirun.py:245
Algorithm::start
StatusCode start() override
the default (empty) implementation of IStateful::start() method
Definition: Algorithm.h:183
CommonMessaging
Definition: CommonMessaging.h:58
AlgFactory
Definition: Algorithm.h:766
Algorithm::m_EXS
SmartIF< IExceptionSvc > m_EXS
Exception Handler Service.
Definition: Algorithm.h:702
IChronoStatSvc.h
Algorithm::m_pSvcLocator
SmartIF< ISvcLocator > m_pSvcLocator
Pointer to service locator service.
Definition: Algorithm.h:712
Algorithm::m_propertyMgr
SmartIF< PropertyMgr > m_propertyMgr
For management of properties.
Definition: Algorithm.h:714
Algorithm::cardinality
unsigned int cardinality() const override
Return the cardinality.
Definition: Algorithm.h:658
Algorithm::outputDataObjs
const DataObjIDColl & outputDataObjs() const
Definition: Algorithm.h:600
Algorithm::m_RGS
SmartIF< IRndmGenSvc > m_RGS
Random Number Generator Service.
Definition: Algorithm.h:701
Algorithm::stop
StatusCode stop() override
the default (empty) implementation of IStateful::stop() method
Definition: Algorithm.h:185
StatusCode::ignore
void ignore() const
Definition: StatusCode.h:108
Algorithm::m_event_context
EventContext * m_event_context
Event specific data for multiple event processing.
Definition: Algorithm.h:671
Algorithm::m_auditorStop
bool m_auditorStop
flag for auditors in "Reinitialize()"
Definition: Algorithm.h:732
Algorithm::m_DDS
SmartIF< IDataProviderSvc > m_DDS
Detector data service.
Definition: Algorithm.h:695
Algorithm::targetFSMState
Gaudi::StateMachine::State targetFSMState() const override
returns the state the algorithm will be in after the ongoing transition
Definition: Algorithm.h:195
IProperty
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:21
Algorithm::m_auditorEndRun
bool m_auditorEndRun
flag for auditors in "endRun()"
Definition: Algorithm.h:730
DataHandle.h
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
Algorithm::m_subAlgms
std::vector< Algorithm * > m_subAlgms
Sub algorithms.
Definition: Algorithm.h:682
ISvcLocator.h
Algorithm::m_monitorSvcName
std::string m_monitorSvcName
Name to use for Monitor Service.
Definition: Algorithm.h:711
Algorithm::configure
StatusCode configure() override
Dummy implementation of IStateful::configure() method.
Definition: Algorithm.h:176
Algorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Definition: Algorithm.h:593
ToolHandleInfo
General info and helper functions for toolhandles and arrays.
Definition: ToolHandle.h:25
Algorithm::m_auditorFinalize
bool m_auditorFinalize
flag for auditors in "finalize()"
Definition: Algorithm.h:728
Algorithm::inputHandles
virtual std::vector< Gaudi::DataHandle * > inputHandles() const override
Definition: Algorithm.h:587
IExceptionSvc.h
INTupleSvc.h
IHistogramSvc.h