7 using namespace oracle::occi;
21 cout <<
"*****************************************" << endl;
22 cout <<
"******** Inserting Peds in conf-OMDS*****" << endl;
23 cout <<
"*****************************************" << endl;
25 cout <<
"creating fe record " <<endl;
30 result = fe_ped_info.
getID() ;
34 cout <<
"*********about to insert peds *********" << endl;
35 cout <<
" map size = "<<pedset.size()<<endl ;
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;
56 result = fe_lin_info.
getID() ;
59 cout <<
"*********about to insert linearization coeff *********" << endl;
60 cout <<
" map size = "<<linset.size()<<endl ;
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;
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);
118 map<EcalLogicID, FEConfigPedDat> dataset_ped;
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;
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();
196 cout <<
"*****************************************" << endl;
197 cout <<
"************Inserting SLIDING************" << endl;
198 cout <<
"*****************************************" << endl;
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;
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;
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;
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;
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;
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
void insertConfigSet(ICONF *iconf)
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)
MonRunList fetchMonRunListLastNRuns(const RunTag &tag, const MonRunTag &monruntag, int max_run, int n_runs)
void setNumberOfGroups(int iov_id)
void setNumberOfGroups(int iov_id)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov)
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 fetchConfigSet(ICONF *iconf)
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 insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
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)