CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes | Friends

edm::ELseverityLevel Class Reference

#include <ELseverityLevel.h>

List of all members.

Public Types

enum  ELsev_ {
  ELsev_noValueAssigned = 0, ELsev_zeroSeverity, ELsev_incidental, ELsev_success,
  ELsev_info, ELsev_warning, ELsev_warning2, ELsev_error,
  ELsev_error2, ELsev_next, ELsev_unspecified, ELsev_severe,
  ELsev_severe2, ELsev_abort, ELsev_fatal, ELsev_highestSeverity,
  nLevels
}

Public Member Functions

int cmp (ELseverityLevel const &e) const
 ELseverityLevel (ELsev_ lev=ELsev_unspecified)
 ELseverityLevel (ELstring const &str)
const ELstring getInputStr () const
int getLevel () const
const ELstring getName () const
const ELstring getSymbol () const
const ELstring getVarName () const
 ~ELseverityLevel ()

Private Attributes

int myLevel

Friends

std::ostream & operator<< (std::ostream &os, const ELseverityLevel &sev)

Detailed Description

Definition at line 101 of file ELseverityLevel.h.


Member Enumeration Documentation

Enumerator:
ELsev_noValueAssigned 
ELsev_zeroSeverity 
ELsev_incidental 
ELsev_success 
ELsev_info 
ELsev_warning 
ELsev_warning2 
ELsev_error 
ELsev_error2 
ELsev_next 
ELsev_unspecified 
ELsev_severe 
ELsev_severe2 
ELsev_abort 
ELsev_fatal 
ELsev_highestSeverity 
nLevels 

Definition at line 108 of file ELseverityLevel.h.

               {
    ELsev_noValueAssigned = 0  // default returned by map when not found
  , ELsev_zeroSeverity         // threshold use only
  , ELsev_incidental           // flash this on a screen
  , ELsev_success              // report reaching a milestone
  , ELsev_info                 // information
  , ELsev_warning              // warning
  , ELsev_warning2             // more serious warning
  , ELsev_error                // error detected
  , ELsev_error2               // more serious error
  , ELsev_next                 // advise to skip to next event
  , ELsev_unspecified          // severity was not specified
  , ELsev_severe               // future results are suspect
  , ELsev_severe2              // more severe
  , ELsev_abort                // suggest aborting
  , ELsev_fatal                // strongly suggest aborting!
  , ELsev_highestSeverity      // threshold use only
  // -----
  , nLevels                    // how many levels?
  };  // ELsev_

Constructor & Destructor Documentation

edm::ELseverityLevel::ELseverityLevel ( ELsev_  lev = ELsev_unspecified)

Definition at line 166 of file ELseverityLevel.cc.

References dtNoiseDBValidation_cfg::cerr, and getName().

                                                  : myLevel( lev )  {

  #ifdef ELsevConTRACE
    std::cerr << "--- ELseverityLevel " << lev
              << " (" << getName() << ")\n"
              << std::flush;
  #endif

}
edm::ELseverityLevel::ELseverityLevel ( ELstring const &  str)

Definition at line 177 of file ELseverityLevel.cc.

References ELsev_unspecified, i, edm::loadMap(), m, and myLevel.

                                                      {

  static ELmap const & m = loadMap();

  ELmap::const_iterator  i = m.find( s );
  myLevel = ( i == m.end() ) ? ELsev_unspecified : i->second;

}
edm::ELseverityLevel::~ELseverityLevel ( )

Definition at line 187 of file ELseverityLevel.cc.

{ ; }

Member Function Documentation

int edm::ELseverityLevel::cmp ( ELseverityLevel const &  e) const

Definition at line 194 of file ELseverityLevel.cc.

References myLevel.

                                                            {
  return myLevel - e.myLevel;
}
const ELstring edm::ELseverityLevel::getInputStr ( ) const

Definition at line 260 of file ELseverityLevel.cc.

References ELsev_abort, ELsev_error, ELsev_error2, ELsev_fatal, ELsev_highestSeverity, ELsev_incidental, ELsev_info, ELsev_next, ELsev_severe, ELsev_severe2, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_warning2, ELsev_zeroSeverity, myLevel, and query::result.

                                                    {
  ELstring  result;

  switch ( myLevel )  {
    default                   : result =  "?no value?" ; break;
    case ELsev_zeroSeverity   : result =  "ZERO"       ; break;
    case ELsev_incidental     : result =  "INCIDENTAL" ; break;
    case ELsev_success        : result =  "DEBUG"      ; break;
    case ELsev_info           : result =  "INFO"       ; break;
    case ELsev_warning        : result =  "WARNING"    ; break;
    case ELsev_warning2       : result =  "WARNING2"   ; break;
    case ELsev_error          : result =  "ERROR"      ; break;
    case ELsev_error2         : result =  "ERROR2"     ; break;
    case ELsev_next           : result =  "NEXT"       ; break;
    case ELsev_unspecified    : result =  "UNSPECIFIED"; break;
    case ELsev_severe         : result =  "SYSTEM"     ; break;  // 6/13/07 mf
    case ELsev_severe2        : result =  "SEVERE2"    ; break;
    case ELsev_abort          : result =  "ABORT"      ; break;
    case ELsev_fatal          : result =  "FATAL"      ; break;
    case ELsev_highestSeverity: result =  "HIGHEST"    ; break;
  };  // switch

  return result;
}
int edm::ELseverityLevel::getLevel ( ) const
const ELstring edm::ELseverityLevel::getName ( void  ) const

