BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
RealizationSvc Class Reference

#include <RealizationSvc.h>

+ Inheritance diagram for RealizationSvc:

Public Member Functions

 RealizationSvc (const std::string &name, ISvcLocator *svcloc)
 
 ~RealizationSvc ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
void handle (const Incident &)
 
void readDB (int runNo)
 
void updateRealData ()
 
int getInitEvtID ()
 
void setInitEvtID (int i)
 
void setLuminosity (float i)
 
float getLuminosity ()
 
float getLuminosity (int runNo)
 
void setBunchPosX (double i)
 
void setBunchPosY (double i)
 
void setBunchPosZ (double i)
 
void setBunchSizeX (double i)
 
void setBunchSizeY (double i)
 
void setBunchSizeZ (double i)
 
double getBunchPosX ()
 
double getBunchPosY ()
 
double getBunchPosZ ()
 
double getBunchSizeX ()
 
double getBunchSizeY ()
 
double getBunchSizeZ ()
 
double getTrgGain (int cry_id)
 
void setRunEvtNum (int i)
 
int getRunEvtNum ()
 
void setTrgTable (std::vector< uint32_t > i)
 
std::vector< uint32_t > getTrgTable ()
 
int getEtotDataSteps ()
 
int getVthBEtotH ()
 
int getVthEEtotH ()
 
int getVthEtotL ()
 
int getVthEtotM ()
 
int getVthBLZ ()
 
int getVthDiffB ()
 
int getVthDiffE ()
 
int getVthBalBLK ()
 
int getVthBalEEMC ()
 
int getVthDiffMin ()
 
void setBgFileName (std::vector< std::string > i)
 
std::vector< std::string > getBgFileName ()
 
std::vector< std::string > getBgFileName (std::string query)
 
float getRunTotalTime ()
 
float getTauValue ()
 
std::vector< double > getRunInfo ()
 
std::vector< std::string > getTofThreshold ()
 
std::vector< int > getRunList ()
 
int getRunId ()
 
void setRunId (int i)
 
bool UseDBFlag ()
 
bool ifReadBunch ()
 
bool ifReadTrg ()
 
bool ifReadRandTrg ()
 
bool ifReadTFEE ()
 

Detailed Description

Definition at line 17 of file RealizationSvc.h.

Constructor & Destructor Documentation

◆ RealizationSvc()

RealizationSvc::RealizationSvc ( const std::string & name,
ISvcLocator * svcloc )

Definition at line 24 of file RealizationSvc.cxx.

24 :
25 base_class (name, svcloc) {
26 m_CaliConst = 100;
27 declareProperty("RunIDList", m_runNoList);
28 declareProperty("IfUseDB", m_useDB = true);
29 declareProperty("IfReadBunch", m_ifReadBunch = true);
30 declareProperty("IfUseTrg", m_ifReadTrg = false);
31 declareProperty("IfReadRanTrg", m_ifReadRandTrg = false);
32 declareProperty("IfReadTFEE", m_ifReadTFEE = false);
33 declareProperty("IfReadRunInfo", m_ifReadRunInfo = false);
34 declareProperty("BossRelease", m_bossRelease="default");
35 declareProperty("SftVer", m_SftVer = "default");
36 declareProperty("ParVer", m_ParVer = "default");
37 declareProperty("InitEvtID", m_initEvtID = 0);
38}

◆ ~RealizationSvc()

RealizationSvc::~RealizationSvc ( )
inline

Definition at line 22 of file RealizationSvc.h.

22{};

Member Function Documentation

◆ finalize()

StatusCode RealizationSvc::finalize ( )
virtual

Definition at line 113 of file RealizationSvc.cxx.

113 {
114 MsgStream log(messageService(), name());
115 log << MSG::INFO << "RealizationSvc::finalize()" << endreq;
116
117 return StatusCode::SUCCESS;
118}

◆ getBgFileName() [1/2]

std::vector< std::string > RealizationSvc::getBgFileName ( )
inline

Definition at line 87 of file RealizationSvc.h.

87{ return m_bgfilename; }

Referenced by MixerAlg::execute(), and MixerAlg::initialize().

◆ getBgFileName() [2/2]

std::vector< std::string > RealizationSvc::getBgFileName ( std::string query)

Definition at line 166 of file RealizationSvc.cxx.

