BOSS 8.0.0
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/DatabaseRecord.h"
5#include "DatabaseSvc/IDatabaseSvc.h"
6#include <string>
7#include <vector>
8// #include "DatabaseSvc/DatabaseSvc.h"
9
10namespace RealDBUtil {
11
12 template <class type> std::string toString( type obj ) {
13 std::ostringstream tmp;
14 tmp << obj;
15 return tmp.str();
16 }
17
19 public:
20 /// Constructor keeps track of table of interest
21 // ConnectionProvider(const std::string& host="202.122.35.54",
22 // const std::string& table="metadata_v0",
23 // const std::string& dbName="calib");
24
26
28
39 /// Used to form bit masks for dbs queries
40 enum eLevel { LEVELProd = 1, LEVELDev = 2, LEVELTest = 4, LEVELSuperseded = 8 };
41
42 ConnectionProvider::eRet getReadLumInfo( std::string& Lum, int runNo, std::string SftVer,
43 std::string ParVer, std::string BossRelease );
44 ConnectionProvider::eRet getReadBunchInfo( std::vector<std::string>& bunch, int runNo,
45 std::string SftVer, std::string ParVer,
46 std::string BossRelease );
47 ConnectionProvider::eRet getReadTrgTableInfo( std::vector<std::string>& trgTable,
48 int runNo );
49 // ConnectionDBBase::eRet getReadSC_MagnetInfo(unsigned int serialNo,
50 // std::vector<std::string>& current, int runNo); ConnectionProvider::eRet
51 // getReadBackgroundInfo( std::vector<std::string>& fileInfor, std::vector<int>&
52 // vRanTrgEvtNum, int runNo);
53 ConnectionProvider::eRet getReadBackgroundInfo( std::vector<std::string>& fileInfor,
54 int runNo );
55 // ConnectionProvider::eRet getReadBackgroundInfo( std::vector<std::string>& fileInfor,
56 // std::vector<int>& vRanTrgEvtNum,std::string query);
57 ConnectionProvider::eRet getReadBackgroundInfo( std::vector<std::string>& fileInfor,
58 std::string query );
59 ConnectionProvider::eRet getReadTofThreshInfo( std::vector<std::string>& tofThresh,
60 int runNo );
61 ConnectionProvider::eRet getRunInfo( std::vector<std::string>& runInfo, int runNo );
62 ConnectionProvider::eRet getLumCurvePar( std::string& runTotalTime, std::string& tau_value,
63 int runNo, std::string SftVer, std::string ParVer,
64 std::string BossRelease );
65 ConnectionProvider::eRet getEmcGain( std::vector<double>& emcGain, int runNo );
66
67 std::vector<std::string> split( const std::string& src, std::string delimit,
68 std::string null_subst = "" );
69 bool getcal( int runNo, std::string ids );
70
72
73 int getEtotDataSteps() { return m_EtotDataSteps; }
74 int getVthBEtotH() { return m_VthBEtotH; }
75 int getVthEEtotH() { return m_VthEEtotH; }
76 int getVthEtotL() { return m_VthEtotL; }
77 int getVthEtotM() { return m_VthEtotM; }
78 int getVthBLZ() { return m_VthBLZ; }
79 int getVthDiffB() { return m_VthDiffB; }
80 int getVthDiffE() { return m_VthDiffE; }
81 int getVthBalBLK() { return m_VthBalBLK; }
82 int getVthBalEEMC() { return m_VthBalEEMC; }
83 int getVthDiffMin() { return m_VthDiffMin; }
84
85 private:
86 IDatabaseSvc* m_dbsvc;
87
88 int m_trgTpye;
89 int m_tfee_fileid;
90 std::vector<std::string> m_trgTable;
91 std::vector<std::string> m_tofThresh;
92
93 int id_num;
94 std::string* trgGain[6500];
95
96 // trigger config infor.
97 int m_EtotDataSteps;
98 int m_VthBEtotH;
99 int m_VthEEtotH;
100 int m_VthEtotL;
101 int m_VthEtotM;
102 int m_VthBLZ;
103 int m_VthDiffB;
104 int m_VthDiffE;
105 int m_VthBalBLK;
106 int m_VthBalEEMC;
107 int m_VthDiffMin;
108 };
109} // namespace RealDBUtil
110
111#endif
char * SftVer
Definition DQA_TO_DB.cxx:19
int runNo
Definition DQA_TO_DB.cxx:13
char * ParVer
Definition DQA_TO_DB.cxx:20
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)