00001 // thanks chunlei 00002 #ifndef DQADtagAlg_ReadBeamInfFromDb_H 00003 #define DQADtagAlg_ReadBeamInfFromDb_H 00004 00005 #include <iostream> 00006 #include <mysql.h> 00007 00008 00009 class ReadBeamInfFromDb { 00010 00011 public: 00012 00013 ReadBeamInfFromDb(); 00014 ~ReadBeamInfFromDb() {} 00015 00016 bool isRunValid(int run); 00017 double getbeamE(int run); 00018 00019 private: 00020 MYSQL* OpenDb() const; 00021 void ReadDb(int run); 00022 void CloseDb(MYSQL* mysql) const; 00023 00024 00025 int m_run; 00026 bool m_isRunValid; 00027 double m_beamE; 00028 00029 }; 00030 00031 00032 #endif