| The Gaudi Framework v28r2-patches (bc4ad17a)

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

- File List
- File Members

GaudiSequencer.h
Go to the documentation of this file.
1 #ifndef GAUDISEQUENCER_H
2 #define GAUDISEQUENCER_H 1
3
4 // Include files
5 // from Gaudi
6 #include "GaudiAlg/GaudiAlgorithm.h"
7
8 // Forward declarations
9 class ISequencerTimerTool;
10
26 class GAUDI_API GaudiSequencer : public GaudiAlgorithm
27 {
28 public:
30 GaudiSequencer( const std::string& name, ISvcLocator* pSvcLocator );
31
32 ~GaudiSequencer() override = default;
33
34 StatusCode initialize() override;
35 StatusCode execute() override;
36 StatusCode finalize() override;
37
38 StatusCode beginRun() override;
39 StatusCode endRun() override;
40
42 void membershipHandler( Gaudi::Details::PropertyBase& theProp );
43
44 protected:
45 class AlgorithmEntry final
46 {
47 public:
49 AlgorithmEntry( Algorithm* alg ) : m_algorithm( alg ) {}
50
51 void setReverse( bool flag ) { m_reverse = flag; }
52
53 Algorithm* algorithm() const { return m_algorithm; }
54 bool reverse() const { return m_reverse; }
55 void setTimer( int nb ) { m_timer = nb; }
56 int timer() const { return m_timer; }
57 private:
58 Algorithm* m_algorithm = nullptr;
59 bool m_reverse = false;
60 int m_timer = 0;
61 };
62
64 StatusCode decodeNames();
65
66 public:
68 std::ostream& toControlFlowExpression(std::ostream& os) const override;
69
70 private:
72 GaudiSequencer( const GaudiSequencer& a ) = delete;
73
75 GaudiSequencer& operator=( const GaudiSequencer& a ) = delete;
76
77 Gaudi::Property<std::vector<std::string>> m_names{this, "Members", {}, "list of algorithms"};
78 Gaudi::Property<bool> m_sequential{this, "Sequential", false, "execute members one at a time"};
79 Gaudi::Property<bool> m_modeOR{this, "ModeOR", false, "use OR logic instead of AND"};
80 Gaudi::Property<bool> m_ignoreFilter{this, "IgnoreFilterPassed", false, "always continue"};
81 Gaudi::Property<bool> m_measureTime{this, "MeasureTime", false, "measure time"};
82 Gaudi::Property<bool> m_returnOK{this, "ReturnOK", false, "forces the sequencer to return a good status"};
83 Gaudi::Property<bool> m_shortCircuit{this, "ShortCircuit", true, "stop processing as soon as possible"};
84 Gaudi::Property<bool> m_invert{this, "Invert", false, "invert the logic result of the sequencer"};
85
86 std::vector<AlgorithmEntry> m_entries;
87 ISequencerTimerTool* m_timerTool = nullptr;
88 int m_timer;
89 };
90 #endif // GAUDISEQUENCER_H
Algorithm::endRun
StatusCode endRun() override
Algorithm end run. This method is called at the end of the event loop.
Definition: Algorithm.cpp:482
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:314
GaudiAlgorithm::initialize
StatusCode initialize() override
standard initialization method
Definition: GaudiAlgorithm.cpp:44
GaudiSequencer
Sequencer for executing several algorithms, stopping when one is faulty.
Definition: GaudiSequencer.h:26
GaudiAlgorithm.h
Header file for class GaudiAlgorithm.
GaudiSequencer::AlgorithmEntry::setReverse
void setReverse(bool flag)
Definition: GaudiSequencer.h:51
GaudiSequencer::AlgorithmEntry::algorithm
Algorithm * algorithm() const
Definition: GaudiSequencer.h:53
GaudiAlgorithm::execute
StatusCode execute() override
standard execution method
Definition: GaudiAlgorithm.cpp:72
operator=
PropertyMgr & operator=(const PropertyMgr &)=delete
std::string
STL class.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GaudiSequencer::AlgorithmEntry
Definition: GaudiSequencer.h:45
Algorithm::beginRun
StatusCode beginRun() override
Algorithm begin run.
Definition: Algorithm.cpp:434
GaudiAlgorithm::finalize
StatusCode finalize() override
standard finalization method
Definition: GaudiAlgorithm.cpp:58
GaudiAlgorithm
The useful base class for data processing algorithms.
Definition: GaudiAlgorithm.h:94
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
std::vector
STL class.
ISequencerTimerTool
Implements the time measurement inside a sequencer.
Definition: ISequencerTimerTool.h:14
GaudiSequencer::AlgorithmEntry::AlgorithmEntry
AlgorithmEntry(Algorithm *alg)
Standard constructor.
Definition: GaudiSequencer.h:49
GaudiSequencer::AlgorithmEntry::timer
int timer() const
Definition: GaudiSequencer.h:56
GaudiSequencer::AlgorithmEntry::reverse
bool reverse() const
Definition: GaudiSequencer.h:54
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
std::ostream
STL class.
GaudiSequencer::AlgorithmEntry::setTimer
void setTimer(int nb)
Definition: GaudiSequencer.h:55
GaudiSequencer::m_timer
int m_timer
Timer number for the sequencer.
Definition: GaudiSequencer.h:88
GaudiSequencer::m_entries
std::vector< AlgorithmEntry > m_entries
List of algorithms to process.
Definition: GaudiSequencer.h:86