#include "LHAPDF/Info.h"
#include "LHAPDF/Config.h"
#include "LHAPDF/PDFInfo.h"
#include "LHAPDF/PDFSet.h"
#include "LHAPDF/Factories.h"
#include <iostream>
#ifdef HAVE_MPI
#include <mpi.h>
#endif
using namespace std;
int main(int argc, char* argv[]) {
#ifdef HAVE_MPI
MPI_Init(&argc, &argv);
#endif
cout <<
"Verbosity: " << cfg.
get_entry(
"Verbosity") << endl;
cout <<
"New Verbosity from second Config: " << cfg2.
get_entry(
"Verbosity") << endl;
cout <<
"SetDesc: " << set.
get_entry(
"SetDesc") << endl;
cout <<
"Verbosity from set: " << set.
get_entry(
"Verbosity") << endl;
if (info.
has_key(
"PdfDesc")) cout <<
"PdfDesc: " << info.
get_entry(
"PdfDesc") << endl;
cout <<
"PdfType: " << info.
get_entry(
"PdfType") << endl;
cout <<
"Verbosity from PDF: " << info.
get_entry(
"Verbosity") << endl;
vector<int> pids = info.
get_entry_as< vector<int> >(
"Flavors");
cout << "PIDs (1): "; for (int f : pids) { cout << f << " "; } cout << endl;
cout << "Testing PDFInfo for " << name << endl;
delete i;
}
#ifdef HAVE_MPI
MPI_Finalize();
#endif
return 0;
}
Metadata base class for PDFs, PDF sets, or global configuration.
Definition: Info.h:29
void set_entry(const std::string &key, const T &val)
Set a keyed value entry.
Definition: Info.h:158
virtual const std::string & get_entry(const std::string &key) const
Definition: Info.h:119
T get_entry_as(const std::string &key) const
Definition: Info.h:139
Metadata class for PDF members.
Definition: PDFInfo.h:18
const std::string & get_entry(const std::string &key) const
Retrieve a metadata string by key name.
bool has_key(const std::string &key) const
Can this Info object return a value for the given key? (it may be defined non-locally)
Class for PDF-set metadata and manipulation.
Definition: PDFSet.h:105
const std::string & get_entry(const std::string &key) const
Retrieve a metadata string by key name.
Definition: PDFSet.h:281
PDFInfo * mkPDFInfo(const std::string &setname, size_t member)
const std::vector< std::string > & availablePDFSets()
Get the names of all available PDF sets in the search path.
std::string to_str(const T &val)
Make a string representation of val.
Definition: Utils.h:61