CMS 3D CMS Logo

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

#include <ELseverityLevel.h>

Public Types

enum  ELsev_ {
  ELsev_noValueAssigned = 0, ELsev_zeroSeverity, ELsev_success, ELsev_info,
  ELsev_fwkInfo, ELsev_warning, ELsev_error, ELsev_unspecified,
  ELsev_severe, ELsev_highestSeverity, nLevels
}
 

Public Member Functions

constexpr int cmp (ELseverityLevel const &e) const noexcept
 
constexpr ELseverityLevel (ELsev_ lev=ELsev_unspecified) noexcept
 
 ELseverityLevel (std::string_view str)
 
const std::string & getInputStr () const
 
constexpr int getLevel () const noexcept
 
const std::string & getName () const
 
const std::string & getSymbol () const
 
const std::string & getVarName () const
 
 ~ELseverityLevel () noexcept=default
 

Private Attributes

int myLevel
 

Friends

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

Detailed Description

Definition at line 26 of file ELseverityLevel.h.

Member Enumeration Documentation

Enumerator
ELsev_noValueAssigned 
ELsev_zeroSeverity 
ELsev_success 
ELsev_info 
ELsev_fwkInfo 
ELsev_warning 
ELsev_error 
ELsev_unspecified 
ELsev_severe 
ELsev_highestSeverity 
nLevels 

Definition at line 31 of file ELseverityLevel.h.

Constructor & Destructor Documentation

constexpr edm::messagelogger::ELseverityLevel::ELseverityLevel ( ELsev_  lev = ELsev_unspecified)
inlinenoexcept

Definition at line 48 of file ELseverityLevel.h.

edm::messagelogger::ELseverityLevel::ELseverityLevel ( std::string_view  str)

Definition at line 76 of file ELseverityLevel.cc.

References ELsev_unspecified, mps_fire::i, and myLevel.

76  {
77  static ELmap const& m = loadMap();
78 
79  ELmap::const_iterator i = m.find(s);
80  myLevel = (i == m.end()) ? ELsev_unspecified : i->second;
81  }
edm::messagelogger::ELseverityLevel::~ELseverityLevel ( )
defaultnoexcept

Member Function Documentation

constexpr int edm::messagelogger::ELseverityLevel::cmp ( ELseverityLevel const &  e) const
inlinenoexcept

Definition at line 56 of file ELseverityLevel.h.

References alignCSCRings::e, and myLevel.

56 { return myLevel - e.myLevel; }
const std::string & edm::messagelogger::ELseverityLevel::getInputStr ( ) const

Definition at line 127 of file ELseverityLevel.cc.

References cms::cuda::assert(), ELsev_error, ELsev_fwkInfo, ELsev_highestSeverity, ELsev_info, ELsev_noValueAssigned, ELsev_severe, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_zeroSeverity, PixelMapPlotter::inputs, myLevel, nLevels, and runTheMatrix::ret.

127  {
128  static const auto inputs = []() {
129  std::array<std::string, nLevels> ret;
130  ret[ELsev_noValueAssigned] = "?no value?";
131  ret[ELsev_zeroSeverity] = "ZERO";
132  ret[ELsev_success] = "DEBUG";
133  ret[ELsev_info] = "INFO";
134  ret[ELsev_fwkInfo] = "FWKINFO";
135  ret[ELsev_warning] = "WARNING";
136  ret[ELsev_error] = "ERROR";
137  ret[ELsev_unspecified] = "UNSPECIFIED";
138  ret[ELsev_severe] = "SYSTEM";
139  ret[ELsev_highestSeverity] = "HIGHEST";
140  return ret;
141  }();
142 
144  return inputs[myLevel];
145  }
tuple ret
prodAgent to be discontinued
assert(be >=bs)
constexpr int edm::messagelogger::ELseverityLevel::getLevel ( ) const
inlinenoexcept
const std::string & edm::messagelogger::ELseverityLevel::getName ( void  ) const

Definition at line 107 of file ELseverityLevel.cc.

