IAddSequencer.py

Go to the documentation of this file.
00001 from AthenaCommon.Configurable import *
00002 from GaudiAlg.GaudiAlgConf import Sequencer
00003 
00004 from AthenaCommon.Logging import logging
00005 
00006 ## @brief Sequencer class using "+=" to schedule Algorithms.
00007 
00008 class IAddSequencer ( Sequencer )  :
00009 
00010     ## Defines "+=" behaviour.
00011     # First adds Algorithm to the Sequencer, which schedules it to be run
00012     # but DOES NOT take care of ownership. Then appends the full name of the
00013     # Algorithm to the list of Sequencer members. This means that the Sequencer
00014     # owns the Algorithm and prevents it from disappearing before it can be used.
00015     # Returns the Sequencer after the addition. """
00016 
00017     def __iadd__(self,alghandle):
00018 
00019         try:
00020             Sequencer.__iadd__(self, alghandle)
00021             self.Members.append( alghandle.getFullName() )
00022         except (RuntimeError, TypeError):
00023             mlog = logging.getLogger( 'IAddSequencer::__iadd__ ' )
00024             if hasattr( alghandle, 'getFullName' ):
00025                 mlog.error ("Could not add "+alghandle.getFullName()+" to IAddSequencer")
00026             else:
00027                 mlog.error ("Could not add "+str(alghandle)+" to IAddSequencer")
00028         return self

Generated on Mon Sep 24 14:19:11 2007 for AtlfastAlgs by  doxygen 1.5.1