[Rivet-svn] r2959 - trunk/src/Tools

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Feb 22 23:46:29 GMT 2011


Author: buckley
Date: Tue Feb 22 23:46:29 2011
New Revision: 2959

Log:
Adding optional prepend and append path list args to the path searching functions

Modified:
   trunk/src/Tools/RivetPaths.cc

Modified: trunk/src/Tools/RivetPaths.cc
==============================================================================
--- trunk/src/Tools/RivetPaths.cc	Tue Feb 22 23:45:12 2011	(r2958)
+++ trunk/src/Tools/RivetPaths.cc	Tue Feb 22 23:46:29 2011	(r2959)
@@ -90,8 +90,10 @@
     return dirs;
   }
 
-  string findAnalysisRefFile(const string& filename) {
-    return _findFile(filename, getAnalysisRefPaths());
+  string findAnalysisRefFile(const string& filename,
+                             const vector<string>& pathprepend, const vector<string>& pathappend) {
+    const vector<string> paths = pathprepend + getAnalysisRefPaths() + pathappend;
+    return _findFile(filename, paths);
   }
 
 
@@ -110,8 +112,10 @@
     return dirs;
   }
 
-  string findAnalysisInfoFile(const string& filename) {
-    return _findFile(filename, getAnalysisInfoPaths());
+  string findAnalysisInfoFile(const string& filename,
+                              const vector<string>& pathprepend, const vector<string>& pathappend) {
+    const vector<string> paths = pathprepend + getAnalysisInfoPaths() + pathappend;
+    return _findFile(filename, paths);
   }
 
 
@@ -130,8 +134,10 @@
     return dirs;
   }
 
-  string findAnalysisPlotFile(const string& filename) {
-    return _findFile(filename, getAnalysisPlotPaths());
+  string findAnalysisPlotFile(const string& filename,
+                              const vector<string>& pathprepend, const vector<string>& pathappend) {
+    const vector<string> paths = pathprepend + getAnalysisPlotPaths() + pathappend;
+    return _findFile(filename, paths);
   }
 
 


More information about the Rivet-svn mailing list