[Rivet-svn] rivet: 2 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Tue May 2 12:45:01 BST 2017


details:   https://rivet.hepforge.org/hg/rivet/rev/197ab62f1c10
branches:  
changeset: 5737:197ab62f1c10
user:      Andy Buckley <andy at insectnation.org>
date:      Tue May 02 12:31:03 2017 +0100
description:
Extend and improve string functions for path handling.

details:   https://rivet.hepforge.org/hg/rivet/rev/eb21cfe95793
branches:  
changeset: 5738:eb21cfe95793
user:      Andy Buckley <andy at insectnation.org>
date:      Tue May 02 12:31:31 2017 +0100
description:
Add AnalysisHandler::addData and readData methods for histo preloading.

diffs (truncated from 210 to 50 lines):

--- a/ChangeLog	Tue Apr 11 11:33:45 2017 +0200
+++ b/ChangeLog	Tue May 02 12:31:31 2017 +0100
@@ -1,3 +1,9 @@
+2017-05-02  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Add AnalysisHandler::addData and readData methods for histo preloading.
+
+	* Extend and improve string functions for path handling.
+
 2017-01-21  Andy Buckley  <andy.buckley at cern.ch>
 
 	* Removing lots of long-deprecated functions & methods.
--- a/include/Rivet/AnalysisHandler.hh	Tue Apr 11 11:33:45 2017 +0200
+++ b/include/Rivet/AnalysisHandler.hh	Tue May 02 12:31:31 2017 +0100
@@ -182,10 +182,16 @@
     /// @name Histogram / data object access
     //@{
 
+    /// Add a vector of analysis objects to the current state.
+    void addData(const std::vector<AnalysisObjectPtr>& aos) const;
+
+    /// Read analysis plots into the histo collection (via addData) from the named file.
+    void readData(const std::string& filename) const;
+
     /// Get all analyses' plots as a vector of analysis objects.
     std::vector<AnalysisObjectPtr> getData() const;
 
-    /// Write all analyses' plots to the named file.
+    /// Write all analyses' plots (via getData) to the named file.
     void writeData(const std::string& filename) const;
 
     //@}
@@ -224,6 +230,7 @@
 
     //@}
 
+
   private:
 
     /// The assignment operator is private and must never be called.
--- a/include/Rivet/Tools/Utils.hh	Tue Apr 11 11:33:45 2017 +0200
+++ b/include/Rivet/Tools/Utils.hh	Tue May 02 12:31:31 2017 +0100
@@ -192,6 +192,21 @@
     return rtn;
   }
 
+  /// @brief Split a string on a specified separator string
+  inline vector<string> split(const string& s, const string& sep) {
+    vector<string> dirs;
+    string tmp = s;


More information about the Rivet-svn mailing list