| The Gaudi Framework v30r0 (c919700c)

- 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 bool isSequence() const override final { return true; }
99
103 virtual bool branchFilterPassed() const;
104
108 virtual StatusCode setBranchFilterPassed( bool state );
109
113 virtual bool isStopOverride() const;
114
118 StatusCode append( Algorithm* pAlgorithm );
119
123 StatusCode appendToBranch( Algorithm* pAlgorithm );
124
134 StatusCode createAndAppend( const std::string& type, // The concrete algorithm class of the algorithm
135 const std::string& name, // The name to be given to the algorithm
136 Algorithm*& pAlgorithm // Set to point to the newly created algorithm object
137 );
138
148 StatusCode createAndAppendToBranch( const std::string& type, // The concrete algorithm class of the algorithm
149 const std::string& name, // The name to be given to the algorithm
150 Algorithm*& pAlgorithm // Set to point to the newly created algorithm object
151 );
152
156 StatusCode remove( Algorithm* pAlgorithm );
157 StatusCode remove( const std::string& name );
158 StatusCode removeFromBranch( Algorithm* pAlgorithm );
159 StatusCode removeFromBranch( const std::string& name );
160
167 const std::vector<Algorithm*>& branchAlgorithms() const;
168 std::vector<Algorithm*>& branchAlgorithms();
169
171 StatusCode decodeMemberNames();
172
174 StatusCode decodeBranchMemberNames();
175
176 protected:
180 StatusCode append( Algorithm* pAlgorithm, std::vector<Algorithm*>& theAlgs );
181
191 StatusCode createAndAppend( const std::string& type, // The concrete algorithm class of the algorithm
192 const std::string& name, // The name to be given to the algorithm
193 Algorithm*& pAlgorithm, // Set to point to the newly created algorithm object
194 std::vector<Algorithm*>& theAlgs );
195
199 StatusCode decodeNames( Gaudi::Property<std::vector<std::string>>& theNames, std::vector<Algorithm*>& theAlgs,
200 std::vector<bool>& theLogic );
201
205 StatusCode execute( const std::vector<Algorithm*>& theAlgs, std::vector<bool>& theLogic, Algorithm*& lastAlgorithm,
206 unsigned int first = 0 );
207
211 StatusCode executeMember( Algorithm* theAlgorithm );
212
217 StatusCode remove( const std::string& algname, std::vector<Algorithm*>& theAlgs );
218
219 // NO COPY / ASSIGNMENT ALLOWED
220 Sequencer( const Sequencer& a ) = delete;
221 Sequencer& operator=( const Sequencer& rhs ) = delete;
222
223 public:
225 std::ostream& toControlFlowExpression( std::ostream& os ) const override;
226
227 private:
228 /**************************
229 ** Private Data Members **
230 **************************/
231
232 Gaudi::Property<std::vector<std::string>> m_names{this, "Members", {}, "member names"};
233 Gaudi::Property<std::vector<std::string>> m_branchNames{this, "BranchMembers", {}, "branch member names"};
234 Gaudi::Property<bool> m_stopOverride{this, "StopOverride", false, "stop on filter failure override"};
235
236 std::vector<bool> m_isInverted; // Member logic inverted list
237 std::vector<Algorithm*> m_branchAlgs; // Branch algorithms
238 std::vector<bool> m_isBranchInverted; // Branch Member logic inverted list
239
240 bool m_branchFilterPassed = false; // Branch filter passed flag
241 };
242
243 #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:506
Algorithm::resetExecuted
void resetExecuted() override
Reset the executed state of the Algorithm for the duration of the current event.
Definition: Algorithm.cpp:760
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
Algorithm.h
Sequencer::isSequence
bool isSequence() const override final
additional interface methods
Definition: Sequencer.h:98
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:737
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:32
compareRootHistos.state
state
Definition: compareRootHistos.py:424
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:319
Algorithm::toControlFlowExpression
std::ostream & toControlFlowExpression(std::ostream &os) const override
Produce string represention of the control flow expression.
Definition: Algorithm.cpp:1011
Gaudi::Functional::execute
StatusCode execute() override final
Algorithm::finalize
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
Definition: Algorithm.h:187
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:133
Algorithm::operator=
Algorithm & operator=(const Algorithm &rhs)
Private assignment operator: NO ASSIGNMENT ALLOWED.
Algorithm::beginRun
StatusCode beginRun() override
Algorithm begin run.
Definition: Algorithm.cpp:458
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:79
std::vector< Algorithm * >
Sequencer::m_branchAlgs
std::vector< Algorithm * > m_branchAlgs
Definition: Sequencer.h:237
Sequencer::m_isInverted
std::vector< bool > m_isInverted
Definition: Sequencer.h:236
Property.h
Algorithm::initialize
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Definition: Algorithm.h:181
Algorithm::start
StatusCode start() override
the default (empty) implementation of IStateful::start() method
Definition: Algorithm.h:183
Algorithm::stop
StatusCode stop() override
the default (empty) implementation of IStateful::stop() method
Definition: Algorithm.h:185
Sequencer
ClassName: Sequencer.
Definition: Sequencer.h:23
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
Algorithm::reinitialize
StatusCode reinitialize() override
the default (empty) implementation of IStateful::reinitialize() method
Definition: Algorithm.cpp:700
std::ostream
STL class.
Sequencer::m_isBranchInverted
std::vector< bool > m_isBranchInverted
Definition: Sequencer.h:238