| The Gaudi Framework v29r1 (5cd95fa2)

- 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 23 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 27 of file IssueSeverity.h.

27 {
28 NIL = 0,
29 VERBOSE,
30 DEBUG,
31 DEBUG1,
32 DEBUG2,
33 DEBUG3,
34 INFO,
35 WARNING,
36 RECOVERABLE,
37 ERROR,
38 FATAL,
39 ALWAYS,
40 NUM_LEVELS
41 };
IssueSeverity::RECOVERABLE
Definition: IssueSeverity.h:36
IssueSeverity::DEBUG1
Definition: IssueSeverity.h:31
IssueSeverity::DEBUG
Definition: IssueSeverity.h:30
IssueSeverity::DEBUG2
Definition: IssueSeverity.h:32
IssueSeverity::ERROR
Definition: IssueSeverity.h:37
IssueSeverity::VERBOSE
Definition: IssueSeverity.h:29
IssueSeverity::ALWAYS
Definition: IssueSeverity.h:39
IssueSeverity::FATAL
Definition: IssueSeverity.h:38
IssueSeverity::NUM_LEVELS
Definition: IssueSeverity.h:40
IssueSeverity::DEBUG3
Definition: IssueSeverity.h:33
IssueSeverity::NIL
Definition: IssueSeverity.h:28
IssueSeverity::INFO
Definition: IssueSeverity.h:34
IssueSeverity::WARNING
Definition: IssueSeverity.h:35

## Constructor & Destructor Documentation

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

Definition at line 43 of file IssueSeverity.h.

43 {}

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

Definition at line 77 of file IssueSeverity.h.

78 : m_file( std::move( file ) ), m_msg( std::move( msg ) ), m_line( line ), m_level( level ), m_reported( false )
79 {
80 report();
81 }
IssueSeverity::report
void report()
Definition: IssueSeverity.cpp:22
IssueSeverity::m_file
std::string m_file
Definition: IssueSeverity.h:66
IssueSeverity::m_msg
std::string m_msg
Definition: IssueSeverity.h:67
IssueSeverity::m_level
IssueSeverity::Level m_level
Definition: IssueSeverity.h:70
std::move
T move(T...args)
IssueSeverity::m_line
int m_line
Definition: IssueSeverity.h:69
gaudirun.level
level
Definition: gaudirun.py:271
plotSpeedupsPyRoot.line
line
Definition: plotSpeedupsPyRoot.py:172
IssueSeverity::m_reported
bool m_reported
Definition: IssueSeverity.h:71

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

Definition at line 83 of file IssueSeverity.h.

84 : IssueSeverity( std::move( level ), 0, "??", std::move( msg ) )
85 {
86 }
IssueSeverity::IssueSeverity
IssueSeverity()
Definition: IssueSeverity.h:43
std::move
T move(T...args)
gaudirun.level
level
Definition: gaudirun.py:271

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

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

Definition at line 88 of file IssueSeverity.h.

89 {
90 m_file = std::move( rhs.m_file );
91 m_msg = std::move( rhs.m_msg );
92 m_line = rhs.m_line;
93 m_level = rhs.m_level;
94 m_reported = std::exchange( rhs.m_reported, true );
95 }
IssueSeverity::m_file
std::string m_file
Definition: IssueSeverity.h:66
IssueSeverity::m_msg
std::string m_msg
Definition: IssueSeverity.h:67
IssueSeverity::m_level
IssueSeverity::Level m_level
Definition: IssueSeverity.h:70
std::move
T move(T...args)
IssueSeverity::m_line
int m_line
Definition: IssueSeverity.h:69
IssueSeverity::m_reported
bool m_reported
Definition: IssueSeverity.h:71

IssueSeverity::~IssueSeverity | ( |  | ) |

Definition at line 15 of file IssueSeverity.cpp.

16 {
17 if ( !m_reported ) {
18 report();
19 }
20 }
IssueSeverity::report
void report()
Definition: IssueSeverity.cpp:22
IssueSeverity::m_reported
bool m_reported
Definition: IssueSeverity.h:71

## Member Function Documentation

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

