00001
00002
00003
00004
00005
00006
00007
00008 def hookDebugger(debugger='gdb'):
00009 """debugging helper, hooks debugger to running interpreter process
00010 """
00011 import os
00012 pid = os.spawnvp(os.P_NOWAIT,
00013 debugger, [debugger, '-q', 'python', str(os.getpid())])
00014
00015
00016 import time
00017 time.sleep( 1 )
00018 return
00019
00020 import GaudiPython as gp
00021 appMgr = gp.iService('ApplicationMgr')
00022 appMgr.SvcMapping = [ 'EvtDataSvc/EventDataArchiveSvc',
00023 'DybDataSvc/EventDataSvc',
00024 'MockEvtConversionSvc/EventPersistencySvc',
00025 'HistogramSvc/HistogramDataSvc',
00026 'MockEvtSelector/EventSelector' ]
00027 appMgr.Dlls += [ 'DybEventMgr' ]
00028 appMgr.TopAlg = [ 'TESDemoTrim',
00029 'TESDemoFill1',
00030 'TESDemoFill2',
00031 'TESDemoUse' ]
00032 appMgr.EvtMax = 20
00033 appMgr.EvtSel =""
00034
00035 am = gp.AppMgr()
00036
00037 trimSvc = am.service('ArchiveTrimSvc')
00038 trimSvc.DefaultWindowSeconds = 0.0001
00039
00040 fill1 = am.algorithm('TESDemoFill1')
00041 fill1.PositronPercentage = 20
00042 fill2 = am.algorithm('TESDemoFill2')
00043 fill2.NeutronPercentage = 40
00044
00045 am.initialize()
00046 am.run( am.EvtMax )
00047 am.exit()