166 {
167 MsgStream log( messageService(), name() );
169
170 std::vector<std::string> Bgfilename;
171 Bgfilename.clear();
172
173 std::vector<std::string> fileInfor;
174 ConnectionProvider::eRet e = m_connect->getReadBackgroundInfo(fileInfor,query);
175 if(e != 0 ) {
176 log << MSG::ERROR << "Could not find background infor., exit." << endreq;
177 exit(1);
178 }
179
180 for(unsigned int i = 0; i < fileInfor.size(); i+=2)
181 {
182 Bgfilename.push_back(fileInfor[i]+"/"+fileInfor[i+1]);
183 }
184 fileInfor.clear();
185
186 for(unsigned int i = 0; i < Bgfilename.size(); i++) {
187 log << MSG::INFO << "Background file name: " << Bgfilename[i] << endreq;
188 }
189
190 return Bgfilename;
191}
ConnectionProvider::eRet getReadBackgroundInfo(std::vector< std::string > &fileInfor, int runNo)

◆ getBunchPosX()

double RealizationSvc::getBunchPosX ( )
inline

Definition at line 48 of file RealizationSvc.h.

48{ return m_bunch_x; }

Referenced by G4HepMCInterface::HepMC2G4().

◆ getBunchPosY()

double RealizationSvc::getBunchPosY ( )
inline

Definition at line 49 of file RealizationSvc.h.

49{ return m_bunch_y; }

Referenced by G4HepMCInterface::HepMC2G4().

◆ getBunchPosZ()

double RealizationSvc::getBunchPosZ ( )
inline

Definition at line 50 of file RealizationSvc.h.

50{ return m_bunch_z; }

Referenced by G4HepMCInterface::HepMC2G4().

◆ getBunchSizeX()

double RealizationSvc::getBunchSizeX ( )
inline

Definition at line 51 of file RealizationSvc.h.

51{ return m_sigma_x; }

Referenced by G4HepMCInterface::HepMC2G4().

◆ getBunchSizeY()

double RealizationSvc::getBunchSizeY ( )
inline

Definition at line 52 of file RealizationSvc.h.

52{ return m_sigma_y; }

Referenced by G4HepMCInterface::HepMC2G4().

◆ getBunchSizeZ()

double RealizationSvc::getBunchSizeZ ( )
inline

Definition at line 53 of file RealizationSvc.h.

53{ return m_sigma_z; }

Referenced by G4HepMCInterface::HepMC2G4().

◆ getEtotDataSteps()

int RealizationSvc::getEtotDataSteps ( )
inline

Definition at line 74 of file RealizationSvc.h.

74{ return m_EtotDataSteps; }

◆ getInitEvtID()

int RealizationSvc::getInitEvtID ( )
inline

Definition at line 35 of file RealizationSvc.h.

35{ return m_initEvtID; }

Referenced by McContext::McContext().

◆ getLuminosity() [1/2]

float RealizationSvc::getLuminosity ( )
inline

Definition at line 39 of file RealizationSvc.h.

39{ return m_lumi; }

Referenced by McContext::McContext().

◆ getLuminosity() [2/2]

float RealizationSvc::getLuminosity ( int runNo)

Definition at line 151 of file RealizationSvc.cxx.

151 {
153
154 MsgStream log( messageService(), name() );
155 std::string sLum;
156 ConnectionProvider::eRet e = m_connect->getReadLumInfo(sLum,runNo, m_SftVer, m_ParVer, m_bossRelease);
157 if(e != 0 ) {
158 log << MSG::ERROR << "Could not find Luminosity infor., exit." << endreq;
159 exit(1);
160 }
161 m_lumi = std::atof(sLum.c_str());
162 log << MSG::INFO << "Luminosity is " << m_lumi << " in Run " << runNo << endreq;
163 return m_lumi;
164}
int runNo
Definition DQA_TO_DB.cxx:12
ConnectionProvider::eRet getReadLumInfo(std::string &Lum, int runNo, std::string SftVer, std::string ParVer, std::string BossRelease)

◆ getRunEvtNum()

int RealizationSvc::getRunEvtNum ( )
inline

Definition at line 63 of file RealizationSvc.h.

63{ return m_RunEvtNum; }

◆ getRunId()

◆ getRunInfo()

