CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes | Friends
edm::ELseverityLevel Class Reference

#include <ELseverityLevel.h>

Public Types

enum  ELsev_ {
  ELsev_noValueAssigned = 0, ELsev_zeroSeverity, ELsev_success, ELsev_info,
  ELsev_warning, ELsev_error, ELsev_unspecified, ELsev_severe,
  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 103 of file ELseverityLevel.h.

Member Enumeration Documentation

Enumerator
ELsev_noValueAssigned 
ELsev_zeroSeverity 
ELsev_success 
ELsev_info 
ELsev_warning 
ELsev_error 
ELsev_unspecified 
ELsev_severe 
ELsev_highestSeverity 
nLevels 

Definition at line 110 of file ELseverityLevel.h.

110  {
111  ELsev_noValueAssigned = 0 // default returned by map when not found
112  , ELsev_zeroSeverity // threshold use only
113  , ELsev_success // report reaching a milestone
114  , ELsev_info // information
115  , ELsev_warning // warning
116  , ELsev_error // error detected
117  , ELsev_unspecified // severity was not specified
118  , ELsev_severe // future results are suspect
119  , ELsev_highestSeverity // threshold use only
120  // -----
121  , nLevels // how many levels?
122  }; // ELsev_

Constructor & Destructor Documentation

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

Definition at line 114 of file ELseverityLevel.cc.

References ecal_dqm_sourceclient-live_cfg::cerr, and getName().

114  : myLevel( lev ) {
115 
116  #ifdef ELsevConTRACE
117  std::cerr << "--- ELseverityLevel " << lev
118  << " (" << getName() << ")\n"
119  << std::flush;
120  #endif
121 
122 }
const ELstring getName() const
edm::ELseverityLevel::ELseverityLevel ( ELstring const &  str)

Definition at line 125 of file ELseverityLevel.cc.

References ELsev_unspecified, i, edm::loadMap(), visualization-live-secondInstance_cfg::m, and myLevel.

125  {
126 
127  static ELmap const & m = loadMap();
128 
129  ELmap::const_iterator i = m.find( s );
130  myLevel = ( i == m.end() ) ? ELsev_unspecified : i->second;
131 
132 }
int i
Definition: DBlmapReader.cc:9
static ELmap const & loadMap()
std::map< ELstring const, ELseverityLevel::ELsev_ > ELmap
edm::ELseverityLevel::~ELseverityLevel ( )

Definition at line 134 of file ELseverityLevel.cc.

134 { ; }

Member Function Documentation

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

Definition at line 141 of file ELseverityLevel.cc.

References myLevel.

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

Definition at line 193 of file ELseverityLevel.cc.

References ELsev_error, ELsev_highestSeverity, ELsev_info, ELsev_severe, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_zeroSeverity, myLevel, and mps_fire::result.

193  {
195 
196  switch ( myLevel ) {
197  default : result = "?no value?" ; break;
198  case ELsev_zeroSeverity : result = "ZERO" ; break;
199  case ELsev_success : result = "DEBUG" ; break;
200  case ELsev_info : result = "INFO" ; break;
201  case ELsev_warning : result = "WARNING" ; break;
202  case ELsev_error : result = "ERROR" ; break;
203  case ELsev_unspecified : result = "UNSPECIFIED"; break;
204  case ELsev_severe : result = "SYSTEM" ; break; // 6/13/07 mf
205  case ELsev_highestSeverity: result = "HIGHEST" ; break;
206  }; // switch
207 
208  return result;
209 }
tuple result
Definition: mps_fire.py:95
std::string ELstring
Definition: ELstring.h:26
int edm::ELseverityLevel::getLevel ( ) const
const ELstring edm::ELseverityLevel::getName ( void  ) const

Definition at line 174 of file ELseverityLevel.cc.

References ELsev_error, ELsev_highestSeverity, ELsev_info, ELsev_severe, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_zeroSeverity, myLevel, and mps_fire::result.

Referenced by plotting.Plot::draw(), ELseverityLevel(), edm::service::ELstatistics::formSummary(), edm::operator<<(), LogErrorEventFilter::print(), and edm::service::ELstatistics::summaryForJobReport().

174  {
176 
177  switch ( myLevel ) {
178  default : result = "?no value?"; break;
179  case ELsev_zeroSeverity : result = "--" ; break;
180  case ELsev_success : result = "Debug" ; break; // 4/21/09 mf
181  case ELsev_info : result = "Info" ; break;
182  case ELsev_warning : result = "Warning" ; break;
183  case ELsev_error : result = "Error" ; break;
184  case ELsev_unspecified : result = "??" ; break;
185  case ELsev_severe : result = "System" ; break; // 6/13/07 mf
186  case ELsev_highestSeverity: result = "!!" ; break;
187  }; // switch
188 
189  return result;
190 }
tuple result
Definition: mps_fire.py:95
std::string ELstring
Definition: ELstring.h:26
const ELstring edm::ELseverityLevel::getSymbol ( ) const

Definition at line 155 of file ELseverityLevel.cc.

References ELsev_error, ELsev_highestSeverity, ELsev_info, ELsev_severe, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_zeroSeverity, myLevel, and mps_fire::result.

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

155  {
157 
158  switch ( myLevel ) {
159  default : result = "0" ; break;
160  case ELsev_zeroSeverity : result = "--"; break;
161  case ELsev_success : result = "-d"; break; // 4/21/09 mf
162  case ELsev_info : result = "-i"; break;
163  case ELsev_warning : result = "-w"; break;
164  case ELsev_error : result = "-e"; break;
165  case ELsev_unspecified : result = "??"; break;
166  case ELsev_severe : result = "-s"; break;
167  case ELsev_highestSeverity: result = "!!"; break;
168  }; // switch
169 
170  return result;
171 }
tuple result
Definition: mps_fire.py:95
std::string ELstring
Definition: ELstring.h:26
const ELstring edm::ELseverityLevel::getVarName ( ) const

Definition at line 212 of file ELseverityLevel.cc.

References ELsev_error, ELsev_highestSeverity, ELsev_info, ELsev_severe, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_zeroSeverity, myLevel, and mps_fire::result.

212  {
214 
215  switch ( myLevel ) {
216  default : result = "?no value? "; break;
217  case ELsev_zeroSeverity : result = "ELzeroSeverity "; break;
218  case ELsev_success : result = "ELdebug "; break;// 4/21/09
219  case ELsev_info : result = "ELinfo "; break;
220  case ELsev_warning : result = "ELwarning "; break;
221  case ELsev_error : result = "ELerror "; break;
222  case ELsev_unspecified : result = "ELunspecified "; break;
223  case ELsev_severe : result = "ELsystem "; break;// 6/13/07
224  case ELsev_highestSeverity: result = "ELhighestSeverity"; break;
225  }; // switch
226 
227  return result;
228 }
tuple result
Definition: mps_fire.py:95
std::string ELstring
Definition: ELstring.h:26

Friends And Related Function Documentation

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

Definition at line 235 of file ELseverityLevel.cc.

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

Member Data Documentation

int edm::ELseverityLevel::myLevel
private