21 cout <<
"*****************************************" << endl;
22 cout <<
"******** Inserting Peds in conf-OMDS*****" << endl;
23 cout <<
"*****************************************" << endl;
25 cout <<
"creating fe record " <<endl;
29 insertConfigSet(&fe_ped_info) ;
30 result = fe_ped_info.
getID() ;
34 cout <<
"*********about to insert peds *********" << endl;
35 cout <<
" map size = "<<pedset.size()<<endl ;
36 insertDataArraySet(&pedset, &fe_ped_info);
37 cout <<
"*********Done peds *********" << endl;
43 const map<EcalLogicID, FEConfigLinParamDat> & linparamset,
int iovId,
string tag) {
47 cout <<
"*********************************************" << endl;
48 cout <<
"**Inserting Linarization coeff in conf-OMDS**" << endl;
49 cout <<
"*********************************************" << endl;
51 cout <<
"creating fe record " <<endl;
55 insertConfigSet(&fe_lin_info) ;
56 result = fe_lin_info.
getID() ;
59 cout <<
"*********about to insert linearization coeff *********" << endl;
60 cout <<
" map size = "<<linset.size()<<endl ;
61 insertDataArraySet(&linset, &fe_lin_info);
62 insertDataArraySet(&linparamset, &fe_lin_info);
63 cout <<
"*********Done lineraization coeff *********" << endl;
68 int EcalTPGDBApp::writeToConfDB_TPGMain(
int ped,
int lin,
int lut,
int fgr,
int sli,
int wei,
int spi,
int tim,
int bxt,
int btt,
int bst,
string tag,
int ver) {
72 cout <<
"*********************************************" << endl;
73 cout <<
"**Inserting Main FE table in conf-OMDS **" << endl;
74 cout <<
"*********************************************" << endl;
76 cout <<
"creating fe record " <<endl;
93 insertConfigSet(&fe_main) ;
94 result = fe_main.
getId() ;
96 cout <<
"*********Done Main *********" << endl;
109 cout <<
"*****************************************" << endl;
110 cout <<
"test readinf fe_ped with id="<<iconf_req << endl;
111 cout <<
"*****************************************" << endl;
114 fe_ped_info.
setId(iconf_req);
116 fetchConfigSet(&fe_ped_info);
118 map<EcalLogicID, FEConfigPedDat> dataset_ped;
119 fetchDataSet(&dataset_ped, &fe_ped_info);
121 typedef map<EcalLogicID, FEConfigPedDat>::const_iterator CIfeped;
125 for (CIfeped
p = dataset_ped.begin();
p != dataset_ped.end(); ++
p) {
135 cout <<
"*****************************************" << endl;
136 cout <<
"test read done"<<iconf_req << endl;
137 cout <<
"*****************************************" << endl;
147 cout <<
"Retrieving run list from DB from run nb ... "<< runNb << endl;
168 std::cout<<
"we are in read ped from condDB and runNb is "<< runNb<<endl;
170 mon_list = fetchMonRunListLastNRuns(my_runtag, montag, runNb , 10 );
172 std::cout<<
"we are in read ped from condDB"<<endl;
174 std::vector<MonRunIOV> mon_run_vec = mon_list.
getRuns();
175 cout <<
"number of ped runs is : "<< mon_run_vec.size()<< endl;
176 int mon_runs = mon_run_vec.size();
180 for (
int ii=0 ;
ii<(
int)mon_run_vec.size();
ii++)
cout <<
"here is the run number: "<< mon_run_vec[
ii].getRunIOV().getRunNumber() << endl;
184 cout <<
" retrieve the data for a given run"<< endl;
185 cout <<
"here is the run number: "<< mon_run_vec[
run].getRunIOV().getRunNumber() << endl;
186 iovId = mon_run_vec[
run].getID();
188 fetchDataSet(&dataset, &mon_run_vec[run]) ;
196 cout <<
"*****************************************" << endl;
197 cout <<
"************Inserting SLIDING************" << endl;
198 cout <<
"*****************************************" << endl;
204 insertConfigSet(&fe_info);
210 insertDataArraySet(&sliset, &fe_info);
212 result=fe_info.
getId();
214 cout <<
"*****************************************" << endl;
215 cout <<
"************SLI done*********************" << endl;
216 cout <<
"*****************************************" << endl;
223 const map<EcalLogicID, FEConfigLUTDat> & lutset,
224 const map<EcalLogicID, FEConfigLUTParamDat> & lutparamset,
int iovId,
string tag)
226 cout <<
"*****************************************" << endl;
227 cout <<
"************Inserting LUT************" << endl;
228 cout <<
"*****************************************" << endl;
234 insertConfigSet(&fe_lut_info);
240 insertDataArraySet(&lutgroupset, &fe_lut_info);
242 insertDataArraySet(&lutset, &fe_lut_info);
244 insertDataArraySet(&lutparamset, &fe_lut_info);
246 result=fe_lut_info.
getId();
248 cout <<
"*****************************************" << endl;
249 cout <<
"************LUT done*********************" << endl;
250 cout <<
"*****************************************" << endl;
256 const map<EcalLogicID, FEConfigWeightDat> & lutset,
int ngr,
string tag)
258 cout <<
"*****************************************" << endl;
259 cout <<
"************Inserting weights************" << endl;
260 cout <<
"*****************************************" << endl;
267 insertConfigSet(&fe_wei_info);
273 insertDataArraySet(&lutgroupset, &fe_wei_info);
275 insertDataArraySet(&lutset, &fe_wei_info);
277 result=fe_wei_info.
getId();
279 cout <<
"*****************************************" << endl;
280 cout <<
"************WEIGHT done******************" << endl;
281 cout <<
"*****************************************" << endl;
289 const map<EcalLogicID, FEConfigFgrDat> & fgrset,
290 const map<EcalLogicID, FEConfigFgrParamDat> & fgrparamset,
291 const map<EcalLogicID, FEConfigFgrEETowerDat> & dataset3,
292 const map<EcalLogicID, FEConfigFgrEEStripDat> & dataset4,
293 int iovId,
string tag)
295 cout <<
"*****************************************" << endl;
296 cout <<
"************Inserting Fgr************" << endl;
297 cout <<
"*****************************************" << endl;
303 insertConfigSet(&fe_fgr_info);
309 insertDataArraySet(&fgrgroupset, &fe_fgr_info);
311 insertDataArraySet(&fgrset, &fe_fgr_info);
313 insertDataArraySet(&fgrparamset, &fe_fgr_info);
315 insertDataArraySet(&dataset3, &fe_fgr_info);
317 insertDataArraySet(&dataset4, &fe_fgr_info);
319 result=fe_fgr_info.
getId();
321 cout <<
"*****************************************" << endl;
322 cout <<
"************Fgr done*********************" << endl;
323 cout <<
"*****************************************" << endl;
331 cout <<
"*****************************************" << endl;
332 cout <<
"************Inserting Spike************" << endl;
333 cout <<
"*****************************************" << endl;
338 insertConfigSet(&fe_spike_info);
344 insertDataArraySet(&spikegroupset, &fe_spike_info);
346 result=fe_spike_info.
getId();
348 cout <<
"*****************************************" << endl;
349 cout <<
"************Spike done*******************" << endl;
350 cout <<
"*****************************************" << endl;
358 cout <<
"*****************************************" << endl;
359 cout <<
"************Inserting Delays************" << endl;
360 cout <<
"*****************************************" << endl;
365 insertConfigSet(&fe_time_info);
371 insertDataArraySet(&timegroupset, &fe_time_info);
373 result=fe_time_info.
getId();
375 cout <<
"*****************************************" << endl;
376 cout <<
"************Delays done******************" << endl;
377 cout <<
"*****************************************" << endl;
387 cout <<
"=============RunTag:" << endl;
391 cout <<
"====================" << endl;
397 cout <<
"=============RunIOV:" << endl;
403 cout <<
"====================" << endl;
int writeToConfDB_TPGLinearCoef(const std::map< EcalLogicID, FEConfigLinDat > &linset, const std::map< EcalLogicID, FEConfigLinParamDat > &linparamset, int iovId, std::string tag)
void setRunTypeDef(const RunTypeDef &runTypeDef)
void printIOV(const RunIOV *iov) const
LocationDef getLocationDef() const
float getPedMeanG1() const
EcalTPGDBApp(std::string host, std::string sid, std::string user, std::string pass, int port)
std::string getGeneralTag() const
std::string getRunType() const
void setIOVId(int iov_id)
int writeToConfDB_TPGSliding(const std::map< EcalLogicID, FEConfigSlidingDat > &sliset, int iovId, std::string tag)
int writeToConfDB_Delay(const std::map< EcalLogicID, FEConfigTimingDat > &delaygroupset, std::string tag)
int writeToConfDB_TPGMain(int ped, int lin, int lut, int fgr, int sli, int wei, int spi, int tim, int bxt, int btt, int bst, std::string tag, int ver)
void setGeneralTag(std::string tag)
void setRunTag(const RunTag &tag)
void setNumberOfGroups(int iov_id)
void setNumberOfGroups(int iov_id)
void setIOVId(int iov_id)
std::string getLocation() const
void setMonVersionDef(const MonVersionDef &ver)
int readFromCondDB_Pedestals(std::map< EcalLogicID, MonPedestalsDat > &pedset, int runNb)
float getPedMeanG12() const
void setLocationDef(const LocationDef &locDef)
void setIOVId(int iov_id)
int writeToConfDB_Spike(const std::map< EcalLogicID, FEConfigSpikeDat > &spikegroupset, std::string tag)
std::vector< MonRunIOV > getRuns()
int writeToConfDB_TPGPedestals(const std::map< EcalLogicID, FEConfigPedDat > &pedset, int iovId, std::string tag)
RunTypeDef getRunTypeDef() const
void setRunType(std::string runtype)
void setMonRunTag(const MonRunTag &tag)
float getPedMeanG6() const
void setMonitoringVersion(std::string ver)
run_t getRunNumber() const
void setConfigTag(std::string x)
void readFromConfDB_TPGPedestals(int iconf_req)
void setNumberOfGroups(int n)
int writeToConfDB_TPGLUT(const std::map< EcalLogicID, FEConfigLUTGroupDat > &lutgroup, const std::map< EcalLogicID, FEConfigLUTDat > &lutdat, const std::map< EcalLogicID, FEConfigLUTParamDat > &lutparamset, int iovId, std::string tag)
void setLocation(std::string loc)
int writeToConfDB_TPGFgr(const std::map< EcalLogicID, FEConfigFgrGroupDat > &lutgroup, const std::map< EcalLogicID, FEConfigFgrDat > &lutdat, const std::map< EcalLogicID, FEConfigFgrParamDat > &fgrparamset, const std::map< EcalLogicID, FEConfigFgrEETowerDat > &dataset3, const std::map< EcalLogicID, FEConfigFgrEEStripDat > &dataset4, int iovId, std::string tag)
void printTag(const RunTag *tag) const
int writeToConfDB_TPGWeight(const std::map< EcalLogicID, FEConfigWeightGroupDat > &lutgroup, const std::map< EcalLogicID, FEConfigWeightDat > &lutdat, int iovId, std::string tag)
void setGeneralTag(std::string tag)