std::vector< double > RealizationSvc::getRunInfo ( )
inline

Definition at line 95 of file RealizationSvc.h.

95{return m_runInfo; }

◆ getRunList()

std::vector< int > RealizationSvc::getRunList ( )
inline

Definition at line 101 of file RealizationSvc.h.

101{ return m_runIdList; }

Referenced by McContext::McContext().

◆ getRunTotalTime()

float RealizationSvc::getRunTotalTime ( )
inline

Definition at line 91 of file RealizationSvc.h.

91{ return m_runTotalTime; }

Referenced by MixerAlg::execute().

◆ getTauValue()

float RealizationSvc::getTauValue ( )
inline

Definition at line 92 of file RealizationSvc.h.

92{ return m_tauValue; }

Referenced by MixerAlg::execute().

◆ getTofThreshold()

std::vector< std::string > RealizationSvc::getTofThreshold ( )
inline

Definition at line 98 of file RealizationSvc.h.

98{ return m_tfee; }

◆ getTrgGain()

double RealizationSvc::getTrgGain ( int cry_id)
inline

Definition at line 55 of file RealizationSvc.h.

55{ return m_trgGain[cry_id]; }

Referenced by BesTrigL1::getEmcAnalogSig(), and EmcTCFinder::setEmcDigi().

◆ getTrgTable()

std::vector< uint32_t > RealizationSvc::getTrgTable ( )
inline

Definition at line 71 of file RealizationSvc.h.

71{ return m_trgTable; }

Referenced by BesGlobalTrigSvc::handle().

◆ getVthBalBLK()

int RealizationSvc::getVthBalBLK ( )
inline

Definition at line 82 of file RealizationSvc.h.

82{ return m_VthBalBLK; }

Referenced by BesGlobalTrigSvc::getL1BLK_GATE(), and BesGlobalTrigSvc::getL1EBL_BR().

◆ getVthBalEEMC()

int RealizationSvc::getVthBalEEMC ( )
inline

Definition at line 83 of file RealizationSvc.h.

83{ return m_VthBalEEMC; }

Referenced by BesGlobalTrigSvc::getL1EBL_EC().

◆ getVthBEtotH()

int RealizationSvc::getVthBEtotH ( )
inline

Definition at line 75 of file RealizationSvc.h.

75{ return m_VthBEtotH; }

Referenced by BesGlobalTrigSvc::getL1ETOT_BR().

◆ getVthBLZ()

int RealizationSvc::getVthBLZ ( )
inline

Definition at line 79 of file RealizationSvc.h.

79{ return m_VthBLZ; }

Referenced by BesGlobalTrigSvc::getL1EBL_Z().

◆ getVthDiffB()

int RealizationSvc::getVthDiffB ( )
inline

Definition at line 80 of file RealizationSvc.h.

80{ return m_VthDiffB; }

Referenced by BesGlobalTrigSvc::getL1EDIFF_BR().

◆ getVthDiffE()

int RealizationSvc::getVthDiffE ( )
inline

Definition at line 81 of file RealizationSvc.h.

81{ return m_VthDiffE; }

Referenced by BesGlobalTrigSvc::getL1EDIFF_EC().

◆ getVthDiffMin()

int RealizationSvc::getVthDiffMin ( )
inline

Definition at line 84 of file RealizationSvc.h.

84{ return m_VthDiffMin; }

◆ getVthEEtotH()

int RealizationSvc::getVthEEtotH ( )
inline

Definition at line 76 of file RealizationSvc.h.

76{ return m_VthEEtotH; }

Referenced by BesGlobalTrigSvc::getL1ETOT_EC().

◆ getVthEtotL()

int RealizationSvc::getVthEtotL ( )
inline

Definition at line 77 of file RealizationSvc.h.

77{ return m_VthEtotL; }

Referenced by BesGlobalTrigSvc::getL1ETOT_L().

◆ getVthEtotM()

int RealizationSvc::getVthEtotM ( )
inline

Definition at line 78 of file RealizationSvc.h.

78{ return m_VthEtotM; }

Referenced by BesGlobalTrigSvc::getL1ETOT_M().

◆ handle()

void RealizationSvc::handle ( const Incident & inc)

Definition at line 131 of file RealizationSvc.cxx.

