Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:19:19

0001 // -*- C++ -*-
0002 //
0003 // This file is part of LHAPDF
0004 // Copyright (C) 2012-2024 The LHAPDF collaboration (see AUTHORS for details)
0005 //
0006 #pragma once
0007 #ifndef LHAPDF_Config_H
0008 #define LHAPDF_Config_H
0009 
0010 #include "LHAPDF/Info.h"
0011 
0012 namespace LHAPDF {
0013 
0014 
0015   /// Class for PDF set metadata and manipulation
0016   class Config : public Info {
0017   public:
0018 
0019     /// @name Fetching/creation
0020     /// @{
0021 
0022     /// Get the global configuration object
0023     ///
0024     /// The global config is populated by reading from lhapdf.conf if it is
0025     /// found in the search paths. It is a singleton, hence the 'get' accessor
0026     /// rather than a constructor.
0027     ///
0028     /// @note The LHAPDF system is responsible for deletion of the returned
0029     /// object. Do NOT delete it yourself!
0030     static Config& get();
0031     /// @}
0032 
0033 
0034     /// Config destructor, used for end-of-run banner printing
0035     ~Config();
0036 
0037 
0038   private:
0039 
0040     /// Hide the default constructor
0041     Config() {
0042       // std::cout << "CONFIG CONSTRUCTION" << std::endl;
0043     }
0044 
0045   };
0046 
0047 
0048   /// @defgroup verb Verbosity control
0049   /// @{
0050 
0051   /// Convenient way to get the current verbosity level
0052   ///
0053   /// Levels: 0=silent, 1=standard, 2=debug
0054   ///
0055   /// @note Verbosity is actually managed via the Info class hierarchy and can also be obtained from there.
0056   inline int verbosity() {
0057     return Config::get().get_entry_as<int>("Verbosity", 1);
0058   }
0059 
0060   /// Convenient way to set the verbosity level
0061   ///
0062   /// Levels: 0=silent, 1=standard, 2=debug
0063   ///
0064   /// @note Verbosity is actually managed via the Info class hierarchy and can also be set there.
0065   inline void setVerbosity(int v) {
0066     Config::get().set_entry("Verbosity", v);
0067   }
0068 
0069   /// @}
0070 
0071 
0072 }
0073 #endif