thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
Utilities
Debug.h
1
// -*- C++ -*-
2
//
3
// Debug.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2019 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef ThePEG_Debug_H
10
#define ThePEG_Debug_H
11
// This is the declaration of the Debug class.
12
13
#include <vector>
14
15
namespace
ThePEG
{
16
21
class
Debug
{
22
23
public
:
24
28
enum
Levels
{
29
noDebug
= 0,
30
printSomeEvents
= 1,
31
printEveryEvent
= 5,
32
full
= 9
33
};
34
38
static
int
level
;
39
45
static
bool
isset
;
46
54
static
std::vector<bool>
debugItems
;
55
60
static
void
debugItem
(
int
item,
bool
on);
61
65
static
void
setDebug
(
int
ilev);
66
71
static
bool
debugItem
(
int
item)
72
{
73
if
(
level
==
noDebug
)
return
false
;
74
if
(
level
==
full
)
return
true
;
75
return
( item < 0 || std::size_t(item) >=
debugItems
.size() )?
false
:
76
debugItems
[item];
77
}
78
86
static
void
unmaskFpuErrors
();
90
static
void
unmaskFpuOverflow
();
94
static
void
unmaskFpuUnderflow
();
98
static
void
unmaskFpuDivZero
();
102
static
void
unmaskFpuDenorm
();
106
static
void
unmaskFpuInvalid
();
110
static
void
maskFpuErrors
();
114
static
void
maskFpuOverflow
();
118
static
void
maskFpuUnderflow
();
122
static
void
maskFpuDivZero
();
126
static
void
maskFpuDenorm
();
130
static
void
maskFpuInvalid
();
132
133
};
134
135
}
136
137
#endif
/* ThePEG_Debug_H */
ThePEG::Debug
The Debug class defines a number of debug levels and a static public member giving the current debug ...
Definition:
Debug.h:21
ThePEG::Debug::unmaskFpuDenorm
static void unmaskFpuDenorm()
Switch on signalling denormalized argument FPU exceptions.
ThePEG::Debug::maskFpuUnderflow
static void maskFpuUnderflow()
Switch off signalling underflow FPU exceptions.
ThePEG::Debug::unmaskFpuOverflow
static void unmaskFpuOverflow()
Switch on signalling overflow FPU exceptions.
ThePEG::Debug::Levels
Levels
The different debug levels.
Definition:
Debug.h:28
ThePEG::Debug::printEveryEvent
@ printEveryEvent
Higher debug level.
Definition:
Debug.h:31
ThePEG::Debug::printSomeEvents
@ printSomeEvents
Lowest debug level.
Definition:
Debug.h:30
ThePEG::Debug::full
@ full
Highest possible debug level.
Definition:
Debug.h:32
ThePEG::Debug::noDebug
@ noDebug
No debugging.
Definition:
Debug.h:29
ThePEG::Debug::maskFpuInvalid
static void maskFpuInvalid()
Switch off signalling invalid operation FPU exceptions.
ThePEG::Debug::maskFpuErrors
static void maskFpuErrors()
Switch off signalling all FPU exceptions.
ThePEG::Debug::debugItem
static bool debugItem(int item)
Check if a given item should be debugged.
Definition:
Debug.h:71
ThePEG::Debug::debugItem
static void debugItem(int item, bool on)
Switch on or off a given debug item.
ThePEG::Debug::unmaskFpuErrors
static void unmaskFpuErrors()
Switch on signalling all FPU exceptions.
ThePEG::Debug::unmaskFpuDivZero
static void unmaskFpuDivZero()
Switch on signalling division by zero FPU exceptions.
ThePEG::Debug::maskFpuDivZero
static void maskFpuDivZero()
Switch off signalling division by zero FPU exceptions.
ThePEG::Debug::setDebug
static void setDebug(int ilev)
Set the debug level.
ThePEG::Debug::maskFpuOverflow
static void maskFpuOverflow()
Switch off signalling overflow FPU exceptions.
ThePEG::Debug::debugItems
static std::vector< bool > debugItems
A vector of switches indicating whether a given debug item is switched on or not.
Definition:
Debug.h:54
ThePEG::Debug::maskFpuDenorm
static void maskFpuDenorm()
Switch off signalling denormalized argument FPU exceptions.
ThePEG::Debug::unmaskFpuInvalid
static void unmaskFpuInvalid()
Switch on signalling invalid operation FPU exceptions.
ThePEG::Debug::unmaskFpuUnderflow
static void unmaskFpuUnderflow()
Switch on signalling underflow FPU exceptions.
ThePEG::Debug::isset
static bool isset
If true, the debug level has been set from the outside from the calling program.
Definition:
Debug.h:45
ThePEG::Debug::level
static int level
The current level.
Definition:
Debug.h:38
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
Generated on Thu Jun 20 2024 14:47:02 for ThePEG by
1.9.6