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,
00036 SOURCE_MO_COMPOSITE = 0x2,
00037 SOURCE_SE = 0x4,
00038 SOURCE_TE_NATURAL = 0x8,
00039 SOURCE_TE_ENRICHED = 0x10,
00040 SOURCE_ZR = 0x20,
00041 SOURCE_ND = 0x40,
00042 SOURCE_CA = 0x80,
00043 SOURCE_CU = 0x100,
00044 SOURCE_CD = 0x200,
00045 SOURCE_CALIB_TUBE = 0x400,
00046 SOURCE_ENDCAP = 0x800
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 }
00061
00062 #endif
00063
00064