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.

31  {
32  ELsev_noValueAssigned = 0, // default returned by map when not found
33  ELsev_zeroSeverity, // threshold use only
34  ELsev_success, // report reaching a milestone
35  ELsev_info, // information
36  ELsev_fwkInfo, // framework
37  ELsev_warning, // warning
38  ELsev_error, // error detected
39  ELsev_unspecified, // severity was not specified
40  ELsev_severe, // future results are suspect
41  ELsev_highestSeverity, // threshold use only
42  // -----
43  nLevels // how many levels?
44  }; // ELsev_

Constructor & Destructor Documentation

◆ ELseverityLevel() [1/2]

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

Definition at line 48 of file ELseverityLevel.h.

48 : myLevel(lev) {}

◆ ELseverityLevel() [2/2]

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

Definition at line 76 of file ELseverityLevel.cc.

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  }

References ELsev_unspecified, mps_fire::i, visualization-live-secondInstance_cfg::m, myLevel, and alignCSCRings::s.

◆ ~ELseverityLevel()

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

Member Function Documentation

◆ cmp()

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

Definition at line 56 of file ELseverityLevel.h.

56 { return myLevel - e.myLevel; }

References MillePedeFileConverter_cfg::e, and myLevel.

◆ getInputStr()

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

Definition at line 127 of file ELseverityLevel.cc.

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  }

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.

◆ getLevel()

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

◆ getName()

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

Definition at line 107 of file ELseverityLevel.cc.

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  }

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<<().

◆ getSymbol()

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

Definition at line 87 of file ELseverityLevel.cc.

87  {
88  static const auto symbols = []() {
89  std::array<std::string, nLevels> ret;
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  }

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().

◆ getVarName()

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

Definition at line 147 of file ELseverityLevel.cc.

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  }

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.

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 171 of file ELseverityLevel.cc.

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

Member Data Documentation

◆ myLevel

int edm::messagelogger::ELseverityLevel::myLevel
private
edm::messagelogger::ELseverityLevel::ELsev_fwkInfo
Definition: ELseverityLevel.h:36
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:542
mps_fire.i
i
Definition: mps_fire.py:428
edm::messagelogger::ELseverityLevel::myLevel
int myLevel
Definition: ELseverityLevel.h:73
edm::messagelogger::ELseverityLevel::ELsev_info
Definition: ELseverityLevel.h:35
edm::messagelogger::ELseverityLevel::ELsev_zeroSeverity
Definition: ELseverityLevel.h:33
cms::cuda::assert
assert(be >=bs)
edm::messagelogger::ELseverityLevel::ELsev_highestSeverity
Definition: ELseverityLevel.h:41
edm::messagelogger::ELseverityLevel::ELsev_error
Definition: ELseverityLevel.h:38
alignCSCRings.s
s
Definition: alignCSCRings.py:92
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
edm::messagelogger::ELseverityLevel::nLevels
Definition: ELseverityLevel.h:43
edm::messagelogger::ELseverityLevel::ELsev_severe
Definition: ELseverityLevel.h:40
edm::messagelogger::ELseverityLevel::ELsev_noValueAssigned
Definition: ELseverityLevel.h:32
edm::messagelogger::ELseverityLevel::ELsev_warning
Definition: ELseverityLevel.h:37
edm::messagelogger::ELseverityLevel::ELsev_unspecified
Definition: ELseverityLevel.h:39
PixelMapPlotter.inputs
inputs
Definition: PixelMapPlotter.py:490
edm::messagelogger::ELseverityLevel::getName
const std::string & getName() const
Definition: ELseverityLevel.cc:107
varNames
constexpr const char * varNames[]
Definition: PulseShapeFitOOTPileupCorrection.cc:110
edm::messagelogger::ELseverityLevel::ELsev_success
Definition: ELseverityLevel.h:34
symbols
Definition: symbols.py:1
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37