CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
DatabaseRecord Class Reference

#include <DatabaseRecord.h>

+ Inheritance diagram for DatabaseRecord:

Public Member Functions

 DatabaseRecord ()
 
 ~DatabaseRecord ()
 
void clear ()
 
void DeleteObject ()
 
int GetInt (std::string key)
 
double GetDouble (std::string key)
 
long GetLong (std::string key)
 
std::string GetString (std::string key)
 
 DatabaseRecord ()
 
 ~DatabaseRecord ()
 
void clear ()
 
void DeleteObject ()
 
int GetInt (std::string key)
 
double GetDouble (std::string key)
 
long GetLong (std::string key)
 
std::string GetString (std::string key)
 

Detailed Description

Constructor & Destructor Documentation

◆ DatabaseRecord() [1/2]

DatabaseRecord::DatabaseRecord ( )
inline

◆ ~DatabaseRecord() [1/2]

◆ DatabaseRecord() [2/2]

DatabaseRecord::DatabaseRecord ( )
inline

◆ ~DatabaseRecord() [2/2]

DatabaseRecord::~DatabaseRecord ( )
inline

Member Function Documentation

◆ clear() [1/2]

void DatabaseRecord::clear ( )
inline

◆ clear() [2/2]

void DatabaseRecord::clear ( )
inline

◆ DeleteObject() [1/2]

void DatabaseRecord::DeleteObject ( )
inline

Definition at line 23 of file Database/DatabaseSvc/DatabaseSvc-00-00-24/DatabaseSvc/DatabaseRecord.h.

24 {
25 DatabaseRecord::iterator it;
26 for(it=this->begin(); it != this->end(); it++)
27 {
28 if((*it).second!=NULL)
29 {
30 delete[] (*it).second;
31 (*it).second = NULL;
32 }
33 }
34 erase(this->begin(),this->end());
35 }

Referenced by clear(), and ~DatabaseRecord().

◆ DeleteObject() [2/2]

void DatabaseRecord::DeleteObject ( )
inline

Definition at line 23 of file InstallArea/include/DatabaseSvc/DatabaseSvc/DatabaseRecord.h.

24 {
25 DatabaseRecord::iterator it;
26 for(it=this->begin(); it != this->end(); it++)
27 {
28 if((*it).second!=NULL)
29 {
30 delete[] (*it).second;
31 (*it).second = NULL;
32 }
33 }
34 erase(this->begin(),this->end());
35 }

◆ GetDouble() [1/2]

double DatabaseRecord::GetDouble ( std::string  key)
inline

Definition at line 46 of file Database/DatabaseSvc/DatabaseSvc-00-00-24/DatabaseSvc/DatabaseRecord.h.

47 {
48 DatabaseRecord::iterator it = find(key);
49 if(it==end())
50 return 0;
51 return atof((*it).second);
52 }
*************DOUBLE PRECISION m_pi *DOUBLE PRECISION m_HvecTau2 DOUBLE PRECISION m_HvClone2 DOUBLE PRECISION m_gamma1 DOUBLE PRECISION m_gamma2 DOUBLE PRECISION m_thet1 DOUBLE PRECISION m_thet2 INTEGER m_IFPHOT *COMMON c_Taupair $ !Spin Polarimeter vector first Tau $ !Spin Polarimeter vector second Tau $ !Clone Spin Polarimeter vector first Tau $ !Clone Spin Polarimeter vector second Tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !phi of HvecTau1 $ !theta of HvecTau1 $ !phi of HvecTau2 $ !theta of HvecTau2 $ !super key
Definition: Taupair.h:42

Referenced by BeamEnergySvc::getBeamEnergyInfo(), FieldDBUtil::ConnectionDB::getReadSC_MagnetInfo(), and TestDbAlg::initialize().

◆ GetDouble() [2/2]

double DatabaseRecord::GetDouble ( std::string  key)
inline

Definition at line 46 of file InstallArea/include/DatabaseSvc/DatabaseSvc/DatabaseRecord.h.

47 {
48 DatabaseRecord::iterator it = find(key);
49 if(it==end())
50 return 0;
51 return atof((*it).second);
52 }

◆ GetInt() [1/2]

int DatabaseRecord::GetInt ( std::string  key)
inline

Definition at line 37 of file Database/DatabaseSvc/DatabaseSvc-00-00-24/DatabaseSvc/DatabaseRecord.h.

38 {
39 DatabaseRecord::iterator it = find(key);
40 if(it==end())
41 return 0;
42 return atoi((*it).second);
43 }

Referenced by CalibMySQLCnvSvc::getSftParVer().

◆ GetInt() [2/2]

int DatabaseRecord::GetInt ( std::string  key)
inline

Definition at line 37 of file InstallArea/include/DatabaseSvc/DatabaseSvc/DatabaseRecord.h.

38 {
39 DatabaseRecord::iterator it = find(key);
40 if(it==end())
41 return 0;
42 return atoi((*it).second);
43 }

◆ GetLong() [1/2]

long DatabaseRecord::GetLong ( std::string  key)
inline

Definition at line 54 of file Database/DatabaseSvc/DatabaseSvc-00-00-24/DatabaseSvc/DatabaseRecord.h.

55 {
56 DatabaseRecord::iterator it = find(key);
57 if(it==end())
58 return 0;
59 return atol((*it).second);
60 }

Referenced by TestDbAlg::initialize().

◆ GetLong() [2/2]

long DatabaseRecord::GetLong ( std::string  key)
inline

Definition at line 54 of file InstallArea/include/DatabaseSvc/DatabaseSvc/DatabaseRecord.h.

55 {
56 DatabaseRecord::iterator it = find(key);
57 if(it==end())
58 return 0;
59 return atol((*it).second);
60 }

◆ GetString() [1/2]

std::string DatabaseRecord::GetString ( std::string  key)
inline

Definition at line 62 of file Database/DatabaseSvc/DatabaseSvc-00-00-24/DatabaseSvc/DatabaseRecord.h.

63 {
64 // std::string str1;
65 DatabaseRecord::iterator it = find(key);
66 if(it==end())
67 return 0;
68 std::string str1((*it).second);
69 return str1;
70
71 }

Referenced by DedxCurSvc::getDedxCurveInfo(), RealDBUtil::ConnectionProvider::getLumCurvePar(), RealDBUtil::ConnectionProvider::getReadBunchInfo(), RealDBUtil::ConnectionProvider::getReadLumInfo(), and CalibMySQLCnvSvc::getSftParVer().

◆ GetString() [2/2]

std::string DatabaseRecord::GetString ( std::string  key)
inline

Definition at line 62 of file InstallArea/include/DatabaseSvc/DatabaseSvc/DatabaseRecord.h.

63 {
64 // std::string str1;
65 DatabaseRecord::iterator it = find(key);
66 if(it==end())
67 return 0;
68 std::string str1((*it).second);
69 return str1;
70
71 }

The documentation for this class was generated from the following files: