[Rivet-svn] r3580 - trunk/bin

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Feb 24 14:25:11 GMT 2012


Author: holsch
Date: Fri Feb 24 14:25:11 2012
New Revision: 3580

Log:
Prevent division by zero in case of empty histograms

Modified:
   trunk/bin/rivet-rescale

Modified: trunk/bin/rivet-rescale
==============================================================================
--- trunk/bin/rivet-rescale	Fri Feb 24 14:17:23 2012	(r3579)
+++ trunk/bin/rivet-rescale	Fri Feb 24 14:25:11 2012	(r3580)
@@ -320,7 +320,8 @@
                 scalefactor = newarea/oldarea
             else:
                 scalefactor= 0.0
-            if scalefactor != 1.0:
+            if scalefactor != 1.0 and scalefactor > 0.0:
+                print scalefactor
                 oldarea = histos[name].getArea()
                 newarea = histos[name].getArea() * scalefactor
 


More information about the Rivet-svn mailing list