CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/CondFormats/OptAlignObjects/interface/OAQuality.h

Go to the documentation of this file.
00001 #ifndef OAQuality_H
00002 #define OAQuality_H
00003 
00004 enum OAQuality { oa_fixed, oa_calibrated, oa_unknown };
00005 
00006 struct OAQualityTranslator {
00007     
00008   static const char * name(OAQuality oaq) 
00009   {
00010     static const char* c[] = { 
00011       "fixed",
00012       "calibrated",
00013       "unknown"   
00014     };
00015     return c[oaq];                        
00016   }
00017   
00018   static const OAQuality index( const int& ind ) {
00019     switch (ind) {
00020     case 0:
00021       return oa_fixed;
00022       break;
00023     case 1:
00024       return oa_calibrated;
00025       break;
00026     case 2:
00027       return oa_unknown;
00028       break;
00029     default:
00030       return oa_unknown;
00031       break;
00032     }
00033   }
00034 
00035 };
00036 #endif