[yoda-svn] yoda: Fix yodals to work with Counters.

YODA Mercurial yoda at projects.hepforge.org
Wed Sep 30 22:30:01 BST 2015


details:   https://yoda.hepforge.org/hg/yoda/rev/97244e4efbb3
branches:  
changeset: 1136:97244e4efbb3
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Sep 30 22:21:18 2015 +0100
description:
Fix yodals to work with Counters.

diffs (32 lines):

--- a/ChangeLog	Wed Sep 23 09:58:14 2015 +0100
+++ b/ChangeLog	Wed Sep 30 22:21:18 2015 +0100
@@ -1,3 +1,7 @@
+2015-09-30  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Fix yodals to work with Counters.
+
 2015-09-23  Andy Buckley  <andy.buckley at cern.ch>
 
 	* Version 1.5.3 release.
--- a/bin/yodals	Wed Sep 23 09:58:14 2015 +0100
+++ b/bin/yodals	Wed Sep 30 22:21:18 2015 +0100
@@ -34,4 +34,8 @@
         extrainfo = ""
         if opts.VERBOSITY >= 2 and hasattr(ao, "sumW"):
             extrainfo = " sumW={sumw:.3g}".format(sumw=ao.sumW())
-        print "{path:<50} {type:<10} {nobjs:4d} bins/pts".format(path=p, type=ao.type, nobjs=len(ao)), extrainfo
+        try:
+            nobjstr = "{n:4d}".format(n=len(ao))
+        except:
+            nobjstr = "   -"
+        print "{path:<50} {type:<10} {nobjs} bins/pts".format(path=p, type=ao.type, nobjs=nobjstr) + extrainfo
--- a/pyext/yoda/plotting.py	Wed Sep 23 09:58:14 2015 +0100
+++ b/pyext/yoda/plotting.py	Wed Sep 30 22:21:18 2015 +0100
@@ -3,6 +3,7 @@
 import sys
 
 
+# TODO: need a better name... MiniHist, PlotData?
 class NumpyHist(object):
 
     def __init__(self, ao):


More information about the yoda-svn mailing list