131 {
132 MsgStream log( messageService(), name() );
133 log << MSG::DEBUG << "handle: " << inc.type() << endreq;
134 if ( inc.type() == "NewRun" ){
135 log << MSG::DEBUG << "Begin New Run" << endreq;
136 if(m_useDB == true) {
137 int runNo;
138 SmartDataPtr<Event::EventHeader> evt(m_eventSvc,"/Event/EventHeader");
139 if( evt ){
140 runNo = evt -> runNumber();
141 log << MSG::INFO <<"The runNumber of current event is "<<runNo<<endreq;
142 }
143 else {
144 log << MSG::ERROR <<"Can not get EventHeader!"<<endreq;
145 }
146 readDB(std::abs(runNo));
147 }
148 }
149}
void readDB(int runNo)

◆ ifReadBunch()

bool RealizationSvc::ifReadBunch ( )
inline

Definition at line 107 of file RealizationSvc.h.

107{ return m_ifReadBunch; }

Referenced by G4HepMCInterface::HepMC2G4().

◆ ifReadRandTrg()

bool RealizationSvc::ifReadRandTrg ( )
inline

Definition at line 109 of file RealizationSvc.h.

109{ return m_ifReadRandTrg; }

Referenced by MixerAlg::execute(), and MixerAlg::initialize().

◆ ifReadTFEE()

bool RealizationSvc::ifReadTFEE ( )
inline

Definition at line 110 of file RealizationSvc.h.

110{ return m_ifReadTFEE; }

◆ ifReadTrg()

bool RealizationSvc::ifReadTrg ( )
inline

Definition at line 108 of file RealizationSvc.h.

108{ return m_ifReadTrg; }

Referenced by BesGlobalTrigSvc::handle().

◆ initialize()

StatusCode RealizationSvc::initialize ( )
virtual

Definition at line 40 of file RealizationSvc.cxx.

40 {
41 MsgStream log(messageService(), name());
42 log << MSG::INFO << "RealizationSvc::initialize()" << endreq;
43
44 StatusCode sc = Service::initialize();
45 if( sc.isFailure() ) return sc;
46
47 if(m_SftVer == "NONE") m_SftVer = getenv("BES_RELEASE");
48
49 for(unsigned int i = 0; i < m_runNoList.size(); i++) {
50 if(m_runNoList[i] != 0) {
51 std::cout <<"run id : " << m_runNoList[i] << std::endl;
52 if(find(m_runIdList.begin(),m_runIdList.end(),m_runNoList[i]) == m_runIdList.end()) m_runIdList.push_back(m_runNoList[i]);
53 else log << MSG::ALWAYS <<"RunNo "<<m_runNoList[i]<<" repeated in run list"<<endreq;
54 }
55 else {
56 if(i == 0 || (i+1) >= m_runNoList.size()) log << MSG::ERROR << "Please check your run id list, it is wrong" << endreq;
57 if(m_runNoList[i+1] < m_runNoList[i-1]) {
58 for(int j = m_runNoList[i+1]+1; j < m_runNoList[i-1]; j++) {
59 if(find(m_runIdList.begin(),m_runIdList.end(),j) == m_runIdList.end()) m_runIdList.push_back(j);
60 else log << MSG::ALWAYS <<"RunNo "<<j<<" repeated in run list"<<endreq;
61 }
62 }
63 else {
64 for(int j = m_runNoList[i-1]+1; j < m_runNoList[i+1]; j++) {
65 if(find(m_runIdList.begin(),m_runIdList.end(),j) == m_runIdList.end()) m_runIdList.push_back(j);
66 else log << MSG::ALWAYS <<"RunNo "<<j<<" repeated in run list"<<endreq;
67 }
68 }
69 }
70 }
71 m_runID = m_runIdList[0];
72
73 int runMin = m_runID, runMax = m_runID;
74 for ( unsigned int i = 1; i < m_runIdList.size(); ++i ) {
75 int _run = m_runIdList[i];
76 if ( _run < runMin ) {
77 runMin = _run;
78 }
79 else if ( _run > runMax ) {
80 runMax = _run;
81 }
82 }
83 IDetVerSvc* idvSvc;
84 sc = service("DetVerSvc", idvSvc);
85 DetVerSvc* dvSvc = dynamic_cast<DetVerSvc*>(idvSvc);
86 if ( dvSvc->fromRun(abs(runMin)) != dvSvc->fromRun(abs(runMax)) ) {
87 log << MSG::ERROR << "wrong run range ["
88 << runMin << " to " << runMax << "], crossed detector configuration" << endreq;
89 return StatusCode::FAILURE;
90 }
91
92 m_connect = new RealDBUtil::ConnectionProvider();
93 if (!m_connect) {
94 log << MSG::ERROR << "Could not open connection to database" << endreq;
95 }
96
97 IIncidentSvc* incsvc;
98 sc = service("IncidentSvc", incsvc);
99 int priority = 100;
100 if( sc.isSuccess() ){
101 incsvc -> addListener(this, "NewRun", priority);
102 }
103
104 sc = serviceLocator()->service("EventDataSvc", m_eventSvc, true);
105 if (sc.isFailure() ) {
106 log << MSG::ERROR << "Unable to find EventDataSvc " << endreq;
107 return sc;
108 }
109
110 return StatusCode::SUCCESS;
111}
int fromRun(unsigned int run)
Definition DetVerSvc.cxx:88

