BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/RealizationSvc/RealizationSvc/RealizationSvc.h
Go to the documentation of this file.
1#ifndef REALIZATIONSVC_H
2#define REALIZATIONSVC_H
3
4#include "GaudiKernel/IInterface.h"
5#include "GaudiKernel/IIncidentListener.h"
6#include "GaudiKernel/Kernel.h"
7#include "GaudiKernel/Service.h"
8#include "GaudiKernel/SmartDataPtr.h"
9#include "GaudiKernel/DataSvc.h"
10#include <vector>
11#include "RealizationSvc/IRealizationSvc.h"
12#include "RealizationSvc/ConnectionProvider.h"
13
14class IDataProviderSvc;
15
16class RealizationSvc: public Service, virtual public IRealizationSvc,
17 virtual public IIncidentListener{
18
19public:
20 RealizationSvc( const std::string& name, ISvcLocator* svcloc );
22 virtual StatusCode initialize();
23 virtual StatusCode finalize();
24 virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
25
26 // Incident handler
27 void handle(const Incident&);
28
29 // interface
30 void readDB(int runNo);
31 void updateRealData();
32
33 //set or get initial event ID
34 int getInitEvtID() { return m_initEvtID; }
35 void setInitEvtID(int i) { m_initEvtID = i; }
36
37 void setLuminosity(float i) { m_lumi = i; }
38 float getLuminosity() { return m_lumi; }
39 float getLuminosity(int runNo);
40
41 void setBunchPosX(double i) { m_bunch_x = i; }
42 void setBunchPosY(double i) { m_bunch_y = i; }
43 void setBunchPosZ(double i) { m_bunch_z = i; }
44 void setBunchSizeX(double i) { m_sigma_x = i; }
45 void setBunchSizeY(double i) { m_sigma_y = i; }
46 void setBunchSizeZ(double i) { m_sigma_z = i; }
47 double getBunchPosX() { return m_bunch_x; }
48 double getBunchPosY() { return m_bunch_y; }
49 double getBunchPosZ() { return m_bunch_z; }
50 double getBunchSizeX() { return m_sigma_x; }
51 double getBunchSizeY() { return m_sigma_y; }
52 double getBunchSizeZ() { return m_sigma_z; }
53
54 inline double getTrgGain(int cry_id) { return m_trgGain[cry_id]; }
55
56 //set event number in a run
57 void setRunEvtNum(int i) { m_RunEvtNum = i; }
58 //set event number in a random trigger file
59 //void setRanTrgEvtNum(std::vector<int> i) { m_RanTrgEvtNum = i; }
60
61 //get event number in a run
62 int getRunEvtNum() { return m_RunEvtNum; }
63 //get event number in a random trigger file
64 //std::vector<int> getRanTrgEvtNum() { return m_RanTrgEvtNum; }
65
66 // std::vector<int> getRunEvtNum(std::vector<int> inrunList, int EvtMax);
67
68 // trigger table
69 void setTrgTable(std::vector<uint32_t> i) { m_trgTable = i; }
70 std::vector<uint32_t> getTrgTable() { return m_trgTable; }
71
72 // trigger config infor.
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 void setBgFileName(std::vector<std::string> i) { m_bgfilename = i; }
86 std::vector<std::string> getBgFileName() { return m_bgfilename; }
87 std::vector<std::string> getBgFileName(std::string query);
88
89 //luminosity curve parameters
90 float getRunTotalTime() { return m_runTotalTime; }
91 float getTauValue() { return m_tauValue; }
92
93 //run infor.
94 std::vector<double> getRunInfo() {return m_runInfo; }
95
96 //TFEE
97 std::vector<std::string> getTofThreshold() { return m_tfee; }
98
99 //related run id
100 std::vector<int> getRunList() { return m_runIdList; }
101 int getRunId() { return m_runID; }
102 void setRunId(int i) { m_runID = i; }
103
104 bool UseDBFlag() { return m_useDB; }
105
106 bool ifReadBunch() { return m_ifReadBunch; }
107 bool ifReadTrg() { return m_ifReadTrg; }
108 bool ifReadRandTrg() { return m_ifReadRandTrg; }
109 bool ifReadTFEE() { return m_ifReadTFEE; }
110
111private:
112 int m_CaliConst;
113
114 std::string m_bossRelease;
115 std::string m_SftVer;
116 std::string m_ParVer;
117
118 float m_lumi;
119 double m_bunch_x;
120 double m_bunch_y;
121 double m_bunch_z;
122
123 double m_sigma_x;
124 double m_sigma_y;
125 double m_sigma_z;
126
127 int m_initEvtID;
128
129 int m_RunEvtNum;
130 //std::vector<int> m_RanTrgEvtNum;
131
132 //run id list property
133 std::vector<int> m_runNoList;
134 std::vector<int> m_runIdList;
135 int m_runID;
136
137 bool m_useDB;
138
139 //luminosity curve parameters
140 float m_runTotalTime;
141 float m_tauValue;
142
143 bool m_ifReadBunch;
144 bool m_ifReadTrg;
145 bool m_ifReadRandTrg;
146 bool m_ifReadTFEE;
147 bool m_ifReadRunInfo;
148
149 std::vector<uint32_t> m_trgTable;
150 IDataProviderSvc* m_eventSvc;
151
152 //background
153 std::vector<std::string> m_bgfilename;
154 //TFEE
155 std::vector<std::string> m_tfee;
156
157 //run infor.
158 std::vector<double> m_runInfo;
159
160 double m_trgGain[6240];
161
162 //trigger config infor.
163 int m_EtotDataSteps;
164 int m_VthBEtotH;
165 int m_VthEEtotH;
166 int m_VthEtotL;
167 int m_VthEtotM;
168 int m_VthBLZ;
169 int m_VthDiffB;
170 int m_VthDiffE;
171 int m_VthBalBLK;
172 int m_VthBalEEMC;
173 int m_VthDiffMin;
174
176};
177
178#endif
int runNo
Definition: DQA_TO_DB.cxx:12
RealizationSvc(const std::string &name, ISvcLocator *svcloc)
virtual StatusCode finalize()
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
virtual StatusCode initialize()
void handle(const Incident &)
void readDB(int runNo)