[Rivet-svn] r2352 - trunk/bin

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Mar 22 16:59:59 GMT 2010


Author: fsiegert
Date: Mon Mar 22 16:59:59 2010
New Revision: 2352

Log:
Add option to rivet-mkhtml to ignore unvalidated analyses for plot website.

Modified:
   trunk/bin/rivet-mkhtml

Modified: trunk/bin/rivet-mkhtml
==============================================================================
--- trunk/bin/rivet-mkhtml	Mon Mar 22 16:38:14 2010	(r2351)
+++ trunk/bin/rivet-mkhtml	Mon Mar 22 16:59:59 2010	(r2352)
@@ -35,6 +35,8 @@
                   help="Plot config file(s) to be used with make-plots.")
 parser.add_option("-s", "--single", dest="SINGLE", action="store_true",
                   default=False, help="Display plots on single webpage.")
+parser.add_option("-i", "--ignore-unvalidated", dest="IGNORE_UNVALIDATED", action="store_true",
+                  default=False, help="Ignore unvalidated analyses.")
 
 
 opts, aidafiles = parser.parse_args()
@@ -99,7 +101,7 @@
     if os.access(os.path.expanduser(configfile), os.R_OK):
         mp_cmd.append("-c")
         mp_cmd.append(os.path.expanduser(configfile))
-for analysis in sorted(analyses):
+for analysis in sorted(analyses, reverse=True):
     anapath = os.path.join(opts.OUTPUTDIR, analysis)
     datfiles = glob.glob("%s/*.dat" % anapath)
     for datfile in sorted(datfiles):
@@ -135,16 +137,18 @@
 if opts.SINGLE:
     # write table of contents
     index.write('<ul>\n')
-    for analysis in sorted(analyses):
+    for analysis in sorted(analyses, reverse=True):
         summary=analysis
         if rivetavailable:
             ana=rivet.AnalysisLoader.getAnalysis(analysis)
             if ana:
                 summary="%s (%s)" % (ana.summary(), analysis)
+                if opts.IGNORE_UNVALIDATED and ana.status()!="VALIDATED":
+                    continue
         index.write('<li><a href="#%s">%s</a>\n' % (analysis, summary) )
     index.write('</ul>\n')
 
-for analysis in sorted(analyses):
+for analysis in sorted(analyses, reverse=True):
     references=[]
     summary=analysis
     description="Description not available."
@@ -156,6 +160,8 @@
             references=ana.references()
             description=ana.description()
             spiresid=ana.spiresId()
+            if opts.IGNORE_UNVALIDATED and ana.status()!="VALIDATED":
+                continue
     if opts.SINGLE:
         index.write('<h3 style="clear:left; padding-top:2em;"><a name="%s">%s</a></h3>\n' % (analysis, summary) )
     else:


More information about the Rivet-svn mailing list