Definition at line 234 of file ELseverityLevel.cc.

References ELsev_abort, ELsev_error, ELsev_error2, ELsev_fatal, ELsev_highestSeverity, ELsev_incidental, ELsev_info, ELsev_next, ELsev_severe, ELsev_severe2, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_warning2, ELsev_zeroSeverity, myLevel, and query::result.

Referenced by ELseverityLevel(), edm::service::ELstatistics::formSummary(), edm::service::ELtsErrorLog::initiateMsg(), edm::service::ErrorLog::operator()(), edm::operator<<(), and edm::service::ELstatistics::summaryForJobReport().

                                                {
  ELstring  result;

  switch ( myLevel )  {
    default                   :  result =  "?no value?"; break;
    case ELsev_zeroSeverity   :  result =  "--"        ; break;
    case ELsev_incidental     :  result =  ".."        ; break;
    case ELsev_success        :  result =  "Debug"     ; break; // 4/21/09 mf
    case ELsev_info           :  result =  "Info"      ; break;
    case ELsev_warning        :  result =  "Warning"   ; break;
    case ELsev_warning2       :  result =  "Warning!"  ; break;
    case ELsev_error          :  result =  "Error"     ; break;
    case ELsev_error2         :  result =  "Error!"    ; break;
    case ELsev_next           :  result =  "Next"      ; break;
    case ELsev_unspecified    :  result =  "??"        ; break;
    case ELsev_severe         :  result =  "System"    ; break; // 6/13/07 mf
    case ELsev_severe2        :  result =  "Severe!"   ; break;
    case ELsev_abort          :  result =  "Abort!"    ; break;
    case ELsev_fatal          :  result =  "Fatal!"    ; break;
    case ELsev_highestSeverity:  result =  "!!"        ; break;
  };  // switch

  return result;
}
const ELstring edm::ELseverityLevel::getSymbol ( ) const

Definition at line 208 of file ELseverityLevel.cc.

References ELsev_abort, ELsev_error, ELsev_error2, ELsev_fatal, ELsev_highestSeverity, ELsev_incidental, ELsev_info, ELsev_next, ELsev_severe, ELsev_severe2, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_warning2, ELsev_zeroSeverity, myLevel, and query::result.

Referenced by edm::service::ELstatistics::formSummary(), edm::service::ELoutput::log(), edm::ELlog4cplus::log(), and edm::service::ELstatistics::summaryForJobReport().

                                                  {
  ELstring  result;

  switch ( myLevel )  {
    default                   :  result =  "0" ; break;
    case ELsev_zeroSeverity   :  result =  "--"; break;
    case ELsev_incidental     :  result =  ".."; break;
    case ELsev_success        :  result =  "-d"; break;         // 4/21/09 mf
    case ELsev_info           :  result =  "-i"; break;
    case ELsev_warning        :  result =  "-w"; break;
    case ELsev_warning2       :  result =  "-W"; break;
    case ELsev_error          :  result =  "-e"; break;
    case ELsev_error2         :  result =  "-E"; break;
    case ELsev_next           :  result =  "-n"; break;
    case ELsev_unspecified    :  result =  "??"; break;
    case ELsev_severe         :  result =  "-s"; break;
    case ELsev_severe2        :  result =  "-S"; break;
    case ELsev_abort          :  result =  "-A"; break;
    case ELsev_fatal          :  result =  "-F"; break;
    case ELsev_highestSeverity:  result =  "!!"; break;
  };  // switch

  return result;
}
const ELstring edm::ELseverityLevel::getVarName ( ) const

Definition at line 286 of file ELseverityLevel.cc.

References ELsev_abort, ELsev_error, ELsev_error2, ELsev_fatal, ELsev_highestSeverity, ELsev_incidental, ELsev_info, ELsev_next, ELsev_severe, ELsev_severe2, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_warning2, ELsev_zeroSeverity, myLevel, and query::result.

                                                   {
  ELstring  result;

  switch ( myLevel )  {
    default                   : result =  "?no value?       "; break;
    case ELsev_zeroSeverity   : result =  "ELzeroSeverity   "; break;
    case ELsev_incidental     : result =  "ELincidental     "; break;
    case ELsev_success        : result =  "ELdebug          "; break;// 4/21/09
    case ELsev_info           : result =  "ELinfo           "; break;
    case ELsev_warning        : result =  "ELwarning        "; break;
    case ELsev_warning2       : result =  "ELwarning2       "; break;
    case ELsev_error          : result =  "ELerror          "; break;
    case ELsev_error2         : result =  "ELerror2         "; break;
    case ELsev_next           : result =  "ELnextEvent      "; break;
    case ELsev_unspecified    : result =  "ELunspecified    "; break;
    case ELsev_severe         : result =  "ELsystem         "; break;// 6/13/07
    case ELsev_severe2        : result =  "ELsevere2        "; break;
    case ELsev_abort          : result =  "ELabort          "; break;
    case ELsev_fatal          : result =  "ELfatal          "; break;
    case ELsev_highestSeverity: result =  "ELhighestSeverity"; break;
  };  // switch

  return result;
}

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const ELseverityLevel sev 
) [friend]

Definition at line 316 of file ELseverityLevel.cc.

                                                                         {
  return os << " -" << sev.getName() << "- ";
}

Member Data Documentation