/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

RunTESDemo.RegSeq.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 # To use this, place 'hookDebugger()' statement where you want to switch
00004 # into the debugger. Note that if you invoke this script as a command, i.e.
00005 # '$ ./RunTESDemo.py', the session will terminate so it is best it invoke
00006 # it as a python script, i.e. '$ python RunTESDemo.py'.
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      # give debugger some time to attach to the python process
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 # not in system-of-units time!
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()
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:09:00 for TESDemo by doxygen 1.7.4