| The Gaudi Framework v27r1

- 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 public:
25
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
91
99 virtual bool branchFilterPassed( ) const;
100
104 virtual StatusCode setBranchFilterPassed( bool state );
105
109 virtual bool isStopOverride( ) const;
110
114 StatusCode append( Algorithm* pAlgorithm );
115
119 StatusCode appendToBranch( Algorithm* pAlgorithm );
120
130 StatusCode createAndAppend(
131 const std::string& type, // The concrete algorithm class of the algorithm
132 const std::string& name, // The name to be given to the algorithm
133 Algorithm*& pAlgorithm // Set to point to the newly created algorithm object
134 );
135
145 StatusCode createAndAppendToBranch(
146 const std::string& type, // The concrete algorithm class of the algorithm
147 const std::string& name, // The name to be given to the algorithm
148 Algorithm*& pAlgorithm // Set to point to the newly created algorithm object
149 );
150
154 StatusCode remove( Algorithm* pAlgorithm );
155 StatusCode remove( const std::string& name );
156 StatusCode removeFromBranch( Algorithm* pAlgorithm );
157 StatusCode removeFromBranch( const std::string& name );
158
165 const std::vector<Algorithm*>& branchAlgorithms( ) const;
166 std::vector<Algorithm*>& branchAlgorithms( );
167
169 StatusCode decodeMemberNames( );
170
172 void membershipHandler( Property& theProp );
173
175 StatusCode decodeBranchMemberNames( );
176
178 void branchMembershipHandler( Property& theProp );
179
180 protected:
181
185 StatusCode append( Algorithm* pAlgorithm,
186 std::vector<Algorithm*>& theAlgs );
187
197 StatusCode createAndAppend(
198 const std::string& type, // The concrete algorithm class of the algorithm
199 const std::string& name, // The name to be given to the algorithm
200 Algorithm*& pAlgorithm, // Set to point to the newly created algorithm object
201 std::vector<Algorithm*>& theAlgs
202 );
203
207 StatusCode decodeNames( StringArrayProperty& theNames,
208 std::vector<Algorithm*>& theAlgs,
209 std::vector<bool>& theLogic );
210
214 StatusCode execute( const std::vector<Algorithm*>& theAlgs,
215 std::vector<bool>& theLogic,
216 Algorithm*& lastAlgorithm, unsigned int first = 0 );
217
221 StatusCode executeMember( Algorithm* theAlgorithm );
222
227 StatusCode remove( const std::string& algname, std::vector<Algorithm*>& theAlgs );
228
229 // NO COPY / ASSIGNMENT ALLOWED
230 Sequencer( const Sequencer& a ) = delete;
231 Sequencer& operator=( const Sequencer& rhs ) = delete;
232
233 private:
234
235 /**************************
236 ** Private Data Members **
237 **************************/
238
239 StringArrayProperty m_names; // Member names
240 std::vector<bool> m_isInverted; // Member logic inverted list
241 StringArrayProperty m_branchNames; // Branch Member names
242 std::vector<Algorithm*> m_branchAlgs; // Branch algorithms
243 std::vector<bool> m_isBranchInverted; // Branch Member logic inverted list
244 BooleanProperty m_stopOverride; // Stop on filter failure Override flag
245 bool m_branchFilterPassed = false; // Branch filter passed flag
246 };
247
248 #endif //ALGORITHM_SEQUENCER_H
249
Algorithm::endRun
StatusCode endRun() override
Algorithm end run. This method is called at the end of the event loop.
Definition: Algorithm.cpp:562
compareRootHistos.state
tuple state
Definition: compareRootHistos.py:348
Algorithm::resetExecuted
void resetExecuted() override
Reset the executed state of the Algorithm for the duration of the current event.
Definition: Algorithm.cpp:848
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
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
Algorithm::finalize
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
Definition: Algorithm.h:187
Sequencer::m_stopOverride
BooleanProperty m_stopOverride
Definition: Sequencer.h:244
Sequencer::m_branchNames
StringArrayProperty m_branchNames
Definition: Sequencer.h:241
std::string
STL class.
AnalysisTest.execute
def execute()
Definition: AnalysisTest.py:25
Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:820
SimpleProperty< std::vector< std::string > >
gaudirun.type
string type
Definition: gaudirun.py:151
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Algorithm::operator=
Algorithm & operator=(const Algorithm &rhs)
Private assignment operator: NO ASSIGNMENT ALLOWED.
Algorithm::beginRun
StatusCode beginRun() override
Algorithm begin run.
Definition: Algorithm.cpp:500
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:74
Property
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
std::vector< Algorithm * >
Sequencer::m_branchAlgs
std::vector< Algorithm * > m_branchAlgs
Definition: Sequencer.h:242
Sequencer::m_isInverted
std::vector< bool > m_isInverted
Definition: Sequencer.h:240
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
Sequencer::m_names
StringArrayProperty m_names
Definition: Sequencer.h:239
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:107
Algorithm::reinitialize
StatusCode reinitialize() override
the default (empty) implementation of IStateful::reinitialize() method
Definition: Algorithm.cpp:785
Sequencer::m_isBranchInverted
std::vector< bool > m_isBranchInverted
Definition: Sequencer.h:243