00001
00002
00003
00004
00005
00006
00007
00009
00010 #ifndef __TMUIHVMASK_H__
00011 #define __TMUIHVMASK_H__
00012
00013 #include <TDataType.h>
00014 #include <PHException.h>
00015
00016 #ifndef __CINT__
00017 #ifdef __GNUC__
00018 #if __GNUC__ < 3
00019 #include <hash_map.h>
00020 namespace sgi { using ::hash_map; };
00021 #else
00022 #include <ext/hash_map>
00023 #if __GNUC_MINOR__ == 0
00024 namespace sgi = std;
00025 #else
00026 namespace sgi = ::__gnu_cxx;
00027 #endif
00028 #endif
00029 #else
00030 namespace sgi = std;
00031 #endif
00032 #endif // __CINT__
00033
00034 #include <string>
00035
00036 class TMuiHVMask
00037 {
00038 public:
00039
00040 static double get_effic_twopack(UShort_t arm,
00041 UShort_t plane,
00042 UShort_t panel,
00043 UShort_t orient,
00044 UShort_t twopack);
00045
00046 static double get_effic_hvgroup(UShort_t arm,
00047 UShort_t plane,
00048 UShort_t panel,
00049 UShort_t orient,
00050 UShort_t hvgroup);
00051
00052 static void set_run_number(ULong_t run_number){
00053 _run_number = run_number;
00054 }
00055 static ULong_t get_run_number() { return _run_number; }
00056
00057 static void set_one_tube_effic(Float_t one_tube_effic){
00058 _one_tube_effic = one_tube_effic;
00059 }
00060
00061 static void set_two_tube_effic(Float_t two_tube_effic){
00062 _two_tube_effic = two_tube_effic;
00063 }
00064
00065 static void set_disabled(bool disabled){
00066 _disabled = disabled;
00067 }
00068
00069 static void set_use_override(bool use_override){
00070 _use_override = use_override;
00071 }
00072
00073 static void set_filename_north(const char* filename) {
00074 _filename_north = std::string(filename);
00075 }
00076
00077 static void set_filename_south(const char* filename) {
00078 _filename_south = std::string(filename);
00079 }
00080
00081 static void set_mask_plane(const int mask_plane) {
00082 _mask_plane = mask_plane;
00083 }
00084
00085 private:
00086
00087 #ifndef __CINT__
00088 typedef sgi::hash_map<ULong_t, double> private_map;
00089 static private_map _map;
00090 #endif
00091
00092 static ULong_t _run_number;
00093 static bool initialize();
00094 static bool _use_override;
00095 static float _one_tube_effic;
00096 static float _two_tube_effic;
00097 static bool _disabled;
00098 static int _mask_plane;
00099 static std::string _filename_north;
00100 static std::string _filename_south;
00101 ClassDef(TMuiHVMask, 1)
00102 };
00103
00104 #endif
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115