test
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 101 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 108 of file ELseverityLevel.h.

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

Constructor & Destructor Documentation

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

Definition at line 123 of file ELseverityLevel.cc.

References dtNoiseDBValidation_cfg::cerr, and getName().

123  : myLevel( lev ) {
124 
125  #ifdef ELsevConTRACE
126  std::cerr << "--- ELseverityLevel " << lev
127  << " (" << getName() << ")\n"
128  << std::flush;
129  #endif
130 
131 }
const ELstring getName() const
edm::ELseverityLevel::ELseverityLevel ( ELstring const &  str)

Definition at line 134 of file ELseverityLevel.cc.

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

134  {
135 
136  static ELmap const & m = loadMap();
137 
138  ELmap::const_iterator i = m.find( s );
139  myLevel = ( i == m.end() ) ? ELsev_unspecified : i->second;
140 
141 }
int i
Definition: DBlmapReader.cc:9
static ELmap const & loadMap()
std::map< ELstring const, ELseverityLevel::ELsev_ > ELmap
edm::ELseverityLevel::~ELseverityLevel ( )

Definition at line 143 of file ELseverityLevel.cc.

143 { ; }

Member Function Documentation

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

Definition at line 150 of file ELseverityLevel.cc.

References myLevel.

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

Definition at line 202 of file ELseverityLevel.cc.

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

202  {
204 
205  switch ( myLevel ) {
206  default : result = "?no value?" ; break;
207  case ELsev_zeroSeverity : result = "ZERO" ; break;
208  case ELsev_success : result = "DEBUG" ; break;
209  case ELsev_info : result = "INFO" ; break;
210  case ELsev_warning : result = "WARNING" ; break;
211  case ELsev_error : result = "ERROR" ; break;
212  case ELsev_unspecified : result = "UNSPECIFIED"; break;
213  case ELsev_severe : result = "SYSTEM" ; break; // 6/13/07 mf
214  case ELsev_highestSeverity: result = "HIGHEST" ; break;
215  }; // switch
216 
217  return result;
218 }
tuple result
Definition: query.py:137
std::string ELstring
Definition: ELstring.h:26
int edm::ELseverityLevel::getLevel ( ) const
const ELstring edm::ELseverityLevel::getName ( void  ) const

Definition at line 183 of file ELseverityLevel.cc.

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

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

183  {
185 
186  switch ( myLevel ) {
187  default : result = "?no value?"; break;
188  case ELsev_zeroSeverity : result = "--" ; break;
189  case ELsev_success : result = "Debug" ; break; // 4/21/09 mf
190  case ELsev_info : result = "Info" ; break;
191  case ELsev_warning : result = "Warning" ; break;
192  case ELsev_error : result = "Error" ; break;
193  case ELsev_unspecified : result = "??" ; break;
194  case ELsev_severe : result = "System" ; break; // 6/13/07 mf
195  case ELsev_highestSeverity: result = "!!" ; break;
196  }; // switch
197 
198  return result;
199 }
tuple result
Definition: query.py:137
std::string ELstring
Definition: ELstring.h:26
const ELstring edm::ELseverityLevel::getSymbol ( ) const

Definition at line 164 of file ELseverityLevel.cc.

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

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

164  {
166 
167  switch ( myLevel ) {
168  default : result = "0" ; break;
169  case ELsev_zeroSeverity : result = "--"; break;
170  case ELsev_success : result = "-d"; break; // 4/21/09 mf
171  case ELsev_info : result = "-i"; break;
172  case ELsev_warning : result = "-w"; break;
173  case ELsev_error : result = "-e"; break;
174  case ELsev_unspecified : result = "??"; break;
175  case ELsev_severe : result = "-s"; break;
176  case ELsev_highestSeverity: result = "!!"; break;
177  }; // switch
178 
179  return result;
180 }
tuple result
Definition: query.py:137
std::string ELstring
Definition: ELstring.h:26
const ELstring edm::ELseverityLevel::getVarName ( ) const

Definition at line 221 of file ELseverityLevel.cc.

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

221  {
223 
224  switch ( myLevel ) {
225  default : result = "?no value? "; break;
226  case ELsev_zeroSeverity : result = "ELzeroSeverity "; break;
227  case ELsev_success : result = "ELdebug "; break;// 4/21/09
228  case ELsev_info : result = "ELinfo "; break;
229  case ELsev_warning : result = "ELwarning "; break;
230  case ELsev_error : result = "ELerror "; break;
231  case ELsev_unspecified : result = "ELunspecified "; break;
232  case ELsev_severe : result = "ELsystem "; break;// 6/13/07
233  case ELsev_highestSeverity: result = "ELhighestSeverity"; break;
234  }; // switch
235 
236  return result;
237 }
tuple result
Definition: query.py:137
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 244 of file ELseverityLevel.cc.

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

Member Data Documentation

int edm::ELseverityLevel::myLevel
private