Metadata class for PDF members. More...
#include <PDFInfo.h>
Public Member Functions | |
PDFInfo () | |
PDFInfo (const std::string &mempath) | |
PDFInfo (const std::string &setname, int member) | |
Constructor from a set name and member ID. | |
PDFInfo (int lhaid) | |
Constructor from an LHAPDF ID code. | |
Metadata accessors | |
std::vector< std::string > | keys () const |
Get the keys defined on this object or higher. | |
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) | |
const std::string & | get_entry (const std::string &key) const |
Retrieve a metadata string by key name. | |
const std::string & | get_entry (const std::string &key, const std::string &fallback) const |
Retrieve a metadata string by key name, with a fallback. | |
![]() | |
Info () | |
Default constructor. | |
Info (const std::string &path) | |
Constructor. | |
virtual | ~Info () |
Virtual destructor to allow inheritance. | |
void | load (const std::string &filepath) |
std::vector< std::string > | keys_local () const |
Get the keys defined on this specific object. | |
std::vector< std::string > | keys () const |
bool | has_key_local (const std::string &key) const |
Is a value defined for the given key on this specific object? | |
const std::string & | get_entry_local (const std::string &key) const |
Retrieve a metadata string by key name, as defined on this specific object. | |
template<typename T> | |
T | get_entry_as (const std::string &key) const |
template<typename T> | |
T | get_entry_as (const std::string &key, const T &fallback) const |
Retrieve a metadata entry by key name, with an inline type cast and default fallback. | |
template<typename T> | |
void | set_entry (const std::string &key, const T &val) |
Set a keyed value entry. | |
template<> | |
bool | get_entry_as (const std::string &key) const |
template<> | |
std::vector< std::string > | get_entry_as (const std::string &key) const |
template<> | |
std::vector< int > | get_entry_as (const std::string &key) const |
template<> | |
std::vector< double > | get_entry_as (const std::string &key) const |
Private Attributes | |
std::string | _setname |
Name of the set in which this PDF is contained (for PDFSet lookup) | |
int | _member |
Additional Inherited Members | |
![]() | |
std::map< std::string, std::string > | _metadict |
The string -> string native metadata storage container. | |
Metadata class for PDF members.
|
inline |
LHAPDF::PDFInfo::PDFInfo | ( | const std::string & | mempath | ) |
|
virtual |
Retrieve a metadata string by key name.
Reimplemented from LHAPDF::Info.
|
inlinevirtual |
Retrieve a metadata string by key name, with a fallback.
Reimplemented from LHAPDF::Info.
|
virtual |
Can this Info object return a value for the given key? (it may be defined non-locally)
Reimplemented from LHAPDF::Info.
|
private |
Member ID in PDF set