00001 #ifndef __PBSCTIMINGFIXES_H__ 00002 #define __PBSCTIMINGFIXES_H__ 00003 00008 class pbscTimingFixes 00009 { 00010 00011 private: 00012 float femTPattern[144]; 00013 float globalT0[6]; 00014 float smT0[108]; 00015 float smTRes[108]; 00016 float towerT0[108][144]; 00017 00018 void loadCommonFixes(); 00019 void loadFixes2_1(); 00020 void loadTowerT0_1(); 00021 void loadFixes2_2(); 00022 void loadTowerT0_2(); 00023 00024 protected: 00025 pbscTimingFixes() {} 00026 00027 virtual ~pbscTimingFixes() {} 00028 00029 static pbscTimingFixes * single; 00030 static bool fixesLoaded; 00031 public: 00032 static pbscTimingFixes * getInstance() 00033 { 00034 if (!single) 00035 single = new pbscTimingFixes(); 00036 return single; 00037 } 00038 static void deleteInstance() 00039 { 00040 delete single; 00041 } 00042 void loadFixes(int runNumber) 00043 { 00044 loadCommonFixes(); 00045 if (runNumber < 29987) 00046 loadFixes2_1(); 00047 else 00048 loadFixes2_2(); 00049 fixesLoaded = true; 00050 } 00051 inline float getSectorT0(int S) 00052 { 00053 return globalT0[S]; 00054 } 00055 inline float getSMT0(int SM) 00056 { 00057 return smT0[SM]; 00058 } 00059 inline float getTowerT0(int SM, int T) 00060 { 00061 return towerT0[SM][T]; 00062 } 00063 inline float getSMTRes(int SM) 00064 { 00065 return smTRes[SM]; 00066 } 00067 inline float getFEMTPattern(int iSMT) 00068 { 00069 return femTPattern[iSMT]; 00070 } 00071 inline bool areFixesLoaded() 00072 { 00073 return fixesLoaded; 00074 } 00075 00076 public: 00077 // ClassDef(timingFixes,1) 00078 }; 00079 #endif