| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
IssueSeverity Class Referencefinal

`#include <GaudiKernel/IssueSeverity.h>`

Collaboration diagram for IssueSeverity:
[legend]

## Public Types
enum | Level { NIL = 0, VERBOSE, DEBUG, DEBUG1, DEBUG2, DEBUG3, INFO, WARNING, RECOVERABLE, ERROR, FATAL, ALWAYS, NUM_LEVELS }

## Public Member Functions
| IssueSeverity ()
| IssueSeverity (IssueSeverity::Level level, int line, std::string file, std::string msg="")
| IssueSeverity (IssueSeverity::Level level, std::string msg="")
| IssueSeverity (const IssueSeverity &)=delete
IssueSeverity & | operator= (const IssueSeverity &)=delete
| IssueSeverity (IssueSeverity &&) noexcept
IssueSeverity & | operator= (IssueSeverity &&) noexcept
| ~IssueSeverity ()
void | setLevel (const IssueSeverity::Level &l)
void | setMsg (std::string m)
IssueSeverity::Level | getLevel () const
std::string | getMsg () const
std::string | getOrigin () const
void | report ()

## Private Attributes
std::string | m_file
std::string | m_msg
int | m_line = 0
IssueSeverity::Level | m_level = IssueSeverity::NIL
bool | m_reported = true

## Static Private Attributes
static bool | m_init
static IIssueLogger * | m_ers

## Friends
std::ostream & | operator<< (std::ostream &, const IssueSeverity &)

## Detailed Description

Definition at line 42 of file IssueSeverity.h.

## Member Enumeration Documentation

enum IssueSeverity::Level

Enumerator
NIL |
VERBOSE |
DEBUG |
DEBUG1 |
DEBUG2 |
DEBUG3 |
INFO |
WARNING |
RECOVERABLE |
ERROR |
FATAL |
ALWAYS |
NUM_LEVELS |

Definition at line 46 of file IssueSeverity.h.

46 {
47 NIL = 0,
48 VERBOSE,
49 DEBUG,
50 DEBUG1,
51 DEBUG2,
52 DEBUG3,
53 INFO,
54 WARNING,
55 RECOVERABLE,
56 ERROR,
57 FATAL,
58 ALWAYS,
59 NUM_LEVELS
60 };
IssueSeverity::RECOVERABLE
Definition: IssueSeverity.h:55
IssueSeverity::DEBUG1
Definition: IssueSeverity.h:50
IssueSeverity::DEBUG
Definition: IssueSeverity.h:49
IssueSeverity::DEBUG2
Definition: IssueSeverity.h:51
IssueSeverity::ERROR
Definition: IssueSeverity.h:56
IssueSeverity::VERBOSE
Definition: IssueSeverity.h:48
IssueSeverity::ALWAYS
Definition: IssueSeverity.h:58
IssueSeverity::FATAL
Definition: IssueSeverity.h:57
IssueSeverity::NUM_LEVELS
Definition: IssueSeverity.h:59
IssueSeverity::DEBUG3
Definition: IssueSeverity.h:52
IssueSeverity::NIL
Definition: IssueSeverity.h:47
IssueSeverity::INFO
Definition: IssueSeverity.h:53
IssueSeverity::WARNING
Definition: IssueSeverity.h:54

## Constructor & Destructor Documentation

IssueSeverity::IssueSeverity | ( |  | ) |
| inline

Definition at line 62 of file IssueSeverity.h.

62 {}

IssueSeverity::IssueSeverity | ( | IssueSeverity::Level | level,
|  | int | line,
|  | std::string | file,
|  | std::string | msg = `""`
| ) |  |
| inline

Definition at line 107 of file IssueSeverity.h.