Definition at line 57 of file IssueSeverity.h.

57 { return m_level; }
IssueSeverity::m_level
IssueSeverity::Level m_level
Definition: IssueSeverity.h:70

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

Definition at line 58 of file IssueSeverity.h.

58 { return m_msg; }
IssueSeverity::m_msg
std::string m_msg
Definition: IssueSeverity.h:67

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

Definition at line 36 of file IssueSeverity.cpp.

36 { return m_file + ":" + std::to_string( m_line ); }
std::to_string
T to_string(T...args)
IssueSeverity::m_file
std::string m_file
Definition: IssueSeverity.h:66
IssueSeverity::m_line
int m_line
Definition: IssueSeverity.h:69

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

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

Definition at line 97 of file IssueSeverity.h.

98 {
99 m_file = std::move( rhs.m_file );
100 m_msg = std::move( rhs.m_msg );
101 m_line = rhs.m_line;
102 m_level = rhs.m_level;
103 m_reported = std::exchange( rhs.m_reported, true );
104 return *this;
105 }
IssueSeverity::m_file
std::string m_file
Definition: IssueSeverity.h:66
IssueSeverity::m_msg
std::string m_msg
Definition: IssueSeverity.h:67
IssueSeverity::m_level
IssueSeverity::Level m_level
Definition: IssueSeverity.h:70
std::move
T move(T...args)
IssueSeverity::m_line
int m_line
Definition: IssueSeverity.h:69
IssueSeverity::m_reported
bool m_reported
Definition: IssueSeverity.h:71

void IssueSeverity::report | ( |  | ) |

Definition at line 22 of file IssueSeverity.cpp.

23 {
24 if ( !m_init ) {
25 m_init = true;
26 m_ers = Gaudi::svcLocator()->service<IIssueLogger>( "IssueLogger" ).get();
27 }
28 if ( m_ers ) {
29 m_ers->report( *this );
30 } else {
31 std::cerr << *this << std::endl;
32 }
33 m_reported = true;
34 }
IssueSeverity::m_init
static bool m_init
Definition: IssueSeverity.h:73
IssueSeverity::m_ers
static IIssueLogger * m_ers
Definition: IssueSeverity.h:74
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:8
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:79
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
std::cerr
IssueSeverity::m_reported
bool m_reported
Definition: IssueSeverity.h:71

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

Definition at line 54 of file IssueSeverity.h.

54 { m_level = l; }
IssueSeverity::m_level
IssueSeverity::Level m_level
Definition: IssueSeverity.h:70
gaudirun.l
dictionary l
Definition: gaudirun.py:440

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

Definition at line 55 of file IssueSeverity.h.

55 { m_msg = std::move( m ); }
IssueSeverity::m_msg
std::string m_msg
Definition: IssueSeverity.h:67
std::move
T move(T...args)

## Friends And Related Function Documentation

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

Definition at line 107 of file IssueSeverity.h.

108 {
109 os << "ISSUE: level " << rhs.getLevel() << " from: " << rhs.getOrigin() << " msg: " << rhs.getMsg();
110 return os;
111 }
IssueSeverity::getOrigin
std::string getOrigin() const
Definition: IssueSeverity.cpp:36
IssueSeverity::getLevel
IssueSeverity::Level getLevel() const
Definition: IssueSeverity.h:57
IssueSeverity::getMsg
std::string getMsg() const
Definition: IssueSeverity.h:58

## Member Data Documentation

IIssueLogger * IssueSeverity::m_ers
| static private

Definition at line 74 of file IssueSeverity.h.

std::string IssueSeverity::m_file
| private

Definition at line 66 of file IssueSeverity.h.

bool IssueSeverity::m_init
| static private

Definition at line 73 of file IssueSeverity.h.

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

Definition at line 70 of file IssueSeverity.h.

int IssueSeverity::m_line = 0
| private

Definition at line 69 of file IssueSeverity.h.

std::string IssueSeverity::m_msg
| private

Definition at line 67 of file IssueSeverity.h.

bool IssueSeverity::m_reported = true
| private

Definition at line 71 of file IssueSeverity.h.

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

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