| # Gaudi Framework, version v21r10p1 |

Home |  | Generated: 29 Jul 2010

# Sequencer.h

Go to the documentation of this file.

    00001 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiAlg/GaudiAlg/Sequencer.h,v 1.4 2008/06/02 14:22:04 marcocle Exp $
    00002 #ifndef ALGORITHM_SEQUENCER_H
    00003 #define ALGORITHM_SEQUENCER_H
    00004
    00005 // Include files
    00006 #include "GaudiKernel/Algorithm.h"
    00007 #include "GaudiKernel/Property.h"
    00008
    00009 class MsgStream;
    00010
    00024 class GAUDI_API Sequencer: public Algorithm {
    00025  public:
    00026
    00030     Sequencer( const std::string& name, // The path object's name
    00031                    ISvcLocator* svcloc      // A pointer to a service location service
    00032               );
    00033
    00037     virtual ~Sequencer( );
    00038
    00039     /*****************************
    00040      ** Public Function Members **
    00041      *****************************/
    00042
    00049     virtual StatusCode initialize( );
    00050
    00054     virtual StatusCode reinitialize( );
    00055
    00059     virtual StatusCode start( );
    00060
    00065     virtual StatusCode execute( );
    00066
    00070     virtual StatusCode stop( );
    00071
    00075     virtual StatusCode finalize( );
    00076
    00080     virtual StatusCode beginRun( );
    00081
    00085     virtual StatusCode endRun( );
    00086
    00090     void resetExecuted( );
    00091
    00095     virtual bool branchFilterPassed( ) const;
    00096
    00100     virtual StatusCode setBranchFilterPassed( bool state );
    00101
    00105     virtual bool isStopOverride( ) const;
    00106
    00110     StatusCode append( Algorithm* pAlgorithm );
    00111
    00115     StatusCode appendToBranch( Algorithm* pAlgorithm );
    00116
    00126      StatusCode createAndAppend(
    00127             const std::string& type,  // The concrete algorithm class of the algorithm
    00128             const std::string& name,  // The name to be given to the algorithm
    00129             Algorithm*& pAlgorithm    // Set to point to the newly created algorithm object
    00130         );
    00131
    00141      StatusCode createAndAppendToBranch(
    00142             const std::string& type,  // The concrete algorithm class of the algorithm
    00143             const std::string& name,  // The name to be given to the algorithm
    00144             Algorithm*& pAlgorithm    // Set to point to the newly created algorithm object
    00145         );
    00146
    00150     StatusCode remove( Algorithm* pAlgorithm );
    00151     StatusCode remove( const std::string& name );
    00152     StatusCode removeFromBranch( Algorithm* pAlgorithm );
    00153     StatusCode removeFromBranch( const std::string& name );
    00154
    00161     std::vector<Algorithm*>* branchAlgorithms( ) const;
    00162
    00164      StatusCode decodeMemberNames( );
    00165
    00167      void       membershipHandler( Property& theProp );
    00168
    00170      StatusCode decodeBranchMemberNames( );
    00171
    00173      void       branchMembershipHandler( Property& theProp );
    00174
    00175 protected:
    00176
    00180     StatusCode append( Algorithm* pAlgorithm,
    00181                        std::vector<Algorithm*>* theAlgs );
    00182
    00192      StatusCode createAndAppend(
    00193             const std::string& type,  // The concrete algorithm class of the algorithm
    00194             const std::string& name,  // The name to be given to the algorithm
    00195             Algorithm*& pAlgorithm,    // Set to point to the newly created algorithm object
    00196             std::vector<Algorithm*>* theAlgs
    00197         );
    00198
    00202     StatusCode decodeNames( StringArrayProperty& theNames,
    00203                             std::vector<Algorithm*>* theAlgs,
    00204                             std::vector<bool>& theLogic );
    00205
    00209     StatusCode execute( std::vector<Algorithm*>* theAlgs,
    00210                         std::vector<bool>& theLogic,
    00211                         Algorithm*& lastAlgorithm, unsigned int first = 0 );
    00212
    00216     StatusCode executeMember( Algorithm* theAlgorithm );
    00217
    00222     StatusCode remove( const std::string& algname, std::vector<Algorithm*>* theAlgs );
    00223
    00224 private:
    00225
    00226     /******************************
    00227      ** Private Function Members **
    00228      ******************************/
    00229
    00233     Sequencer( const Sequencer& a );
    00234
    00238     Sequencer& operator=( const Sequencer& rhs );
    00239
    00240     /**************************
    00241      ** Private Data Members **
    00242      **************************/
    00243
    00244     StringArrayProperty m_names;             // Member names
    00245     std::vector<bool> m_isInverted;          // Member logic inverted list
    00246     StringArrayProperty m_branchNames;       // Branch Member names
    00247     std::vector<Algorithm*>* m_branchAlgs;   // Branch algorithms
    00248     std::vector<bool> m_isBranchInverted;    // Branch Member logic inverted list
    00249     BooleanProperty m_stopOverride;          // Stop on filter failure Override flag
    00250     bool m_branchFilterPassed;               // Branch filter passed flag
    00251 };
    00252
    00253 #endif //ALGORITHM_SEQUENCER_H
    00254