BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
BeamEnergySvc.h
Go to the documentation of this file.
1#ifndef BEAM_ENERGY_SVC_H
2#define BEAM_ENERGY_SVC_H
3
4#include "GaudiKernel/Service.h"
6#include <mysql.h>
7
8template <class TYPE> class CnvFactory;
9
10class BeamEnergySvc : public Service, virtual public IBeamEnergySvc
11{
12 friend class CnvFactory<BeamEnergySvc>;
13
14 public :
15 BeamEnergySvc(const std::string& name, ISvcLocator* svcLoc);
16 virtual ~BeamEnergySvc();
17
18 virtual StatusCode initialize();
19 virtual StatusCode finalize();
20 virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvIF);
21
22 bool isRunValid(int run);
23 double getbeamE(int run);
24
25 private :
26 std::string m_host;
27 std::string m_dbName;
28 std::string m_userName;
29 std::string m_password;
30 unsigned int m_port_num;
31
32 MYSQL* OpenDb() const;
33 void ReadDb(int run);
34 void CloseDb(MYSQL* mysql) const;
35
36 int m_run;
37 bool m_isRunValid;
38 double m_beamE;
39};
40
41#endif
struct st_mysql MYSQL
#define private
bool isRunValid(int run)
virtual StatusCode initialize()
virtual StatusCode finalize()
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvIF)
double getbeamE(int run)
virtual ~BeamEnergySvc()