00001 #ifndef __PBGLSECTOR_H__ 00002 #define __PBGLSECTOR_H__ 00003 00004 #ifndef __EMCSTATICDATA_H__ 00005 #include "EmcStaticData.h" 00006 #endif 00007 #ifndef __PBGLCALIBRATIONDATA_H__ 00008 #include "PbGlCalibrationData.h" 00009 #endif 00010 #ifndef __EMCSECTOR_H__ 00011 #include "EmcSector.h" 00012 #endif 00013 #ifndef __PBGLSUPERMODULE_H__ 00014 #include "PbGlSuperModule.h" 00015 #endif 00016 #ifndef __PBGLINDEXER_H__ 00017 #include "PbGlIndexer.h" 00018 #endif 00019 #include <vector> 00020 00021 class PHTimeStamp; 00022 00025 class PbGlSector: public EmcSector 00026 { 00027 public: 00028 00029 PbGlSector(int &, PHTimeStamp* ts = 0 ); 00030 00031 virtual ~PbGlSector(); 00032 00034 virtual EmcSuperModule *getSuperModule(int SMNumber) {return SM[SMNumber];} 00036 virtual void GetEnergyCalibration(int i, float& c0, float& g0, float& cf); 00038 PbGlSuperModule * GetSM24(int iSM24) {return (PbGlSuperModule *)SM[iSM24];} 00040 void CorrectEnergyCalibration(const char * fname); 00041 00042 private: 00043 00044 void BuildFromFiles(void); 00045 void BuildFromDB(PHTimeStamp*); 00046 void Reset(void); 00047 void LoadNextSMData(FILE * fp, EmcSuperModule * SM24); 00048 00049 protected: 00050 00052 std::vector<EmcSuperModule*> SM; 00053 00054 std::vector<float> fC0; 00055 std::vector<float> fG0; 00056 std::vector<float> fCF; 00057 00058 private: 00059 static size_t fgSize; 00060 static size_t fgNumberOfSuperModules; 00061 }; 00062 00063 #endif