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_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.

108  {
109  ELsev_noValueAssigned = 0 // default returned by map when not found
110  , ELsev_zeroSeverity // threshold use only
111  , ELsev_incidental // flash this on a screen
112  , ELsev_success // report reaching a milestone
113  , ELsev_info // information
114  , ELsev_warning // warning
115  , ELsev_warning2 // more serious warning
116  , ELsev_error // error detected
117  , ELsev_error2 // more serious error
118  , ELsev_next // advise to skip to next event
119  , ELsev_unspecified // severity was not specified
120  , ELsev_severe // future results are suspect
121  , ELsev_severe2 // more severe
122  , ELsev_abort // suggest aborting
123  , ELsev_fatal // strongly suggest aborting!
124  , ELsev_highestSeverity // threshold use only
125  // -----
126  , nLevels // how many levels?
127  }; // ELsev_

Constructor & Destructor Documentation

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

Definition at line 166 of file ELseverityLevel.cc.

References benchmark_cfg::cerr, and getName().

166  : myLevel( lev ) {
167 
168  #ifdef ELsevConTRACE
169  std::cerr << "--- ELseverityLevel " << lev
170  << " (" << getName() << ")\n"
171  << std::flush;
172  #endif
173 
174 }
const ELstring getName() const
edm::ELseverityLevel::ELseverityLevel ( ELstring const &  str)

Definition at line 177 of file ELseverityLevel.cc.

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

177  {
178 
179  static ELmap const & m = loadMap();
180 
181  ELmap::const_iterator i = m.find( s );
182  myLevel = ( i == m.end() ) ? ELsev_unspecified : i->second;
183 
184 }
int i
Definition: DBlmapReader.cc:9
static ELmap const & loadMap()
std::map< ELstring const, ELseverityLevel::ELsev_ > ELmap
string s
Definition: asciidump.py:422
edm::ELseverityLevel::~ELseverityLevel ( )

Definition at line 187 of file ELseverityLevel.cc.

187 { ; }

Member Function Documentation

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

Definition at line 194 of file ELseverityLevel.cc.

References myLevel.

194  {
195  return myLevel - e.myLevel;
196 }
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.

260  {
262 
263  switch ( myLevel ) {
264  default : result = "?no value?" ; break;
265  case ELsev_zeroSeverity : result = "ZERO" ; break;
266  case ELsev_incidental : result = "INCIDENTAL" ; break;
267  case ELsev_success : result = "DEBUG" ; break;
268  case ELsev_info : result = "INFO" ; break;
269  case ELsev_warning : result = "WARNING" ; break;
270  case ELsev_warning2 : result = "WARNING2" ; break;
271  case ELsev_error : result = "ERROR" ; break;
272  case ELsev_error2 : result = "ERROR2" ; break;
273  case ELsev_next : result = "NEXT" ; break;
274  case ELsev_unspecified : result = "UNSPECIFIED"; break;
275  case ELsev_severe : result = "SYSTEM" ; break; // 6/13/07 mf
276  case ELsev_severe2 : result = "SEVERE2" ; break;
277  case ELsev_abort : result = "ABORT" ; break;
278  case ELsev_fatal : result = "FATAL" ; break;
279  case ELsev_highestSeverity: result = "HIGHEST" ; break;
280  }; // switch
281 
282  return result;
283 }
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 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().

234  {
236 
237  switch ( myLevel ) {
238  default : result = "?no value?"; break;
239  case ELsev_zeroSeverity : result = "--" ; break;
240  case ELsev_incidental : result = ".." ; break;
241  case ELsev_success : result = "Debug" ; break; // 4/21/09 mf
242  case ELsev_info : result = "Info" ; break;
243  case ELsev_warning : result = "Warning" ; break;
244  case ELsev_warning2 : result = "Warning!" ; break;
245  case ELsev_error : result = "Error" ; break;
246  case ELsev_error2 : result = "Error!" ; break;
247  case ELsev_next : result = "Next" ; break;
248  case ELsev_unspecified : result = "??" ; break;
249  case ELsev_severe : result = "System" ; break; // 6/13/07 mf
250  case ELsev_severe2 : result = "Severe!" ; break;
251  case ELsev_abort : result = "Abort!" ; break;
252  case ELsev_fatal : result = "Fatal!" ; break;
253  case ELsev_highestSeverity: result = "!!" ; break;
254  }; // switch
255 
256  return result;
257 }
tuple result
Definition: query.py:137
std::string ELstring
Definition: ELstring.h:26
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().

208  {
210 
211  switch ( myLevel ) {
212  default : result = "0" ; break;
213  case ELsev_zeroSeverity : result = "--"; break;
214  case ELsev_incidental : result = ".."; break;
215  case ELsev_success : result = "-d"; break; // 4/21/09 mf
216  case ELsev_info : result = "-i"; break;
217  case ELsev_warning : result = "-w"; break;
218  case ELsev_warning2 : result = "-W"; break;
219  case ELsev_error : result = "-e"; break;
220  case ELsev_error2 : result = "-E"; break;
221  case ELsev_next : result = "-n"; break;
222  case ELsev_unspecified : result = "??"; break;
223  case ELsev_severe : result = "-s"; break;
224  case ELsev_severe2 : result = "-S"; break;
225  case ELsev_abort : result = "-A"; break;
226  case ELsev_fatal : result = "-F"; break;
227  case ELsev_highestSeverity: result = "!!"; break;
228  }; // switch
229 
230  return result;
231 }
tuple result
Definition: query.py:137
std::string ELstring
Definition: ELstring.h:26
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.

286  {
288 
289  switch ( myLevel ) {
290  default : result = "?no value? "; break;
291  case ELsev_zeroSeverity : result = "ELzeroSeverity "; break;
292  case ELsev_incidental : result = "ELincidental "; break;
293  case ELsev_success : result = "ELdebug "; break;// 4/21/09
294  case ELsev_info : result = "ELinfo "; break;
295  case ELsev_warning : result = "ELwarning "; break;
296  case ELsev_warning2 : result = "ELwarning2 "; break;
297  case ELsev_error : result = "ELerror "; break;
298  case ELsev_error2 : result = "ELerror2 "; break;
299  case ELsev_next : result = "ELnextEvent "; break;
300  case ELsev_unspecified : result = "ELunspecified "; break;
301  case ELsev_severe : result = "ELsystem "; break;// 6/13/07
302  case ELsev_severe2 : result = "ELsevere2 "; break;
303  case ELsev_abort : result = "ELabort "; break;
304  case ELsev_fatal : result = "ELfatal "; break;
305  case ELsev_highestSeverity: result = "ELhighestSeverity"; break;
306  }; // switch
307 
308  return result;
309 }
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 316 of file ELseverityLevel.cc.

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

Member Data Documentation

int edm::ELseverityLevel::myLevel
private