Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ccnc.h

Go to the documentation of this file.
00001 
00013 #ifndef _CCNC_H_
00014 #define _CCNC_H_
00015 
00016 #ifndef ROOT_Rtypes
00017 #if !defined(__CINT__) || defined(__MAKECINT__)
00018 #include "Rtypes.h"
00019 #endif
00020 #endif
00021 
00022 typedef enum ccnc_enum {
00023 
00024   e_cc = 1,
00025   e_nc,
00026   e_both_ccnc,
00027   e_undefined_ccnc
00028 
00029 } ccnc_t;
00030 
00031 namespace ccnc {
00032 
00033      inline const char * as_string(ccnc_t ccnc) 
00034      {
00035        switch(ccnc) {
00036          case e_cc:          return "CC";     break;
00037          case e_nc:          return "NC";     break;
00038          case e_both_ccnc:   return "CC+NC";  break;
00039 
00040          case e_undefined_ccnc:
00041          default:            
00042                       return "unknown CCNC"; break;
00043        }
00044        return "bad ccnc";
00045      }
00046 
00047      inline ccnc_t get_from_code(int code) 
00048      {
00049         if      (code == 1) return e_cc;
00050         else if (code == 2) return e_nc;
00051         else if (code == 3) return e_both_ccnc;
00052         else                return e_undefined_ccnc;
00053      }
00054      
00055 }
00056 
00057 #endif

Generated on Mon Feb 15 11:06:30 2010 for loon by  doxygen 1.3.9.1