7 using namespace oracle::occi;
21 std::cout <<
"*****************************************" << std::endl;
22 std::cout <<
"******** Inserting Peds in conf-OMDS*****" << std::endl;
23 std::cout <<
"*****************************************" << std::endl;
25 std::cout <<
"creating fe record " <<std::endl;
30 result = fe_ped_info.
getID() ;
34 std::cout <<
"*********about to insert peds *********" << std::endl;
35 std::cout <<
" map size = "<<pedset.size()<<std::endl ;
37 std::cout <<
"*********Done peds *********" << std::endl;
43 const std::map<EcalLogicID, FEConfigLinParamDat> & linparamset,
int iovId, std::string
tag) {
47 std::cout <<
"*********************************************" << std::endl;
48 std::cout <<
"**Inserting Linarization coeff in conf-OMDS**" << std::endl;
49 std::cout <<
"*********************************************" << std::endl;
51 std::cout <<
"creating fe record " <<std::endl;
56 result = fe_lin_info.
getID() ;
59 std::cout <<
"*********about to insert linearization coeff *********" << std::endl;
60 std::cout <<
" map size = "<<linset.size()<<std::endl ;
63 std::cout <<
"*********Done lineraization coeff *********" << std::endl;
72 std::cout <<
"*********************************************" << std::endl;
73 std::cout <<
"**Inserting Main FE table in conf-OMDS **" << std::endl;
74 std::cout <<
"*********************************************" << std::endl;
76 std::cout <<
"creating fe record " <<std::endl;
91 result = fe_main.
getId() ;
93 std::cout <<
"*********Done Main *********" << std::endl;
106 std::cout <<
"*****************************************" << std::endl;
107 std::cout <<
"test readinf fe_ped with id="<<iconf_req << std::endl;
108 std::cout <<
"*****************************************" << std::endl;
111 fe_ped_info.
setId(iconf_req);
115 std::map<EcalLogicID, FEConfigPedDat> dataset_ped;
118 typedef std::map<EcalLogicID, FEConfigPedDat>::const_iterator CIfeped;
122 float ped_m12[61200];
125 for (
int i=0;
i<61200;
i++){
131 for (CIfeped
p = dataset_ped.begin();
p != dataset_ped.end();
p++) {
135 int xt_num=ecid_xt.
getID2();
141 std::cout <<
"*****************************************" << std::endl;
142 std::cout <<
"test read done"<<iconf_req << std::endl;
143 std::cout <<
"*****************************************" << std::endl;
153 std::cout <<
"Retrieving run list from DB from run nb ... "<< runNb << std::endl;
174 std::cout<<
"we are in read ped from condDB and runNb is "<< runNb<<std::endl;
178 std::cout<<
"we are in read ped from condDB"<<std::endl;
180 std::vector<MonRunIOV> mon_run_vec = mon_list.
getRuns();
181 std::cout <<
"number of ped runs is : "<< mon_run_vec.size()<< std::endl;
182 int mon_runs = mon_run_vec.size();
186 for (
int ii=0 ; ii<(int)mon_run_vec.size(); ii++)
std::cout <<
"here is the run number: "<< mon_run_vec[ii].getRunIOV().getRunNumber() << std::endl;
190 std::cout <<
" retrieve the data for a given run"<< std::endl;
191 std::cout <<
"here is the run number: "<< mon_run_vec[
run].getRunIOV().getRunNumber() << std::endl;
192 iovId = mon_run_vec[
run].getID();
202 std::cout <<
"*****************************************" << std::endl;
203 std::cout <<
"************Inserting SLIDING************" << std::endl;
204 std::cout <<
"*****************************************" << std::endl;
218 result=fe_info.
getId();
220 std::cout <<
"*****************************************" << std::endl;
221 std::cout <<
"************SLI done*********************" << std::endl;
222 std::cout <<
"*****************************************" << std::endl;
228 const std::map<EcalLogicID, FEConfigLUTDat> & lutset,
229 const std::map<EcalLogicID, FEConfigLUTParamDat> & lutparamset,
int iovId, std::string
tag)
231 std::cout <<
"*****************************************" << std::endl;
232 std::cout <<
"************Inserting LUT************" << std::endl;
233 std::cout <<
"*****************************************" << std::endl;
251 result=fe_lut_info.
getId();
253 std::cout <<
"*****************************************" << std::endl;
254 std::cout <<
"************LUT done*********************" << std::endl;
255 std::cout <<
"*****************************************" << std::endl;
261 const std::map<EcalLogicID, FEConfigWeightDat> & lutset,
int ngr, std::string
tag)
263 std::cout <<
"*****************************************" << std::endl;
264 std::cout <<
"************Inserting weights************" << std::endl;
265 std::cout <<
"*****************************************" << std::endl;
282 result=fe_wei_info.
getId();
284 std::cout <<
"*****************************************" << std::endl;
285 std::cout <<
"************WEIGHT done******************" << std::endl;
286 std::cout <<
"*****************************************" << std::endl;
294 const std::map<EcalLogicID, FEConfigFgrDat> & fgrset,
295 const std::map<EcalLogicID, FEConfigFgrParamDat> & fgrparamset,
296 const std::map<EcalLogicID, FEConfigFgrEETowerDat> & dataset3,
297 const std::map<EcalLogicID, FEConfigFgrEEStripDat> & dataset4,
298 int iovId, std::string
tag)
300 std::cout <<
"*****************************************" << std::endl;
301 std::cout <<
"************Inserting Fgr************" << std::endl;
302 std::cout <<
"*****************************************" << std::endl;
324 result=fe_fgr_info.
getId();
326 std::cout <<
"*****************************************" << std::endl;
327 std::cout <<
"************Fgr done*********************" << std::endl;
328 std::cout <<
"*****************************************" << std::endl;
338 std::cout <<
"=============RunTag:" << std::endl;
342 std::cout <<
"====================" << std::endl;
348 std::cout <<
"=============RunIOV:" << std::endl;
354 std::cout <<
"====================" << std::endl;
int writeToConfDB_TPGLinearCoef(const std::map< EcalLogicID, FEConfigLinDat > &linset, const std::map< EcalLogicID, FEConfigLinParamDat > &linparamset, int iovId, std::string tag)
void printIOV(const RunIOV *iov) const
void setLocationDef(const LocationDef locDef)
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)
void setGeneralTag(std::string tag)
int writeToConfDB_TPGMain(int ped, int lin, int lut, int fgr, int sli, int wei, int bxt, int btt, std::string tag, int ver)
void setRunTag(RunTag tag)
void setNumberOfGroups(int iov_id)
void setNumberOfGroups(int iov_id)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov)
MonRunList fetchMonRunListLastNRuns(RunTag tag, MonRunTag monruntag, int max_run, int n_runs)
void setRunTypeDef(const RunTypeDef runTypeDef)
void setIOVId(int iov_id)
std::string getLocation() const
void setMonVersionDef(MonVersionDef ver)
int readFromCondDB_Pedestals(std::map< EcalLogicID, MonPedestalsDat > &pedset, int runNb)
float getPedMeanG12() const
void setIOVId(int iov_id)
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)
float getPedMeanG6() const
void setMonitoringVersion(std::string ver)
run_t getRunNumber() const
void setConfigTag(std::string x)
void readFromConfDB_TPGPedestals(int iconf_req)
void setMonRunTag(MonRunTag tag)
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)