00001 #!/usr/bin/env python 00002 #" python rawpython.py " 00003 00004 import GaudiPython as gm 00005 appMgr = gm.AppMgr() 00006 appMgr.TopAlg = ['RawDataReader'] 00007 # default: -1 = infinite 00008 appMgr.EvtMax = -1 00009 #appMgr.EvtMax = 3 00010 # default: "" = "EventSelector" 00011 # no need to set EvtSel 00012 #appMgr.EvtSel ="NONE" 00013 appMgr.ExtSvc +=["RawDataEvtSelector/EventSelector","RawDataInputSvc","RawDataConSvc","RootIOCnvSvc","DybStorageSvc"] 00014 per = appMgr.service("EventPersistencySvc") 00015 per.CnvServices = [ "RawDataConSvc" ] 00016 output =appMgr.service("RootIOCnvSvc") 00017 output.DefaultOutput="rawoutput.root" 00018 00019 00020 #------------------------------------------------------------------------------- 00021 # properties of RawDataInputSvc 00022 #------------------------------------------------------------------------------- 00023 rawsvc = appMgr.service("RawDataInputSvc") 00024 ## DAQ test files 00025 #rawsvc.RawDataFiles=["daq.DummyData.0000001.ElecCalib.DYB-AD1.testWritingEvent._0001.data"] 00026 #rawsvc.RawDataFiles=["daq.DummyData.0000001.Physics.DYB-AD1.testWritingEvent._0001.data"] 00027 #rawsvc.RawDataFiles=["daq.NoTag.0000284.Pedstal.UNK-Detector.SFO-1._0001.data"] 00028 rawsvc.RawDataFiles=[ "daq.DummyData.0001234.Physics.DYB-AD1.testWritingEvent._0001.data" 00029 , "daq.DummyData.0001234.Physics.DYB-AD1.testWritingEvent._0002.data" 00030 ] 00031 00032 ## 0: not print 00033 rawsvc.PrintFreq = 0 00034 00035 #------------------------------------------------------------------------------- 00036 # properties of RawDataReader 00037 #------------------------------------------------------------------------------- 00038 rawReader = appMgr.algorithm("RawDataReader") 00039 ## 0: not print 00040 rawReader.PrintFreq = 0 00041 00042 #from RootIOTest.RootIOTestConf import DybStoreAlg 00043 #dsa = DybStoreAlg() 00044 #appMgr.TopAlg.append(dsa) 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()