Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Sequencer.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/GaudiAlg/src/Sequencer.h,v 1.1.1.1 2001/04/18 21:03:30 tlindner 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 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 
00055     virtual StatusCode execute( );
00056 
00060     virtual StatusCode finalize( );
00061 
00065     StatusCode resetExecuted( );
00066 
00070     virtual bool branchFilterPassed( ) const;
00071 
00075     virtual StatusCode setBranchFilterPassed( bool state );
00076 
00080     virtual bool isStopOverride( ) const;
00081 
00085     StatusCode append( Algorithm* pAlgorithm );
00086 
00090     StatusCode appendToBranch( Algorithm* pAlgorithm );
00091 
00101      StatusCode createAndAppend(
00102             const std::string& type,  // The concrete algorithm class of the algorithm
00103             const std::string& name,  // The name to be given to the algorithm
00104             Algorithm*& pAlgorithm    // Set to point to the newly created algorithm object
00105         );
00106 
00116      StatusCode createAndAppendToBranch(
00117             const std::string& type,  // The concrete algorithm class of the algorithm
00118             const std::string& name,  // The name to be given to the algorithm
00119             Algorithm*& pAlgorithm    // Set to point to the newly created algorithm object
00120         );
00121 
00125     StatusCode remove( Algorithm* pAlgorithm );
00126     StatusCode remove( const std::string& name );
00127     StatusCode removeFromBranch( Algorithm* pAlgorithm );
00128     StatusCode removeFromBranch( const std::string& name );
00129 
00136     std::vector<Algorithm*>* branchAlgorithms( ) const;
00137 
00139      StatusCode decodeMemberNames( );
00140 
00142      void       membershipHandler( Property& theProp );
00143 
00145      StatusCode decodeBranchMemberNames( );
00146 
00148      void       branchMembershipHandler( Property& theProp );
00149 
00150 protected:
00151 
00155     StatusCode append( Algorithm* pAlgorithm,
00156                        std::vector<Algorithm*>* theAlgs );
00157 
00167      StatusCode createAndAppend(
00168             const std::string& type,  // The concrete algorithm class of the algorithm
00169             const std::string& name,  // The name to be given to the algorithm
00170             Algorithm*& pAlgorithm,    // Set to point to the newly created algorithm object
00171             std::vector<Algorithm*>* theAlgs
00172         );
00173 
00177     StatusCode decodeNames( StringArrayProperty& theNames,
00178                             std::vector<Algorithm*>* theAlgs,
00179                             std::vector<bool>& theLogic );
00180 
00184     StatusCode execute( std::vector<Algorithm*>* theAlgs,
00185                         std::vector<bool>& theLogic,
00186                         Algorithm*& lastAlgorithm, unsigned int first = 0 );
00187 
00191     StatusCode executeMember( Algorithm* theAlgorithm );
00192 
00197     StatusCode remove( const std::string& algname, std::vector<Algorithm*>* theAlgs );
00198 
00199 private:
00200 
00201     /******************************
00202      ** Private Function Members **
00203      ******************************/
00204 
00208     Sequencer( const Sequencer& a );
00209 
00213     Sequencer& operator=( const Sequencer& rhs );
00214 
00215     /**************************
00216      ** Private Data Members **
00217      **************************/
00218 
00219     StringArrayProperty m_names;             // Member names
00220     std::vector<bool> m_isInverted;          // Member logic inverted list
00221     StringArrayProperty m_branchNames;       // Branch Member names
00222     std::vector<Algorithm*>* m_branchAlgs;   // Branch algorithms
00223     std::vector<bool> m_isBranchInverted;    // Branch Member logic inverted list
00224     BooleanProperty m_stopOverride;          // Stop on filter failure Override flag
00225     bool m_branchFilterPassed;               // Branch filter passed flag
00226 };
00227 
00228 #endif //ALGORITHM_SEQUENCER_H
00229 

Generated at Wed Nov 21 12:20:23 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000