[Rivet-svn] r3521 - trunk/bin

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Dec 9 14:28:29 GMT 2011


Author: fsiegert
Date: Fri Dec  9 14:28:29 2011
New Revision: 3521

Log:
rivet-mkhtml: Add option to ignore missing AIDA files instead of exiting.

Modified:
   trunk/bin/rivet-mkhtml

Modified: trunk/bin/rivet-mkhtml
==============================================================================
--- trunk/bin/rivet-mkhtml	Wed Dec  7 20:42:50 2011	(r3520)
+++ trunk/bin/rivet-mkhtml	Fri Dec  9 14:28:29 2011	(r3521)
@@ -57,6 +57,8 @@
                   default=False, help="create booklet (currently only available for PDF with pdftk).")
 parser.add_option("-i", "--ignore-unvalidated", dest="IGNORE_UNVALIDATED", action="store_true",
                   default=False, help="ignore unvalidated analyses.")
+parser.add_option("--ignore-missing", dest="IGNORE_MISSING", action="store_true",
+                  default=False, help="ignore missing AIDA files.")
 parser.add_option("-m", "--match", action="append", dest="PATHPATTERNS",
                   help="only write out histograms from analyses whose name matches any of these regexes")
 parser.add_option("-M", "--unmatch", action="append", dest="PATHUNPATTERNS",
@@ -106,7 +108,10 @@
     aidafilepath = os.path.abspath(aidafile.split(":")[0])
     if not os.access(aidafilepath, os.R_OK):
         print "Error: cannot read from %s" % aidafilepath
-        sys.exit(2)
+        if opts.IGNORE_MISSING:
+            continue
+        else:
+            sys.exit(2)
     try:
         tree = ET.parse(aidafilepath)
     except Exception, e:


More information about the Rivet-svn mailing list