Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:22

0001 #ifndef OAQuality_H
0002 #define OAQuality_H
0003 
0004 enum OAQuality { oa_fixed, oa_calibrated, oa_unknown };
0005 
0006 struct OAQualityTranslator {
0007   constexpr static const char* const name(OAQuality oaq) {
0008     constexpr const char* const c[] = {"fixed", "calibrated", "unknown"};
0009     return c[oaq];
0010   }
0011 
0012   static constexpr const OAQuality index(int ind) {
0013     switch (ind) {
0014       case 0:
0015         return oa_fixed;
0016         break;
0017       case 1:
0018         return oa_calibrated;
0019         break;
0020       case 2:
0021         return oa_unknown;
0022         break;
0023       default:
0024         return oa_unknown;
0025         break;
0026     }
0027   }
0028 };
0029 #endif