|
[yoda-svn] yoda: issue warning when attempting to normalise empty histogram...YODA Mercurial yoda at projects.hepforge.orgFri Jun 29 16:30:01 BST 2018
details: https://yoda.hepforge.org/hg/yoda/rev/d7ecc6e68430 branches: release-1-7 changeset: 1469:d7ecc6e68430 user: Christian Gutschow <chris.g at cern.ch> date: Fri Jun 29 16:28:17 2018 +0100 description: issue warning when attempting to normalise empty histogram rather than throwing and error diffs (11 lines): --- a/include/YODA/Histo1D.h Fri Jun 29 16:04:42 2018 +0100 +++ b/include/YODA/Histo1D.h Fri Jun 29 16:28:17 2018 +0100 @@ -153,7 +153,7 @@ /// be less than @a normto. This is probably what you want. void normalize(double normto=1.0, bool includeoverflows=true) { const double oldintegral = integral(includeoverflows); - if (oldintegral == 0) MSG_WARNING("Attempted to normalize a histogram with null area"); + if (oldintegral == 0) std::cerr << "Attempted to normalize a histogram with null area" << std::endl; else scaleW(normto / oldintegral); }
More information about the yoda-svn mailing list |