rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
RivetPaths.hh
1// -*- C++ -*-
2#ifndef RIVET_RivetPaths_HH
3#define RIVET_RivetPaths_HH
4#include <string>
5#include <vector>
6#include <unistd.h>
7
8namespace Rivet {
9
10
13
14
16 inline bool fileexists(const std::string& path) {
17 return (access(path.c_str(), R_OK) == 0);
18 }
19
20
23
25 std::string getLibPath();
26
28 std::string getDataPath();
29
31 std::string getRivetDataPath();
32
34
35
38
40 std::vector<std::string> getAnalysisLibPaths();
41
43 void setAnalysisLibPaths(const std::vector<std::string>& paths);
44
46 void addAnalysisLibPath(const std::string& extrapath);
47
50 std::string findAnalysisLibFile(const std::string& filename);
51
53
54
57
59 std::vector<std::string> getAnalysisDataPaths();
60
62 void setAnalysisDataPaths(const std::vector<std::string>& paths);
63
65 void addAnalysisDataPath(const std::string& extrapath);
66
70 std::string findAnalysisDataFile(const std::string& filename,
71 const std::vector<std::string>& pathprepend=std::vector<std::string>(),
72 const std::vector<std::string>& pathappend=std::vector<std::string>());
73
74
76 std::vector<std::string> getAnalysisRefPaths();
77
81 std::string findAnalysisRefFile(const std::string& filename,
82 const std::vector<std::string>& pathprepend=std::vector<std::string>(),
83 const std::vector<std::string>& pathappend=std::vector<std::string>());
84
85
87 std::vector<std::string> getAnalysisInfoPaths();
88
92 std::string findAnalysisInfoFile(const std::string& filename,
93 const std::vector<std::string>& pathprepend=std::vector<std::string>(),
94 const std::vector<std::string>& pathappend=std::vector<std::string>());
95
96
98 std::vector<std::string> getAnalysisPlotPaths();
99
103 std::string findAnalysisPlotFile(const std::string& filename,
104 const std::vector<std::string>& pathprepend=std::vector<std::string>(),
105 const std::vector<std::string>& pathappend=std::vector<std::string>());
106
108
110
111
112}
113
114#endif
std::vector< std::string > getAnalysisInfoPaths()
Get Rivet analysis info metadata search paths.
std::string findAnalysisRefFile(const std::string &filename, const std::vector< std::string > &pathprepend=std::vector< std::string >(), const std::vector< std::string > &pathappend=std::vector< std::string >())
Find the first file of the given name in the ref data file search dirs.
bool fileexists(const std::string &path)
Convenience function for determining if a filesystem path exists.
Definition RivetPaths.hh:16
std::string getDataPath()
Get data install path.
std::string findAnalysisInfoFile(const std::string &filename, const std::vector< std::string > &pathprepend=std::vector< std::string >(), const std::vector< std::string > &pathappend=std::vector< std::string >())
Find the first file of the given name in the analysis info file search dirs.
void setAnalysisDataPaths(const std::vector< std::string > &paths)
Set the Rivet data file search paths.
void addAnalysisDataPath(const std::string &extrapath)
Add a Rivet data file search path.
std::vector< std::string > getAnalysisDataPaths()
Get Rivet analysis reference data search paths.
void setAnalysisLibPaths(const std::vector< std::string > &paths)
Set the Rivet analysis plugin library search paths.
std::string findAnalysisDataFile(const std::string &filename, const std::vector< std::string > &pathprepend=std::vector< std::string >(), const std::vector< std::string > &pathappend=std::vector< std::string >())
Find the first file of the given name in the general data file search dirs.
std::vector< std::string > getAnalysisRefPaths()
Get Rivet analysis reference data search paths.
std::string findAnalysisLibFile(const std::string &filename)
Find the first file of the given name in the analysis library search dirs.
std::string getRivetDataPath()
Get Rivet data install path.
std::vector< std::string > getAnalysisPlotPaths()
Get Rivet analysis plot style search paths.
std::string getLibPath()
Get library install path.
std::string findAnalysisPlotFile(const std::string &filename, const std::vector< std::string > &pathprepend=std::vector< std::string >(), const std::vector< std::string > &pathappend=std::vector< std::string >())
Find the first file of the given name in the analysis plot file search dirs.
void addAnalysisLibPath(const std::string &extrapath)
Add a Rivet analysis plugin library search path.
std::vector< std::string > getAnalysisLibPaths()
Get Rivet analysis plugin library search paths.
Definition MC_CENT_PPB_Projections.hh:10