Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:04

0001 // -*- C++ -*-
0002 //
0003 // Package:     DataFormats/Common
0004 // Class  :     ELseverityLevel
0005 //
0006 // Implementation:
0007 //     [Notes on implementation]
0008 //
0009 // Original Author:  Christopher Jones
0010 //         Created:  Wed, 20 Jan 2021 15:39:12 GMT
0011 //
0012 
0013 // system include files
0014 #include <cassert>
0015 #include <array>
0016 
0017 // user include files
0018 #include "DataFormats/Common/interface/ELseverityLevel.h"
0019 
0020 namespace edm {
0021 
0022   std::string_view ELseverityLevel::getName() const noexcept {
0023     static const auto names = []() {
0024       std::array<const char*, nLevels> ret;
0025       ret[ELsev_noValueAssigned] = "?no value?";
0026       ret[ELsev_zeroSeverity] = "--";
0027       ret[ELsev_success] = "Debug";
0028       ret[ELsev_info] = "Info";
0029       ret[ELsev_fwkInfo] = "FwkInfo";
0030       ret[ELsev_warning] = "Warning";
0031       ret[ELsev_error] = "Error";
0032       ret[ELsev_unspecified] = "??";
0033       ret[ELsev_severe] = "System";
0034       ret[ELsev_highestSeverity] = "!!";
0035       return ret;
0036     }();
0037 
0038     assert(myLevel < nLevels);
0039     return names[myLevel];
0040   }
0041 }  // namespace edm