| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

dbi_rawpython.py

Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 #" python rawpython.py     "
00003 
00004 import os
00005 os.environ['ENV_TSQL_URL']= 'mysql://dyb1.ihep.ac.cn/DybOffline;';
00006 os.environ['ENV_TSQL_USER']='offdbrw';
00007 os.environ['ENV_TSQL_PSWD']='dybdbrw';
00008 
00009 import GaudiPython as gm
00010 appMgr = gm.AppMgr()
00011 appMgr.Dlls += ['DbiRawDataFileSvcDict']
00012 appMgr.Dlls += ['DatabaseInterfaceDict']
00013 
00014 appMgr.TopAlg = ['RawDataReader']
00015 # default: -1 = infinite
00016 appMgr.EvtMax = -1
00017 #appMgr.EvtMax = 3
00018 # default: "" = "EventSelector"
00019 # no need to set EvtSel
00020 #appMgr.EvtSel ="NONE"
00021 appMgr.ExtSvc +=["RawDataEvtSelector/EventSelector","RawDataInputSvc","RawDataConSvc","RootIOCnvSvc","DybStorageSvc"]
00022 per = appMgr.service("EventPersistencySvc")
00023 per.CnvServices = [ "RawDataConSvc" ]
00024 output =appMgr.service("RootIOCnvSvc")
00025 output.DefaultOutput="rawoutput.root" 
00026 
00027 #-------------------------------------------------------------------------------
00028 # properties of RawDataInputSvc
00029 #-------------------------------------------------------------------------------
00030 rawsvc = appMgr.service("RawDataInputSvc")
00031 ##DBI test
00032 rawsvc.SeqNo = 85
00033 rawsvc.IsDBI = 1
00034 
00035 
00036 ## 0: not print
00037 rawsvc.PrintFreq = 100
00038 
00039 #-------------------------------------------------------------------------------
00040 # properties of RawDataReader
00041 #-------------------------------------------------------------------------------
00042 rawReader = appMgr.algorithm("RawDataReader")
00043 ## 0: not print
00044 rawReader.PrintFreq = 100
00045 
00046 #-------------------------------------------------------------------------------
00047 # OutputLevel: 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL, 7=ALWAYS
00048 #-------------------------------------------------------------------------------
00049 MessageSvc = appMgr.service( "MessageSvc" )
00050 MessageSvc.OutputLevel = 3
00051 MessageSvc.Format = "% F%24W%S%7W%R%T %0W%M"
00052 
00053 appMgr.initialize()
00054 appMgr.run( appMgr.EvtMax )
00055 appMgr.exit()
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:27:41 2011 for RawDataTest by doxygen 1.4.7