lhapdf is hosted by Hepforge, IPPP Durham
LHAPDF 6.5.4
Loading...
Searching...
No Matches
/tests/testpaths.cc
// Test program for path searching machinery
#include "LHAPDF/Paths.h"
#include <iostream>
using namespace std;
#ifdef HAVE_MPI
#include <mpi.h>
#endif
int main(int argc, char* argv[]) {
#ifdef HAVE_MPI
MPI_Init(&argc, &argv);
#endif
for (const string& p : LHAPDF::paths())
cout << p << endl;
cout << "@" << LHAPDF::findFile("lhapdf.conf") << "@" << endl;
cout << "List of available PDFs:" << endl;
for (const string& s : LHAPDF::availablePDFSets())
cout << " " << s << endl;
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return 0;
}
const std::vector< std::string > & availablePDFSets()
Get the names of all available PDF sets in the search path.
std::string findFile(const std::string &target)
std::vector< std::string > paths()
Get the ordered list of search paths, from $LHAPDF_DATA_PATH and the install location.