CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
EcalTPGDBApp Class Reference

#include <EcalTPGDBApp.h>

Inheritance diagram for EcalTPGDBApp:
EcalCondDBInterface EcalDBConnection

Public Member Functions

 EcalTPGDBApp (std::string host, std::string sid, std::string user, std::string pass, int port)
 
 EcalTPGDBApp (std::string sid, std::string user, std::string pass)
 
int readFromCondDB_Pedestals (std::map< EcalLogicID, MonPedestalsDat > &pedset, int runNb)
 
void readFromConfDB_TPGPedestals (int iconf_req)
 
std::string to_string (char value[])
 
int writeToConfDB_Delay (const std::map< EcalLogicID, FEConfigTimingDat > &delaygroupset, std::string tag)
 
int writeToConfDB_Spike (const std::map< EcalLogicID, FEConfigSpikeDat > &spikegroupset, std::string tag)
 
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)
 
int writeToConfDB_TPGLinearCoef (const std::map< EcalLogicID, FEConfigLinDat > &linset, const std::map< EcalLogicID, FEConfigLinParamDat > &linparamset, int iovId, std::string tag)
 
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)
 
int writeToConfDB_TPGMain (int ped, int lin, int lut, int fgr, int sli, int wei, int wei2, int spi, int tim, int bxt, int btt, int bst, int cok, std::string tag, int ver)
 
int writeToConfDB_TPGPedestals (const std::map< EcalLogicID, FEConfigPedDat > &pedset, int iovId, std::string tag)
 
int writeToConfDB_TPGSliding (const std::map< EcalLogicID, FEConfigSlidingDat > &sliset, int iovId, std::string tag)
 
int writeToConfDB_TPGWeight (const std::map< EcalLogicID, FEConfigWeightGroupDat > &lutgroup, const std::map< EcalLogicID, FEConfigWeightDat > &lutdat, int iovId, std::string tag)
 
int writeToConfDB_TPGWeight_doubleWeights (const std::map< EcalLogicID, FEConfigOddWeightGroupDat > &lutgroupset, const std::map< EcalLogicID, FEConfigOddWeightDat > &lutset, const std::map< EcalLogicID, FEConfigOddWeightModeDat > &tpmode, int ngr, std::string tag)
 
- Public Member Functions inherited from EcalCondDBInterface
void dummy ()
 
 EcalCondDBInterface (std::string host, std::string sid, std::string user, std::string pass, int port=1521)
 
 EcalCondDBInterface (std::string sid, std::string user, std::string pass)
 
 EcalCondDBInterface ()=delete
 
 EcalCondDBInterface (const EcalCondDBInterface &copy)=delete
 
CaliIOV fetchCaliIOV (CaliTag *tag, const Tm &evenTm) noexcept(false)
 
template<class DATT , class ICONF >
void fetchConfigDataSet (std::vector< DATT > *fillMap, ICONF *iconf) noexcept(false)
 
template<class ICONF >
void fetchConfigSet (ICONF *iconf) noexcept(false)
 
