Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]
  Links to LXR source navigation pages for stable releases [ 12.*.* ]   [ 13.*.* ]   [ 14.*.* ]   [ 15.*.* ] 

001 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiAlg/GaudiAlg/Sequencer.h,v 1.4 2008/06/02 14:22:04 marcocle Exp $
002 #ifndef ALGORITHM_SEQUENCER_H
003 #define ALGORITHM_SEQUENCER_H
004 
005 // Include files
006 #include "GaudiKernel/Algorithm.h"
007 #include "GaudiKernel/Property.h"
008 
009 class MsgStream;
010 
011 /**
012  ** ClassName: Sequencer
013  **
014  ** Description: A Sequencer is essentially a list of Algorithms and is responsible
015  **              for their management. Note that Sequences may themselves contain other
016  **              Sequences. The default execute( ) implementation loops over the
017  **              members of the sequence, calling their execute( ) methods. However, this
018  **              can be modified if a member is disabled, has already been executed, or a
019  **              member indicates that it's filter fails. The the former two cases the
020  **             execution of the member is bypassed. In the latter case, the loop is
021  **             terminated and the Sequencer assumes the same filtered state as the
022  **             last member.
023  **/
024 class Sequencer : public Algorithm {
025  public:
026 
027     /**
028      ** Constructor(s)
029      **/
030     Sequencer( const std::string& name, // The path object's name
031                    ISvcLocator* svcloc      // A pointer to a service location service
032               );
033 
034     /**
035      ** Destructor
036      **/
037     virtual ~Sequencer( );
038 
039     /*****************************
040      ** Public Function Members **
041      *****************************/
042 
043     /**
044      ** Initialization of a sequencer. Typically things like histogram creation,
045      ** setting up of data structures etc, should be done here. If a sequence
046      ** has properties specified in the job options file, they will be set to
047      ** the requested values BEFORE the initialize() method is invoked.
048      **/
049     virtual StatusCode initialize( );
050 
051     /**
052      ** Sequencer Reinitialization.
053      **/
054     virtual StatusCode reinitialize( );
055 
056     /**
057      ** Sequencer finalization.
058      **/
059     virtual StatusCode start( );
060 
061     /**
062      ** The actions to be performed by the sequencer on an event. This method
063      ** is invoked once per event.
064      **/
065     virtual StatusCode execute( );
066     
067     /**
068      ** Sequencer finalization.
069      **/
070     virtual StatusCode stop( );
071 
072     /**
073      ** Sequencer finalization.
074      **/
075     virtual StatusCode finalize( );
076     
077     /**
078      ** Sequencer beginRun.
079      **/
080     virtual StatusCode beginRun( );
081 
082     /**
083      ** Sequencer endRun.
084      **/
085     virtual StatusCode endRun( );
086 
087     /**
088      ** Reset the Sequencer executed state for the current event.
089      **/
090     void resetExecuted( );
091 
092     /**
093      ** Was the branch filter passed for the last event?
094      **/
095     virtual bool branchFilterPassed( ) const;
096 
097     /**
098      ** Set the branch filter passed flag for the last event
099      **/
100     virtual StatusCode setBranchFilterPassed( bool state );
101 
102     /**
103      ** Has the StopOverride mode been set?
104      **/
105     virtual bool isStopOverride( ) const;
106 
107     /**
108      ** Append an algorithm to the sequencer.
109      **/
110     StatusCode append( Algorithm* pAlgorithm );
111 
112     /**
113      ** Append an algorithm to the sequencer branch
114      **/
115     StatusCode appendToBranch( Algorithm* pAlgorithm );
116 
117     /**
118      ** Create a algorithm and append it to the sequencer. A call to this method
119      ** creates a child algorithm object. Note that the returned pointer is
120      ** to Algorithm (as opposed to IAlgorithm), and thus the methods of
121      ** IProperty are also available for the direct setting of the algorithm's
122      ** properties. Using this mechanism instead of creating algorithms
123      ** directly via the new operator is preferred since then the framework
124      ** may take care of all of the necessary book-keeping.
125      **/
126      StatusCode createAndAppend(
127             const std::string& type,  // The concrete algorithm class of the algorithm
128             const std::string& name,  // The name to be given to the algorithm
129             Algorithm*& pAlgorithm    // Set to point to the newly created algorithm object
130         );
131 
132     /**
133      ** Create a algorithm and append it to the sequencer branch. A call to this method
134      ** creates a child algorithm object. Note that the returned pointer is
135      ** to Algorithm (as opposed to IAlgorithm), and thus the methods of
136      ** IProperty are also available for the direct setting of the algorithm's
137      ** properties. Using this mechanism instead of creating algorithms
138      ** directly via the new operator is preferred since then the framework
139      ** may take care of all of the necessary book-keeping.
140      **/
141      StatusCode createAndAppendToBranch(
142             const std::string& type,  // The concrete algorithm class of the algorithm
143             const std::string& name,  // The name to be given to the algorithm
144             Algorithm*& pAlgorithm    // Set to point to the newly created algorithm object
145         );
146 
147     /**
148      ** Remove the specified algorithm from the sequencer
149      **/
150     StatusCode remove( Algorithm* pAlgorithm );
151     StatusCode remove( const std::string& name );
152     StatusCode removeFromBranch( Algorithm* pAlgorithm );
153     StatusCode removeFromBranch( const std::string& name );
154 
155     /**
156      ** List of branch algorithms. These are the algorithms
157      ** that would get executed if a filter algorithm indicated
158      ** a failure. The branch is located within the main sequence
159      ** by the first element, which is the filter algorithm.
160      **/
161     std::vector<Algorithm*>* branchAlgorithms( ) const;
162 
163      /// Decode Member Name list
164      StatusCode decodeMemberNames( );
165 
166      /// "Members" property handler
167      void       membershipHandler( Property& theProp );
168 
169      /// Decode branch member naem list
170      StatusCode decodeBranchMemberNames( );
171 
172      /// "BranchMembers" propertry handler
173      void       branchMembershipHandler( Property& theProp );
174 
175 protected:
176 
177     /**
178      ** Append an algorithm to the sequencer.
179      **/
180     StatusCode append( Algorithm* pAlgorithm,
181                        std::vector<Algorithm*>* theAlgs );
182 
183     /**
184      ** Create a algorithm and append it to the sequencer. A call to this method
185      ** creates a child algorithm object. Note that the returned pointer is
186      ** to Algorithm (as opposed to IAlgorithm), and thus the methods of
187      ** IProperty are also available for the direct setting of the algorithm's
188      ** properties. Using this mechanism instead of creating algorithms
189      ** directly via the new operator is preferred since then the framework
190      ** may take care of all of the necessary book-keeping.
191      **/
192      StatusCode createAndAppend(
193             const std::string& type,  // The concrete algorithm class of the algorithm
194             const std::string& name,  // The name to be given to the algorithm
195             Algorithm*& pAlgorithm,    // Set to point to the newly created algorithm object
196             std::vector<Algorithm*>* theAlgs
197         );
198 
199     /**
200      ** Decode algorithm names, creating or appending algorithms as appropriate
201      **/
202     StatusCode decodeNames( StringArrayProperty& theNames,
203                             std::vector<Algorithm*>* theAlgs,
204                             std::vector<bool>& theLogic );
205 
206     /**
207      ** Execute the members in the specified list
208      **/
209     StatusCode execute( std::vector<Algorithm*>* theAlgs,
210                         std::vector<bool>& theLogic,
211                         Algorithm*& lastAlgorithm, unsigned int first = 0 );
212 
213     /**
214      ** Execute member algorithm
215      **/
216     StatusCode executeMember( Algorithm* theAlgorithm );
217 
218     /**
219      ** Remove the specified algorithm from the sequencer
220      **/
221 
222     StatusCode remove( const std::string& algname, std::vector<Algorithm*>* theAlgs );
223 
224 private:
225 
226     /******************************
227      ** Private Function Members **
228      ******************************/
229 
230     /**
231      ** Private Copy constructor: NO COPY ALLOWED
232      **/
233     Sequencer( const Sequencer& a );
234 
235     /**
236      ** Private asignment operator: NO ASSIGNMENT ALLOWED
237      **/
238     Sequencer& operator=( const Sequencer& rhs );
239 
240     /**************************
241      ** Private Data Members **
242      **************************/
243 
244     StringArrayProperty m_names;             // Member names
245     std::vector<bool> m_isInverted;          // Member logic inverted list
246     StringArrayProperty m_branchNames;       // Branch Member names
247     std::vector<Algorithm*>* m_branchAlgs;   // Branch algorithms
248     std::vector<bool> m_isBranchInverted;    // Branch Member logic inverted list
249     BooleanProperty m_stopOverride;          // Stop on filter failure Override flag
250     bool m_branchFilterPassed;               // Branch filter passed flag
251 };
252 
253 #endif //ALGORITHM_SEQUENCER_H
254 

source navigation ] diff markup ] identifier search ] general search ]

Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems
This page was automatically generated by the LXR engine. Valid HTML 4.01!