00001
00002
00003
00004
00005
00006 headerList = []
00007
00008 def configure(argv = []):
00009
00010 import sys, getopt
00011 opts,args = getopt.getopt(argv,"o:h:")
00012 statsOutput = "tesTree.root"
00013 initializeDataSvc = True
00014 global headerList
00015 for opt,arg in opts:
00016 if opt == "-o":
00017 statsOutput = arg
00018 if opt == "-h":
00019 headerList.append( arg )
00020 if statsOutput != "None":
00021 from StatisticsSvc.StatisticsSvcConf import StatisticsSvc
00022 statsSvc = StatisticsSvc()
00023 statsSvc.Output = {"file0":statsOutput}
00024 return
00025
00026 def run(app):
00027 '''
00028 Configure and add an algorithm to job
00029 '''
00030 app.ExtSvc += ["StatisticsSvc"]
00031 from DataQuality.Tools import TesToTreeAlg
00032 tesToTreeAlg = TesToTreeAlg("TesToTreeAlg")
00033 global headerList
00034 if len(headerList) > 0:
00035 tesToTreeAlg.HeaderList = headerList
00036 app.addAlgorithm(tesToTreeAlg)
00037 pass