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 'MockEvtStorageSvc/DybStorageSvc' ]
00028 appMgr.Dlls += [ 'DybEventMgr' ]
00029 appMgr.TopAlg = [ 'TESDemoTracing',
00030 'TESDemoTrim',
00031 'TESDemoFill1',
00032 'TESDemoFill2',
00033 'TESDemoUse',
00034 'TESDemoMark',
00035 'TESDemoOutput' ]
00036 appMgr.EvtMax = 20
00037 appMgr.EvtSel =""
00038
00039 am = gp.AppMgr(0)
00040
00041 trimSvc = am.service('ArchiveTrimSvc')
00042 trimSvc.DefaultWindowSeconds = 0.0001
00043
00044 tracing = am.algorithm('TESDemoTracing')
00045 tracing.on = 1
00046
00047 fill1 = am.algorithm('TESDemoFill1')
00048 fill1.PositronPercentage = 20
00049 fill2 = am.algorithm('TESDemoFill2')
00050 fill2.NeutronPercentage = 40
00051
00052 am.initialize()
00053 am.run( am.EvtMax )
00054 am.exit()