BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
Tof/TofEnergyCalibSvc/TofEnergyCalibSvc-00-00-01/TofEnergyCalibSvc/TofEnergyCalibSvc.h
Go to the documentation of this file.
1#ifndef TOFENERGYCALIBSVC_H_
2#define TOFENERGYCALIBSVC_H_
3
4#include "GaudiKernel/IInterface.h"
5#include "GaudiKernel/Kernel.h"
6#include "GaudiKernel/Service.h"
7#include "GaudiKernel/IIncidentListener.h"
8#include "GaudiKernel/IDataProviderSvc.h"
9#include "TofEnergyCalibSvc/TofEnergyCalibSvc.h"
10#include "TofEnergyCalibSvc/ITofEnergyCalibSvc.h"
11#include <mysql.h>
12#include <map>
13#include <vector>
14#include "DatabaseSvc/IDatabaseSvc.h"
15#include "GaudiKernel/IService.h"
16//#include "rdbModel/Db/Connection.h"
17//#include "rdbModel/Tables/Assertion.h"
18#include "CLHEP/Matrix/Vector.h"
19#include "DatabaseSvc/IDatabaseSvc.h"
20using CLHEP::HepVector;
21#include <string>
22#include "DatabaseSvc/DatabaseSvc.h"
23
24class TofEnergyCalibSvc: public Service, virtual public ITofEnergyCalibSvc,
25 virtual public IIncidentListener
26{
27 public:
28 TofEnergyCalibSvc( const std::string& name, ISvcLocator* svcloc );
29 //TofEnergyCalibSvc();
31
32 virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvUnknown);
33 virtual StatusCode initialize();
34 virtual StatusCode finalize();
35
36 // Incident handler
37 void handle(const Incident&);
38
39
40
42
43 //static TofEnergyCalibSvc* m_vdb;
44 //static TofEnergyCalibSvc* instance() {
45 // return (m_vdb) ? m_vdb : (m_vdb = new TofEnergyCalibSvc());
46 //}
47 //const DatabaseSvc* GetDatabaseSvc() const {return dynamic_cast<DatabaseSvc*>(m_dbsvc);}
48
49 void SetIsData(const std::string& _IsData) {m_IsData = _IsData;}
50 std::string GetIsData() const {return m_IsData;}
51 void SetBossRelease(const std::string& _bossrelease) {m_bossRelease = _bossrelease;}
52 std::string GetBossRelease() const {return m_bossRelease;}
53 double getCalibConst() const { return m_CalibConst;}
54 double getPara1() const{ return m_Para1;}
55 double getPara2() const{ return m_Para2;}
56 double getPara3() const{ return m_Para3;}
57 double getPara4() const{ return m_Para4;}
58 double getPara5() const{ return m_Para5;}
59 void setCalibConst(double _CalibConst) {m_CalibConst=_CalibConst;}
60 void setPara1(double _Para1) {m_Para1=_Para1;}
61 void setPara2(double _Para2) {m_Para2=_Para2;}
62 void setPara3(double _Para3) {m_Para3=_Para3;}
63 void setPara4(double _Para4) {m_Para4=_Para4;}
64 void setPara5(double _Para5) {m_Para5=_Para5;}
65
66
68 private:
69 // common variables for BOSS & BEAN
70 double m_CalibConst;
71 double m_Para1;
72 double m_Para2;
73 double m_Para3;
74 double m_Para4;
75 double m_Para5;
76 std::string dbName;
77 std::string m_bossRelease;
78 std::string m_IsData;
79
80 std::string host;
81 std::string table;
82 std::string userName;
83 std::string password;
84 unsigned int serialNo;
85
86
87 IDataProviderSvc* m_eventSvc;
88
89};
90#endif /* TOFENERGYCALIBSVC_H_ */
virtual StatusCode finalize()
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown)
bool getTofEnergyCalibSvcInfo()
virtual StatusCode initialize()
TofEnergyCalibSvc(const std::string &name, ISvcLocator *svcloc)
void handle(const Incident &)