|
[Rivet-svn] rivet: working perfectly for MC_TTBAR!!!Rivet Mercurial rivet at projects.hepforge.orgMon Dec 12 16:00:02 GMT 2016
details: https://rivet.hepforge.org/hg/rivet/rev/f858d0beff26 branches: multiweight changeset: 5650:f858d0beff26 user: Chris Pollard <cspollard at gmail.com> date: Mon Dec 12 15:51:28 2016 +0000 description: working perfectly for MC_TTBAR!!! diffs (truncated from 119 to 50 lines): --- a/include/Rivet/AnalysisHandler.hh Mon Dec 12 14:14:38 2016 +0000 +++ b/include/Rivet/AnalysisHandler.hh Mon Dec 12 15:51:28 2016 +0000 @@ -65,7 +65,7 @@ /// number of events. Should only really be used by external steering code /// or analyses in the finalize phase. double sumOfWeights() const { - return _eventCounter->sumW(); + return _eventCounter._persistent[0]->sumW(); } size_t numWeights() const { --- a/src/Core/AnalysisHandler.cc Mon Dec 12 14:14:38 2016 +0000 +++ b/src/Core/AnalysisHandler.cc Mon Dec 12 15:51:28 2016 +0000 @@ -174,6 +174,7 @@ /// can we get away with not passing a matrix? MSG_TRACE("Pushing analysis objects to persistent."); + _eventCounter.pushToPersistent(_subEventWeights); // if this is indeed a new event, push the temporary // histograms and reset for (const AnaHandle& a : _analyses) { @@ -182,9 +183,6 @@ } } - MSG_TRACE("Pushing eventCounter to persistent."); - _eventCounter.pushToPersistent(_subEventWeights); - _eventNumber = ge.event_number(); MSG_DEBUG("Event #" << numEvents() << " weight sum = " << sumOfWeights()); @@ -194,6 +192,7 @@ _eventCounter.newSubEvent(); + for (const AnaHandle& a : _analyses) { for (const auto & ao : a->analysisObjects()) { ao.get().newSubEvent(); @@ -212,7 +211,6 @@ } #endif - MSG_TRACE("Filling event counter."); _eventCounter->fill(); // Run the analyses for (AnaHandle a : _analyses) { @@ -240,6 +238,15 @@ void AnalysisHandler::finalize() { if (!_initialised) return;
More information about the Rivet-svn mailing list |