|
[yoda-svn] r488 - in trunk: include/YODA pyext/yoda/include tests/Histo1Dblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Jul 4 01:55:30 BST 2012
Author: buckley Date: Wed Jul 4 01:55:30 2012 New Revision: 488 Log: Fix Cython reference/object non-compilation ambiguity and make all tests pass Modified: trunk/include/YODA/Axis2D.h trunk/pyext/yoda/include/10-AnalysisObject.pyx trunk/tests/Histo1D/H1DModify.cc Modified: trunk/include/YODA/Axis2D.h ============================================================================== --- trunk/include/YODA/Axis2D.h Wed Jul 4 00:35:21 2012 (r487) +++ trunk/include/YODA/Axis2D.h Wed Jul 4 01:55:30 2012 (r488) @@ -592,6 +592,16 @@ // _binhash[bin(i).xMax()] = -1; // } } + + + // DEBUG + for (size_t ix = 0; ix < xedges.size() - 1; ++ix) { + for (size_t iy = 0; iy < yedges.size() - 1; ++iy) { + std::cout << xedges[ix] << " " << yedges[iy] << " " << _binhash[xedges[ix]][yedges[iy]] << std::cout; + } + } + + } Modified: trunk/pyext/yoda/include/10-AnalysisObject.pyx ============================================================================== --- trunk/pyext/yoda/include/10-AnalysisObject.pyx Wed Jul 4 00:35:21 2012 (r487) +++ trunk/pyext/yoda/include/10-AnalysisObject.pyx Wed Jul 4 01:55:30 2012 (r488) @@ -3,7 +3,8 @@ string type() map[string, string] annotations() -ctypedef cAnalysisObject* AOptr +ctypedef cAnalysisObject* AOptr + cdef class AnalysisObject: """Base object class""" @@ -26,8 +27,7 @@ # TODO: clean up some of this, as required it = annotations.begin() while it != annotations.end(): - obj = deref(it) - d[obj.first.c_str()] = obj.second.c_str() + d[deref(it).first.c_str()] = deref(it).second.c_str() inc(it) return d Modified: trunk/tests/Histo1D/H1DModify.cc ============================================================================== --- trunk/tests/Histo1D/H1DModify.cc Wed Jul 4 00:35:21 2012 (r487) +++ trunk/tests/Histo1D/H1DModify.cc Wed Jul 4 01:55:30 2012 (r488) @@ -60,7 +60,7 @@ MSG_(PAD(70) << "Checking the reset function: "); h.reset(); - if (!(h.mean() != h.mean())|| !(h.mean(false) != h.mean(false))) { + if (h.integral() != 0) { MSG_RED("FAIL"); return -1; }
More information about the yoda-svn mailing list |