CMS 3D CMS Logo

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

◆ ELsev_

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

◆ ELseverityLevel() [1/2]

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

Definition at line 48 of file ELseverityLevel.h.

◆ ELseverityLevel() [2/2]

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

◆ ~ELseverityLevel()

edm::messagelogger::ELseverityLevel::~ELseverityLevel ( )
defaultnoexcept

Member Function Documentation

◆ cmp()

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

◆ getInputStr()

const std::string & edm::messagelogger::ELseverityLevel::getInputStr ( ) const

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

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

◆ getLevel()

constexpr int edm::messagelogger::ELseverityLevel::getLevel ( ) const
inlinenoexcept

◆ getName()

const std::string & edm::messagelogger::ELseverityLevel::getName ( void  ) const

Definition at line 108 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, names, nLevels, and runTheMatrix::ret.

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

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

◆ getSymbol()

const std::string & edm::messagelogger::ELseverityLevel::getSymbol ( ) const

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

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

◆ getVarName()

const std::string & edm::messagelogger::ELseverityLevel::getVarName ( ) const

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

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

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 172 of file ELseverityLevel.cc.

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

Member Data Documentation

◆ myLevel

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