CGEM BOSS
6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
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
IDatabaseSvc.h
MYSQL
struct st_mysql MYSQL
Definition
MysqlConnection.h:11
IDatabaseSvc
Definition
IDatabaseSvc.h:15
ReadEb
Definition
ReadEb.h:17
ReadEb::setcalib
bool setcalib(bool calib)
Definition
ReadEb.h:38
ReadEb::~ReadEb
virtual ~ReadEb()
Definition
ReadEb.h:33
ReadEb::getXangle
double getXangle()
Definition
ReadEb.h:36
ReadEb::getEcms
double getEcms()
Definition
ReadEb.h:35
ReadEb::getbeta
CLHEP::Hep3Vector getbeta()
Definition
ReadEb.h:37
ReadEb::ReadEb
ReadEb(int run)
Definition
ReadEb.h:21
6.6.5.i
Generator
KKMC
KKMC-00-00-44-slc6tag
KKMC
ReadEb.h
Generated by
1.12.0