count = 0 doubleComparisonMacro = "/uscms/home/meloam/scratch/s8workflow/DoubleComparison.C" def getFileNameStub(args): print "looking at %s" % args["node"].getName() try: return args["node"].getOnlyFile() except: print "failed at %s" % args["node"].getName() raise doubleMonitorPlotList = Miter() for (onedata, onemc) in haddedDataMiter.zip(rootQCDMiter): print "zipping %s %s" % (onedata[1], onemc[1]) subMonitorAbs = os.path.join(doubleMonitorAbs, onedata[1]["opoint"], onedata[1]["bin"]) subMonitorRel = os.path.join(doubleMonitorRel, onedata[1]["opoint"], onedata[1]["bin"]) for onebin in jet_bins: if onebin[0] == onedata[1]["bin"]: minbin = onebin[2] maxbin = onebin[3] monitorNames = [ ["MonitorAnalyzer/n/njet_pt", "-njetpt", "Njet_{pt}"], ["MonitorAnalyzer/n/njet_eta", "-njeteta", "Njet_{eta}"], ["MonitorAnalyzer/generic/pvs", "-pvs", "N_{pv}"], ] fileDesc = "mcVsdata"
# # def getFileNameStub( args ): print "looking at %s" % args['node'].getName() try: return args['node'].getOnlyFile() except: print "failed at %s" % args['node'].getName() raise s8macro = "/uscms/home/meloam/s8/CMSSW_3_9_8_patch1/src/RecoBTag/PerformanceMeasurements/test/S8Solver/run_s8.C" scaleFactors = Miter() for (onedata, onemc) in haddedDataFinalMiter.zip( haddedMCFinalMiter ): print "zipping1 %s, %s" % (onedata[1],onemc[1]) opoint = onedata[1]['opoint'] collect = Node( name = "collect-s8solve-close-%s" % opoint ) solution= Node( name = "s8volve-close-%s" % opoint ) g.addNode( collect ) g.addNode( solution ) g.addEdge( onedata[0], collect, NullEdge() ) g.addEdge( onemc[0] , collect, NullEdge() ) runs8edge = LocalScriptEdge( name = "s8solver-closure-%s" % ( opoint) , command = BindSubstitutes("root -b -q '%s(\"%s\",\"%s\",1)' &> output.txt" % \ ( s8macro, '%s','%s' ), [BindFunction( func = getFileNameStub, args = { 'node': onemc[0] } ),
handle = open("/afs/fnal.gov/files/home/room3/meloam/public_html/s8/v-1/input_single.json", "w+") handle.write(json.dumps({"data": targetList, "tagList": tagList})) handle.close() # # Make some comparison plots # plotMiter = Miter() uploadMiter = Miter() mcVsDataCollect = Node(name="mcVsData-collect") mcVsDataWebpage = Node(name="mcVsData-page") for (onedata, onemc) in haddedDataMiter.zip(haddedSkippedQCDMiter): print "Will zip opoint %s bin %s" % (onedata[1]["opoint"], onedata[1]["bin"]) # # Set up global index # def pageText(args): retval = "<html><head><title>Global s8 index</title></head>" retval += "<body><h1>s8 workflow output!</h1><ul>" for onepage in args["pages"].iterMany(): retval += '<li><a href="%s">%s</a> - %s</a></li>' % ( httpRoot + onepage[1]["shortname"], onepage[1]["linkname"], onepage[1]["description"],