BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
Utilities/MeasuredEcmsSvc/MeasuredEcmsSvc-00-00-19/MeasuredEcmsSvc/MeasuredEcmsSvc.h
Go to the documentation of this file.
1//========================================
2//AUTHOR: Lianjin WU <[email protected]> 2015.11.28
3//========================================
4#ifndef Utilities_MeasuredEcmsSvc_H
5#define Utilities_MeasuredEcmsSvc_H
6#include "MeasuredEcmsSvc/IMeasuredEcmsSvc.h"
7class IDatabaseSvc;
8template <class TYPE> class CnvFactory;
9class MeasuredEcmsSvc:public Service, virtual public IMeasuredEcmsSvc, virtual public IIncidentListener{
10 friend class CnvFactory<MeasuredEcmsSvc>;
11 public:
12 MeasuredEcmsSvc(const std::string& name, ISvcLocator* svcLoc);
14
15 virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvIF);
16 virtual StatusCode initialize();
17 virtual StatusCode finalize();
18
19 void handle(const Incident&);
20
23 void readDB(int runNo);
25 int getRunFrom(int runNo);
26 int getRunTo(int runNo);
27 double getEcmsErr(int runNo);
28 double getAveEcms(int runNo);
29 double getAveEcmsErr(int runNo);
30 double getPx(int runNo);
31 double getPy(int runNo);
32 double getPz(int runNo);
33 double getEcms(int runNo);
36
37 void readInfo(int runNo, char *tab, char *col, char *min_col, char *max_col);
38 double getInfo(int runNo, char *tab, char *col, char *min_col, char *max_col);
39 bool isGetInfoValid(int runNo, char *tab, char *col, char *min_col, char *max_col);
40
41 void readInfo(int runNo);
42 double getInfo(int runNo);
44
45 void readRecord(int runNo, char *tab, char *col, char *min_col, char *max_col);
46 std::string getRecord(int runNo, char *tab, char *col, char *min_col, char *max_col);
47 bool isGetRecordValid(int runNo, char *tab, char *col, char *min_col, char *max_col);
48
49 void readRecord(int runNo);
50 std::string getRecord(int runNo);
52
55 int getSampleName(){return m_sampleName2;}
56 int getRunFrom(){return m_runFrom2;}
57 int getRunTo(){return m_runTo2;}
58 double getEcmsErr(){return m_ecmsErr2;}
59 double getAveEcms(){return m_aveEcms2;}
60 double getAveEcmsErr(){return m_aveEcmsErr2;}
61 double getPx(){return m_px2;}
62 double getPy(){return m_py2;}
63 double getPz(){return m_pz2;}
64 double getEcms(){return m_ecms2;}
65 bool isReadDBValid(){return m2_runNoValid;}
66 bool isGetEcmsValid(){return m2_runNoValid;}
67 bool isRunNoValid(){return m2_runNoValid;}
68
69 private:
70 //RunParamsMin and RunParamsMax are used to set range for psi3773 listed in RunParams
71 int RunParamsMin, RunParamsMax;
72 //MeasuredEcmsMin and MeasuredEcmsMax for the data listed in MeasuredEcms2
73 int MeasuredEcmsMin, MeasuredEcmsMax;
74
75 std::string table;
76 std::string column;
77 std::string up_column;
78 std::string down_column;
79
80 IDatabaseSvc* m_dbSvc;
81 IDataProviderSvc* m_eventSvc;
82
83 int old_runNo;
84 int old_runNo1;
85 int old_runNo2;
86 int old_runNo3;
87 int old_runNo4;
88
89 double m_info1;
90 bool m_runNoValid1;
91
92 double m_info2;
93 bool m_runNoValid2;
94
95 int m_sampleName;
96 int m_runFrom;
97 int m_runTo;
98 double m_ecmsErr;
99 double m_aveEcms;
100 double m_aveEcmsErr;
101 double m_ecms;
102 double m_px, m_py, m_pz;
103 bool m_runNoValid;
104
105 int m_sampleName2;
106 int m_runFrom2;
107 int m_runTo2;
108 double m_ecmsErr2;
109 double m_aveEcms2;
110 double m_aveEcmsErr2;
111 double m_ecms2;
112 double m_px2, m_py2, m_pz2;
113 bool m2_runNoValid;
114
115 std::string m_record1;
116 bool m_record_valid1;
117
118 std::string m_record2;
119 bool m_record_valid2;
120};
121#endif
int runNo
Definition: DQA_TO_DB.cxx:12
double getEcmsErr(int runNo)
std::string getRecord(int runNo)
void readMeasuredEcms2(int runNo)
void readRunParams2(int runNo)
void readRunParams(int runNo)
virtual StatusCode finalize()
int getRunTo(int runNo)
bool isGetRecordValid(int runNo, char *tab, char *col, char *min_col, char *max_col)
double getPz(int runNo)
int getRunFrom(int runNo)
void readRecord(int runNo)
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvIF)
int getSampleName(int runNo)
double getInfo(int runNo)
double getEcms(int runNo)
bool isGetRecordValid(int runNo)
void handle(const Incident &)
void readInfo(int runNo)
virtual StatusCode initialize()
double getPy(int runNo)
void readDB(int runNo)
virtual ~MeasuredEcmsSvc()
bool isRunNoValid(int runNo)
MeasuredEcmsSvc(const std::string &name, ISvcLocator *svcLoc)
double getInfo(int runNo, char *tab, char *col, char *min_col, char *max_col)
bool isGetInfoValid(int runNo)
double getAveEcmsErr(int runNo)
double getPx(int runNo)
void readRecord(int runNo, char *tab, char *col, char *min_col, char *max_col)
double getAveEcms(int runNo)
std::string getRecord(int runNo, char *tab, char *col, char *min_col, char *max_col)
void readInfo(int runNo, char *tab, char *col, char *min_col, char *max_col)
bool isGetEcmsValid(int runNo)
void readMeasuredEcms(int runNo)
bool isGetInfoValid(int runNo, char *tab, char *col, char *min_col, char *max_col)