| # Gaudi Framework, version v21r7p1 |

Home |  | Generated: 15 Feb 2010

# IssueSeverity Class Reference

`#include <IssueSeverity.h>`

Collaboration diagram for IssueSeverity:

[legend]

List of all members.

## Public Types
enum | Level { NIL = 0, VERBOSE, DEBUG, DEBUG1, DEBUG2, DEBUG3, INFO, WARNING, RECOVERABLE, ERROR, FATAL, ALWAYS, NUM_LEVELS }
## Public Member Functions
| IssueSeverity ()
| IssueSeverity (const IssueSeverity::Level &level, int line, const std::string &file, const std::string &msg="")
| IssueSeverity (const IssueSeverity::Level &level, const std::string &msg="")
| IssueSeverity (const IssueSeverity &es)
| IssueSeverity (IssueSeverity *es)
IssueSeverity & | operator= (const IssueSeverity &rhs)
| ~IssueSeverity ()
void | setLevel (const IssueSeverity::Level &l)
void | setMsg (const std::string &m)
IssueSeverity::Level | getLevel () const
std::string | getMsg () const
std::string | getOrigin () const
void | report ()
| operator StatusCode () const
## Static Private Member Functions
static void | init ()
## Private Attributes
int | m_line
std::string | m_file
IssueSeverity::Level | m_level
std::string | m_msg
bool | m_reported
## 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.

    00046              {
    00047     NIL = 0,
    00048     VERBOSE,
    00049     DEBUG,
    00050     DEBUG1,
    00051     DEBUG2,
    00052     DEBUG3,
    00053     INFO,
    00054     WARNING,
    00055     RECOVERABLE,
    00056     ERROR,
    00057     FATAL,
    00058     ALWAYS,
    00059     NUM_LEVELS
    00060   };

## Constructor & Destructor Documentation

IssueSeverity::IssueSeverity | ( |  | ) | `[inline]`

Definition at line 109 of file IssueSeverity.h.

    00109                                    : m_line(0), m_file(""),
    00110                                        m_level(IssueSeverity::NIL),
    00111                                        m_msg(""), m_reported(true) {}

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

Definition at line 113 of file IssueSeverity.h.

    00115                                                          :
    00116   m_line(line), m_file(file), m_level(level), m_msg(msg), m_reported(false) {
    00117
    00118   init();
    00119   report();
    00120
    00121 }

IssueSeverity::IssueSeverity | ( | const IssueSeverity::Level & | level,
|  | const std::string & | msg = `""` |
| ) |  |  | `[inline]`

Definition at line 123 of file IssueSeverity.h.

    00124                                                          :
    00125   m_line(0), m_file("??"), m_level(level), m_msg(msg), m_reported(false) {
    00126
    00127   init();
    00128   report();
    00129
    00130 }

IssueSeverity::IssueSeverity | ( | const IssueSeverity & | es | ) | `[inline]`

Definition at line 132 of file IssueSeverity.h.

    00132                                                               {
    00133   m_line = rhs.m_line;
    00134   m_file = rhs.m_file;
    00135   m_level = rhs.m_level;
    00136   m_msg   = rhs.m_msg;
    00137   m_reported = true;
    00138 }

IssueSeverity::IssueSeverity | ( | IssueSeverity * | es | ) | `[inline]`

Definition at line 140 of file IssueSeverity.h.

    00140                                                         {
    00141   m_line = rhs->m_line;
    00142   m_file = rhs->m_file;
    00143   m_level = rhs->m_level;
    00144   m_msg   = rhs->m_msg;
    00145   m_reported = true;
    00146 }

IssueSeverity::~IssueSeverity | ( |  | ) |

Definition at line 22 of file IssueSeverity.cpp.

    00022                               {
    00023
    00024   if (!m_reported) {
    00025     report();
    00026     // do stuff
    00027   }
    00028
    00029 }

## Member Function Documentation

IssueSeverity & IssueSeverity::operator= | ( | const IssueSeverity & | rhs | ) | `[inline]`

Definition at line 148 of file IssueSeverity.h.

    00148                                                                        {
    00149   m_line = rhs.m_line;
    00150   m_file = rhs.m_file;
    00151   m_level = rhs.m_level;
    00152   m_msg   = rhs.m_level;
    00153   m_reported = true;
    00154   return *this;
    00155 }

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

Definition at line 75 of file IssueSeverity.h.

    00075                                              {
    00076     m_level = l;
    00077   }

void IssueSeverity::setMsg | ( | const std::string & | m | ) | `[inline]`

Definition at line 78 of file IssueSeverity.h.

    00078                                   {
    00079     m_msg = m;
    00080   }

IssueSeverity::Level IssueSeverity::getLevel | ( |  | ) | const`[inline]`

Definition at line 82 of file IssueSeverity.h.

    00082 { return m_level; }

std::string IssueSeverity::getMsg | ( |  | ) | const`[inline]`

Definition at line 83 of file IssueSeverity.h.

    00083 { return m_msg; }

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

Definition at line 45 of file IssueSeverity.cpp.

    00045                                {
    00046   std::ostringstream ost;
    00047   ost << m_file << ":" << m_line;
    00048   return ost.str();
    00049 }

void IssueSeverity::report | ( |  | ) |

Definition at line 32 of file IssueSeverity.cpp.

    00032                       {
    00033
    00034   if (m_ers != 0) {
    00035     m_ers->report(this);
    00036   } else {
    00037     std::cerr << *this << std::endl;
    00038   }
    00039   m_reported = true;
    00040
    00041 }

IssueSeverity::operator StatusCode | ( |  | ) | const

Definition at line 51 of file IssueSeverity.cpp.

    00051                                          {
    00052   if (m_level == IssueSeverity::RECOVERABLE) {
    00053     return StatusCode(StatusCode::RECOVERABLE, *this);
    00054   } else if (m_level < IssueSeverity::ERROR) {
    00055     return StatusCode(StatusCode::SUCCESS, *this);
    00056   } else {
    00057     return StatusCode(StatusCode::FAILURE, *this);
    00058   }
    00059 }

void IssueSeverity::init | ( |  | ) | `[static, private]`

Definition at line 15 of file IssueSeverity.cpp.

    00015                          {
    00016   if (!m_init) {
    00017     m_init = true;
    00018     m_ers = Gaudi::svcLocator()->service<IIssueLogger>("IssueLogger").get();
    00019   }
    00020 }

## Friends And Related Function Documentation

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

Definition at line 157 of file IssueSeverity.h.

    00157                                                                      {
    00158   os << "ISSUE:  level " << rhs.getLevel() << " from: " << rhs.getOrigin()
    00159      << " msg: " << rhs.getMsg();
    00160   return os;
    00161 }

## Member Data Documentation

int IssueSeverity::m_line`[private]`

Definition at line 95 of file IssueSeverity.h.

std::string IssueSeverity::m_file`[private]`

Definition at line 96 of file IssueSeverity.h.

bool IssueSeverity::m_init`[static, private]`

Definition at line 98 of file IssueSeverity.h.

IIssueLogger * IssueSeverity::m_ers`[static, private]`

Definition at line 99 of file IssueSeverity.h.

IssueSeverity::Level IssueSeverity::m_level`[private]`

Definition at line 101 of file IssueSeverity.h.

std::string IssueSeverity::m_msg`[private]`

Definition at line 102 of file IssueSeverity.h.

bool IssueSeverity::m_reported`[private]`

Definition at line 103 of file IssueSeverity.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r7p1/GaudiKernel/GaudiKernel/IssueSeverity.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r7p1/GaudiKernel/src/Lib/IssueSeverity.cpp