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