BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
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"
11#include <mysql.h>
12#include <map>
13#include <vector>
15#include "GaudiKernel/IService.h"
16//#include "rdbModel/Db/Connection.h"
17//#include "rdbModel/Tables/Assertion.h"
18#include "CLHEP/Matrix/Vector.h"
20using CLHEP::HepVector;
21#include <string>
23class TofEnergyCalibSvc: public extends<Service, ITofEnergyCalibSvc>,
24//class 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 //Get informations from CalVtxLumVer
67 StatusCode getSftParVer(std::string& SftVer,
68 std::string& CalParVer, int &runfrm,
69 int &runto,int RunNo, std::string BossRelease,
70 std::string DataType);
71
73 private:
74 // common variables for BOSS & BEAN
75 double m_CalibConst;
76 double m_Para1;
77 double m_Para2;
78 double m_Para3;
79 double m_Para4;
80 double m_Para5;
81 std::string dbName;
82 std::string m_bossRelease;
83 std::string m_isData;
84 std::string m_calPar;
85 std::string m_bossVer;
86 std::string host;
87 std::string table;
88 std::string userName;
89 std::string password;
90 unsigned int serialNo;
91
92
93 IDataProviderSvc* m_eventSvc;
94
95};
96#endif /* TOFENERGYCALIBSVC_H_ */
char * SftVer
Definition: DQA_TO_DB.cxx:18
void setCalibConst(double _CalibConst)
double getPara5() const
IDatabaseSvc * m_dbsvc
virtual StatusCode initialize()
double getPara4() const
double getPara2() const
std::string GetBossRelease() const
void setPara1(double _Para1)
double getCalibConst() const
void setPara2(double _Para2)
void setPara4(double _Para4)
virtual StatusCode finalize()
double getPara3() const
double getPara1() const
void handle(const Incident &)
StatusCode getSftParVer(std::string &SftVer, std::string &CalParVer, int &runfrm, int &runto, int RunNo, std::string BossRelease, std::string DataType)
void setPara5(double _Para5)
void setPara3(double _Para3)
void SetBossRelease(const std::string &_bossrelease)