LHAPDF  6.5.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
PDFInfo.h
1 // -*- C++ -*-
2 //
3 // This file is part of LHAPDF
4 // Copyright (C) 2012-2022 The LHAPDF collaboration (see AUTHORS for details)
5 //
6 #pragma once
7 #ifndef LHAPDF_PDFInfo_H
8 #define LHAPDF_PDFInfo_H
9 
10 #include "LHAPDF/Info.h"
11 #include "LHAPDF/Factories.h"
12 #include "LHAPDF/PDFIndex.h"
13 
14 namespace LHAPDF {
15 
16 
18  class PDFInfo : public Info {
19  public:
20 
26  PDFInfo() { }
27 
32  PDFInfo(const std::string& mempath);
33 
35  PDFInfo(const std::string& setname, int member);
36 
38  PDFInfo(int lhaid);
39 
40 
43 
45  bool has_key(const std::string& key) const;
46 
48  const std::string& get_entry(const std::string& key) const;
49 
51  const std::string& get_entry(const std::string& key, const std::string& fallback) const {
52  return Info::get_entry(key, fallback);
53  }
54 
56 
57 
58  private:
59 
61  std::string _setname;
62 
65  int _member;
66 
67  };
68 
69 
70 }
71 #endif
int _member
Definition: PDFInfo.h:65
virtual const std::string & get_entry(const std::string &key) const
Definition: Info.h:102
PDFInfo()
Definition: PDFInfo.h:26
Metadata class for PDF members.
Definition: PDFInfo.h:18
const std::string & get_entry(const std::string &key, const std::string &fallback) const
Retrieve a metadata string by key name, with a fallback.
Definition: PDFInfo.h:51
std::string _setname
Name of the set in which this PDF is contained (for PDFSet lookup)
Definition: PDFInfo.h:61
Metadata base class for PDFs, PDF sets, or global configuration.
Definition: Info.h:29
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.