109 :
110 m_file(std::move(file)),m_msg(std::move(msg)), m_line(line), m_level(level), m_reported(false) {
111 report();
112 }
IssueSeverity::report
void report()
Definition: IssueSeverity.cpp:24
IssueSeverity::m_file
std::string m_file
Definition: IssueSeverity.h:93
plotSpeedupsPyRoot.line
tuple line
Definition: plotSpeedupsPyRoot.py:164
IssueSeverity::m_msg
std::string m_msg
Definition: IssueSeverity.h:94
IssueSeverity::m_level
IssueSeverity::Level m_level
Definition: IssueSeverity.h:97
std::move
T move(T...args)
IssueSeverity::m_line
int m_line
Definition: IssueSeverity.h:96
gaudirun.level
level
Definition: gaudirun.py:261
IssueSeverity::m_reported
bool m_reported
Definition: IssueSeverity.h:98

IssueSeverity::IssueSeverity | ( | IssueSeverity::Level | level,
|  | std::string | msg = `""`
| ) |  |
| inline

Definition at line 114 of file IssueSeverity.h.

114 :
115 IssueSeverity(std::move(level),0,"??",std::move(msg)) { }
IssueSeverity::IssueSeverity
IssueSeverity()
Definition: IssueSeverity.h:62
std::move
T move(T...args)
gaudirun.level
level
Definition: gaudirun.py:261

IssueSeverity::IssueSeverity | ( | const IssueSeverity & |  | ) |
| delete

IssueSeverity::IssueSeverity | ( | IssueSeverity && | rhs | ) |
| inline noexcept

Definition at line 117 of file IssueSeverity.h.

117 {
118 m_file = std::move(rhs.m_file);
119 m_msg = std::move(rhs.m_msg);
120 m_line = rhs.m_line;
121 m_level = rhs.m_level;
122 m_reported = rhs.m_reported;
123 rhs.m_reported = true;
124 }
IssueSeverity::m_file
std::string m_file
Definition: IssueSeverity.h:93
IssueSeverity::m_msg
std::string m_msg
Definition: IssueSeverity.h:94
IssueSeverity::m_level
IssueSeverity::Level m_level
Definition: IssueSeverity.h:97
std::move
T move(T...args)
IssueSeverity::m_line
int m_line
Definition: IssueSeverity.h:96
IssueSeverity::m_reported
bool m_reported
Definition: IssueSeverity.h:98

IssueSeverity::~IssueSeverity | ( |  | ) |

Definition at line 16 of file IssueSeverity.cpp.

16 {
17 if (!m_reported) {
18 report();
19 // do stuff
20 }
21 }
IssueSeverity::report
void report()
Definition: IssueSeverity.cpp:24
IssueSeverity::m_reported
bool m_reported
Definition: IssueSeverity.h:98

## Member Function Documentation

IssueSeverity::Level IssueSeverity::getLevel | ( |  | ) | const
| inline

Definition at line 82 of file IssueSeverity.h.

82 { return m_level; }
IssueSeverity::m_level
IssueSeverity::Level m_level
Definition: IssueSeverity.h:97

std::string IssueSeverity::getMsg | ( |  | ) | const
| inline

Definition at line 83 of file IssueSeverity.h.

83 { return m_msg; }
IssueSeverity::m_msg
std::string m_msg
Definition: IssueSeverity.h:94

std::string IssueSeverity::getOrigin | ( |  | ) | const

Definition at line 38 of file IssueSeverity.cpp.

38 {
39 return m_file + ":" + std::to_string(m_line);
40 }
std::to_string
T to_string(T...args)
IssueSeverity::m_file
std::string m_file
Definition: IssueSeverity.h:93
IssueSeverity::m_line
int m_line
Definition: IssueSeverity.h:96

IssueSeverity& IssueSeverity::operator= | ( | const IssueSeverity & |  | ) |
| delete

IssueSeverity & IssueSeverity::operator= | ( | IssueSeverity && | rhs | ) |
| inline noexcept

Definition at line 126 of file IssueSeverity.h.

