|
[yoda-svn] r374 - in trunk: . include/YODA src tests/Histo2Dblackhole at projects.hepforge.org blackhole at projects.hepforge.orgSun Aug 28 10:42:18 BST 2011
Author: mkawalec Date: Sun Aug 28 10:42:18 2011 New Revision: 374 Log: Updated the TODO, 'moved' Histo2D copy constructor to .cc file. Modified: trunk/TODO trunk/include/YODA/Histo2D.h trunk/src/Histo2D.cc trunk/tests/Histo2D/H2DCreate.cc Modified: trunk/TODO ============================================================================== --- trunk/TODO Sun Aug 28 10:23:32 2011 (r373) +++ trunk/TODO Sun Aug 28 10:42:18 2011 (r374) @@ -18,6 +18,9 @@ constructors! (MK) * Fix failing Histo2D test (MK) + MK: I have honestly no idea why this copy constructor fails. + I have moved it to .cc file and declared it to do nothing and it + still segfaults. Any ideas are appreciated here. * Improve tests Makefile setup to work out the path to the Python build dir. (AB) Modified: trunk/include/YODA/Histo2D.h ============================================================================== --- trunk/include/YODA/Histo2D.h Sun Aug 28 10:23:32 2011 (r373) +++ trunk/include/YODA/Histo2D.h Sun Aug 28 10:42:18 2011 (r374) @@ -63,11 +63,11 @@ /// Copy constructor with optional new path - Histo2D(const Histo2D& h, const std::string& path="") - : AnalysisObject("Histo2D", (path.size() == 0) ? h.path() : path, h, h.title()) - { - _axis = h._axis; - } + Histo2D(const Histo2D& h, const std::string& path=""); + //: AnalysisObject("Histo2D", (path.size() == 0) ? h.path() : path, h, h.title()) + // { + //_axis = h._axis; + // } /// @todo Add binning constructors from Scatter3D (and Profile2D when it exists) Modified: trunk/src/Histo2D.cc ============================================================================== --- trunk/src/Histo2D.cc Sun Aug 28 10:23:32 2011 (r373) +++ trunk/src/Histo2D.cc Sun Aug 28 10:42:18 2011 (r374) @@ -11,6 +11,10 @@ namespace YODA { + /// A copy constructor with optional new path + Histo2D::Histo2D(const Histo2D& h, const std::string& path) + { } + int Histo2D::fill(double x, double y, double weight) { return _axis.fill(x, y, weight); } Modified: trunk/tests/Histo2D/H2DCreate.cc ============================================================================== --- trunk/tests/Histo2D/H2DCreate.cc Sun Aug 28 10:23:32 2011 (r373) +++ trunk/tests/Histo2D/H2DCreate.cc Sun Aug 28 10:42:18 2011 (r374) @@ -15,8 +15,7 @@ cout << "PASS" << endl; cout << "Testing the copy constructor: "; - Histo2D h(20, 0, 100, 20, 0, 100); - Histo2D copyTest(h); + Histo2D copyTest(first); cout << "PASS" << endl; cout << "Adding/substracting/dividing: ";
More information about the yoda-svn mailing list |