|
[yoda-svn] r501 - trunk/include/YODAblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Jul 12 18:53:24 BST 2012
Author: buckley Date: Thu Jul 12 18:53:24 2012 New Revision: 501 Log: Tweak to how normalisation interacts with the ScaledBy annotation -- I *think* this now has the desired behaviour, but it's been a long time since I thought about this. To be revisited when we try to get run merging working for real Modified: trunk/include/YODA/Histo1D.h trunk/include/YODA/Histo2D.h Modified: trunk/include/YODA/Histo1D.h ============================================================================== --- trunk/include/YODA/Histo1D.h Thu Jul 12 18:43:58 2012 (r500) +++ trunk/include/YODA/Histo1D.h Thu Jul 12 18:53:24 2012 (r501) @@ -130,7 +130,8 @@ void normalize(double normto=1.0, bool includeoverflows=true) { const double oldintegral = integral(includeoverflows); if (oldintegral == 0) throw WeightError("Attempted to normalize a histogram with null area"); - _axis.scaleW(normto / oldintegral); + /// @todo Check that this is the desired behaviour + scaleW(normto / oldintegral); } Modified: trunk/include/YODA/Histo2D.h ============================================================================== --- trunk/include/YODA/Histo2D.h Thu Jul 12 18:43:58 2012 (r500) +++ trunk/include/YODA/Histo2D.h Thu Jul 12 18:53:24 2012 (r501) @@ -110,7 +110,8 @@ void normalize(double normto=1.0, bool includeoverflows=true) { const double oldintegral = integral(includeoverflows); if (oldintegral == 0) throw WeightError("Attempted to normalize a histogram with null area"); - _axis.scaleW(normto / oldintegral); + /// @todo Check that this is the desired behaviour + scaleW(normto / oldintegral); }
More information about the yoda-svn mailing list |