|
[Rivet-svn] r4197 - trunk/docblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Mar 6 16:59:28 GMT 2013
Author: buckley Date: Wed Mar 6 16:59:28 2013 New Revision: 4197 Log: Fixed missing YODAfied histogramming in CDF_2008_S7541902 Modified: trunk/doc/mk-analysis-latex trunk/doc/readplot.py Modified: trunk/doc/mk-analysis-latex ============================================================================== --- trunk/doc/mk-analysis-latex Wed Mar 6 15:24:54 2013 (r4196) +++ trunk/doc/mk-analysis-latex Wed Mar 6 16:59:28 2013 (r4197) @@ -169,25 +169,34 @@ page += "\n\\noindent " + niceify(para) + "\n" - # TODO: The plot file contains patterns, not all histo names: we need to work a bit harder than this! # try: - # import readplot - # info = readplot.plotinfo(ana.name()) - # histpage = "" - # histcount = 0 - # if info and info.keys(): - # histpage += "\n\\vspace{1em}\n\\noindent\n" - # histpage += "\\textbf{Histograms:}\n \\penalty 100\n" - # try: - # histpage += "\\begin{itemize}\n" - # for hpath in sorted(info.keys()): - # htitle = info[hpath]["TITLE"] - # histpage += " \\item %s (\kbd{%s})\n" % (htitle, hpath.replace(r"_", r"\_")) - # histcount += 1 - # finally: - # histpage += "\\end{itemize}\n" - # if histcount > 0: - # page += histpage + anarefpath = os.path.join("..", "data", "refdata", ana.name()+".yoda") + hpaths = None + if os.path.exists(anarefpath): + import yoda + aos = yoda.readYODA(anarefpath) + hpaths = [ao.path for ao in aos] + paths_titles = {} + if hpaths: + import lighthisto + pp = lighthisto.PlotParser([os.path.join("..", "data", "plotinfo")]) + for hp in hpaths: + attrs = pp.getHeaders(hp) + print "BAR", hp, attrs + if attrs.has_key("Title"): + paths_titles[hp] = attrs["Title"] + + print hpaths + print paths_titles + + page = "" + if paths_titles: + page += "\n\\vspace{1em}\n\\noindent\n" + page += "\\textbf{Histograms:}\n \\penalty 100\n" + page += "\\begin{itemize}\n" + for hpath, htitle in sorted(paths_titles.iteritems()): + page += " \\item %s (\\kbd{%s})\n" % (htitle, hpath.replace(r"_", r"\_")) + page += "\\end{itemize}\n" # except: # pass Modified: trunk/doc/readplot.py ============================================================================== --- trunk/doc/readplot.py Wed Mar 6 15:24:54 2013 (r4196) +++ trunk/doc/readplot.py Wed Mar 6 16:59:28 2013 (r4197) @@ -43,11 +43,6 @@ import rivet -# all_analyses = rivet.AnalysisLoader.analysisNames() -# for a in -#plotinfos = glob.glob(os.path.join(os.getcwd(), "..", "data", "plotinfo", "*")) - - ## Get list of plots for each analysis def plotinfo(aname): finfo = None
More information about the Rivet-svn mailing list |