CMS 3D CMS Logo

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

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

Constructor & Destructor Documentation

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

Definition at line 98 of file ELseverityLevel.cc.

References MessageLogger_cfi::cerr, and getName().

98  : myLevel(lev) {
99 #ifdef ELsevConTRACE
100  std::cerr << "--- ELseverityLevel " << lev << " (" << getName() << ")\n" << std::flush;
101 #endif
102  }
const ELstring getName() const
edm::ELseverityLevel::ELseverityLevel ( ELstring const &  str)

Definition at line 104 of file ELseverityLevel.cc.

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

104  {
105  static ELmap const& m = loadMap();
106 
107  ELmap::const_iterator i = m.find(s);
108  myLevel = (i == m.end()) ? ELsev_unspecified : i->second;
109  }
std::map< ELstring const, ELseverityLevel::ELsev_ > ELmap
static ELmap const & loadMap()
edm::ELseverityLevel::~ELseverityLevel ( )

Definition at line 111 of file ELseverityLevel.cc.

111 { ; }

Member Function Documentation

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

Definition at line 117 of file ELseverityLevel.cc.

References myLevel.

const ELstring edm::ELseverityLevel::getInputStr ( ) const

Definition at line 197 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.

197  {
199 
200  switch (myLevel) {
201  default:
202  result = "?no value?";
203  break;
204  case ELsev_zeroSeverity:
205  result = "ZERO";
206  break;
207  case ELsev_success:
208  result = "DEBUG";
209  break;
210  case ELsev_info:
211  result = "INFO";
212  break;
213  case ELsev_warning:
214  result = "WARNING";
215  break;
216  case ELsev_error:
217  result = "ERROR";
218  break;
219  case ELsev_unspecified:
220  result = "UNSPECIFIED";
221  break;
222  case ELsev_severe:
223  result = "SYSTEM";
224  break; // 6/13/07 mf
226  result = "HIGHEST";
227  break;
228  }; // switch
229 
230  return result;
231  }
std::string ELstring
Definition: ELstring.h:21
int edm::ELseverityLevel::getLevel ( ) const
const ELstring edm::ELseverityLevel::getName ( void  ) const

Definition at line 161 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<<(), and edm::service::ELstatistics::summaryForJobReport().

161  {
163 
164  switch (myLevel) {
165  default:
166  result = "?no value?";
167  break;
168  case ELsev_zeroSeverity:
169  result = "--";
170  break;
171  case ELsev_success:
172  result = "Debug";
173  break; // 4/21/09 mf
174  case ELsev_info:
175  result = "Info";
176  break;
177  case ELsev_warning:
178  result = "Warning";
179  break;
180  case ELsev_error:
181  result = "Error";
182  break;
183  case ELsev_unspecified:
184  result = "??";
185  break;
186  case ELsev_severe:
187  result = "System";
188  break; // 6/13/07 mf
190  result = "!!";
191  break;
192  }; // switch
193 
194  return result;
195  }
std::string ELstring
Definition: ELstring.h:21
const ELstring edm::ELseverityLevel::getSymbol ( ) const

Definition at line 125 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().

125  {
127 
128  switch (myLevel) {
129  default:
130  result = "0";
131  break;
132  case ELsev_zeroSeverity:
133  result = "--";
134  break;
135  case ELsev_success:
136  result = "-d";
137  break; // 4/21/09 mf
138  case ELsev_info:
139  result = "-i";
140  break;
141  case ELsev_warning:
142  result = "-w";
143  break;
144  case ELsev_error:
145  result = "-e";
146  break;
147  case ELsev_unspecified:
148  result = "??";
149  break;
150  case ELsev_severe:
151  result = "-s";
152  break;
154  result = "!!";
155  break;
156  }; // switch
157 
158  return result;
159  }
std::string ELstring
Definition: ELstring.h:21
const ELstring edm::ELseverityLevel::getVarName ( ) const

Definition at line 233 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.

233  {
235 
236  switch (myLevel) {
237  default:
238  result = "?no value? ";
239  break;
240  case ELsev_zeroSeverity:
241  result = "ELzeroSeverity ";
242  break;
243  case ELsev_success:
244  result = "ELdebug ";
245  break; // 4/21/09
246  case ELsev_info:
247  result = "ELinfo ";
248  break;
249  case ELsev_warning:
250  result = "ELwarning ";
251  break;
252  case ELsev_error:
253  result = "ELerror ";
254  break;
255  case ELsev_unspecified:
256  result = "ELunspecified ";
257  break;
258  case ELsev_severe:
259  result = "ELsystem ";
260  break; // 6/13/07
262  result = "ELhighestSeverity";
263  break;
264  }; // switch
265 
266  return result;
267  }
std::string ELstring
Definition: ELstring.h:21

Friends And Related Function Documentation

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

Definition at line 273 of file ELseverityLevel.cc.

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

Member Data Documentation

int edm::ELseverityLevel::myLevel
private