|
[Rivet-svn] r1711 - trunk/srcblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Jul 22 10:41:59 BST 2009
Author: fsiegert Date: Wed Jul 22 10:41:58 2009 New Revision: 1711 Log: Don't abort if a histo=NULL is being normalized, just return instead. It's quite annoying to have a long run abort right at the end, without having written out at least all other histograms. Modified: trunk/src/Analysis.cc Modified: trunk/src/Analysis.cc ============================================================================== --- trunk/src/Analysis.cc Wed Jul 22 09:30:50 2009 (r1710) +++ trunk/src/Analysis.cc Wed Jul 22 10:41:58 2009 (r1711) @@ -370,7 +370,11 @@ void Analysis::normalize(AIDA::IHistogram1D*& histo, const double norm) { - assert(histo); + if (!histo) { + getLog() << Log::ERROR << "Failed to normalise histo=NULL in analysis " + << name() << "(norm=" << norm << ")" << endl; + return; + } getLog() << Log::TRACE << "Normalizing histo " << histo->title() << " to " << norm << endl; double oldintg = 0.0; @@ -392,6 +396,11 @@ void Analysis::scale(AIDA::IHistogram1D*& histo, const double scale) { + if (!histo) { + getLog() << Log::ERROR << "Failed to scale histo=NULL in analysis " + << name() << "(scale=" << scale << ")" << endl; + return; + } getLog() << Log::TRACE << "Scaling histo " << histo->title() << endl; std::vector<double> x, y, ex, ey;
More information about the Rivet-svn mailing list |