References cms::cuda::assert(), ELsev_error, ELsev_fwkInfo, ELsev_highestSeverity, ELsev_info, ELsev_noValueAssigned, ELsev_severe, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_zeroSeverity, myLevel, edm::names, nLevels, and runTheMatrix::ret.

Referenced by plotting.Plot::draw(), and edm::messagelogger::operator<<().

107  {
108  static const auto names = []() {
109  std::array<std::string, nLevels> ret;
110  ret[ELsev_noValueAssigned] = "?no value?";
111  ret[ELsev_zeroSeverity] = "--";
112  ret[ELsev_success] = "Debug";
113  ret[ELsev_info] = "Info";
114  ret[ELsev_fwkInfo] = "FwkInfo";
115  ret[ELsev_warning] = "Warning";
116  ret[ELsev_error] = "Error";
117  ret[ELsev_unspecified] = "??";
118  ret[ELsev_severe] = "System";
119  ret[ELsev_highestSeverity] = "!!";
120  return ret;
121  }();
122 
124  return names[myLevel];
125  }
tuple ret
prodAgent to be discontinued
assert(be >=bs)
std::vector< std::string > names
const std::string & edm::messagelogger::ELseverityLevel::getSymbol ( ) const

Definition at line 87 of file ELseverityLevel.cc.

References cms::cuda::assert(), ELsev_error, ELsev_fwkInfo, ELsev_highestSeverity, ELsev_info, ELsev_noValueAssigned, ELsev_severe, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_zeroSeverity, myLevel, nLevels, and runTheMatrix::ret.

Referenced by edm::service::ELoutput::log().

87  {
88  static const auto symbols = []() {
89  std::array<std::string, nLevels> ret;
90  ret[ELsev_noValueAssigned] = "0";
91  ret[ELsev_zeroSeverity] = "--";
92  ret[ELsev_success] = "-d";
93  ret[ELsev_info] = "-i";
94  ret[ELsev_fwkInfo] = "-f";
95  ret[ELsev_warning] = "-w";
96  ret[ELsev_error] = "-e";
97  ret[ELsev_unspecified] = "??";
98  ret[ELsev_severe] = "-s";
99  ret[ELsev_highestSeverity] = "!!";
100  return ret;
101  }();
102 
104  return symbols[myLevel];
105  }
tuple ret
prodAgent to be discontinued
assert(be >=bs)
const std::string & edm::messagelogger::ELseverityLevel::getVarName ( ) const

Definition at line 147 of file ELseverityLevel.cc.

References cms::cuda::assert(), ELsev_error, ELsev_fwkInfo, ELsev_highestSeverity, ELsev_info, ELsev_noValueAssigned, ELsev_severe, ELsev_success, ELsev_unspecified, ELsev_warning, ELsev_zeroSeverity, myLevel, nLevels, runTheMatrix::ret, and varNames.

147  {
148  static const auto varNames = []() {
149  std::array<std::string, nLevels> ret;
150  ret[ELsev_noValueAssigned] = "?no value?";
151  ret[ELsev_zeroSeverity] = "ELzeroSeverity ";
152  ret[ELsev_success] = "ELdebug ";
153  ret[ELsev_info] = "ELinfo ";
154  ret[ELsev_fwkInfo] = "ELfwkInfo ";
155  ret[ELsev_warning] = "ELwarning ";
156  ret[ELsev_error] = "ELerror ";
157  ret[ELsev_unspecified] = "ELunspecified ";
158  ret[ELsev_severe] = "ELsystem ";
159  ret[ELsev_highestSeverity] = "ELhighestSeverity";
160  return ret;
161  }();
162 
164  return varNames[myLevel];
165  }
tuple ret
prodAgent to be discontinued
constexpr char const * varNames[]
assert(be >=bs)

Friends And Related Function Documentation

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

Definition at line 171 of file ELseverityLevel.cc.

171 { return os << " -" << sev.getName() << "- "; }
const std::string & getName() const

Member Data Documentation

int edm::messagelogger::ELseverityLevel::myLevel
private