The Gaudi Framework
v29r0 (ff2e7097)
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
IssueSeverity.cpp
Go to the documentation of this file.
1
#define GAUDIKERNEL_ISSUESEVERITY_CPP 1
2
3
#include "
GaudiKernel/IssueSeverity.h
"
4
#include "
GaudiKernel/Bootstrap.h
"
5
#include "
GaudiKernel/IIssueLogger.h
"
6
#include "
GaudiKernel/ISvcLocator.h
"
7
#include "
GaudiKernel/StatusCode.h
"
8
#include "
GaudiKernel/System.h
"
9
10
#include <sstream>
11
12
bool
IssueSeverity::m_init
(
false
);
13
IIssueLogger
*
IssueSeverity::m_ers
(
nullptr
);
14
15
IssueSeverity::~IssueSeverity
()
16
{
17
if
( !
m_reported
) {
18
report
();
19
}
20
}
21
22
void
IssueSeverity::report
()
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
}
35
36
std::string
IssueSeverity::getOrigin
()
const
{
return
m_file
+
":"
+
std::to_string
(
m_line
); }
System.h
IssueSeverity::m_init
static bool m_init
Definition:
IssueSeverity.h:73
IssueSeverity::m_ers
static IIssueLogger * m_ers
Definition:
IssueSeverity.h:74
IssueSeverity::report
void report()
Definition:
IssueSeverity.cpp:22
IssueSeverity::getOrigin
std::string getOrigin() const
Definition:
IssueSeverity.cpp:36
IIssueLogger::report
virtual void report(IssueSeverity::Level level, const std::string &msg, const std::string &origin)=0
std::to_string
T to_string(T...args)
IssueSeverity::~IssueSeverity
~IssueSeverity()
Definition:
IssueSeverity.cpp:15
std::endl
T endl(T...args)
Bootstrap.h
IIssueLogger
Definition:
IIssueLogger.h:8
IssueSeverity::m_file
std::string m_file
Definition:
IssueSeverity.h:66
std::string
STL class.
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()
IIssueLogger.h
IssueSeverity.h
IssueSeverity::m_line
int m_line
Definition:
IssueSeverity.h:69
StatusCode.h
std::cerr
ISvcLocator.h
IssueSeverity::m_reported
bool m_reported
Definition:
IssueSeverity.h:71
GaudiKernel
src
Lib
IssueSeverity.cpp
Generated on Tue Sep 26 2017 11:39:07 for The Gaudi Framework by
1.8.11