[Rivet-svn] rivet: 3 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Thu Nov 12 16:00:01 GMT 2015


details:   https://rivet.hepforge.org/hg/rivet/rev/e5e0686b8e8c
branches:  release-2-4-x
changeset: 4927:e5e0686b8e8c
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Nov 12 15:44:01 2015 +0000
description:
Bug fix for non-hier output

details:   https://rivet.hepforge.org/hg/rivet/rev/b0876bde6880
branches:  release-2-4-x
changeset: 4928:b0876bde6880
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Nov 12 15:44:22 2015 +0000
description:
Make sure that the path attr is set on loaded histogram objects

details:   https://rivet.hepforge.org/hg/rivet/rev/04bf6a2c032c
branches:  release-2-4-x
changeset: 4929:04bf6a2c032c
user:      Andy Buckley <andy at insectnation.org>
date:      Thu Nov 12 15:54:01 2015 +0000
description:
Don't accidentally treat Scatter2D as a 2D histo or profile

diffs (truncated from 70 to 50 lines):

--- a/bin/make-plots	Thu Nov 12 01:05:08 2015 +0000
+++ b/bin/make-plots	Thu Nov 12 15:54:01 2015 +0000
@@ -90,13 +90,13 @@
                 elif name == 'SPECIAL':
                     self.special[path] = Special(f)
                 elif name == 'HISTOGRAM' or name == 'HISTOGRAM2D':
-                    self.histos[path] = Histogram(f)
-                    self.histos[path].path = path
+                    self.histos[path] = Histogram(f, p=path)
+                    # self.histos[path].path = path
                     self.description['is2dim'] = self.histos[path].is2dim
                 elif name == 'HISTO1D':
-                    self.histos[path] = Histo1D(f)
+                    self.histos[path] = Histo1D(f, p=path)
                 elif name == 'HISTO2D':
-                    self.histos[path] = Histo2D(f)
+                    self.histos[path] = Histo2D(f, p=path)
                     self.description['is2dim'] = True
                 elif name == 'FUNCTION':
                     self.functions[path] = Function(f)
@@ -117,9 +117,11 @@
             self.description['RatioPlot'] = '0'
 
         if self.description.has_key('PlotSize') and self.description['PlotSize']!='':
-            plotsizex,plotsizey = self.description['PlotSize'].split(',')
-            self.description['PlotSizeX'] = float(plotsizex)
-            self.description['PlotSizeY'] = float(plotsizey)
+            plotsizes = self.description['PlotSize'].split(',')
+            self.description['PlotSizeX'] = float(plotsizes[0])
+            self.description['PlotSizeY'] = float(plotsizes[1])
+            if len(plotsizes) == 3:
+                self.description['RatioPlotSizeY'] = float(plotsizes[2])
             del self.description['PlotSize']
 
         if self.description.get('MainPlot', '1') == '0':
@@ -1439,6 +1441,7 @@
                 print '+++ Error in Histogram.add() for %s: binning of histograms differs' % self.path
 
     def divide(self, name):
+        #print name.path, self.path
         if len(self.data) != len(name.data):
             print '+++ Error in Histogram.divide() for %s: different numbers of bins' % self.path
         for i in range(len(self.data)):
--- a/bin/rivet-cmphistos	Thu Nov 12 01:05:08 2015 +0000
+++ b/bin/rivet-cmphistos	Thu Nov 12 15:54:01 2015 +0000
@@ -230,12 +230,13 @@
 
 def writeOutput(output, h):
     "Choose output file name and dir"
-    hparts = h.strip("/").split("/", 1)


More information about the Rivet-svn mailing list