| # Gaudi Framework, version v20r4
Generated: 8 Jan 2009

# IssueSeverity Class Reference

`#include <IssueSeverity.h>`

Collaboration diagram for IssueSeverity:

[legend]

List of all members.

## Detailed Description

Definition at line 41 of file IssueSeverity.h.

## 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 &)

## Member Enumeration Documentation

enum IssueSeverity::Level

Enumerator:

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

Definition at line 45 of file IssueSeverity.h.

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

## Constructor & Destructor Documentation

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

Definition at line 108 of file IssueSeverity.h.

    00108                                    : m_line(0), m_file(""),
    00109                                        m_level(IssueSeverity::NIL),
    00110                                        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 112 of file IssueSeverity.h.

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

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

Definition at line 122 of file IssueSeverity.h.

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

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

Definition at line 131 of file IssueSeverity.h.

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

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

Definition at line 139 of file IssueSeverity.h.

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

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

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

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

Definition at line 74 of file IssueSeverity.h.

    00074                                              {
    00075     m_level = l;
    00076   }

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

Definition at line 77 of file IssueSeverity.h.

    00077                                   {
    00078     m_msg = m;
    00079   }

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

Definition at line 81 of file IssueSeverity.h.

    00081 { return m_level; }

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

Definition at line 82 of file IssueSeverity.h.

    00082 { 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     Gaudi::svcLocator()->service("IssueLogger",m_ers,true).ignore();
    00019   }
    00020 }

## Friends And Related Function Documentation

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

Definition at line 156 of file IssueSeverity.h.

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

## Member Data Documentation

int IssueSeverity::m_line`[private]`

Definition at line 94 of file IssueSeverity.h.

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

Definition at line 95 of file IssueSeverity.h.

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

Definition at line 97 of file IssueSeverity.h.

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

Definition at line 98 of file IssueSeverity.h.

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

Definition at line 100 of file IssueSeverity.h.

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

Definition at line 101 of file IssueSeverity.h.

bool IssueSeverity::m_reported`[private]`

Definition at line 102 of file IssueSeverity.h.

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

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