def savePlots(self,savedir, cfg = "Plotter"): perf[ts[0]].start() cfg = Configuration(cfg) cfg.loadConfiguration(self.config) plots = cfg.getPlots() nohpp = int(plots.getOption("HistsPerPage")) if nohpp >12: nohpp = 12 elif nohpp < 1: nohpp = 1 Drawer.NoHpP = nohpp writeAs = plots.getOption("create").split(",") summaryFile = plots.getOption("summaryFile") Drawer.summaryFile = savedir + "/" + summaryFile histlist = cfg.getAllCanvas() noh = len(histlist) perf[ts[0]].stop() if showPerformance: print "Config read in %s" % perf[ts[0]].getMeasuredTime() self.doHistList(histlist, savedir, writeAs) Drawer.summaryBegin = False Drawer.flushStack(savedir, writeAs) perf[ts[3]].stop() if showPerformance: if noh > 1: print "%d histograms read in %s (%f per hist without caching)" % (noh, perf[ts[2]].getMeasuredTime(), (perf[ts[2]].getMeasuredSeconds()-perf[ts[5]].getMeasuredSeconds())/(noh-1)) print "%d histograms printed in %s (%f per hist without caching)" % (noh, perf[ts[1]].getMeasuredTime(), (perf[ts[1]].getMeasuredSeconds()-perf[ts[4]].getMeasuredSeconds())/(noh-1)) else: print "%d histograms read in %s (%f per hist)" % (noh, perf[ts[2]].getMeasuredTime(), (perf[ts[2]].getMeasuredSeconds())) print "%d histograms printed in %s (%f per hist)" % (noh, perf[ts[1]].getMeasuredTime(), (perf[ts[1]].getMeasuredSeconds())) print "total time elapsed: %s" % perf[ts[3]].getMeasuredTime()