All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
include/N3AnaBase/utils/source_utils.h
00001 #ifndef __N3AnaBase_source_utils_h 
00002 #define __N3AnaBase_source_utils_h 1
00003 
00004 #include <cstdlib>
00005 #include <iostream>
00006 #include <stdexcept>
00007 #include <string>
00008 
00009 #include <N3GeomDef/N3SourceGeom.h>
00010 
00011 namespace nemo3 { 
00012   
00027 
00028   class source_utils 
00029   { 
00030   public:
00031     
00032     enum source_t 
00033       {
00034         SOURCE_INVALID       = -1,
00035         SOURCE_MO_METAL      = 0x1,    // Molybdenum metallic
00036         SOURCE_MO_COMPOSITE  = 0x2,    // Molybdenum composite
00037         SOURCE_SE            = 0x4,    // Selenium
00038         SOURCE_TE_NATURAL    = 0x8,    // Tellurium natural 
00039         SOURCE_TE_ENRICHED   = 0x10,   // Tellurium enriched (130)
00040         SOURCE_ZR            = 0x20,   // Zirconium
00041         SOURCE_ND            = 0x40,   // Neodymum
00042         SOURCE_CA            = 0x80,   // Calcium
00043         SOURCE_CU            = 0x100,  // Copper
00044         SOURCE_CD            = 0x200,  // Cadmium
00045         SOURCE_CALIB_TUBE    = 0x400,  // Calibration tube
00046         SOURCE_ENDCAP        = 0x800   // Endcap
00047       };
00048 
00050     static int get_source_from_label (const std::string & label_);
00051 
00053     static std::string get_label_from_source (int id_);
00054 
00056     static bool is_source_valid (int id_);
00057 
00058   };
00059 
00060 } // end of namespace nemo3 
00061 
00062 #endif /* __N3AnaBase_source_utils_h */
00063 
00064 // end of source_utils.h