00001
00002
00003
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
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
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
00054
00055 if '__main__' == __name__ :
00056 gaudi = GaudiPython.AppMgr()
00057 configure( gaudi )
00058 gaudi.run(1)
00059
00060