◆ readDB()

void RealizationSvc::readDB ( int runNo)

Definition at line 262 of file RealizationSvc.cxx.

262 {
263 MsgStream log( messageService(), name() );
264 log << MSG::DEBUG << "In getCaliConst" << endreq;
265
267
268 StatusCode sc;
269
270 //Get bunch infor
271 if(m_ifReadBunch == true) {
272 std::vector<std::string> sbunch;
273 std::vector<double> bunchInfo;
274 ConnectionProvider::eRet e = m_connect->getReadBunchInfo(sbunch,runNo,m_SftVer,m_ParVer,m_bossRelease);
275 if(e == 7 ) {
276 bool last = true;
277 for(int id = 1; true; id++) {
278 e = m_connect->getReadBunchInfo(sbunch,runNo+id,m_SftVer,m_ParVer,m_bossRelease);
279 last = true;
280 if(e == 7) {
281 if((runNo-id) > 0) {
282 e = m_connect->getReadBunchInfo(sbunch,runNo-id,m_SftVer,m_ParVer,m_bossRelease);
283 last = false;
284 }
285 }
286 if(e == 0) {
287 if(last == true) log << MSG::INFO << "Use Bunch infor. of run " << runNo+id << " instead of run " << runNo << endreq;
288 if(last == false) log << MSG::INFO << "Use Bunch infor. of run " << runNo-id << " instead of run " << runNo << endreq;
289 break;
290 }
291 }
292 }
293 if(e != 0 && e != 7) {
294 log << MSG::ERROR << "Could not find Bunch infor., exit." << endreq;
295 exit(1);
296 }
297 for(unsigned int i = 0; i < sbunch.size(); i++)
298 {
299 bunchInfo.push_back(atof(sbunch[i].c_str()));
300 }
301 sbunch.clear();
302
303 if(bunchInfo.size() == 6)
304 {
305 //convert from cm to mm
306 m_bunch_x = 10*bunchInfo[0];
307 m_bunch_y = 10*bunchInfo[1];
308 m_bunch_z = 10*bunchInfo[2];
309 m_sigma_x = 10*bunchInfo[3];
310 m_sigma_y = 10*bunchInfo[4];
311 m_sigma_z = 10*bunchInfo[5];
312 log << MSG::INFO << "BunchPosX: " << m_bunch_x << " BunchPosY: " << m_bunch_y << " BunchPosZ: " << m_bunch_z << " in Run " << runNo << endreq;
313 log << MSG::INFO << "BunchSigmaX: " << m_sigma_x << " BunchSigmaY: " << m_sigma_y << " BunchSigmaZ: " << m_sigma_z << " in Run " << runNo << endreq;
314 }
315 else {
316 log << MSG::ERROR << "Please check the bunch information, the size is " << bunchInfo.size() << endreq;
317 }
318 bunchInfo.clear();
319 }
320
321 //get trigger table
322 if(m_ifReadTrg == true) {
323 m_trgTable.clear();
324 std::vector<std::string> strgTable;
325 ConnectionProvider::eRet e = m_connect->getReadTrgTableInfo(strgTable,runNo);
326 if(e != 0 ) {
327 log << MSG::ERROR << "Could not find TrgTable infor., exit." << endreq;
328 exit(1);
329 }
330 for(unsigned int i = 0; i < strgTable.size(); i++)
331 {
332 long long value = 0;
333 for (unsigned int j = 0; j < (strgTable[i]).length(); j++)
334 {
335 value = value*10 + (strgTable[i][j] - '0');
336 }
337 m_trgTable.push_back(uint32_t(value));
338 }
339 strgTable.clear();
340 if(m_trgTable.size() != 65) log << MSG::ERROR << "Please check the TrgTable information, the size is " << m_trgTable.size() << endreq;
341
342 std::vector<double> vtrgGain;
343 e = m_connect->getEmcGain(vtrgGain,runNo);
344 if(e != 0 ) {
345 log << MSG::ERROR << "Could not find emc gain infor., exit." << endreq;
346 exit(1);
347 }
348 for(unsigned int i = 0; i < vtrgGain.size(); i++) {
349 m_trgGain[i] = vtrgGain[i];
350 }
351
352 //get trigger config information
353 e = m_connect->getTrgConfigInfo(runNo);
354 if(e != 0 ) {
355 log << MSG::ERROR << "Could not find Trigger config infor., exit." << endreq;
356 exit(1);
357 }
358 m_EtotDataSteps = m_connect->getEtotDataSteps();
359 m_VthBEtotH = m_connect->getVthBEtotH();
360 m_VthEEtotH = m_connect->getVthEEtotH();
361 m_VthEtotL = m_connect->getVthEtotL();
362 m_VthEtotM = m_connect->getVthEtotM();
363 m_VthBLZ = m_connect->getVthBLZ();
364 m_VthDiffB = m_connect->getVthDiffB();
365 m_VthDiffE = m_connect->getVthDiffE();
366 m_VthBalBLK = m_connect->getVthBalBLK();
367 m_VthBalEEMC = m_connect->getVthBalEEMC();
368 m_VthDiffMin = m_connect->getVthDiffMin();
369 }
370
371 //get background file
372 if(m_ifReadRandTrg == true) {
373 std::vector<std::string> fileInfor;
374 ConnectionProvider::eRet e = m_connect->getReadBackgroundInfo(fileInfor,runNo);
375 if(e == 7 ) {
376 bool last = true;
377 for(int id = 1; true; id++) {
378 e = m_connect->getReadBackgroundInfo(fileInfor,runNo+id);
379 last = true;
380 if(e == 7) {
381 if((runNo-id) > 0) {
382 e = m_connect->getReadBackgroundInfo(fileInfor,runNo-id);
383 last = false;
384 }
385 }
386 if(e == 0) {
387 if(last == true) log << MSG::INFO << "Use Bg files of run " << runNo+id << " instead of run " << runNo << endreq;
388 if(last == false) log << MSG::INFO << "Use Bg files of run " << runNo-id << " instead of run " << runNo << endreq;
389 break;
390 }
391 }
392 }
393 if(e != 0 && e != 7) {
394 log << MSG::ERROR << "Could not find background infor., exit." << endreq;
395 exit(1);
396 }
397 m_bgfilename.clear();
398 for(unsigned int i = 0; i < fileInfor.size(); i+=2)
399 {
400 m_bgfilename.push_back(fileInfor[i]+"/"+fileInfor[i+1]);
401 }
402 fileInfor.clear();
403 for(unsigned int i = 0; i < m_bgfilename.size(); i++) {
404 log << MSG::INFO << "Background file name: " << m_bgfilename[i] << " in run " << runNo << endreq;
405 }
406
407 //get luminosity curve parameters
408 std::string srunTime;
409 std::string stau_value;
410 e = m_connect->getLumCurvePar(srunTime, stau_value, runNo, m_SftVer, m_ParVer, m_bossRelease);
411 if(e != 0 ) {
412 log << MSG::ERROR << "Could not find Luminosity curve parameters, exit." << endreq;
413 exit(1);
414 }
415 m_runTotalTime = std::atof(srunTime.c_str());
416 m_tauValue = std::atof(stau_value.c_str());
417 log << MSG::INFO << "Total time is " << m_runTotalTime << ", tau is " << m_tauValue << " in run " << runNo << ". " << endreq;
418 }
419
420 //get tof threshold in table TFEE
421 if(m_ifReadTFEE == true) {
422 m_tfee.clear();
423 ConnectionProvider::eRet e = m_connect->getReadTofThreshInfo(m_tfee,runNo);
424 if(e != 0 ) {
425 log << MSG::ERROR << "Could not find TFEE infor., exit." << endreq;
426 exit(1);
427 }
428
429 for(unsigned int i = 0; i < m_tfee.size(); i++) {
430 log << MSG::INFO << "TFEE ----> " << m_tfee[i] << endreq;
431 }
432 }
433
434 //get run infor.
435 if(m_ifReadRunInfo == true) {
436 m_runInfo.clear();
437 std::vector<std::string> srunInfo;
438 ConnectionProvider::eRet e = m_connect->getRunInfo(srunInfo,runNo);
439 if(e != 0 ) {
440 log << MSG::ERROR << "Could not find run infor., exit." << endreq;
441 exit(1);
442 }
443 for(unsigned int i = 0; i < srunInfo.size(); i++)
444 {
445 m_runInfo.push_back(atof(srunInfo[i].c_str()));
446 }
447 srunInfo.clear();
448
449 for(unsigned int i = 0; i < m_runInfo.size(); i++) {
450 log << MSG::INFO << "runInfo ----> " << m_runInfo[i] << endreq;
451 }
452 }
453
454}
ConnectionProvider::eRet getRunInfo(std::vector< std::string > &runInfo, int runNo)
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 getEmcGain(std::vector< double > &emcGain, int runNo)
ConnectionProvider::eRet getReadTrgTableInfo(std::vector< std::string > &trgTable, int runNo)
ConnectionProvider::eRet getReadTofThreshInfo(std::vector< std::string > &tofThresh, int runNo)
char * c_str(Index i)

