Functions | |
def | configure |
def | run |
def AnalysesEx::RawData2Tree::configure | ( | argv = [] |
) |
Definition at line 3 of file RawData2Tree.py.
00003 : 00004 00005 from DetHelpers.DetHelpersConf import PmtGeomInfoSvc 00006 pgisvc = PmtGeomInfoSvc("PmtGeomInfoSvc") 00007 pgisvc.StreamItems = [ "/dd/Structure/DayaBay" ] 00008 00009 from Gaudi.Configuration import ApplicationMgr 00010 app = ApplicationMgr() 00011 app.HistogramPersistency = 'ROOT' 00012 00013 import sys, getopt 00014 opts,args = getopt.getopt(argv,"o:c:p:") 00015 outFile = "ntuple.root" 00016 cableMap = "" 00017 printFreq = -1 00018 for opt,arg in opts: 00019 if opt == "-o": 00020 outFile = arg 00021 if opt == "-c": 00022 cableMap = arg 00023 if opt == "-p": 00024 printFreq = arg 00025 print 'Output file = %s.' % outFile 00026 00027 if cableMap != "": 00028 from DataSvc.DataSvcConf import StaticCableSvc 00029 cableSvc = StaticCableSvc() 00030 cableSvc.FeeCableMap = cableMap 00031 #"/publicfs/dyb/data/mc/MCData_challenge/MCData_challengeScript/Nuwa-trunk/AnalysesEx/share/feeCableMap.txt" 00032 00033 from AnalysesEx.AnalysesExConf import RawData2Tree 00034 rawalg = RawData2Tree() 00035 rawalg.CheckReadout = True 00036 rawalg.PrintFreq = printFreq 00037 app.TopAlg.append(rawalg) 00038 app.ExtSvc += ["NTupleSvc"] 00039 00040 from GaudiSvc.GaudiSvcConf import NTupleSvc 00041 ntSvc = NTupleSvc() 00042 ntSvc.Output += [ "FILE1 DATAFILE='" + outFile + "' OPT='NEW' TYP='ROOT'" ] 00043 00044 return 00045 def run(app):
def AnalysesEx::RawData2Tree::run | ( | app | ) |