template<class DATT , class IOVT >
void fetchDataSet (std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
 
template<class DATT , class IOVT >
void fetchDataSetWithMap (std::map< EcalLogicID, DATT > *fillMap, IOVT *iov, std::string mapping_name) noexcept(false)
 
template<class DATT >
void fetchDCSDataSet (std::list< std::pair< Tm, std::map< EcalLogicID, DATT > > > *fillMap, const Tm &t) noexcept(false)
 
DCSPTMTempList fetchDCSPTMTempList (const EcalLogicID &ecid) noexcept(false)
 
DCSPTMTempList fetchDCSPTMTempList (const EcalLogicID &ecid, const Tm &start, const Tm &end) noexcept(false)
 
DCUIOV fetchDCUIOV (DCUTag *tag, const Tm &evenTm) noexcept(false)
 
std::list< ODDelaysDatfetchFEDelaysForRun (RunIOV *iov) noexcept(false)
 
RunList fetchGlobalRunListByLocation (const RunTag &tag, int min_run, int max_run, const LocationDef &locDef) noexcept(false)
 
template<class ICONF >
void fetchLastConfigSet (ICONF *iconf) noexcept(false)
 
RunIOV fetchLMFLastRun () const
 
LMFRunIOV fetchLMFRunIOV (RunTag *runtag, LMFRunTag *lmftag, run_t run, subrun_t lmfrun) noexcept(false)
 
bool fetchLMFRunIOV (const LMFSeqDat &, LMFRunIOV &, int lmr, int type, int color) const
 
MonRunIOV fetchMonRunIOV (RunTag *runtag, MonRunTag *montag, run_t run, subrun_t monrun) noexcept(false)
 
MonRunList fetchMonRunList (const RunTag &tag, const MonRunTag &monruntag) noexcept(false)
 
MonRunList fetchMonRunList (const RunTag &tag, const MonRunTag &monruntag, int min_run, int max_run) noexcept(false)
 
MonRunList fetchMonRunListLastNRuns (const RunTag &tag, const MonRunTag &monruntag, int max_run, int n_runs) noexcept(false)
 
RunList fetchNonEmptyGlobalRunList (const RunTag &tag, int min_run, int max_run) noexcept(false)
 
RunList fetchNonEmptyRunList (const RunTag &tag, int min_run, int max_run) noexcept(false)
 
RunIOV fetchRunIOV (RunTag *tag, run_t run) noexcept(false)
 
RunIOV fetchRunIOV (std::string location, run_t run) noexcept(false)
 
RunIOV fetchRunIOV (std::string location, const Tm &t) noexcept(false)
 
RunList fetchRunList (const RunTag &tag) noexcept(false)
 
RunList fetchRunList (const RunTag &tag, int min_run, int max_run) noexcept(false)
 
RunList fetchRunListByLocation (const RunTag &tag, int min_run, int max_run, const LocationDef &locDef) noexcept(false)
 
RunList fetchRunListLastNRuns (const RunTag &tag, int max_run, int n_runs) noexcept(false)
 
template<class DATT , class IOVT >
void fetchValidDataSet (std::map< EcalLogicID, DATT > *fillMap, IOVT *fillIOV, RunTag *tag, run_t run=(unsigned int)-1) noexcept(false)
 
template<class DATT , class IOVT >
void fetchValidDataSet (std::map< EcalLogicID, DATT > *fillMap, IOVT *fillIOV, std::string location, run_t run=(unsigned int)-1) noexcept(false)
 
DateHandlergetDateHandler ()
 
std::map< int, int > getDetId2LogicIdMap ()
 
int getDetIdFromLogicId (int logic_id)
 
EcalLogicID getEcalLogicID (std::string name, int id1=EcalLogicID::NULLID, int id2=EcalLogicID::NULLID, int id3=EcalLogicID::NULLID, std::string mapsTo="") noexcept(false)
 
EcalLogicID getEcalLogicID (int logicID) noexcept(false)
 
std::map< int, int > getEcalLogicID2LmrMap ()
 
std::vector< EcalLogicIDgetEcalLogicIDForLMPN (int lmr_logic_id)
 
std::vector< EcalLogicIDgetEcalLogicIDForLMPN (const EcalLogicID &lmr_logic_id)
 
std::vector< EcalLogicIDgetEcalLogicIDForLMR (int lmr_logic_id)
 
std::vector< EcalLogicIDgetEcalLogicIDForLMR (const EcalLogicID &lmr_logic_id)
 
std::vector< EcalLogicIDgetEcalLogicIDMappedTo (int logic_id, std::string maps_to)
 
std::vector< EcalLogicIDgetEcalLogicIDSet (std::string name, int fromId1=EcalLogicID::NULLID, int toId1=EcalLogicID::NULLID, int fromId2=EcalLogicID::NULLID, int toId2=EcalLogicID::NULLID, int fromId3=EcalLogicID::NULLID, int toId3=EcalLogicID::NULLID, std::string mapsTo="") noexcept(false)
 
std::vector< EcalLogicIDgetEcalLogicIDSetOrdered (std::string name, int fromId1, int toId1, int fromId2=EcalLogicID::NULLID, int toId2=EcalLogicID::NULLID, int fromId3=EcalLogicID::NULLID, int toId3=EcalLogicID::NULLID, std::string mapsTo="", int orderedBy=EcalLogicID::NULLID) noexcept(false)
 
std::map< int, int > getLogicId2DetIdMap ()
 
int getLogicIdFromDetId (int det_id)
 
template<class DATT , class ICONF >
void insertConfigDataArraySet (const std::vector< DATT > &data, ICONF *iconf) noexcept(false)
 
template<class DATT , class ICONF >
void insertConfigDataSet (const std::vector< DATT > data, ICONF *iconf) noexcept(false)
 
template<class ICONF >
void insertConfigSet (ICONF *iconf) noexcept(false)
 
template<class DATT , class IOVT >
void insertDataArraySet (const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
 
template<class DATT , class IOVT >
void insertDataSet (const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
 
template<class DATT , class IOVT >
void insertDataSetVector (const std::vector< EcalLogicID > &ecid, const std::vector< IOVT > &run_iov, const std::vector< DATT > &data) noexcept(false)
 
void insertDCUIOV (DCUIOV *iov) noexcept(false)
 
void insertLmfDat (LMFDat *dat) noexcept(false)
 
void insertLmfDat (std::list< LMFDat * > dat) noexcept(false)
 
void insertLmfIOV (LMFIOV *iov) noexcept(false)
 
void insertLmfLmrSubIOV (LMFLmrSubIOV *iov) noexcept(false)
 
void insertLmfRunIOV (LMFRunIOV *iov) noexcept(false)
 
void insertLmfSeq (LMFSeqDat *iov) noexcept(false)
 
void insertMonRunIOV (MonRunIOV *iov) noexcept(false)
 
void insertRunIOV (RunIOV *iov) noexcept(false)
 
void updateRunConfig (ODRunConfigInfo *od) noexcept(false)
 
void updateRunIOV (RunIOV *iov) noexcept(false)
 
void updateRunIOVEndTime (RunIOV *iov) noexcept(false)
 
void updateRunIOVStartTime (RunIOV *iov) noexcept(false)
 
 ~EcalCondDBInterface () noexcept(false) override
 
- Public Member Functions inherited from EcalDBConnection
void commit ()
 
oracle::occi::Statement * createStatement ()
 
 EcalDBConnection (std::string host, std::string sid, std::string user, std::string pass, int port=1521) noexcept(false)
 
 EcalDBConnection (std::string sid, std::string user, std::string pass) noexcept(false)
 
oracle::occi::Clob getClobLocator ()
 
oracle::occi::Connection * getConn () const
 
oracle::occi::Environment * getEnv () const
 
void rollback ()
 
void terminateStatement (oracle::occi::Statement *stmt)
 
virtual ~EcalDBConnection () noexcept(false)
 

Private Member Functions

void printIOV (const RunIOV *iov) const
 
void printTag (const RunTag *tag) const
 

Private Attributes

uint64_t endmicros
 
run_t endrun
 
uint64_t startmicros
 
run_t startrun
 

Additional Inherited Members

- Protected Attributes inherited from EcalDBConnection
oracle::occi::Connection * conn
 
oracle::occi::Environment * env
 
std::string host
 
std::string pass
 
int port
 
std::string sid
 
oracle::occi::Statement * stmt
 
std::string user
 

Detailed Description

Definition at line 16 of file EcalTPGDBApp.h.

Constructor & Destructor Documentation

EcalTPGDBApp::EcalTPGDBApp ( std::string  host,
std::string  sid,
std::string  user,
std::string  pass,
int  port 
)
EcalTPGDBApp::EcalTPGDBApp ( std::string  sid,
std::string  user,
std::string  pass 
)

Member Function Documentation

void EcalTPGDBApp::printIOV ( const RunIOV iov) const
private

Definition at line 419 of file EcalTPGDBApp.cc.

References RunIOV::getRunEnd(), RunIOV::getRunNumber(), RunIOV::getRunStart(), RunIOV::getRunTag(), printTag(), Tm::str(), and GlobalPosition_Frontier_DevDB_cff::tag.

419  {
420  edm::LogVerbatim("ECALTPGDBApp") << "=============RunIOV:";
421  RunTag tag = iov->getRunTag();
422  printTag(&tag);
423  edm::LogVerbatim("ECALTPGDBApp") << "Run Number: " << iov->getRunNumber();
424  edm::LogVerbatim("ECALTPGDBApp") << "Run Start: " << iov->getRunStart().str();
425  edm::LogVerbatim("ECALTPGDBApp") << "Run End: " << iov->getRunEnd().str();
426  edm::LogVerbatim("ECALTPGDBApp") << "====================";
427 }
Log< level::Info, true > LogVerbatim
Definition: RunTag.h:13
RunTag getRunTag() const
Definition: RunIOV.cc:58
Tm getRunStart() const
Definition: RunIOV.cc:40
Tm getRunEnd() const
Definition: RunIOV.cc:49
run_t getRunNumber() const
Definition: RunIOV.cc:31
std::string str() const
Definition: Tm.cc:66
void printTag(const RunTag *tag) const
void EcalTPGDBApp::printTag ( const RunTag tag) const
private

Definition at line 411 of file EcalTPGDBApp.cc.

References RunTag::getGeneralTag(), LocationDef::getLocation(), RunTag::getLocationDef(), RunTypeDef::getRunType(), and RunTag::getRunTypeDef().

Referenced by printIOV().

411  {
412  edm::LogVerbatim("ECALTPGDBApp") << "=============RunTag:";
413  edm::LogVerbatim("ECALTPGDBApp") << "GeneralTag: " << tag->getGeneralTag();
414  edm::LogVerbatim("ECALTPGDBApp") << "Location: " << tag->getLocationDef().getLocation();
415  edm::LogVerbatim("ECALTPGDBApp") << "Run Type: " << tag->getRunTypeDef().getRunType();
416  edm::LogVerbatim("ECALTPGDBApp") << "====================";
417 }
Log< level::Info, true > LogVerbatim
LocationDef getLocationDef() const
Definition: RunTag.cc:31
std::string getGeneralTag() const
Definition: RunTag.cc:20
std::string getRunType() const
Definition: RunTypeDef.cc:19
std::string getLocation() const
Definition: LocationDef.cc:18
RunTypeDef getRunTypeDef() const
Definition: RunTag.cc:40
int EcalTPGDBApp::readFromCondDB_Pedestals ( std::map< EcalLogicID, MonPedestalsDat > &  pedset,
int  runNb 
)

Definition at line 151 of file EcalTPGDBApp.cc.

References EcalCondDBInterface::fetchDataSet(), EcalCondDBInterface::fetchMonRunListLastNRuns(), MonRunList::getRuns(), cuy::ii, test_db_connect::my_locdef, test_db_connect::my_rundef, submitPVValidationJobs::run, MonRunTag::setGeneralTag(), RunTag::setGeneralTag(), LocationDef::setLocation(), RunTag::setLocationDef(), MonVersionDef::setMonitoringVersion(), MonRunList::setMonRunTag(), MonRunTag::setMonVersionDef(), MonRunList::setRunTag(), RunTypeDef::setRunType(), and RunTag::setRunTypeDef().

151  {
152  int iovId = 0;
153 
154  edm::LogVerbatim("ECALTPGDBApp") << "Retrieving run list from DB from run nb ... " << runNb;
155  RunTag my_runtag;
158  my_locdef.setLocation("P5_Co");
159  my_rundef.setRunType("PEDESTAL");
160  my_runtag.setLocationDef(my_locdef);
161  my_runtag.setRunTypeDef(my_rundef);
162  my_runtag.setGeneralTag("LOCAL");
163 
164  // here we retrieve the Monitoring results
165  MonVersionDef monverdef;
166  monverdef.setMonitoringVersion("test01");
167  MonRunTag montag;
168  montag.setMonVersionDef(monverdef);
169  montag.setGeneralTag("CMSSW");
170 
171  MonRunList mon_list;
172  mon_list.setMonRunTag(montag);
173  mon_list.setRunTag(my_runtag);
174 
175  edm::LogVerbatim("ECALTPGDBApp") << "we are in read ped from condDB and runNb is " << runNb;
176 
177  mon_list = fetchMonRunListLastNRuns(my_runtag, montag, runNb, 10);
178 
179  edm::LogVerbatim("ECALTPGDBApp") << "we are in read ped from condDB";
180 
181  std::vector<MonRunIOV> mon_run_vec = mon_list.getRuns();
182  edm::LogVerbatim("ECALTPGDBApp") << "number of ped runs is : " << mon_run_vec.size();
183  int mon_runs = mon_run_vec.size();
184  //int sm_num = 0;
185 
186  if (mon_runs > 0) {
187  for (int ii = 0; ii < (int)mon_run_vec.size(); ii++)
188  edm::LogVerbatim("ECALTPGDBApp") << "here is the run number: " << mon_run_vec[ii].getRunIOV().getRunNumber();
189 
190  // for the first run of the list we retrieve the pedestals
191  int run = 0;
192  edm::LogVerbatim("ECALTPGDBApp") << " retrieve the data for a given run";
193  edm::LogVerbatim("ECALTPGDBApp") << "here is the run number: " << mon_run_vec[run].getRunIOV().getRunNumber();
194  iovId = mon_run_vec[run].getID();
195 
196  fetchDataSet(&dataset, &mon_run_vec[run]);
197  }
198  return iovId;
199 }
Log< level::Info, true > LogVerbatim
void setRunTypeDef(const RunTypeDef &runTypeDef)
Definition: RunTag.cc:42
Definition: RunTag.h:13
int ii
Definition: cuy.py:589
void setGeneralTag(std::string tag)
Definition: MonRunTag.cc:21
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
void setRunTag(const RunTag &tag)
Definition: MonRunList.cc:18
MonRunList fetchMonRunListLastNRuns(const RunTag &tag, const MonRunTag &monruntag, int max_run, int n_runs) noexcept(false)
void setMonVersionDef(const MonVersionDef &ver)
Definition: MonRunTag.cc:30
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:33
std::vector< MonRunIOV > getRuns()
Definition: MonRunList.cc:32
void setRunType(std::string runtype)
Definition: RunTypeDef.cc:21
void setMonRunTag(const MonRunTag &tag)
Definition: MonRunList.cc:23
void setMonitoringVersion(std::string ver)
void setLocation(std::string loc)
Definition: LocationDef.cc:20
void setGeneralTag(std::string tag)
Definition: RunTag.cc:24
void EcalTPGDBApp::readFromConfDB_TPGPedestals ( int  iconf_req)

Definition at line 113 of file EcalTPGDBApp.cc.

References EcalCondDBInterface::fetchConfigSet(), EcalCondDBInterface::fetchDataSet(), EcalLogicID::getID2(), FEConfigPedDat::getPedMeanG1(), FEConfigPedDat::getPedMeanG12(), FEConfigPedDat::getPedMeanG6(), AlCaHLTBitMon_ParallelJobs::p, and FEConfigPedInfo::setId().

113  {
114  // now we do something else
115  // this is an example for reading the pedestals
116  // for a given config iconf_req
117 
118  // FC alternatively a config set can be retrieved by the tag and version
119 
120  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
121  edm::LogVerbatim("ECALTPGDBApp") << "test readinf fe_ped with id=" << iconf_req;
122  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
123 
124  FEConfigPedInfo fe_ped_info;
125  fe_ped_info.setId(iconf_req);
126 
127  fetchConfigSet(&fe_ped_info);
128 
129  map<EcalLogicID, FEConfigPedDat> dataset_ped;
130  fetchDataSet(&dataset_ped, &fe_ped_info);
131 
132  typedef map<EcalLogicID, FEConfigPedDat>::const_iterator CIfeped;
133  EcalLogicID ecid_xt;
134  FEConfigPedDat rd_ped;
135 
136  for (CIfeped p = dataset_ped.begin(); p != dataset_ped.end(); ++p) {
137  ecid_xt = p->first;
138  rd_ped = p->second;
139  //int sm_num=ecid_xt.getID1();
140  ecid_xt.getID2();
141  rd_ped.getPedMeanG12();
142  rd_ped.getPedMeanG6();
143  rd_ped.getPedMeanG1();
144  }
145 
146  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
147  edm::LogVerbatim("ECALTPGDBApp") << "test read done" << iconf_req;
148  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
149 }
Log< level::Info, true > LogVerbatim
float getPedMeanG1() const
void fetchConfigSet(ICONF *iconf) noexcept(false)
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
int getID2() const
Definition: EcalLogicID.cc:32
float getPedMeanG12() const
float getPedMeanG6() const
void setId(int id)
std::string EcalTPGDBApp::to_string ( char  value[])
inline

Definition at line 21 of file EcalTPGDBApp.h.

References relativeConstraints::value.

21  {
22  std::ostringstream streamOut;
23  streamOut << value;
24  return streamOut.str();
25  }
int EcalTPGDBApp::writeToConfDB_Delay ( const std::map< EcalLogicID, FEConfigTimingDat > &  delaygroupset,
std::string  tag 
)

Definition at line 387 of file EcalTPGDBApp.cc.

References FEConfigTimingInfo::getId(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), mps_fire::result, and IODConfig::setConfigTag().

Referenced by EcalTPGParamBuilder::analyze().

387  {
388  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
389  edm::LogVerbatim("ECALTPGDBApp") << "************Inserting Delays************";
390  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
391  int result = 0;
392 
393  FEConfigTimingInfo fe_time_info;
394  fe_time_info.setConfigTag(tag);
395  insertConfigSet(&fe_time_info);
396 
397  // Tm tdb = fe_fgr_info.getDBTime();
398  //tdb.dumpTm();
399 
400  // Insert the dataset
401  insertDataArraySet(&timegroupset, &fe_time_info);
402 
403  result = fe_time_info.getId();
404 
405  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
406  edm::LogVerbatim("ECALTPGDBApp") << "************Delays done******************";
407  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
408  return result;
409 }
Log< level::Info, true > LogVerbatim
tuple result
Definition: mps_fire.py:311
void insertConfigSet(ICONF *iconf) noexcept(false)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
void setConfigTag(std::string x)
Definition: IODConfig.h:29
int EcalTPGDBApp::writeToConfDB_Spike ( const std::map< EcalLogicID, FEConfigSpikeDat > &  spikegroupset,
std::string  tag 
)

Definition at line 363 of file EcalTPGDBApp.cc.

References FEConfigSpikeInfo::getId(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), mps_fire::result, and IODConfig::setConfigTag().

Referenced by EcalTPGParamBuilder::analyze().

363  {
364  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
365  edm::LogVerbatim("ECALTPGDBApp") << "************Inserting Spike************";
366  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
367  int result = 0;
368 
369  FEConfigSpikeInfo fe_spike_info;
370  fe_spike_info.setConfigTag(tag);
371  insertConfigSet(&fe_spike_info);
372 
373  // Tm tdb = fe_fgr_info.getDBTime();
374  //tdb.dumpTm();
375 
376  // Insert the dataset
377  insertDataArraySet(&spikegroupset, &fe_spike_info);
378 
379  result = fe_spike_info.getId();
380 
381  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
382  edm::LogVerbatim("ECALTPGDBApp") << "************Spike done*******************";
383  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
384  return result;
385 }
Log< level::Info, true > LogVerbatim
tuple result
Definition: mps_fire.py:311
void insertConfigSet(ICONF *iconf) noexcept(false)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
void setConfigTag(std::string x)
Definition: IODConfig.h:29
int EcalTPGDBApp::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 
)

Definition at line 324 of file EcalTPGDBApp.cc.

References FEConfigFgrInfo::getId(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigFgrInfo::setNumberOfGroups().

Referenced by EcalTPGParamBuilder::analyze().

330  {
331  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
332  edm::LogVerbatim("ECALTPGDBApp") << "************Inserting Fgr************";
333  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
334  int result = 0;
335 
336  FEConfigFgrInfo fe_fgr_info;
337  fe_fgr_info.setNumberOfGroups(iovId); // this eventually refers to some other table
338  fe_fgr_info.setConfigTag(tag);
339  insertConfigSet(&fe_fgr_info);
340 
341  // Tm tdb = fe_fgr_info.getDBTime();
342  //tdb.dumpTm();
343 
344  // Insert the dataset
345  insertDataArraySet(&fgrgroupset, &fe_fgr_info);
346  // Insert the dataset
347  insertDataArraySet(&fgrset, &fe_fgr_info);
348  // Insert the parameters
349  insertDataArraySet(&fgrparamset, &fe_fgr_info);
350  // Insert the parameters
351  insertDataArraySet(&dataset3, &fe_fgr_info);
352  // Insert the parameters
353  insertDataArraySet(&dataset4, &fe_fgr_info);
354 
355  result = fe_fgr_info.getId();
356 
357  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
358  edm::LogVerbatim("ECALTPGDBApp") << "************Fgr done*********************";
359  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
360  return result;
361 }
Log< level::Info, true > LogVerbatim
int getId() const
tuple result
Definition: mps_fire.py:311
void setNumberOfGroups(int iov_id)
void insertConfigSet(ICONF *iconf) noexcept(false)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
void setConfigTag(std::string x)
Definition: IODConfig.h:29
int EcalTPGDBApp::writeToConfDB_TPGLinearCoef ( const std::map< EcalLogicID, FEConfigLinDat > &  linset,
const std::map< EcalLogicID, FEConfigLinParamDat > &  linparamset,
int  iovId,
std::string  tag 
)

Definition at line 38 of file EcalTPGDBApp.cc.

References FEConfigLinInfo::getID(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigLinInfo::setIOVId().

Referenced by EcalTPGParamBuilder::analyze().

41  {
42  int result = 0;
43 
44  edm::LogVerbatim("ECALTPGDBApp") << "*********************************************";
45  edm::LogVerbatim("ECALTPGDBApp") << "**Inserting Linarization coeff in conf-OMDS**";
46  edm::LogVerbatim("ECALTPGDBApp") << "*********************************************";
47 
48  edm::LogVerbatim("ECALTPGDBApp") << "creating fe record ";
49  FEConfigLinInfo fe_lin_info;
50  fe_lin_info.setIOVId(iovId);
51  fe_lin_info.setConfigTag(tag);
52  insertConfigSet(&fe_lin_info);
53  result = fe_lin_info.getID();
54 
55  // Insert the dataset, identifying by iov
56  edm::LogVerbatim("ECALTPGDBApp") << "*********about to insert linearization coeff *********";
57  edm::LogVerbatim("ECALTPGDBApp") << " map size = " << linset.size();
58  insertDataArraySet(&linset, &fe_lin_info);
59  insertDataArraySet(&linparamset, &fe_lin_info);
60  edm::LogVerbatim("ECALTPGDBApp") << "*********Done lineraization coeff *********";
61 
62  return result;
63 }
Log< level::Info, true > LogVerbatim
void setIOVId(int iov_id)
tuple result
Definition: mps_fire.py:311
void insertConfigSet(ICONF *iconf) noexcept(false)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
void setConfigTag(std::string x)
Definition: IODConfig.h:29
int EcalTPGDBApp::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 
)

Definition at line 226 of file EcalTPGDBApp.cc.

References FEConfigLUTInfo::getId(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigLUTInfo::setNumberOfGroups().

Referenced by EcalTPGParamBuilder::analyze().

230  {
231  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
232  edm::LogVerbatim("ECALTPGDBApp") << "************Inserting LUT************";
233  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
234  int result = 0;
235 
236  FEConfigLUTInfo fe_lut_info;
237  fe_lut_info.setNumberOfGroups(iovId);
238  fe_lut_info.setConfigTag(tag);
239  insertConfigSet(&fe_lut_info);
240 
241  // Tm tdb = fe_lut_info.getDBTime();
242  //tdb.dumpTm();
243 
244  // Insert the dataset
245  insertDataArraySet(&lutgroupset, &fe_lut_info);
246  // Insert the dataset
247  insertDataArraySet(&lutset, &fe_lut_info);
248  // insert the parameters
249  insertDataArraySet(&lutparamset, &fe_lut_info);
250 
251  result = fe_lut_info.getId();
252 
253  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
254  edm::LogVerbatim("ECALTPGDBApp") << "************LUT done*********************";
255  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
256  return result;
257 }
Log< level::Info, true > LogVerbatim
tuple result
Definition: mps_fire.py:311
void setNumberOfGroups(int iov_id)
void insertConfigSet(ICONF *iconf) noexcept(false)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
int getId() const
void setConfigTag(std::string x)
Definition: IODConfig.h:29
int EcalTPGDBApp::writeToConfDB_TPGMain ( int  ped,
int  lin,
int  lut,
int  fgr,
int  sli,
int  wei,
int  wei2,
int  spi,
int  tim,
int  bxt,
int  btt,
int  bst,
int  cok,
std::string  tag,
int  ver 
)

Definition at line 65 of file EcalTPGDBApp.cc.

References FEConfigMainInfo::getId(), EcalCondDBInterface::insertConfigSet(), mps_fire::result, FEConfigMainInfo::setBstId(), FEConfigMainInfo::setBttId(), FEConfigMainInfo::setBxtId(), FEConfigMainInfo::setCokeId(), IODConfig::setConfigTag(), FEConfigMainInfo::setFgrId(), FEConfigMainInfo::setLinId(), FEConfigMainInfo::setLUTId(), FEConfigMainInfo::setPedId(), FEConfigMainInfo::setSliId(), FEConfigMainInfo::setSpiId(), FEConfigMainInfo::setTimId(), FEConfigMainInfo::setVersion(), FEConfigMainInfo::setWei2Id(), and FEConfigMainInfo::setWeiId().

Referenced by EcalTPGParamBuilder::analyze().

79  {
80  int result = 0;
81 
82  edm::LogVerbatim("ECALTPGDBApp") << "*********************************************";
83  edm::LogVerbatim("ECALTPGDBApp") << "**Inserting Main FE table in conf-OMDS **";
84  edm::LogVerbatim("ECALTPGDBApp") << "*********************************************";
85 
86  edm::LogVerbatim("ECALTPGDBApp") << "creating fe record ";
87 
88  FEConfigMainInfo fe_main;
89  fe_main.setPedId(ped);
90  fe_main.setLinId(lin);
91  fe_main.setLUTId(lut);
92  fe_main.setFgrId(fgr);
93  fe_main.setSliId(sli);
94  fe_main.setWeiId(wei);
95  fe_main.setWei2Id(wei2);
96  fe_main.setSpiId(spi);
97  fe_main.setTimId(tim);
98  fe_main.setBxtId(bxt);
99  fe_main.setBttId(btt);
100  fe_main.setBstId(bst);
101  fe_main.setCokeId(cok);
102  fe_main.setConfigTag(tag);
103  fe_main.setVersion(ver);
104 
105  insertConfigSet(&fe_main);
106  result = fe_main.getId();
107 
108  edm::LogVerbatim("ECALTPGDBApp") << "*********Done Main *********";
109 
110  return result;
111 }
void setSpiId(int x)
Log< level::Info, true > LogVerbatim
void setLinId(int x)
void setTimId(int x)
void setBxtId(int x)
void setVersion(int id)
tuple result
Definition: mps_fire.py:311
void setLUTId(int x)
void setFgrId(int x)
void setWei2Id(int x)
void insertConfigSet(ICONF *iconf) noexcept(false)
void setCokeId(int x)
void setPedId(int x)
int getId() const
void setWeiId(int x)
void setConfigTag(std::string x)
Definition: IODConfig.h:29
void setSliId(int x)
void setBstId(int x)
void setBttId(int x)
int EcalTPGDBApp::writeToConfDB_TPGPedestals ( const std::map< EcalLogicID, FEConfigPedDat > &  pedset,
int  iovId,
std::string  tag 
)

Definition at line 15 of file EcalTPGDBApp.cc.

References FEConfigPedInfo::getID(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigPedInfo::setIOVId().

Referenced by EcalTPGParamBuilder::analyze().

15  {
16  int result = 0;
17 
18  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
19  edm::LogVerbatim("ECALTPGDBApp") << "******** Inserting Peds in conf-OMDS*****";
20  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
21 
22  edm::LogVerbatim("ECALTPGDBApp") << "creating fe record ";
23  FEConfigPedInfo fe_ped_info;
24  fe_ped_info.setIOVId(iovId);
25  fe_ped_info.setConfigTag(tag);
26  insertConfigSet(&fe_ped_info);
27  result = fe_ped_info.getID();
28 
29  // Insert the dataset, identifying by iov
30  edm::LogVerbatim("ECALTPGDBApp") << "*********about to insert peds *********";
31  edm::LogVerbatim("ECALTPGDBApp") << " map size = " << pedset.size();
32  insertDataArraySet(&pedset, &fe_ped_info);
33  edm::LogVerbatim("ECALTPGDBApp") << "*********Done peds *********";
34 
35  return result;
36 }
Log< level::Info, true > LogVerbatim
tuple result
Definition: mps_fire.py:311
void insertConfigSet(ICONF *iconf) noexcept(false)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
void setIOVId(int iov_id)
void setConfigTag(std::string x)
Definition: IODConfig.h:29
int EcalTPGDBApp::writeToConfDB_TPGSliding ( const std::map< EcalLogicID, FEConfigSlidingDat > &  sliset,
int  iovId,
std::string  tag 
)

Definition at line 201 of file EcalTPGDBApp.cc.

References FEConfigSlidingInfo::getId(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigSlidingInfo::setIOVId().

Referenced by EcalTPGParamBuilder::analyze().

201  {
202  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
203  edm::LogVerbatim("ECALTPGDBApp") << "************Inserting SLIDING************";
204  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
205  int result = 0;
206 
207  FEConfigSlidingInfo fe_info;
208  fe_info.setIOVId(iovId);
209  fe_info.setConfigTag(tag);
210  insertConfigSet(&fe_info);
211 
212  // Tm tdb = fe_lut_info.getDBTime();
213  //tdb.dumpTm();
214 
215  // Insert the dataset
216  insertDataArraySet(&sliset, &fe_info);
217 
218  result = fe_info.getId();
219 
220  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
221  edm::LogVerbatim("ECALTPGDBApp") << "************SLI done*********************";
222  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
223  return result;
224 }
Log< level::Info, true > LogVerbatim
tuple result
Definition: mps_fire.py:311
void setIOVId(int iov_id)
void insertConfigSet(ICONF *iconf) noexcept(false)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
void setConfigTag(std::string x)
Definition: IODConfig.h:29
int EcalTPGDBApp::writeToConfDB_TPGWeight ( const std::map< EcalLogicID, FEConfigWeightGroupDat > &  lutgroup,
const std::map< EcalLogicID, FEConfigWeightDat > &  lutdat,
int  iovId,
std::string  tag 
)

Definition at line 259 of file EcalTPGDBApp.cc.

References FEConfigWeightInfo::getId(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigWeightInfo::setNumberOfGroups().

Referenced by EcalTPGParamBuilder::analyze().

262  {
263  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
264  edm::LogVerbatim("ECALTPGDBApp") << "************Inserting weights************";
265  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
266 
267  int result = 0;
268 
269  FEConfigWeightInfo fe_wei_info;
270  fe_wei_info.setNumberOfGroups(ngr);
271  fe_wei_info.setConfigTag(tag);
272  insertConfigSet(&fe_wei_info);
273 
274  // Tm tdb = fe_lut_info.getDBTime();
275  //tdb.dumpTm();
276 
277  // Insert the dataset
278  insertDataArraySet(&lutgroupset, &fe_wei_info);
279  // Insert the dataset
280  insertDataArraySet(&lutset, &fe_wei_info);
281 
282  result = fe_wei_info.getId();
283 
284  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
285  edm::LogVerbatim("ECALTPGDBApp") << "************WEIGHT done******************";
286  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
287  return result;
288 }
Log< level::Info, true > LogVerbatim
tuple result
Definition: mps_fire.py:311
void insertConfigSet(ICONF *iconf) noexcept(false)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
void setConfigTag(std::string x)
Definition: IODConfig.h:29
void setNumberOfGroups(int n)
int EcalTPGDBApp::writeToConfDB_TPGWeight_doubleWeights ( const std::map< EcalLogicID, FEConfigOddWeightGroupDat > &  lutgroupset,
const std::map< EcalLogicID, FEConfigOddWeightDat > &  lutset,
const std::map< EcalLogicID, FEConfigOddWeightModeDat > &  tpmode,
int  ngr,
std::string  tag 
)

Definition at line 290 of file EcalTPGDBApp.cc.

References FEConfigOddWeightInfo::getId(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), EcalCondDBInterface::insertDataSet(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigOddWeightInfo::setNumberOfGroups().

Referenced by EcalTPGParamBuilder::analyze().

294  {
295  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
296  edm::LogVerbatim("ECALTPGDBApp") << "************Inserting odd weights************";
297  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
298 
299  int result = 0;
300 
301  FEConfigOddWeightInfo fe_wei_info;
302  fe_wei_info.setNumberOfGroups(ngr);
303  fe_wei_info.setConfigTag(tag);
304  insertConfigSet(&fe_wei_info);
305 
306  // Tm tdb = fe_lut_info.getDBTime();
307  //tdb.dumpTm();
308 
309  // Insert the dataset
310  insertDataArraySet(&lutgroupset, &fe_wei_info);
311  // Insert the dataset
312  insertDataArraySet(&lutset, &fe_wei_info);
313  // Insert the Tpmode
314  insertDataSet(&tpmode, &fe_wei_info);
315 
316  result = fe_wei_info.getId();
317 
318  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
319  edm::LogVerbatim("ECALTPGDBApp") << "************ODD WEIGHT + TPmode done******************";
320  edm::LogVerbatim("ECALTPGDBApp") << "*****************************************";
321  return result;
322 }
Log< level::Info, true > LogVerbatim
tuple result
Definition: mps_fire.py:311
void insertConfigSet(ICONF *iconf) noexcept(false)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
void setConfigTag(std::string x)
Definition: IODConfig.h:29
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)

Member Data Documentation

uint64_t EcalTPGDBApp::endmicros
private

Definition at line 79 of file EcalTPGDBApp.h.

run_t EcalTPGDBApp::endrun
private

Definition at line 81 of file EcalTPGDBApp.h.

uint64_t EcalTPGDBApp::startmicros
private

Definition at line 78 of file EcalTPGDBApp.h.

run_t EcalTPGDBApp::startrun
private

Definition at line 80 of file EcalTPGDBApp.h.