[yoda-svn] r555 - in trunk: . include/YODA pyext/yoda/include

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Jan 30 15:50:45 GMT 2013


Author: buckley
Date: Wed Jan 30 15:50:44 2013
New Revision: 555

Log:
Adding a virtual destructor to Bin -- fixes warning from Cython building. And adding a points() method to the Python Scatter2D wrapper.

Modified:
   trunk/ChangeLog
   trunk/include/YODA/Bin.h
   trunk/pyext/yoda/include/Histo1D.pyx
   trunk/pyext/yoda/include/Scatter2D.pyx

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Fri Jan 25 14:45:51 2013	(r554)
+++ trunk/ChangeLog	Wed Jan 30 15:50:44 2013	(r555)
@@ -1,3 +1,9 @@
+2013-01-30  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Adding a points() method to the Python Scatter2D wrapper.
+
+	* Adding a virtual destructor to Bin.
+
 2012-12-30  Andy Buckley  <andy.buckley at cern.ch>
 
 	* Adding support for Boost.Range arguments and file format autodetection in Writer.

Modified: trunk/include/YODA/Bin.h
==============================================================================
--- trunk/include/YODA/Bin.h	Fri Jan 25 14:45:51 2013	(r554)
+++ trunk/include/YODA/Bin.h	Wed Jan 30 15:50:44 2013	(r555)
@@ -18,9 +18,11 @@
   /// weight statistics access, as 1D/2D and basic/profile histos have
   /// quite difference implementations.
   class Bin {
-
   public:
 
+    /// Virtual destructor for inheritance
+    virtual ~Bin() { }
+
     /// @name Miscellaneous
     //@{
 
@@ -30,8 +32,6 @@
     //@}
 
 
-  public:
-
     /// @name Fill statistics
     //@{
 

Modified: trunk/pyext/yoda/include/Histo1D.pyx
==============================================================================
--- trunk/pyext/yoda/include/Histo1D.pyx	Fri Jan 25 14:45:51 2013	(r554)
+++ trunk/pyext/yoda/include/Histo1D.pyx	Wed Jan 30 15:50:44 2013	(r555)
@@ -82,7 +82,7 @@
         """
         self._Histo1D().fill(x, weight)
 
-    ## HACK hACK HACK HACK HACK
+    # TODO: HACK HACK HACK HACK HACK
     def fill_many(self, xs, weight=1.0):
         """
         (x, weight=1.0) -> None. Fill with given x and optional weight.

Modified: trunk/pyext/yoda/include/Scatter2D.pyx
==============================================================================
--- trunk/pyext/yoda/include/Scatter2D.pyx	Fri Jan 25 14:45:51 2013	(r554)
+++ trunk/pyext/yoda/include/Scatter2D.pyx	Wed Jan 30 15:50:44 2013	(r555)
@@ -41,6 +41,9 @@
         return util.new_owned_cls(Scatter2D,
             new c.Scatter2D(deref(self._Scatter2D()), string(path)))
 
+    def points(self):
+        return list(self)
+
     def addPoints(self, iterable):
         for row in iterable:
             self.addPoint(*row)


More information about the yoda-svn mailing list