HepMC3 event record library: Setup.h Source File

HepMC3 event record library

Setup.h
Go to the documentation of this file.
1// -*- C++ -*-
2//
3// This file is part of HepMC
4// Copyright (C) 2014-2023 The HepMC collaboration (see AUTHORS for details)
5//
6/// @file Setup.h
7/// @brief Definition of \b class Setup
8
9#ifndef HEPMC3_SETUP_H
10#define HEPMC3_SETUP_H
11
12
13
14namespace HepMC3 {
15
16/// @brief Configuration for HepMC
17///
18/// Contains macro definitions for printing debug output, feature deprecation, etc.
19/// Static class - configuration is shared among all HepMC events
20/// and program threads
21///
22 class Setup {
23
24 /// Private constructor
25 Setup() {}
26 /// Private destructor
27 ~Setup() {}
28
29
30public:
31
32 /// @name Accessors
33 /// @{
34
35 /// Get error messages printing flag
36 static bool print_errors();
37 /// set error messages printing flag
38 static void set_print_errors(const bool flag);
39
40 /// Get error messages printing level
41 static int errors_level();
42 /// set error messages printing level
43 static void set_errors_level(const int flag);
44
45
46 /// Get warning messages printing flag
47 static bool print_warnings();
48 /// Set warning messages printing flag
49 static void set_print_warnings(const bool flag);
50
51 /// Get warning messages printing level
52 static int warnings_level();
53 /// Set warning messages printing level
54 static void set_warnings_level(const int flag);
55
56
57 /// Get debug level
58 static int debug_level();
59 /// Set debug level
60 static void set_debug_level(const int level);
61 /// @}
62
63 /// @name Static constants
64 /// @{
65
66 /// Default maxUlps for AlmostEqual2sComplement function (double precision)
67 static const unsigned int DEFAULT_DOUBLE_ALMOST_EQUAL_MAXULPS;
68
69 /// Default threshold for comparing double variables
70 static const double DOUBLE_EPSILON;
71
72 /// @}
73
74
75private:
76
77 static int m_errors_level; //!< Level for printing error messages
78 static int m_warnings_level; //!< Level for printing warnings messages
79 static bool m_is_printing_errors; //!< Flag for printing error messages
80 static bool m_is_printing_warnings; //!< Flag for printing warning messages
81 static int m_debug_level; //!< Level of debug messages printed out
82};
83
84
85} // namespace HepMC3
86
87#endif
HepMC3::Setup::DOUBLE_EPSILON
static const double DOUBLE_EPSILON
Default threshold for comparing double variables.
Definition Setup.h:70
HepMC3::Setup::m_debug_level
static int m_debug_level
Level of debug messages printed out.
Definition Setup.h:81
HepMC3::Setup::DEFAULT_DOUBLE_ALMOST_EQUAL_MAXULPS
static const unsigned int DEFAULT_DOUBLE_ALMOST_EQUAL_MAXULPS
Default maxUlps for AlmostEqual2sComplement function (double precision).
Definition Setup.h:67
HepMC3::Setup::set_debug_level
static void set_debug_level(const int level)
Set debug level.
Definition Setup.cc:22
HepMC3::Setup::~Setup
~Setup()
Private destructor.
Definition Setup.h:27
HepMC3::Setup::set_warnings_level
static void set_warnings_level(const int flag)
Set warning messages printing level.
Definition Setup.cc:26
HepMC3::Setup::m_is_printing_errors
static bool m_is_printing_errors
Flag for printing error messages.
Definition Setup.h:79
HepMC3::Setup::errors_level
static int errors_level()
Get error messages printing level.
Definition Setup.cc:23
HepMC3::Setup::m_warnings_level
static int m_warnings_level
Level for printing warnings messages.
Definition Setup.h:78
HepMC3::Setup::m_is_printing_warnings
static bool m_is_printing_warnings
Flag for printing warning messages.
Definition Setup.h:80
HepMC3::Setup::set_print_errors
static void set_print_errors(const bool flag)
set error messages printing flag
Definition Setup.cc:18
HepMC3::Setup::m_errors_level
static int m_errors_level
Level for printing error messages.
Definition Setup.h:77
HepMC3::Setup::print_warnings
static bool print_warnings()
Get warning messages printing flag.
Definition Setup.cc:19
HepMC3::Setup::Setup
Setup()
Private constructor.
Definition Setup.h:25
HepMC3::Setup::set_print_warnings
static void set_print_warnings(const bool flag)
Set warning messages printing flag.
Definition Setup.cc:20
HepMC3::Setup::print_errors
static bool print_errors()
Get error messages printing flag.
Definition Setup.cc:17
HepMC3::Setup::debug_level
static int debug_level()
Get debug level.
Definition Setup.cc:21
HepMC3::Setup::warnings_level
static int warnings_level()
Get warning messages printing level.
Definition Setup.cc:25
HepMC3::Setup::set_errors_level
static void set_errors_level(const int flag)
set error messages printing level
Definition Setup.cc:24
HepMC3
HepMC3 main namespace.
Definition AnalysisExample.h:24