Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:14

0001 // -*- C++ -*-
0002 //
0003 // This file is part of HepMC
0004 // Copyright (C) 2014-2023 The HepMC collaboration (see AUTHORS for details)
0005 //
0006 /// @file Setup.h
0007 /// @brief Definition of \b class Setup
0008 
0009 #ifndef HEPMC3_SETUP_H
0010 #define HEPMC3_SETUP_H
0011 
0012 
0013 
0014 namespace HepMC3 {
0015 
0016 /// @brief Configuration for HepMC
0017 ///
0018 /// Contains macro definitions for printing debug output, feature deprecation, etc.
0019 /// Static class - configuration is shared among all HepMC events
0020 /// and program threads
0021 ///
0022 class Setup {
0023 
0024     /// Private constructor
0025     Setup() {}
0026     /// Private destructor
0027     ~Setup() {}
0028 
0029 
0030 public:
0031 
0032     /// @name Accessors
0033     /// @{
0034 
0035     /// Get error messages printing flag
0036     static bool print_errors();
0037     /// set error messages printing flag
0038     static void set_print_errors(const bool flag);
0039 
0040     /// Get error messages printing level
0041     static int errors_level();
0042     /// set error messages printing level
0043     static void set_errors_level(const int flag);
0044 
0045 
0046     /// Get warning messages printing flag
0047     static bool print_warnings();
0048     /// Set warning messages printing flag
0049     static void set_print_warnings(const bool flag);
0050 
0051     /// Get warning messages printing level
0052     static int warnings_level();
0053     /// Set warning messages printing level
0054     static void set_warnings_level(const int flag);
0055 
0056 
0057     /// Get debug level
0058     static int  debug_level();
0059     /// Set debug level
0060     static void set_debug_level(const int level);
0061     /// @}
0062 
0063     /// @name Static constants
0064     /// @{
0065   
0066     /// Default maxUlps for AlmostEqual2sComplement function (double precision)
0067     static const unsigned int DEFAULT_DOUBLE_ALMOST_EQUAL_MAXULPS;
0068 
0069     /// Default threshold for comparing double variables
0070     static const double DOUBLE_EPSILON;
0071 
0072     /// @}
0073 
0074 
0075 private:
0076 
0077     static int m_errors_level;   //!< Level for printing error messages
0078     static int m_warnings_level;   //!< Level for printing warnings messages
0079     static bool m_is_printing_errors;   //!< Flag for printing error messages
0080     static bool m_is_printing_warnings; //!< Flag for printing warning messages
0081     static int  m_debug_level;          //!< Level of debug messages printed out
0082 };
0083 
0084 
0085 } // namespace HepMC3
0086 
0087 #endif