[Rivet-svn] r2677 - trunk/bin

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Aug 25 15:08:58 BST 2010


Author: fsiegert
Date: Wed Aug 25 15:08:57 2010
New Revision: 2677

Log:
Fix --refid option in compare-histos and make it available in rivet-mkhtml.

Modified:
   trunk/bin/compare-histos
   trunk/bin/rivet-mkhtml

Modified: trunk/bin/compare-histos
==============================================================================
--- trunk/bin/compare-histos	Tue Aug 24 13:23:01 2010	(r2676)
+++ trunk/bin/compare-histos	Wed Aug 25 15:08:57 2010	(r2677)
@@ -206,8 +206,7 @@
 
     ## Handle a request for a reference dataset other than REF
     if opts.REF_ID != "REF":
-        opts.REF_ID = os.path.abspath(opts.REF_ID)
-        if not os.access(opts.REF_ID, os.R_OK):
+        if not os.access(os.path.abspath(opts.REF_ID), os.R_OK):
             logging.error("Error: cannot read reference file %s" % opts.REF_ID)
             sys.exit(2)
 

Modified: trunk/bin/rivet-mkhtml
==============================================================================
--- trunk/bin/rivet-mkhtml	Tue Aug 24 13:23:01 2010	(r2676)
+++ trunk/bin/rivet-mkhtml	Wed Aug 25 15:08:57 2010	(r2677)
@@ -33,6 +33,8 @@
                   default=False, help="display plots on single webpage.")
 parser.add_option("--no-mc-errs", dest="MC_ERRS", action="store_false",
                   default=True, help="don't plot error bars.")
+parser.add_option("--refid", dest="REF_ID",
+                  default=None, help="ID of reference data set (file path for non-REF data)")
 parser.add_option("-n", "--num-threads", metavar="NUMTHREADS", dest="NUMTHREADS", type=int,
                   default=None, help="request make-plots to use a specific number of threads.")
 parser.add_option("--pdf", dest="VECTORFORMAT", action="store_const", const="PDF",
@@ -126,6 +128,8 @@
 ch_cmd = ["compare-histos"]
 if opts.MC_ERRS:
     ch_cmd.append("--mc-errs")
+if opts.REF_ID is not None:
+    ch_cmd.append("--refid=%s" % os.path.abspath(opts.REF_ID))
 ch_cmd.append("--hier-out")
 ch_cmd.append("--rivet-refs")
 ch_cmd.append("--plot-info-dir=../")


More information about the Rivet-svn mailing list