The Gaudi Framework  v28r3 (cc1cf868)
IssueSeverity.cpp
Go to the documentation of this file.
1 #define GAUDIKERNEL_ISSUESEVERITY_CPP 1
2 
6 #include "GaudiKernel/System.h"
9 
10 #include <sstream>
11 
12 bool IssueSeverity::m_init(false);
14 
15 
17  if (!m_reported) {
18  report();
19  }
20 }
21 
22 void
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 
38  return m_file + ":" + std::to_string(m_line);
39 }
40 
static bool m_init
Definition: IssueSeverity.h:82
static IIssueLogger * m_ers
Definition: IssueSeverity.h:83
std::string getOrigin() const
virtual void report(IssueSeverity::Level level, const std::string &msg, const std::string &origin)=0
T to_string(T...args)
T endl(T...args)
std::string m_file
Definition: IssueSeverity.h:75
STL class.
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_API ISvcLocator * svcLocator()