126 {
127 m_file = rhs.m_file;
128 m_msg = rhs.m_level;
129 m_line = rhs.m_line;
130 m_level = rhs.m_level;
131 m_reported = rhs.m_reported;
132 rhs.m_reported = true;
133 return *this;
134 }
IssueSeverity::m_file
std::string m_file
Definition: IssueSeverity.h:93
IssueSeverity::m_msg
std::string m_msg
Definition: IssueSeverity.h:94
IssueSeverity::m_level
IssueSeverity::Level m_level
Definition: IssueSeverity.h:97
IssueSeverity::m_line
int m_line
Definition: IssueSeverity.h:96
IssueSeverity::m_reported
bool m_reported
Definition: IssueSeverity.h:98

void IssueSeverity::report | ( |  | ) |

Definition at line 24 of file IssueSeverity.cpp.

24 {
25 if (!m_init) {
26 m_init = true;
27 m_ers = Gaudi::svcLocator()->service<IIssueLogger>("IssueLogger").get();
28 }
29 if (m_ers) {
30 m_ers->report(*this);
31 } else {
32 std::cerr << *this << std::endl;
33 }
34 m_reported = true;
35 }
IssueSeverity::m_init
static bool m_init
Definition: IssueSeverity.h:100
IssueSeverity::m_ers
static IIssueLogger * m_ers
Definition: IssueSeverity.h:101
IIssueLogger::report
virtual void report(IssueSeverity::Level level, const std::string &msg, const std::string &origin)=0
std::endl
T endl(T...args)
IIssueLogger
Definition: IIssueLogger.h:9
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:78
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
std::cerr
IssueSeverity::m_reported
bool m_reported
Definition: IssueSeverity.h:98

void IssueSeverity::setLevel | ( | const IssueSeverity::Level & | l | ) |
| inline

Definition at line 75 of file IssueSeverity.h.

75 {
76 m_level = l;
77 }
IssueSeverity::m_level
IssueSeverity::Level m_level
Definition: IssueSeverity.h:97
gaudirun.l
dictionary l
Definition: gaudirun.py:421

void IssueSeverity::setMsg | ( | std::string | m | ) |
| inline

Definition at line 78 of file IssueSeverity.h.

78 {
79 m_msg = std::move(m);
80 }
IssueSeverity::m_msg
std::string m_msg
Definition: IssueSeverity.h:94
std::move
T move(T...args)

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
|  | const IssueSeverity & | rhs
| ) |  |
| friend

Definition at line 136 of file IssueSeverity.h.

136 {
137 os << "ISSUE: level " << rhs.getLevel() << " from: " << rhs.getOrigin()
138 << " msg: " << rhs.getMsg();
139 return os;
140 }
IssueSeverity::getOrigin
std::string getOrigin() const
Definition: IssueSeverity.cpp:38
IssueSeverity::getLevel
IssueSeverity::Level getLevel() const
Definition: IssueSeverity.h:82
IssueSeverity::getMsg
std::string getMsg() const
Definition: IssueSeverity.h:83

## Member Data Documentation

IIssueLogger * IssueSeverity::m_ers
| static private

Definition at line 101 of file IssueSeverity.h.

std::string IssueSeverity::m_file
| private

Definition at line 93 of file IssueSeverity.h.

bool IssueSeverity::m_init
| static private

Definition at line 100 of file IssueSeverity.h.

IssueSeverity::Level IssueSeverity::m_level = IssueSeverity::NIL
| private

Definition at line 97 of file IssueSeverity.h.

int IssueSeverity::m_line = 0
| private

Definition at line 96 of file IssueSeverity.h.

std::string IssueSeverity::m_msg
| private

Definition at line 94 of file IssueSeverity.h.

bool IssueSeverity::m_reported = true
| private

Definition at line 98 of file IssueSeverity.h.

The documentation for this class was generated from the following files:

- GaudiKernel/GaudiKernel/IssueSeverity.h
- GaudiKernel/src/Lib/IssueSeverity.cpp