BOSS
7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
Generator/KKMC/KKMC-00-00-62/KKMC/ReadEb.h
Go to the documentation of this file.
1
/****************************************
2
* Read CMS energy from data base for
3
* psi(3770) production
4
*
5
* 2012-1-05 created pingrg
6
*
7
***************************************/
8
#ifndef DTagAlg_ReadBeamInfFromDb_H
9
#define DTagAlg_ReadBeamInfFromDb_H
10
11
#include "CLHEP/Vector/ThreeVector.h"
12
#include "DatabaseSvc/IDatabaseSvc.h"
13
#include <iostream>
14
#include <mysql.h>
15
16
17
class
ReadEb
{
18
19
public
:
20
21
ReadEb
(
int
run):
22
m_run(-1),
23
m_isRunValid(
false
),
24
m_beamE(0),
25
m_beta(0.011,0,0),
26
m_usecbE(
true
){
27
if
( run != previousRun) {
28
previousRun = run;
29
ReadDb(run);
30
}
31
}
32
33
virtual
~ReadEb
() {}
34
35
double
getEcms
(){
return
m_Ecms;}
36
double
getXangle
(){
return
m_xangle;}
37
inline
CLHEP::Hep3Vector
getbeta
(){
return
m_beta;}
38
inline
bool
setcalib
(
bool
calib){m_usecbE=calib;}
39
40
private
:
41
MYSQL
* OpenDb()
const
;
42
void
ReadDb(
int
run);
43
void
CloseDb(
MYSQL
* mysql)
const
;
44
45
IDatabaseSvc
* m_dbsvc;
46
int
m_run;
47
bool
m_isRunValid;
48
double
m_beamE;
49
static
double
m_Ecms;
50
static
double
m_xangle;
51
bool
m_usecbE;
52
CLHEP::Hep3Vector m_beta;
53
static
int
previousRun;
54
};
55
56
57
#endif
true
#define true
Definition:
BesCxxPolicy/BesCxxPolicy-00-01-01/CxxFeatures/config.h:19
false
#define false
Definition:
BesCxxPolicy/BesCxxPolicy-00-01-01/CxxFeatures/config.h:22
MYSQL
struct st_mysql MYSQL
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Db/MysqlConnection.h:11
IDatabaseSvc
Definition:
Database/DatabaseSvc/DatabaseSvc-00-00-26/DatabaseSvc/IDatabaseSvc.h:15
ReadEb
Definition:
Generator/KKMC/KKMC-00-00-62/KKMC/ReadEb.h:17
ReadEb::setcalib
bool setcalib(bool calib)
Definition:
Generator/KKMC/KKMC-00-00-62/KKMC/ReadEb.h:38
ReadEb::~ReadEb
virtual ~ReadEb()
Definition:
Generator/KKMC/KKMC-00-00-62/KKMC/ReadEb.h:33
ReadEb::getXangle
double getXangle()
Definition:
Generator/KKMC/KKMC-00-00-62/KKMC/ReadEb.h:36
ReadEb::getEcms
double getEcms()
Definition:
Generator/KKMC/KKMC-00-00-62/KKMC/ReadEb.h:35
ReadEb::getbeta
CLHEP::Hep3Vector getbeta()
Definition:
Generator/KKMC/KKMC-00-00-62/KKMC/ReadEb.h:37
ReadEb::ReadEb
ReadEb(int run)
Definition:
Generator/KKMC/KKMC-00-00-62/KKMC/ReadEb.h:21
source
Generator
KKMC
KKMC-00-00-62
KKMC
ReadEb.h
Generated by
1.9.6