|
[Rivet-svn] r1868 - trunk/srcblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Oct 5 15:44:31 BST 2009
Author: buckley Date: Mon Oct 5 15:44:31 2009 New Revision: 1868 Log: Fix event number reporting to remove duplicates... for some reason, though, it stops reporting at event 317 :$ Any ideas? Modified: trunk/src/Run.cc Modified: trunk/src/Run.cc ============================================================================== --- trunk/src/Run.cc Mon Oct 5 15:15:02 2009 (r1867) +++ trunk/src/Run.cc Mon Oct 5 15:44:31 2009 (r1868) @@ -116,20 +116,14 @@ void Run::logNEvt() { std::stringstream ss; ss << "Event " << _numEvents; - if (_numEvents % 10 == 0) - Log::getLog("Rivet.Run") << Log::DEBUG + 5 << ss.str() << endl; - if (_numEvents % 100 == 0) - Log::getLog("Rivet.Run") << Log::INFO << ss.str() << endl; - if (_numEvents % 200 == 0) - Log::getLog("Rivet.Run") << Log::INFO + 5 << ss.str() << endl; - if (_numEvents % 500 == 0) - Log::getLog("Rivet.Run") << Log::WARN << ss.str() << endl; - if (_numEvents % 1000 == 0) - Log::getLog("Rivet.Run") << Log::WARN + 5 << ss.str() << endl; - if (_numEvents % 10000 == 0) - Log::getLog("Rivet.Run") << Log::ERROR << ss.str() << endl; - else - Log::getLog("Rivet.Run") << Log::DEBUG << ss.str() << endl; + const string msg = ss.str(); + int lvl = Log::TRACE; + if (_numEvents % 10000 == 0) lvl = Log::ERROR; + else if (_numEvents % 1000 == 0) lvl = Log::WARN; + else if (_numEvents % 100 == 0) lvl = Log::INFO; + else if (_numEvents % 10 == 0) lvl = Log::DEBUG; + Log::getLog("Rivet.Run") << lvl << msg << endl; } + }
More information about the Rivet-svn mailing list |