LHAPDF is hosted by Hepforge, IPPP Durham
LHAPDF  6.2.1
Config.h
1 // -*- C++ -*-
2 //
3 // This file is part of LHAPDF
4 // Copyright (C) 2012-2016 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 
20 
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 
46 
47  };
48 
49 
51 
52 
56  inline int verbosity() {
57  return Config::get().get_entry_as<int>("Verbosity", 1);
58  }
59 
63  inline void setVerbosity(int v) {
64  Config::get().set_entry("Verbosity", v);
65  }
66 
68 
69 
70 }
71 #endif
void set_entry(const std::string &key, const T &val)
Set a keyed value entry.
Definition: Info.h:147
Class for PDF set metadata and manipulation.
Definition: Config.h:16
static Config & get()
T get_entry_as(const std::string &key) const
Definition: Info.h:128
int verbosity()
Definition: Config.h:56
Namespace for all LHAPDF functions and classes.
Definition: AlphaS.h:14
void setVerbosity(int v)
Definition: Config.h:63
Config()
Hide the default constructor.
Definition: Config.h:41
Metadata base class for PDFs, PDF sets, or global configuration.
Definition: Info.h:30
~Config()
Config destructor, used for end-of-run banner printing.