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
10 
27 public:
29  GaudiSequencer( const std::string& name, ISvcLocator* pSvcLocator );
30 
31  ~GaudiSequencer( ) override = default;
32 
33  StatusCode initialize() override;
34  StatusCode execute () override;
35  StatusCode finalize () override;
36 
37  StatusCode beginRun () override;
38  StatusCode endRun () override;
39 
41  void membershipHandler( Property& theProp );
42 
43 protected:
44 
45  class AlgorithmEntry final {
46  public:
48  AlgorithmEntry( Algorithm* alg ) : m_algorithm(alg) { }
49 
50  void setReverse( bool flag ) { m_reverse = flag; }
51 
52  Algorithm* algorithm() const { return m_algorithm; }
53  bool reverse() const { return m_reverse; }
54  void setTimer( int nb ) { m_timer = nb; }
55  int timer() const { return m_timer; }
56  private:
57  Algorithm* m_algorithm = nullptr;
58  bool m_reverse = false;
59  int m_timer = 0;
60  };
61 
63  StatusCode decodeNames( );
64 
65 private:
66 
68  GaudiSequencer( const GaudiSequencer& a );
69 
72 
73  StringArrayProperty m_names;
74  std::vector<AlgorithmEntry> m_entries;
75  bool m_modeOR;
76  bool m_shortCircuit;
77  bool m_ignoreFilter;
80  bool m_isInitialized;
81  bool m_measureTime;
82  bool m_returnOK;
83  ISequencerTimerTool* m_timerTool = nullptr;
84  int m_timer;
85 };
86 #endif // GAUDISEQUENCER_H
GaudiAlgorithm & operator=(const GaudiAlgorithm &)=delete
reverse_wrapper< T > reverse(T &&iterable)
Definition: reverse.h:30
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
#define GAUDI_API
Definition: Kernel.h:107
StatusCode initialize() override
standard initialization method
Sequencer for executing several algorithms, stopping when one is faulty.
StatusCode execute() override
standard execution method
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
StatusCode finalize() override
standard finalization method
The useful base class for data processing algorithms.
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:61
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
Implements the time measurement inside a sequencer.