|
[Rivet-svn] r2970 - trunk/binblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Feb 24 20:05:20 GMT 2011
Author: fsiegert Date: Thu Feb 24 20:05:19 2011 New Revision: 2970 Log: Add nicer sort logic to rivet-mkhtml: Sort analyses by Spires ID and put everything without one at the back Modified: trunk/bin/rivet-mkhtml Modified: trunk/bin/rivet-mkhtml ============================================================================== --- trunk/bin/rivet-mkhtml Thu Feb 24 20:04:06 2011 (r2969) +++ trunk/bin/rivet-mkhtml Thu Feb 24 20:05:19 2011 (r2970) @@ -123,6 +123,13 @@ if reffile and reffile not in reffiles: reffiles.append(reffile) +def anasort(name): + if len(name.split("_"))==3 and not name.startswith("MC"): + if name.split("_")[2].startswith("S"): + return name.split("_")[2][1:] + return "0"+name +analyses=sorted(analyses, key=anasort, reverse=True) + ## Run compare-histos to get plain .dat files from .aida ## We do this here since it also makes the necessary directories @@ -161,7 +168,7 @@ if opts.SINGLE: ## Write table of contents index.write('<ul>\n') - for analysis in sorted(analyses, reverse=True): + for analysis in analyses: summary = analysis ana = rivet.AnalysisLoader.getAnalysis(analysis) if ana: @@ -171,7 +178,7 @@ index.write('<li><a href="#%s">%s</a>\n' % (analysis, summary) ) index.write('</ul>\n') -for analysis in sorted(analyses, reverse=True): +for analysis in analyses: references = [] summary = analysis description = "NONE" @@ -251,7 +258,7 @@ mp_cmd.append("-c") mp_cmd.append(os.path.expanduser(configfile)) datfiles = [] -for analysis in sorted(analyses, reverse=True): +for analysis in analyses: anapath = os.path.join(opts.OUTPUTDIR, analysis) #print anapath anadatfiles = glob.glob("%s/*.dat" % anapath)
More information about the Rivet-svn mailing list |