|
[yoda-svn] r353 - in trunk: src tests/Profile1Dblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Aug 24 14:47:51 BST 2011
Author: mkawalec Date: Wed Aug 24 14:47:51 2011 New Revision: 353 Log: Made Profile1D also fill totalDbn. Added a test for fill operator. Modified: trunk/src/Profile1D.cc trunk/tests/Profile1D/P1DFill.cc Modified: trunk/src/Profile1D.cc ============================================================================== --- trunk/src/Profile1D.cc Wed Aug 24 14:37:12 2011 (r352) +++ trunk/src/Profile1D.cc Wed Aug 24 14:47:51 2011 (r353) @@ -22,6 +22,8 @@ /// @todo Fill the underflow and overflow nicely ProfileBin1D& b = binByCoord(x); b.fill(x, y, weight); + + _axis.totalDbn().fill(x, y, weight); } Modified: trunk/tests/Profile1D/P1DFill.cc ============================================================================== --- trunk/tests/Profile1D/P1DFill.cc Wed Aug 24 14:37:12 2011 (r352) +++ trunk/tests/Profile1D/P1DFill.cc Wed Aug 24 14:47:51 2011 (r353) @@ -5,5 +5,15 @@ using namespace YODA; int main() { + Profile1D p(100, 0, 100); + + cout << "Testing fill operator "; + p.fill(1,1,2); + if(p.sumW() != 2 || p.sumW2() != 4) { + cout << "FAIL" << endl; + return -1; + } + cout << "PASS" << endl; + return EXIT_SUCCESS; }
More information about the yoda-svn mailing list |