[Rivet-svn] r2584 - trunk/bin

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Jul 13 20:45:27 BST 2010


Author: buckley
Date: Tue Jul 13 20:45:30 2010
New Revision: 2584

Log:
Also look for .plot files in the directories where the AIDA files are located

Modified:
   trunk/bin/compare-histos

Modified: trunk/bin/compare-histos
==============================================================================
--- trunk/bin/compare-histos	Tue Jul 13 11:54:36 2010	(r2583)
+++ trunk/bin/compare-histos	Tue Jul 13 20:45:30 2010	(r2584)
@@ -126,12 +126,17 @@
     def getpathvar(name):
         rtn = []
         if os.environ.has_key(name):
-            rtn = [i for i in os.environ[name].split(":") if i]
+            rtn = [os.path.abspath(i) for i in os.environ[name].split(":") if i]
         return rtn
     if os.environ.has_key("RIVET_PLOT_PATH"):
         opts.PLOTINFODIR += getpathvar("RIVET_PLOT_PATH")
     elif os.environ.has_key("RIVET_REF_PATH"):
         opts.PLOTINFODIR += getpathvar("RIVET_REF_PATH")
+    for a in args:
+        adir = os.path.abspath(os.path.split(a)[0])
+        if not adir in opts.PLOTINFODIR:
+            opts.PLOTINFODIR.append(adir)
+
 
     ## Configure logging
     logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
@@ -367,7 +372,7 @@
         try:
             special = plotparser.getSpecial(name)
         except ValueError, err:
-            logging.error("Could not get histo specials: %s" % (err))
+            logging.error("Could not get histo specials: %s" % err)
             special = {}
         if special:
             headstr += "\n"
@@ -379,7 +384,7 @@
         try:
             histopts = plotparser.getHistogramOptions(name)
         except ValueError, err:
-            logging.error("Could not get histo options: %s" % (err))
+            logging.error("Could not get histo options: %s" % err)
             histopts = {}
         histstrs = []
         i = 0


More information about the Rivet-svn mailing list