BOSS
7.1.1
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
4
#include "
DatabaseSvc/IDatabaseSvc.h
"
5
#include "
DatabaseSvc/DatabaseSvc.h
"
6
#include "
DatabaseSvc/DatabaseRecord.h
"
7
#include <vector>
8
#include <string>
9
10
namespace
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
20
class
ConnectionProvider
{
21
public
:
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
27
ConnectionProvider
();
28
29
~ConnectionProvider
();
30
31
enum
eRet
{
32
RETOk
= 0,
33
RETBadCnfFile
= 1,
34
RETBadHost
= 2,
35
RETNoConnect
= 3,
36
RETWrongState
= 4,
37
RETBadValue
= 5,
38
RETMySQLError
= 6,
39
RETNoSchemaMatch
= 7
40
};
41
/// Used to form bit masks for dbs queries
42
enum
eLevel
{
43
LEVELProd
= 1,
44
LEVELDev
= 2,
45
LEVELTest
= 4,
46
LEVELSuperseded
= 8
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
65
ConnectionProvider::eRet
getTrgConfigInfo
(
int
runNo
);
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
SftVer
char * SftVer
Definition
DQA_TO_DB.cxx:18
runNo
int runNo
Definition
DQA_TO_DB.cxx:12
ParVer
char * ParVer
Definition
DQA_TO_DB.cxx:19
DatabaseRecord.h
DatabaseSvc.h
IDatabaseSvc.h
IDatabaseSvc
Definition
IDatabaseSvc.h:15
RealDBUtil::ConnectionProvider
Definition
ConnectionProvider.h:20
RealDBUtil::ConnectionProvider::getEtotDataSteps
int getEtotDataSteps()
Definition
ConnectionProvider.h:67
RealDBUtil::ConnectionProvider::getVthEEtotH
int getVthEEtotH()
Definition
ConnectionProvider.h:69
RealDBUtil::ConnectionProvider::getRunInfo
ConnectionProvider::eRet getRunInfo(std::vector< std::string > &runInfo, int runNo)
Definition
ConnectionProvider.cxx:754
RealDBUtil::ConnectionProvider::getVthBalEEMC
int getVthBalEEMC()
Definition
ConnectionProvider.h:76
RealDBUtil::ConnectionProvider::split
std::vector< std::string > split(const std::string &src, std::string delimit, std::string null_subst="")
Definition
ConnectionProvider.cxx:27
RealDBUtil::ConnectionProvider::getVthDiffE
int getVthDiffE()
Definition
ConnectionProvider.h:74
RealDBUtil::ConnectionProvider::ConnectionProvider
ConnectionProvider()
Constructor keeps track of table of interest.
Definition
ConnectionProvider.cxx:144
RealDBUtil::ConnectionProvider::getReadBunchInfo
ConnectionProvider::eRet getReadBunchInfo(std::vector< std::string > &bunch, int runNo, std::string SftVer, std::string ParVer, std::string BossRelease)
Definition
ConnectionProvider.cxx:317
RealDBUtil::ConnectionProvider::getLumCurvePar
ConnectionProvider::eRet getLumCurvePar(std::string &runTotalTime, std::string &tau_value, int runNo, std::string SftVer, std::string ParVer, std::string BossRelease)
Definition
ConnectionProvider.cxx:239
RealDBUtil::ConnectionProvider::getTrgConfigInfo
ConnectionProvider::eRet getTrgConfigInfo(int runNo)
Definition
ConnectionProvider.cxx:568
RealDBUtil::ConnectionProvider::getVthDiffB
int getVthDiffB()
Definition
ConnectionProvider.h:73
RealDBUtil::ConnectionProvider::getReadLumInfo
ConnectionProvider::eRet getReadLumInfo(std::string &Lum, int runNo, std::string SftVer, std::string ParVer, std::string BossRelease)
Definition
ConnectionProvider.cxx:156
RealDBUtil::ConnectionProvider::getVthDiffMin
int getVthDiffMin()
Definition
ConnectionProvider.h:77
RealDBUtil::ConnectionProvider::getVthBalBLK
int getVthBalBLK()
Definition
ConnectionProvider.h:75
RealDBUtil::ConnectionProvider::getEmcGain
ConnectionProvider::eRet getEmcGain(std::vector< double > &emcGain, int runNo)
Definition
ConnectionProvider.cxx:484
RealDBUtil::ConnectionProvider::getVthBEtotH
int getVthBEtotH()
Definition
ConnectionProvider.h:68
RealDBUtil::ConnectionProvider::eRet
eRet
Definition
ConnectionProvider.h:31
RealDBUtil::ConnectionProvider::RETNoConnect
@ RETNoConnect
Definition
ConnectionProvider.h:35
RealDBUtil::ConnectionProvider::RETBadHost
@ RETBadHost
Definition
ConnectionProvider.h:34
RealDBUtil::ConnectionProvider::RETBadValue
@ RETBadValue
Definition
ConnectionProvider.h:37
RealDBUtil::ConnectionProvider::RETNoSchemaMatch
@ RETNoSchemaMatch
Definition
ConnectionProvider.h:39
RealDBUtil::ConnectionProvider::RETMySQLError
@ RETMySQLError
Definition
ConnectionProvider.h:38
RealDBUtil::ConnectionProvider::RETWrongState
@ RETWrongState
Definition
ConnectionProvider.h:36
RealDBUtil::ConnectionProvider::RETBadCnfFile
@ RETBadCnfFile
Definition
ConnectionProvider.h:33
RealDBUtil::ConnectionProvider::RETOk
@ RETOk
Definition
ConnectionProvider.h:32
RealDBUtil::ConnectionProvider::getVthEtotM
int getVthEtotM()
Definition
ConnectionProvider.h:71
RealDBUtil::ConnectionProvider::getVthBLZ
int getVthBLZ()
Definition
ConnectionProvider.h:72
RealDBUtil::ConnectionProvider::eLevel
eLevel
Used to form bit masks for dbs queries.
Definition
ConnectionProvider.h:42
RealDBUtil::ConnectionProvider::LEVELProd
@ LEVELProd
Definition
ConnectionProvider.h:43
RealDBUtil::ConnectionProvider::LEVELSuperseded
@ LEVELSuperseded
Definition
ConnectionProvider.h:46
RealDBUtil::ConnectionProvider::LEVELDev
@ LEVELDev
Definition
ConnectionProvider.h:44
RealDBUtil::ConnectionProvider::LEVELTest
@ LEVELTest
Definition
ConnectionProvider.h:45
RealDBUtil::ConnectionProvider::getReadTrgTableInfo
ConnectionProvider::eRet getReadTrgTableInfo(std::vector< std::string > &trgTable, int runNo)
Definition
ConnectionProvider.cxx:413
RealDBUtil::ConnectionProvider::getcal
bool getcal(int runNo, std::string ids)
Definition
ConnectionProvider.cxx:47
RealDBUtil::ConnectionProvider::getVthEtotL
int getVthEtotL()
Definition
ConnectionProvider.h:70
RealDBUtil::ConnectionProvider::getReadBackgroundInfo
ConnectionProvider::eRet getReadBackgroundInfo(std::vector< std::string > &fileInfor, int runNo)
Definition
ConnectionProvider.cxx:618
RealDBUtil::ConnectionProvider::~ConnectionProvider
~ConnectionProvider()
Definition
ConnectionProvider.cxx:153
RealDBUtil::ConnectionProvider::getReadTofThreshInfo
ConnectionProvider::eRet getReadTofThreshInfo(std::vector< std::string > &tofThresh, int runNo)
Definition
ConnectionProvider.cxx:699
RealDBUtil
Definition
ConnectionProvider.h:10
RealDBUtil::toString
std::string toString(type obj)
Definition
ConnectionProvider.h:13
7.1.1
Simulation
Realization
RealizationSvc
RealizationSvc-00-01-03
RealizationSvc
ConnectionProvider.h
Generated by
1.12.0