|
[Rivet-svn] r4052 - trunk/src/Coreblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Nov 28 12:19:47 GMT 2012
Author: dgrell Date: Wed Nov 28 12:19:47 2012 New Revision: 4052 Log: Write out histos ordered by path name. Modified: trunk/src/Core/AnalysisHandler.cc Modified: trunk/src/Core/AnalysisHandler.cc ============================================================================== --- trunk/src/Core/AnalysisHandler.cc Tue Nov 27 23:41:51 2012 (r4051) +++ trunk/src/Core/AnalysisHandler.cc Wed Nov 28 12:19:47 2012 (r4052) @@ -8,6 +8,14 @@ #include "Rivet/Event.hh" #include "Rivet/Projections/Beam.hh" +namespace { + bool AOSortByPath(const Rivet::AnalysisObjectPtr a, + const Rivet::AnalysisObjectPtr b) { + return a->path() < b->path(); + } +} + + namespace Rivet { @@ -194,7 +202,8 @@ void AnalysisHandler::writeData(const string& filename) { vector<AnalysisObjectPtr> allPlots; foreach (const AnaHandle a, _analyses) { - const vector<AnalysisObjectPtr> & plots = a->plots(); + vector<AnalysisObjectPtr> plots = a->plots(); + sort(plots.begin(), plots.end(), AOSortByPath); allPlots.insert(allPlots.end(), plots.begin(), plots.end()); } WriterYODA::write(filename, allPlots.begin(), allPlots.end());
More information about the Rivet-svn mailing list |