[Rivet-svn] r3077 - in trunk: . bin

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed May 4 18:40:38 BST 2011


Author: hoeth
Date: Wed May  4 18:40:38 2011
New Revision: 3077

Log:
ignore duplicate files in compare-histos

Modified:
   trunk/ChangeLog
   trunk/bin/compare-histos

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Tue May  3 13:33:16 2011	(r3076)
+++ trunk/ChangeLog	Wed May  4 18:40:38 2011	(r3077)
@@ -1,3 +1,7 @@
+2011-05-04  Hendrik Hoeth <hendrik.hoeth at cern.ch>
+
+	* Ignore duplicate files in compare-histos.
+
 2011-04-25  Andy Buckley  <andy at insectnation.org>
 
 	* Adding some hadron-specific N and sumET vs. |eta| plots to MC_GENERIC.

Modified: trunk/bin/compare-histos
==============================================================================
--- trunk/bin/compare-histos	Tue May  3 13:33:16 2011	(r3076)
+++ trunk/bin/compare-histos	Wed May  4 18:40:38 2011	(r3077)
@@ -185,13 +185,13 @@
 
     ## Get file names and labels
     FILES = []
+    REFFILES = []
     FILEOPTIONS = { }
     if opts.RIVETREFS and rivet_data_dirs:
-        reffiles = []
         for d in rivet_data_dirs:
             import glob
-            reffiles += glob.glob(os.path.join(d, "*.aida"))
-        args = reffiles + args
+            REFFILES += glob.glob(os.path.join(d, "*.aida"))
+        args = REFFILES + args
     for a in args:
         asplit = a.split(":")
         path = asplit[0]
@@ -203,6 +203,8 @@
                 asplit[i] = "Title=%s" % asplit[i]
             FILEOPTIONS[path].append(asplit[i])
 
+    ## Ignore duplicates
+    FILES = list(set(FILES))
 
     ## Check that the requested files are sensible
     if (len(FILES) < 1):
@@ -269,6 +271,8 @@
     for f in FILES:
         histos, titles, xlabels, ylabels = getHistos(f)
         for n, h in histos.iteritems():
+            if not h.isdata and f not in REFFILES:
+                continue
             if h.isdata:
                 l = "data"
                 if h.expt:


More information about the Rivet-svn mailing list