[Rivet-svn] r2266 - trunk/bin

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Mon Feb 22 15:20:45 GMT 2010


Author: fsiegert
Date: Mon Feb 22 15:20:44 2010
New Revision: 2266

Log:
Respect setting of RIVET_REF_PATH in rivet-mkhtml.

Modified:
   trunk/bin/rivet-mkhtml

Modified: trunk/bin/rivet-mkhtml
==============================================================================
--- trunk/bin/rivet-mkhtml	Sat Feb 20 11:37:08 2010	(r2265)
+++ trunk/bin/rivet-mkhtml	Mon Feb 22 15:20:44 2010	(r2266)
@@ -37,9 +37,13 @@
 
 opts, aidafiles = parser.parse_args()
 
+refpaths = os.environ['RIVET_REF_PATH'].split(":")
 try:
     datadir = Popen(["rivet-config", "--datadir"], stdout=PIPE).communicate()[0].split()[0]
+    refpaths.append(datadir)
 except:
+    pass
+if not refpaths:
     print "Error: Didn't find rivet-config. Have you sourced rivetenv.sh?"
     exit(1)
 
@@ -63,8 +67,10 @@
         path = dps.get("path")
         analysis = path[path.rfind("/")+1:]
         analyses.add(analysis)
-        if os.access(os.path.join(datadir, analysis+".aida"), os.R_OK):
-            reffiles.append("%s/%s.aida" % (datadir, analysis))
+        for refpath in refpaths:
+            if os.access(os.path.join(refpath, analysis+".aida"), os.R_OK):
+                reffiles.append("%s/%s.aida" % (refpath, analysis))
+                break
 
 
 ## run compare-histos to get plain .dat files from .aida


More information about the Rivet-svn mailing list