def draw_histogram_dict(histograms, suffix="new"):
    """Draw all histograms in this directory and save it as pdf."""
    # disable open canvas
    ROOT.gROOT.SetBatch()
    import Styles
    Styles.tdrStyle2D()
    can = ROOT.TCanvas()
    can.cd()
    dataset = ROOT.TPaveText(.4, .9, .6, .98, "ndc")
    dataset.SetFillColor(0)
    dataset.SetBorderSize(0)
    dataset.AddText(suffix)
    for name, histo in histograms.iteritems():
        name = name.replace(".", "")
        histo.Draw("colz")
        dataset.Draw()
        can.SaveAs("plots/%s_%s.pdf" % (name, suffix))
def draw_histogram_dict( histograms, suffix="new" ):
	"""Draw all histograms in this directory and save it as pdf."""
	# disable open canvas
	ROOT.gROOT.SetBatch()
	import Styles
	Styles.tdrStyle2D()
	can = ROOT.TCanvas()
	can.cd()
	dataset = ROOT.TPaveText(.4,.9,.6,.98, "ndc")
	dataset.SetFillColor(0)
	dataset.SetBorderSize(0)
	dataset.AddText( suffix )
	for name, histo in histograms.iteritems():
		name = name.replace(".","")
		histo.Draw("colz")
		dataset.Draw()
		can.SaveAs("plots/%s_%s.pdf"%(name,suffix))