BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
ConnectionProvider.h
Go to the documentation of this file.
1#ifndef REALDBUTIL_CONNECTIONPROVIDER_H
2#define REALDBUTIL_CONNECTIONPROVIDER_H
3
7#include <vector>
8#include <string>
9
10namespace RealDBUtil {
11
12 template <class type>
13 std::string toString(type obj)
14 {
15 std::ostringstream tmp;
16 tmp<<obj;
17 return tmp.str();
18 }
19
21public:
22 /// Constructor keeps track of table of interest
23// ConnectionProvider(const std::string& host="202.122.35.54",
24// const std::string& table="metadata_v0",
25// const std::string& dbName="calib");
26
28
30
31 enum eRet {
32 RETOk = 0,
40 };
41 /// Used to form bit masks for dbs queries
42 enum eLevel {
47 };
48
49 ConnectionProvider::eRet getReadLumInfo( std::string& Lum, int runNo, std::string SftVer, std::string ParVer, std::string BossRelease);
50 ConnectionProvider::eRet getReadBunchInfo( std::vector<std::string>& bunch, int runNo,std::string SftVer, std::string ParVer, std::string BossRelease);
51 ConnectionProvider::eRet getReadTrgTableInfo( std::vector<std::string>& trgTable, int runNo);
52 //ConnectionDBBase::eRet getReadSC_MagnetInfo(unsigned int serialNo, std::vector<std::string>& current, int runNo);
53 //ConnectionProvider::eRet getReadBackgroundInfo( std::vector<std::string>& fileInfor, std::vector<int>& vRanTrgEvtNum, int runNo);
54 ConnectionProvider::eRet getReadBackgroundInfo( std::vector<std::string>& fileInfor, int runNo);
55 //ConnectionProvider::eRet getReadBackgroundInfo( std::vector<std::string>& fileInfor, std::vector<int>& vRanTrgEvtNum,std::string query);
56 ConnectionProvider::eRet getReadBackgroundInfo( std::vector<std::string>& fileInfor, std::string query);
57 ConnectionProvider::eRet getReadTofThreshInfo( std::vector<std::string>& tofThresh, int runNo);
58 ConnectionProvider::eRet getRunInfo( std::vector<std::string>& runInfo, int runNo);
59 ConnectionProvider::eRet getLumCurvePar(std::string& runTotalTime, std::string& tau_value, int runNo, std::string SftVer, std::string ParVer, std::string BossRelease);
60 ConnectionProvider::eRet getEmcGain(std::vector<double>& emcGain, int runNo);
61
62 std::vector<std::string> split(const std::string& src, std::string delimit, std::string null_subst="");
63 bool getcal(int runNo, std::string ids);
64
66
67 int getEtotDataSteps() { return m_EtotDataSteps; }
68 int getVthBEtotH() { return m_VthBEtotH; }
69 int getVthEEtotH() { return m_VthEEtotH; }
70 int getVthEtotL() { return m_VthEtotL; }
71 int getVthEtotM() { return m_VthEtotM; }
72 int getVthBLZ() { return m_VthBLZ; }
73 int getVthDiffB() { return m_VthDiffB; }
74 int getVthDiffE() { return m_VthDiffE; }
75 int getVthBalBLK() { return m_VthBalBLK; }
76 int getVthBalEEMC() { return m_VthBalEEMC; }
77 int getVthDiffMin() { return m_VthDiffMin; }
78
79 private:
80 IDatabaseSvc* m_dbsvc;
81
82 int m_trgTpye;
83 int m_tfee_fileid;
84 std::vector<std::string> m_trgTable;
85 std::vector<std::string> m_tofThresh;
86
87 int id_num;
88 std::string* trgGain[6500];
89
90 //trigger config infor.
91 int m_EtotDataSteps;
92 int m_VthBEtotH;
93 int m_VthEEtotH;
94 int m_VthEtotL;
95 int m_VthEtotM;
96 int m_VthBLZ;
97 int m_VthDiffB;
98 int m_VthDiffE;
99 int m_VthBalBLK;
100 int m_VthBalEEMC;
101 int m_VthDiffMin;
102
103 };
104}
105
106#endif
int runNo
ConnectionProvider::eRet getRunInfo(std::vector< std::string > &runInfo, int runNo)
std::vector< std::string > split(const std::string &src, std::string delimit, std::string null_subst="")
ConnectionProvider()
Constructor keeps track of table of interest.
ConnectionProvider::eRet getReadBunchInfo(std::vector< std::string > &bunch, int runNo, std::string SftVer, std::string ParVer, std::string BossRelease)
ConnectionProvider::eRet getLumCurvePar(std::string &runTotalTime, std::string &tau_value, int runNo, std::string SftVer, std::string ParVer, std::string BossRelease)
ConnectionProvider::eRet getTrgConfigInfo(int runNo)
ConnectionProvider::eRet getReadLumInfo(std::string &Lum, int runNo, std::string SftVer, std::string ParVer, std::string BossRelease)
ConnectionProvider::eRet getEmcGain(std::vector< double > &emcGain, int runNo)
eLevel
Used to form bit masks for dbs queries.
ConnectionProvider::eRet getReadTrgTableInfo(std::vector< std::string > &trgTable, int runNo)
bool getcal(int runNo, std::string ids)
ConnectionProvider::eRet getReadBackgroundInfo(std::vector< std::string > &fileInfor, int runNo)
ConnectionProvider::eRet getReadTofThreshInfo(std::vector< std::string > &tofThresh, int runNo)
std::string toString(type obj)