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

Sequencer Class Reference

ClassName: Sequencer. More...

#include <Sequencer.h>

Inheritance diagram for Sequencer:

Algorithm List of all members.

Public Methods

 Sequencer ( const std::string& name, ISvcLocator* svcloc )
 Constructor(s). More...

virtual ~Sequencer ( )
 Destructor. More...

virtual StatusCode initialize ( )
 Initialization of a sequencer. More...

virtual StatusCode execute ( )
 The actions to be performed by the sequencer on an event. More...

virtual StatusCode finalize ( )
 Sequencer finalization. More...

StatusCode resetExecuted ( )
 Reset the Sequencer executed state for the current event. More...

virtual bool branchFilterPassed ( ) const
 Was the branch filter passed for the last event? More...

virtual StatusCode setBranchFilterPassed ( bool state )
 Set the branch filter passed flag for the last event. More...

virtual bool isStopOverride ( ) const
 Has the StopOverride mode been set? More...

StatusCode append ( Algorithm* pAlgorithm )
 Append an algorithm to the sequencer. More...

StatusCode appendToBranch ( Algorithm* pAlgorithm )
 Append an algorithm to the sequencer branch. More...

StatusCode createAndAppend ( const std::string& type, const std::string& name, Algorithm*& pAlgorithm )
 Create a algorithm and append it to the sequencer. More...

StatusCode createAndAppendToBranch ( const std::string& type, const std::string& name, Algorithm*& pAlgorithm )
 Create a algorithm and append it to the sequencer branch. More...

StatusCode remove ( Algorithm* pAlgorithm )
 Remove the specified algorithm from the sequencer. More...

StatusCode remove ( const std::string& name )
StatusCode removeFromBranch ( Algorithm* pAlgorithm )
StatusCode removeFromBranch ( const std::string& name )
std::vector<Algorithm*>* branchAlgorithms ( ) const
 List of branch algorithms. More...

StatusCode decodeMemberNames ( )
 Decode Member Name list. More...

void membershipHandler ( Property& theProp )
 "Members" property handler. More...

StatusCode decodeBranchMemberNames ( )
 Decode branch member naem list. More...

void branchMembershipHandler ( Property& theProp )
 "BranchMembers" propertry handler. More...


Protected Methods

StatusCode append ( Algorithm* pAlgorithm, std::vector<Algorithm*>* theAlgs )
 Append an algorithm to the sequencer. More...

StatusCode createAndAppend ( const std::string& type, const std::string& name, Algorithm*& pAlgorithm, std::vector<Algorithm*>* theAlgs )
 Create a algorithm and append it to the sequencer. More...

StatusCode decodeNames ( StringArrayProperty& theNames, std::vector<Algorithm*>* theAlgs, std::vector<bool>& theLogic )
 Decode algorithm names, creating or appending algorithms as appropriate. More...

StatusCode execute ( std::vector<Algorithm*>* theAlgs, std::vector<bool>& theLogic, Algorithm*& lastAlgorithm, unsigned int first = 0 )
 Execute the members in the specified list. More...

StatusCode executeMember ( Algorithm* theAlgorithm )
 Execute member algorithm. More...

StatusCode remove ( const std::string& algname, std::vector<Algorithm*>* theAlgs )
 Remove the specified algorithm from the sequencer. More...


Private Methods

 Sequencer ( const Sequencer& a )
 Private Copy constructor: NO COPY ALLOWED.

Sequencer& operator= ( const Sequencer& rhs )
 Private asignment operator: NO ASSIGNMENT ALLOWED.


Private Attributes

StringArrayProperty m_names
std::vector<bool> m_isInverted
StringArrayProperty m_branchNames
std::vector<Algorithm*>* m_branchAlgs
std::vector<bool> m_isBranchInverted
BooleanProperty m_stopOverride
bool m_branchFilterPassed

Detailed Description

ClassName: Sequencer.

Description: A Sequencer is essentially a list of Algorithms and is responsible for their management. Note that Sequences may themselves contain other Sequences. The default execute( ) implementation loops over the members of the sequence, calling their execute( ) methods. However, this can be modified if a member is disabled, has already been executed, or a member indicates that it's filter fails. The the former two cases the execution of the member is bypassed. In the latter case, the loop is terminated and the Sequencer assumes the same filtered state as the last member.

