def launch_plot(inputFile, outputDirPlots, variables, cuts, samples, plot, nuisances, legend, groupPlot): factory = PlotFactory() factory._tag = opt.tag factory._energy = opt.energy factory._lumi = opt.lumi factory._plotNormalizedDistributions = opt.plotNormalizedDistributions factory._plotNormalizedIncludeData = opt.plotNormalizedIncludeData factory._plotNormalizedDistributionsTHstack = opt.plotNormalizedDistributionsTHstack factory._showIntegralLegend = opt.showIntegralLegend if opt.onlyPlot is not None: factory._plotsToWrite = opt.onlyPlot.split(',') factory._plotLinear = opt.linearOnly or not opt.logOnly factory._plotLog = opt.logOnly or not opt.linearOnly factory._scaleToPlot = opt.scaleToPlot factory._minLogC = opt.minLogC factory._maxLogC = opt.maxLogC factory._minLogCratio = opt.minLogCratio factory._maxLogCratio = opt.maxLogCratio factory._maxLinearScale = opt.maxLinearScale factory._minLogCdifference = opt.minLogCratio factory._maxLogCdifference = opt.maxLogCratio factory._showRelativeRatio = opt.showRelativeRatio factory._showDataMinusBkgOnly = opt.showDataMinusBkgOnly factory._removeWeight = opt.removeWeight factory._invertXY = opt.invertXY factory._fileFormats = opt.fileFormats.split(',') factory._postFit = opt.postFit factory._removeMCStat = opt.removeMCStat factory._plotFancy = opt.plotFancy factory._SkipMissingNuisance = opt.skipMissingNuisance factory._extraLegend = opt.extraLegend factory._preliminary = not opt.NoPreliminary factory._removeAllMC = opt.RemoveAllMC factory.makePlot(inputFile, outputDirPlots, variables, cuts, samples, plot, nuisances, legend, groupPlot)
if not opt.debug: pass elif opt.debug == 2: print 'Logging level set to DEBUG (%d)' % opt.debug logging.basicConfig(level=logging.DEBUG) elif opt.debug == 1: print 'Logging level set to INFO (%d)' % opt.debug logging.basicConfig(level=logging.INFO) factory = PlotFactory() factory._tag = opt.tag factory._energy = opt.energy factory._lumi = opt.lumi factory._plotNormalizedDistributions = opt.plotNormalizedDistributions factory._plotNormalizedIncludeData = opt.plotNormalizedIncludeData factory._plotNormalizedDistributionsTHstack = opt.plotNormalizedDistributionsTHstack factory._showIntegralLegend = opt.showIntegralLegend if opt.onlyPlot is not None: factory._plotsToWrite = opt.onlyPlot.split(',') factory._plotLinear = opt.linearOnly or not opt.logOnly factory._plotLog = opt.logOnly or not opt.linearOnly factory._scaleToPlot = opt.scaleToPlot factory._minLogC = opt.minLogC factory._maxLogC = opt.maxLogC factory._minLogCratio = opt.minLogCratio factory._maxLogCratio = opt.maxLogCratio factory._maxLinearScale = opt.maxLinearScale