Referenced by handle().

◆ setBgFileName()

void RealizationSvc::setBgFileName ( std::vector< std::string > i)
inline

Definition at line 86 of file RealizationSvc.h.

86{ m_bgfilename = i; }

◆ setBunchPosX()

void RealizationSvc::setBunchPosX ( double i)
inline

Definition at line 42 of file RealizationSvc.h.

42{ m_bunch_x = i; }

◆ setBunchPosY()

void RealizationSvc::setBunchPosY ( double i)
inline

Definition at line 43 of file RealizationSvc.h.

43{ m_bunch_y = i; }

◆ setBunchPosZ()

void RealizationSvc::setBunchPosZ ( double i)
inline

Definition at line 44 of file RealizationSvc.h.

44{ m_bunch_z = i; }

◆ setBunchSizeX()

void RealizationSvc::setBunchSizeX ( double i)
inline

Definition at line 45 of file RealizationSvc.h.

45{ m_sigma_x = i; }

◆ setBunchSizeY()

void RealizationSvc::setBunchSizeY ( double i)
inline

Definition at line 46 of file RealizationSvc.h.

46{ m_sigma_y = i; }

◆ setBunchSizeZ()

void RealizationSvc::setBunchSizeZ ( double i)
inline

Definition at line 47 of file RealizationSvc.h.

47{ m_sigma_z = i; }

◆ setInitEvtID()

void RealizationSvc::setInitEvtID ( int i)
inline

Definition at line 36 of file RealizationSvc.h.

36{ m_initEvtID = i; }

◆ setLuminosity()

void RealizationSvc::setLuminosity ( float i)
inline

Definition at line 38 of file RealizationSvc.h.

38{ m_lumi = i; }

◆ setRunEvtNum()

void RealizationSvc::setRunEvtNum ( int i)
inline

Definition at line 58 of file RealizationSvc.h.

58{ m_RunEvtNum = i; }

Referenced by McContext::McContext(), and McContext::next().

◆ setRunId()

void RealizationSvc::setRunId ( int i)
inline

Definition at line 103 of file RealizationSvc.h.

103{ m_runID = i; }

Referenced by McContext::McContext(), and McContext::next().

◆ setTrgTable()

void RealizationSvc::setTrgTable ( std::vector< uint32_t > i)
inline

Definition at line 70 of file RealizationSvc.h.

70{ m_trgTable = i; }

◆ updateRealData()

void RealizationSvc::updateRealData ( )

Definition at line 456 of file RealizationSvc.cxx.

456 {
457}

◆ UseDBFlag()


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