lhapdf is hosted by Hepforge, IPPP Durham
LHAPDF  6.4.0
Config.h
1 // -*- C++ -*-
2 //
3 // This file is part of LHAPDF
4 // Copyright (C) 2012-2021 The LHAPDF collaboration (see AUTHORS for details)
5 //
6 #pragma once
7 #ifndef LHAPDF_Config_H
8 #define LHAPDF_Config_H
9 
10 #include "LHAPDF/Info.h"
11 
12 namespace LHAPDF {
13 
14 
16  class Config : public Info {
17  public:
18 
21 
30  static Config& get();
32 
33 
35  ~Config();
36 
37 
38  private:
39 
41  Config() {
42  // std::cout << "CONFIG CONSTRUCTION" << std::endl;
43  }
44 
45  };
46 
47 
50 
54  inline int verbosity() {
55  return Config::get().get_entry_as<int>("Verbosity", 1);
56  }
57 
61  inline void setVerbosity(int v) {
62  Config::get().set_entry("Verbosity", v);
63  }
64 
66 
67 
68 }
69 #endif
void set_entry(const std::string &key, const T &val)
Set a keyed value entry.
Definition: Info.h:141
int verbosity()
Definition: Config.h:54
Class for PDF set metadata and manipulation.
Definition: Config.h:16
static Config & get()
void setVerbosity(int v)
Definition: Config.h:61
T get_entry_as(const std::string &key) const
Definition: Info.h:122
Namespace for all LHAPDF functions and classes.
Definition: AlphaS.h:14
Config()
Hide the default constructor.
Definition: Config.h:41
Metadata base class for PDFs, PDF sets, or global configuration.
Definition: Info.h:29
~Config()
Config destructor, used for end-of-run banner printing.