Definition at line 24 of file Sequencer.h.


Constructor & Destructor Documentation

Sequencer::Sequencer ( const std::string & name,
ISvcLocator * svcloc )
 

Constructor(s).

Definition at line 25 of file Sequencer.cpp.

Sequencer::~Sequencer ( ) [virtual]
 

Destructor.

Definition at line 47 of file Sequencer.cpp.

Sequencer::Sequencer ( const Sequencer & a ) [private]
 

Private Copy constructor: NO COPY ALLOWED.


Member Function Documentation

StatusCode Sequencer::append ( Algorithm * pAlgorithm,
std::vector< Algorithm *>* theAlgs ) [protected]
 

Append an algorithm to the sequencer.

Definition at line 300 of file Sequencer.cpp.

StatusCode Sequencer::append ( Algorithm * pAlgorithm )
 

Append an algorithm to the sequencer.

Definition at line 186 of file Sequencer.cpp.

Referenced by appendToBranch(), and decodeNames().

StatusCode Sequencer::appendToBranch ( Algorithm * pAlgorithm )
 

Append an algorithm to the sequencer branch.

Definition at line 193 of file Sequencer.cpp.

std::vector< Algorithm *>* Sequencer::branchAlgorithms ( ) const
 

List of branch algorithms.

These are the algorithms that would get executed if a filter algorithm indicated a failure. The branch is located within the main sequence by the first element, which is the filter algorithm.

Definition at line 248 of file Sequencer.cpp.

Referenced by appendToBranch(), createAndAppendToBranch(), decodeBranchMemberNames(), execute(), finalize(), removeFromBranch(), and resetExecuted().

bool Sequencer::branchFilterPassed ( ) const [virtual]
 

Was the branch filter passed for the last event?

Definition at line 167 of file Sequencer.cpp.

void Sequencer::branchMembershipHandler ( Property & theProp )
 

"BranchMembers" propertry handler.

Definition at line 290 of file Sequencer.cpp.

StatusCode Sequencer::createAndAppend ( const std::string & type,
const std::string & name,
Algorithm *& pAlgorithm,
std::vector< Algorithm *>* theAlgs ) [protected]
 

Create a algorithm and append it to the sequencer.

A call to this method creates a child algorithm object. Note that the returned pointer is to Algorithm (as opposed to IAlgorithm), and thus the methods of IProperty are also available for the direct setting of the algorithm's properties. Using this mechanism instead of creating algorithms directly via the new operator is preferred since then the framework may take care of all of the necessary book-keeping.

Definition at line 322 of file Sequencer.cpp.

StatusCode Sequencer::createAndAppend ( const std::string & type,
const std::string & name,
Algorithm *& pAlgorithm )
 

Create a algorithm and append it to the sequencer.

A call to this method creates a child algorithm object. Note that the returned pointer is to Algorithm (as opposed to IAlgorithm), and thus the methods of IProperty are also available for the direct setting of the algorithm's properties. Using this mechanism instead of creating algorithms directly via the new operator is preferred since then the framework may take care of all of the necessary book-keeping.

Definition at line 200 of file Sequencer.cpp.

Referenced by createAndAppendToBranch(), and decodeNames().

StatusCode Sequencer::createAndAppendToBranch ( const std::string & type,
const std::string & name,
Algorithm *& pAlgorithm )
 

Create a algorithm and append it to the sequencer branch.

A call to this method creates a child algorithm object. Note that the returned pointer is to Algorithm (as opposed to IAlgorithm), and thus the methods of IProperty are also available for the direct setting of the algorithm's properties. Using this mechanism instead of creating algorithms directly via the new operator is preferred since then the framework may take care of all of the necessary book-keeping.

Definition at line 209 of file Sequencer.cpp.

StatusCode Sequencer::decodeBranchMemberNames ( )
 

Decode branch member naem list.

Definition at line 273 of file Sequencer.cpp.

Referenced by branchMembershipHandler(), and initialize().

StatusCode Sequencer::decodeMemberNames ( )
 

Decode Member Name list.

