| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

bug_38882.py

Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # =============================================================================
00003 # $Id: bug_38882.py,v 1.1 2008/07/15 16:00:51 marcocle Exp $
00004 # =============================================================================
00005 
00006 # =============================================================================
00007 __author__ = 'Marco Clemencic'
00008 # =============================================================================
00009 
00010 import GaudiPython
00011 
00012 from GaudiPython.GaudiAlgs import GaudiAlgo
00013 
00014 SUCCESS = GaudiPython.SUCCESS 
00015 
00016 # =============================================================================
00017 # Simple algorithm which book&fill 3 histograms
00018 # =============================================================================
00019 class TestAlg(GaudiAlgo) :
00020     """ Simple algorithm that prints a message during execute """
00021     def __init__ ( self , name ) :
00022         """ Constructor """
00023         GaudiAlgo.__init__( self , name )
00024         
00025     def execute( self ) :
00026         """ The main method 'execute', it is invoked for each event """
00027         print "=== %s Execute ===" % self.name()
00028         return SUCCESS
00029 
00030 # =============================================================================
00031 # job configuration 
00032 # =============================================================================
00033 def configure( gaudi = None  ) :
00034     """ Configuration of the job """
00035     
00036     if not gaudi : gaudi = GaudiPython.AppMgr()
00037     
00038     gaudi.JobOptionsType       = 'NONE'
00039     gaudi.EvtSel               = 'NONE'
00040     gaudi.HistogramPersistency = 'NONE'
00041     
00042     gaudi.config()
00043 
00044     gaudi.initialize()
00045 
00046     alg = TestAlg('bug_38882_test_alg')
00047     gaudi.setAlgorithms( [alg] )
00048     
00049     return SUCCESS
00050 
00051 
00052 # =============================================================================
00053 # The actual job excution 
00054 # =============================================================================
00055 if '__main__' == __name__ :
00056     gaudi = GaudiPython.AppMgr()
00057     configure( gaudi )
00058     gaudi.run(1)
00059 
00060     
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:59:39 2011 for GaudiExamples by doxygen 1.4.7