#include <CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBApp.h>
Definition at line 14 of file EcalTPGDBApp.h.
EcalTPGDBApp::EcalTPGDBApp | ( | string | host, | |
string | sid, | |||
string | user, | |||
string | pass, | |||
int | port | |||
) |
EcalTPGDBApp::EcalTPGDBApp | ( | string | sid, | |
string | user, | |||
string | pass | |||
) |
Definition at line 13 of file EcalTPGDBApp.cc.
00014 : EcalCondDBInterface( sid, user, pass ) 00015 {}
Definition at line 302 of file EcalTPGDBApp.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), RunIOV::getRunEnd(), RunIOV::getRunNumber(), RunIOV::getRunStart(), RunIOV::getRunTag(), printTag(), Tm::str(), and ecalRecalibSequence_cff::tag.
00303 { 00304 cout << endl; 00305 cout << "=============RunIOV:" << endl; 00306 RunTag tag = iov->getRunTag(); 00307 printTag(&tag); 00308 cout << "Run Number: " << iov->getRunNumber() << endl; 00309 cout << "Run Start: " << iov->getRunStart().str() << endl; 00310 cout << "Run End: " << iov->getRunEnd().str() << endl; 00311 cout << "====================" << endl; 00312 }
Definition at line 292 of file EcalTPGDBApp.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), RunTag::getGeneralTag(), LocationDef::getLocation(), RunTag::getLocationDef(), RunTypeDef::getRunType(), and RunTag::getRunTypeDef().
Referenced by printIOV().
00293 { 00294 cout << endl; 00295 cout << "=============RunTag:" << endl; 00296 cout << "GeneralTag: " << tag->getGeneralTag() << endl; 00297 cout << "Location: " << tag->getLocationDef().getLocation() << endl; 00298 cout << "Run Type: " << tag->getRunTypeDef().getRunType() << endl; 00299 cout << "====================" << endl; 00300 }
int EcalTPGDBApp::readFromCondDB_Pedestals | ( | map< EcalLogicID, MonPedestalsDat > & | pedset, | |
int | runNb | |||
) |
Definition at line 118 of file EcalTPGDBApp.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), EcalCondDBInterface::fetchDataSet(), EcalCondDBInterface::fetchMonRunListLastNRuns(), MonRunList::getRuns(), mergeAndRegister_online::run, RunTag::setGeneralTag(), MonRunTag::setGeneralTag(), LocationDef::setLocation(), RunTag::setLocationDef(), MonVersionDef::setMonitoringVersion(), MonRunList::setMonRunTag(), MonRunTag::setMonVersionDef(), MonRunList::setRunTag(), RunTypeDef::setRunType(), and RunTag::setRunTypeDef().
Referenced by EcalTPGParamBuilder::analyze().
00118 { 00119 00120 00121 int iovId = 0 ; 00122 00123 cout << "Retrieving run list from DB from run nb ... "<< runNb << endl; 00124 RunTag my_runtag; 00125 LocationDef my_locdef; 00126 RunTypeDef my_rundef; 00127 my_locdef.setLocation("P5_Co"); 00128 my_rundef.setRunType("PEDESTAL"); 00129 my_runtag.setLocationDef(my_locdef); 00130 my_runtag.setRunTypeDef(my_rundef); 00131 my_runtag.setGeneralTag("LOCAL"); 00132 00133 // here we retrieve the Monitoring results 00134 MonVersionDef monverdef; 00135 monverdef.setMonitoringVersion("test01"); 00136 MonRunTag montag; 00137 montag.setMonVersionDef(monverdef); 00138 montag.setGeneralTag("CMSSW"); 00139 00140 MonRunList mon_list; 00141 mon_list.setMonRunTag(montag); 00142 mon_list.setRunTag(my_runtag); 00143 00144 std::cout<<"we are in read ped from condDB and runNb is "<< runNb<<endl; 00145 00146 mon_list = fetchMonRunListLastNRuns(my_runtag, montag, runNb , 10 ); 00147 00148 std::cout<<"we are in read ped from condDB"<<endl; 00149 00150 std::vector<MonRunIOV> mon_run_vec = mon_list.getRuns(); 00151 cout <<"number of ped runs is : "<< mon_run_vec.size()<< endl; 00152 int mon_runs = mon_run_vec.size(); 00153 int sm_num = 0; 00154 00155 if(mon_runs>0) { 00156 for (int ii=0 ; ii<mon_run_vec.size(); ii++) cout << "here is the run number: "<< mon_run_vec[ii].getRunIOV().getRunNumber() << endl; 00157 00158 // for the first run of the list we retrieve the pedestals 00159 int run=0; 00160 cout <<" retrieve the data for a given run"<< endl; 00161 cout << "here is the run number: "<< mon_run_vec[run].getRunIOV().getRunNumber() << endl; 00162 iovId = mon_run_vec[run].getID(); 00163 00164 fetchDataSet(&dataset, &mon_run_vec[run]) ; 00165 } 00166 return iovId ; 00167 }
Definition at line 69 of file EcalTPGDBApp.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), EcalCondDBInterface::fetchConfigSet(), EcalCondDBInterface::fetchDataSet(), EcalLogicID::getID1(), EcalLogicID::getID2(), FEConfigPedDat::getPedMeanG1(), FEConfigPedDat::getPedMeanG12(), FEConfigPedDat::getPedMeanG6(), i, p, and FEConfigPedInfo::setId().
00069 { 00070 // now we do something else 00071 // this is an example for reading the pedestals 00072 // for a given config iconf_req 00073 00074 // FC alternatively a config set can be retrieved by the tag and version 00075 00076 cout << "*****************************************" << endl; 00077 cout << "test readinf fe_ped with id="<<iconf_req << endl; 00078 cout << "*****************************************" << endl; 00079 00080 FEConfigPedInfo fe_ped_info; 00081 fe_ped_info.setId(iconf_req); 00082 00083 fetchConfigSet(&fe_ped_info); 00084 00085 map<EcalLogicID, FEConfigPedDat> dataset_ped; 00086 fetchDataSet(&dataset_ped, &fe_ped_info); 00087 00088 typedef map<EcalLogicID, FEConfigPedDat>::const_iterator CIfeped; 00089 EcalLogicID ecid_xt; 00090 FEConfigPedDat rd_ped; 00091 00092 float ped_m12[61200]; 00093 float ped_m6[61200]; 00094 float ped_m1[61200]; 00095 for (int i=0; i<61200; i++){ 00096 ped_m12[i]=0; 00097 ped_m6[i]=0; 00098 ped_m1[i]=0; 00099 } 00100 00101 for (CIfeped p = dataset_ped.begin(); p != dataset_ped.end(); p++) { 00102 ecid_xt = p->first; 00103 rd_ped = p->second; 00104 int sm_num=ecid_xt.getID1(); 00105 int xt_num=ecid_xt.getID2(); 00106 ped_m12[xt_num]=rd_ped.getPedMeanG12(); 00107 ped_m6[xt_num]=rd_ped.getPedMeanG6(); 00108 ped_m1[xt_num]=rd_ped.getPedMeanG1(); 00109 } 00110 00111 cout << "*****************************************" << endl; 00112 cout << "test read done"<<iconf_req << endl; 00113 cout << "*****************************************" << endl; 00114 00115 }
std::string EcalTPGDBApp::to_string | ( | char | value[] | ) | [inline] |
Definition at line 20 of file EcalTPGDBApp.h.
00021 { 00022 std::ostringstream streamOut; 00023 streamOut << value; 00024 return streamOut.str(); 00025 }
int EcalTPGDBApp::writeToConfDB_TPGFgr | ( | const map< EcalLogicID, FEConfigFgrGroupDat > & | lutgroup, | |
const map< EcalLogicID, FEConfigFgrDat > & | lutdat, | |||
int | iovId, | |||
string | tag | |||
) |
Definition at line 260 of file EcalTPGDBApp.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), FEConfigFgrInfo::getId(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), HLT_VtxMuL3::result, IODConfig::setConfigTag(), and FEConfigFgrInfo::setNumberOfGroups().
Referenced by EcalTPGParamBuilder::analyze().
00262 { 00263 cout << "*****************************************" << endl; 00264 cout << "************Inserting Fgr************" << endl; 00265 cout << "*****************************************" << endl; 00266 int result=0; 00267 00268 FEConfigFgrInfo fe_fgr_info ; 00269 fe_fgr_info.setNumberOfGroups(iovId); // this eventually refers to some other table 00270 fe_fgr_info.setConfigTag(tag); 00271 insertConfigSet(&fe_fgr_info); 00272 00273 // Tm tdb = fe_fgr_info.getDBTime(); 00274 //tdb.dumpTm(); 00275 00276 // Insert the dataset 00277 insertDataArraySet(&fgrgroupset, &fe_fgr_info); 00278 // Insert the dataset 00279 insertDataArraySet(&fgrset, &fe_fgr_info); 00280 00281 result=fe_fgr_info.getId(); 00282 00283 cout << "*****************************************" << endl; 00284 cout << "************Fgr done*********************" << endl; 00285 cout << "*****************************************" << endl; 00286 return result; 00287 00288 }
int EcalTPGDBApp::writeToConfDB_TPGLinearCoef | ( | const map< EcalLogicID, FEConfigLinDat > & | linset, | |
const map< EcalLogicID, FEConfigParamDat > & | linparamset, | |||
int | iovId, | |||
string | tag | |||
) |
Definition at line 42 of file EcalTPGDBApp.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), FEConfigLinInfo::getID(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), HLT_VtxMuL3::result, IODConfig::setConfigTag(), and FEConfigLinInfo::setIOVId().
Referenced by EcalTPGParamBuilder::analyze().
00043 { 00044 00045 int result=0; 00046 00047 cout << "*********************************************" << endl; 00048 cout << "**Inserting Linarization coeff in conf-OMDS**" << endl; 00049 cout << "*********************************************" << endl; 00050 00051 cout << "creating fe record " <<endl; 00052 FEConfigLinInfo fe_lin_info ; 00053 fe_lin_info.setIOVId(iovId) ; 00054 fe_lin_info.setConfigTag(tag) ; 00055 insertConfigSet(&fe_lin_info) ; 00056 result = fe_lin_info.getID() ; 00057 00058 // Insert the dataset, identifying by iov 00059 cout << "*********about to insert linearization coeff *********" << endl; 00060 cout << " map size = "<<linset.size()<<endl ; 00061 insertDataArraySet(&linset, &fe_lin_info); 00062 insertDataArraySet(&linparamset, &fe_lin_info); 00063 cout << "*********Done lineraization coeff *********" << endl; 00064 00065 return result; 00066 }
int EcalTPGDBApp::writeToConfDB_TPGLUT | ( | const map< EcalLogicID, FEConfigLUTGroupDat > & | lutgroup, | |
const map< EcalLogicID, FEConfigLUTDat > & | lutdat, | |||
int | iovId, | |||
string | tag | |||
) |
Definition at line 197 of file EcalTPGDBApp.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), FEConfigLUTInfo::getId(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), HLT_VtxMuL3::result, IODConfig::setConfigTag(), and FEConfigLUTInfo::setNumberOfGroups().
Referenced by EcalTPGParamBuilder::analyze().
00199 { 00200 cout << "*****************************************" << endl; 00201 cout << "************Inserting LUT************" << endl; 00202 cout << "*****************************************" << endl; 00203 int result=0; 00204 00205 FEConfigLUTInfo fe_lut_info ; 00206 fe_lut_info.setNumberOfGroups(iovId); 00207 fe_lut_info.setConfigTag(tag); 00208 insertConfigSet(&fe_lut_info); 00209 00210 // Tm tdb = fe_lut_info.getDBTime(); 00211 //tdb.dumpTm(); 00212 00213 // Insert the dataset 00214 insertDataArraySet(&lutgroupset, &fe_lut_info); 00215 // Insert the dataset 00216 insertDataArraySet(&lutset, &fe_lut_info); 00217 00218 result=fe_lut_info.getId(); 00219 00220 cout << "*****************************************" << endl; 00221 cout << "************LUT done*********************" << endl; 00222 cout << "*****************************************" << endl; 00223 return result; 00224 00225 }
int EcalTPGDBApp::writeToConfDB_TPGPedestals | ( | const map< EcalLogicID, FEConfigPedDat > & | pedset, | |
int | iovId, | |||
string | tag | |||
) |
Definition at line 17 of file EcalTPGDBApp.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), FEConfigPedInfo::getID(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), HLT_VtxMuL3::result, IODConfig::setConfigTag(), and FEConfigPedInfo::setIOVId().
Referenced by EcalTPGParamBuilder::analyze().
00017 { 00018 00019 int result=0; 00020 00021 cout << "*****************************************" << endl; 00022 cout << "******** Inserting Peds in conf-OMDS*****" << endl; 00023 cout << "*****************************************" << endl; 00024 00025 cout << "creating fe record " <<endl; 00026 FEConfigPedInfo fe_ped_info ; 00027 fe_ped_info.setIOVId(iovId) ; 00028 fe_ped_info.setConfigTag(tag) ; 00029 insertConfigSet(&fe_ped_info) ; 00030 result = fe_ped_info.getID() ; 00031 00032 00033 // Insert the dataset, identifying by iov 00034 cout << "*********about to insert peds *********" << endl; 00035 cout << " map size = "<<pedset.size()<<endl ; 00036 insertDataArraySet(&pedset, &fe_ped_info); 00037 cout << "*********Done peds *********" << endl; 00038 00039 return result; 00040 }
int EcalTPGDBApp::writeToConfDB_TPGSliding | ( | const map< EcalLogicID, FEConfigSlidingDat > & | sliset, | |
int | iovId, | |||
string | tag | |||
) |
Definition at line 170 of file EcalTPGDBApp.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), FEConfigSlidingInfo::getId(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), HLT_VtxMuL3::result, IODConfig::setConfigTag(), and FEConfigSlidingInfo::setIOVId().
Referenced by EcalTPGParamBuilder::analyze().
00171 { 00172 cout << "*****************************************" << endl; 00173 cout << "************Inserting SLIDING************" << endl; 00174 cout << "*****************************************" << endl; 00175 int result=0; 00176 00177 FEConfigSlidingInfo fe_info ; 00178 fe_info.setIOVId(iovId); 00179 fe_info.setConfigTag(tag); 00180 insertConfigSet(&fe_info); 00181 00182 // Tm tdb = fe_lut_info.getDBTime(); 00183 //tdb.dumpTm(); 00184 00185 // Insert the dataset 00186 insertDataArraySet(&sliset, &fe_info); 00187 00188 result=fe_info.getId(); 00189 00190 cout << "*****************************************" << endl; 00191 cout << "************SLI done*********************" << endl; 00192 cout << "*****************************************" << endl; 00193 return result; 00194 00195 }
int EcalTPGDBApp::writeToConfDB_TPGWeight | ( | const map< EcalLogicID, FEConfigWeightGroupDat > & | lutgroup, | |
const map< EcalLogicID, FEConfigWeightDat > & | lutdat, | |||
int | iovId, | |||
string | tag | |||
) |
Definition at line 227 of file EcalTPGDBApp.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), FEConfigWeightInfo::getId(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), HLT_VtxMuL3::result, IODConfig::setConfigTag(), and FEConfigWeightInfo::setNumberOfGroups().
Referenced by EcalTPGParamBuilder::analyze().
00229 { 00230 cout << "*****************************************" << endl; 00231 cout << "************Inserting weights************" << endl; 00232 cout << "*****************************************" << endl; 00233 00234 int result=0; 00235 00236 FEConfigWeightInfo fe_wei_info ; 00237 fe_wei_info.setNumberOfGroups(5); // this eventually refers to some other table 00238 fe_wei_info.setConfigTag(tag); 00239 insertConfigSet(&fe_wei_info); 00240 00241 // Tm tdb = fe_lut_info.getDBTime(); 00242 //tdb.dumpTm(); 00243 00244 // Insert the dataset 00245 insertDataArraySet(&lutgroupset, &fe_wei_info); 00246 // Insert the dataset 00247 insertDataArraySet(&lutset, &fe_wei_info); 00248 00249 result=fe_wei_info.getId(); 00250 00251 cout << "*****************************************" << endl; 00252 cout << "************WEIGHT done******************" << endl; 00253 cout << "*****************************************" << endl; 00254 return result; 00255 00256 00257 }
uint64_t EcalTPGDBApp::endmicros [private] |
Definition at line 45 of file EcalTPGDBApp.h.
run_t EcalTPGDBApp::endrun [private] |
Definition at line 47 of file EcalTPGDBApp.h.
uint64_t EcalTPGDBApp::startmicros [private] |
Definition at line 44 of file EcalTPGDBApp.h.
run_t EcalTPGDBApp::startrun [private] |
Definition at line 46 of file EcalTPGDBApp.h.