Definition at line 253 of file Sequencer.cpp.

Referenced by initialize(), and membershipHandler().

StatusCode Sequencer::decodeNames ( StringArrayProperty & theNames,
std::vector< Algorithm *>* theAlgs,
std::vector< bool >& theLogic ) [protected]
 

Decode algorithm names, creating or appending algorithms as appropriate.

Definition at line 349 of file Sequencer.cpp.

Referenced by decodeBranchMemberNames(), and decodeMemberNames().

StatusCode Sequencer::execute ( std::vector< Algorithm *>* theAlgs,
std::vector< bool >& theLogic,
Algorithm *& lastAlgorithm,
unsigned int first = 0 ) [protected]
 

Execute the members in the specified list.

Definition at line 450 of file Sequencer.cpp.

StatusCode Sequencer::execute ( ) [virtual]
 

The actions to be performed by the sequencer on an event.

This method is invoked once per event.

Definition at line 73 of file Sequencer.cpp.

StatusCode Sequencer::executeMember ( Algorithm * theAlgorithm ) [protected]
 

Execute member algorithm.

Definition at line 490 of file Sequencer.cpp.

Referenced by execute().

StatusCode Sequencer::finalize ( ) [virtual]
 

Sequencer finalization.

Definition at line 122 of file Sequencer.cpp.

StatusCode Sequencer::initialize ( ) [virtual]
 

Initialization of a sequencer.

Typically things like histogram creation, setting up of data structures etc, should be done here. If a sequence has properties specified in the job options file, they will be set to the requested values BEFORE the initialize() method is invoked.

Definition at line 53 of file Sequencer.cpp.

bool Sequencer::isStopOverride ( ) const [virtual]
 

Has the StopOverride mode been set?

Definition at line 180 of file Sequencer.cpp.

Referenced by execute().

void Sequencer::membershipHandler ( Property & theProp )
 

"Members" property handler.

Definition at line 267 of file Sequencer.cpp.

Sequencer & Sequencer::operator= ( const Sequencer & rhs ) [private]
 

Private asignment operator: NO ASSIGNMENT ALLOWED.

StatusCode Sequencer::remove ( const std::string & algname,
std::vector< Algorithm *>* theAlgs ) [protected]
 

Remove the specified algorithm from the sequencer.

Definition at line 506 of file Sequencer.cpp.

StatusCode Sequencer::remove ( const std::string & algname )
 

Definition at line 226 of file Sequencer.cpp.

StatusCode Sequencer::remove ( Algorithm * pAlgorithm )
 

Remove the specified algorithm from the sequencer.

Definition at line 218 of file Sequencer.cpp.

Referenced by remove(), and removeFromBranch().

StatusCode Sequencer::removeFromBranch ( const std::string & algname )
 

Definition at line 241 of file Sequencer.cpp.

StatusCode Sequencer::removeFromBranch ( Algorithm * pAlgorithm )
 

Definition at line 233 of file Sequencer.cpp.

StatusCode Sequencer::resetExecuted ( )
 

Reset the Sequencer executed state for the current event.

Definition at line 138 of file Sequencer.cpp.

StatusCode Sequencer::setBranchFilterPassed ( bool state ) [virtual]
 

Set the branch filter passed flag for the last event.

Definition at line 173 of file Sequencer.cpp.

Referenced by execute().


Member Data Documentation

std::vector< Algorithm *>* Sequencer::m_branchAlgs [private]
 

Definition at line 222 of file Sequencer.h.

bool Sequencer::m_branchFilterPassed [private]
 

Definition at line 225 of file Sequencer.h.

StringArrayProperty Sequencer::m_branchNames [private]
 

Definition at line 221 of file Sequencer.h.

std::vector< bool > Sequencer::m_isBranchInverted [private]
 

Definition at line 223 of file Sequencer.h.

std::vector< bool > Sequencer::m_isInverted [private]
 

Definition at line 220 of file Sequencer.h.

StringArrayProperty Sequencer::m_names [private]
 

Definition at line 219 of file Sequencer.h.

BooleanProperty Sequencer::m_stopOverride [private]
 

Definition at line 224 of file Sequencer.h.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:20:23 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000