| The Gaudi Framework v28r2p1 (f1a77ff4)

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

- File List
- File Members

Sequencer.h
Go to the documentation of this file.
1 #ifndef ALGORITHM_SEQUENCER_H
2 #define ALGORITHM_SEQUENCER_H
3
4 // Include files
5 #include "GaudiKernel/Algorithm.h"
6 #include "GaudiKernel/Property.h"
7
8 class MsgStream;
9
23 class GAUDI_API Sequencer : public Algorithm
24 {
25 public:
29 Sequencer( const std::string& name, // The path object's name
30 ISvcLocator* svcloc // A pointer to a service location service
31 );
32
36 ~Sequencer() override = default;
37
38 /*****************************
39 ** Public Function Members **
40 *****************************/
41
48 StatusCode initialize() override;
49
53 StatusCode reinitialize() override;
54
58 StatusCode start() override;
59
64 StatusCode execute() override;
65
69 StatusCode stop() override;
70
74 StatusCode finalize() override;
75
79 StatusCode beginRun() override;
80
84 StatusCode endRun() override;
85
89 void resetExecuted() override;
90
98 virtual bool branchFilterPassed() const;
99
103 virtual StatusCode setBranchFilterPassed( bool state );
104
108 virtual bool isStopOverride() const;
109
113 StatusCode append( Algorithm* pAlgorithm );
114
118 StatusCode appendToBranch( Algorithm* pAlgorithm );
119
129 StatusCode createAndAppend( const std::string& type, // The concrete algorithm class of the algorithm
130 const std::string& name, // The name to be given to the algorithm
131 Algorithm*& pAlgorithm // Set to point to the newly created algorithm object
132 );
133
143 StatusCode createAndAppendToBranch( const std::string& type, // The concrete algorithm class of the algorithm
144 const std::string& name, // The name to be given to the algorithm
145 Algorithm*& pAlgorithm // Set to point to the newly created algorithm object
146 );
147
151 StatusCode remove( Algorithm* pAlgorithm );
152 StatusCode remove( const std::string& name );
153 StatusCode removeFromBranch( Algorithm* pAlgorithm );
154 StatusCode removeFromBranch( const std::string& name );
155
162 const std::vector<Algorithm*>& branchAlgorithms() const;
163 std::vector<Algorithm*>& branchAlgorithms();
164
166 StatusCode decodeMemberNames();
167
169 StatusCode decodeBranchMemberNames();
170
171 protected:
175 StatusCode append( Algorithm* pAlgorithm, std::vector<Algorithm*>& theAlgs );
176
186 StatusCode createAndAppend( const std::string& type, // The concrete algorithm class of the algorithm
187 const std::string& name, // The name to be given to the algorithm
188 Algorithm*& pAlgorithm, // Set to point to the newly created algorithm object
189 std::vector<Algorithm*>& theAlgs );
190
194 StatusCode decodeNames( Gaudi::Property<std::vector<std::string>>& theNames, std::vector<Algorithm*>& theAlgs,
195 std::vector<bool>& theLogic );
196
200 StatusCode execute( const std::vector<Algorithm*>& theAlgs, std::vector<bool>& theLogic, Algorithm*& lastAlgorithm,
201 unsigned int first = 0 );
202
206 StatusCode executeMember( Algorithm* theAlgorithm );
207
212 StatusCode remove( const std::string& algname, std::vector<Algorithm*>& theAlgs );
213
214 // NO COPY / ASSIGNMENT ALLOWED
215 Sequencer( const Sequencer& a ) = delete;
216 Sequencer& operator=( const Sequencer& rhs ) = delete;
217
218 public:
220 std::ostream& toControlFlowExpression( std::ostream& os ) const override;
221
222 private:
223 /**************************
224 ** Private Data Members **
225 **************************/
226
227 Gaudi::Property<std::vector<std::string>> m_names{this, "Members", {}, "member names"};
228 Gaudi::Property<std::vector<std::string>> m_branchNames{this, "BranchMembers", {}, "branch member names"};
229 Gaudi::Property<bool> m_stopOverride{this, "StopOverride", false, "stop on filter failure override"};
230
231 std::vector<bool> m_isInverted; // Member logic inverted list
232 std::vector<Algorithm*> m_branchAlgs; // Branch algorithms
233 std::vector<bool> m_isBranchInverted; // Branch Member logic inverted list
234
235 bool m_branchFilterPassed = false; // Branch filter passed flag
236 };
237
238 #endif // ALGORITHM_SEQUENCER_H
Algorithm::endRun
StatusCode endRun() override
Algorithm end run. This method is called at the end of the event loop.
Definition: Algorithm.cpp:482
Algorithm::resetExecuted
void resetExecuted() override
Reset the executed state of the Algorithm for the duration of the current event.
Definition: Algorithm.cpp:735
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
Algorithm.h
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:715
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::toControlFlowExpression
std::ostream & toControlFlowExpression(std::ostream &os) const override
Produce string represention of the control flow expression.
Definition: Algorithm.cpp:974
Gaudi::Functional::execute
StatusCode execute() override final
Algorithm::finalize
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
Definition: Algorithm.h:184
std::string
STL class.
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
gaudirun.type
type
Definition: gaudirun.py:125
Algorithm::operator=
Algorithm & operator=(const Algorithm &rhs)
Private assignment operator: NO ASSIGNMENT ALLOWED.
Algorithm::beginRun
StatusCode beginRun() override
Algorithm begin run.
Definition: Algorithm.cpp:434
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:78
std::vector< Algorithm * >
Sequencer::m_branchAlgs
std::vector< Algorithm * > m_branchAlgs
Definition: Sequencer.h:232
Sequencer::m_isInverted
std::vector< bool > m_isInverted
Definition: Sequencer.h:231
Property.h
Algorithm::initialize
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Definition: Algorithm.h:178
Algorithm::start
StatusCode start() override
the default (empty) implementation of IStateful::start() method
Definition: Algorithm.h:180
Algorithm::stop
StatusCode stop() override
the default (empty) implementation of IStateful::stop() method
Definition: Algorithm.h:182
Sequencer
ClassName: Sequencer.
Definition: Sequencer.h:23
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
Algorithm::reinitialize
StatusCode reinitialize() override
the default (empty) implementation of IStateful::reinitialize() method
Definition: Algorithm.cpp:678
std::ostream
STL class.
Sequencer::m_isBranchInverted
std::vector< bool > m_isBranchInverted
Definition: Sequencer.h:233