CMS 3D CMS Logo

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 spi, int tim, int bxt, int btt, int bst, 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)
 
- 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)
 
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 394 of file EcalTPGDBApp.cc.

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

395 {
396  cout << endl;
397  cout << "=============RunIOV:" << endl;
398  RunTag tag = iov->getRunTag();
399  printTag(&tag);
400  cout << "Run Number: " << iov->getRunNumber() << endl;
401  cout << "Run Start: " << iov->getRunStart().str() << endl;
402  cout << "Run End: " << iov->getRunEnd().str() << endl;
403  cout << "====================" << endl;
404 }
Definition: RunTag.h:13
RunTag getRunTag() const
Definition: RunIOV.cc:96
Tm getRunStart() const
Definition: RunIOV.cc:62
Tm getRunEnd() const
Definition: RunIOV.cc:79
run_t getRunNumber() const
Definition: RunIOV.cc:45
std::string str() const
Definition: Tm.cc:89
void printTag(const RunTag *tag) const
void EcalTPGDBApp::printTag ( const RunTag tag) const
private

Definition at line 384 of file EcalTPGDBApp.cc.

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

385 {
386  cout << endl;
387  cout << "=============RunTag:" << endl;
388  cout << "GeneralTag: " << tag->getGeneralTag() << endl;
389  cout << "Location: " << tag->getLocationDef().getLocation() << endl;
390  cout << "Run Type: " << tag->getRunTypeDef().getRunType() << endl;
391  cout << "====================" << endl;
392 }
LocationDef getLocationDef() const
Definition: RunTag.cc:46
std::string getGeneralTag() const
Definition: RunTag.cc:27
std::string getRunType() const
Definition: RunTypeDef.cc:26
std::string getLocation() const
Definition: LocationDef.cc:26
RunTypeDef getRunTypeDef() const
Definition: RunTag.cc:63
int EcalTPGDBApp::readFromCondDB_Pedestals ( std::map< EcalLogicID, MonPedestalsDat > &  pedset,
int  runNb 
)

Definition at line 142 of file EcalTPGDBApp.cc.

References gather_cfg::cout, MonRunList::getRuns(), cuy::ii, createfilelist::int, findQualityFiles::run, RunTag::setGeneralTag(), MonRunTag::setGeneralTag(), LocationDef::setLocation(), RunTag::setLocationDef(), MonVersionDef::setMonitoringVersion(), MonRunList::setMonRunTag(), MonRunTag::setMonVersionDef(), MonRunList::setRunTag(), RunTypeDef::setRunType(), and RunTag::setRunTypeDef().

Referenced by to_string().

142  {
143 
144 
145  int iovId = 0 ;
146 
147  cout << "Retrieving run list from DB from run nb ... "<< runNb << endl;
148  RunTag my_runtag;
149  LocationDef my_locdef;
150  RunTypeDef my_rundef;
151  my_locdef.setLocation("P5_Co");
152  my_rundef.setRunType("PEDESTAL");
153  my_runtag.setLocationDef(my_locdef);
154  my_runtag.setRunTypeDef(my_rundef);
155  my_runtag.setGeneralTag("LOCAL");
156 
157  // here we retrieve the Monitoring results
158  MonVersionDef monverdef;
159  monverdef.setMonitoringVersion("test01");
160  MonRunTag montag;
161  montag.setMonVersionDef(monverdef);
162  montag.setGeneralTag("CMSSW");
163 
164  MonRunList mon_list;
165  mon_list.setMonRunTag(montag);
166  mon_list.setRunTag(my_runtag);
167 
168  std::cout<<"we are in read ped from condDB and runNb is "<< runNb<<endl;
169 
170  mon_list = fetchMonRunListLastNRuns(my_runtag, montag, runNb , 10 );
171 
172  std::cout<<"we are in read ped from condDB"<<endl;
173 
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();
177  //int sm_num = 0;
178 
179  if(mon_runs>0) {
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;
181 
182  // for the first run of the list we retrieve the pedestals
183  int run=0;
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();
187 
188  fetchDataSet(&dataset, &mon_run_vec[run]) ;
189  }
190  return iovId ;
191 }
void setRunTypeDef(const RunTypeDef &runTypeDef)
Definition: RunTag.cc:70
Definition: RunTag.h:13
void setGeneralTag(std::string tag)
Definition: MonRunTag.cc:33
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
void setRunTag(const RunTag &tag)
Definition: MonRunList.cc:23
MonRunList fetchMonRunListLastNRuns(const RunTag &tag, const MonRunTag &monruntag, int max_run, int n_runs) noexcept(false)
void setMonVersionDef(const MonVersionDef &ver)
Definition: MonRunTag.cc:49
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:53
ii
Definition: cuy.py:588
std::vector< MonRunIOV > getRuns()
Definition: MonRunList.cc:46
void setRunType(std::string runtype)
Definition: RunTypeDef.cc:33
void setMonRunTag(const MonRunTag &tag)
Definition: MonRunList.cc:29
void setMonitoringVersion(std::string ver)
void setLocation(std::string loc)
Definition: LocationDef.cc:33
void setGeneralTag(std::string tag)
Definition: RunTag.cc:36
void EcalTPGDBApp::readFromConfDB_TPGPedestals ( int  iconf_req)

Definition at line 102 of file EcalTPGDBApp.cc.

References gather_cfg::cout, EcalLogicID::getID2(), FEConfigPedDat::getPedMeanG1(), FEConfigPedDat::getPedMeanG12(), FEConfigPedDat::getPedMeanG6(), AlCaHLTBitMon_ParallelJobs::p, and FEConfigPedInfo::setId().

Referenced by to_string().

102  {
103  // now we do something else
104  // this is an example for reading the pedestals
105  // for a given config iconf_req
106 
107  // FC alternatively a config set can be retrieved by the tag and version
108 
109  cout << "*****************************************" << endl;
110  cout << "test readinf fe_ped with id="<<iconf_req << endl;
111  cout << "*****************************************" << endl;
112 
113  FEConfigPedInfo fe_ped_info;
114  fe_ped_info.setId(iconf_req);
115 
116  fetchConfigSet(&fe_ped_info);
117 
118  map<EcalLogicID, FEConfigPedDat> dataset_ped;
119  fetchDataSet(&dataset_ped, &fe_ped_info);
120 
121  typedef map<EcalLogicID, FEConfigPedDat>::const_iterator CIfeped;
122  EcalLogicID ecid_xt;
123  FEConfigPedDat rd_ped;
124 
125  for (CIfeped p = dataset_ped.begin(); p != dataset_ped.end(); ++p) {
126  ecid_xt = p->first;
127  rd_ped = p->second;
128  //int sm_num=ecid_xt.getID1();
129  ecid_xt.getID2();
130  rd_ped.getPedMeanG12();
131  rd_ped.getPedMeanG6();
132  rd_ped.getPedMeanG1();
133  }
134 
135  cout << "*****************************************" << endl;
136  cout << "test read done"<<iconf_req << endl;
137  cout << "*****************************************" << endl;
138 
139 }
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:51
float getPedMeanG12() const
float getPedMeanG6() const
void setId(int id)
std::string EcalTPGDBApp::to_string ( char  value[])
inline
int EcalTPGDBApp::writeToConfDB_Delay ( const std::map< EcalLogicID, FEConfigTimingDat > &  delaygroupset,
std::string  tag 
)

Definition at line 355 of file EcalTPGDBApp.cc.

References gather_cfg::cout, FEConfigTimingInfo::getId(), mps_fire::result, and IODConfig::setConfigTag().

Referenced by EcalTPGParamBuilder::analyze(), and to_string().

357 {
358  cout << "*****************************************" << endl;
359  cout << "************Inserting Delays************" << endl;
360  cout << "*****************************************" << endl;
361  int result=0;
362 
363  FEConfigTimingInfo fe_time_info ;
364  fe_time_info.setConfigTag(tag);
365  insertConfigSet(&fe_time_info);
366 
367  // Tm tdb = fe_fgr_info.getDBTime();
368  //tdb.dumpTm();
369 
370  // Insert the dataset
371  insertDataArraySet(&timegroupset, &fe_time_info);
372 
373  result=fe_time_info.getId();
374 
375  cout << "*****************************************" << endl;
376  cout << "************Delays done******************" << endl;
377  cout << "*****************************************" << endl;
378  return result;
379 
380 }
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:31
int EcalTPGDBApp::writeToConfDB_Spike ( const std::map< EcalLogicID, FEConfigSpikeDat > &  spikegroupset,
std::string  tag 
)

Definition at line 328 of file EcalTPGDBApp.cc.

References gather_cfg::cout, FEConfigSpikeInfo::getId(), mps_fire::result, and IODConfig::setConfigTag().

Referenced by EcalTPGParamBuilder::analyze(), and to_string().

330 {
331  cout << "*****************************************" << endl;
332  cout << "************Inserting Spike************" << endl;
333  cout << "*****************************************" << endl;
334  int result=0;
335 
336  FEConfigSpikeInfo fe_spike_info ;
337  fe_spike_info.setConfigTag(tag);
338  insertConfigSet(&fe_spike_info);
339 
340  // Tm tdb = fe_fgr_info.getDBTime();
341  //tdb.dumpTm();
342 
343  // Insert the dataset
344  insertDataArraySet(&spikegroupset, &fe_spike_info);
345 
346  result=fe_spike_info.getId();
347 
348  cout << "*****************************************" << endl;
349  cout << "************Spike done*******************" << endl;
350  cout << "*****************************************" << endl;
351  return result;
352 
353 }
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:31
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 288 of file EcalTPGDBApp.cc.

References gather_cfg::cout, FEConfigFgrInfo::getId(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigFgrInfo::setNumberOfGroups().

Referenced by EcalTPGParamBuilder::analyze(), and to_string().

294 {
295  cout << "*****************************************" << endl;
296  cout << "************Inserting Fgr************" << endl;
297  cout << "*****************************************" << endl;
298  int result=0;
299 
300  FEConfigFgrInfo fe_fgr_info ;
301  fe_fgr_info.setNumberOfGroups(iovId); // this eventually refers to some other table
302  fe_fgr_info.setConfigTag(tag);
303  insertConfigSet(&fe_fgr_info);
304 
305  // Tm tdb = fe_fgr_info.getDBTime();
306  //tdb.dumpTm();
307 
308  // Insert the dataset
309  insertDataArraySet(&fgrgroupset, &fe_fgr_info);
310  // Insert the dataset
311  insertDataArraySet(&fgrset, &fe_fgr_info);
312  // Insert the parameters
313  insertDataArraySet(&fgrparamset, &fe_fgr_info);
314  // Insert the parameters
315  insertDataArraySet(&dataset3, &fe_fgr_info);
316  // Insert the parameters
317  insertDataArraySet(&dataset4, &fe_fgr_info);
318 
319  result=fe_fgr_info.getId();
320 
321  cout << "*****************************************" << endl;
322  cout << "************Fgr done*********************" << endl;
323  cout << "*****************************************" << endl;
324  return result;
325 
326 }
int getId() const
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:31
int EcalTPGDBApp::writeToConfDB_TPGLinearCoef ( const std::map< EcalLogicID, FEConfigLinDat > &  linset,
const std::map< EcalLogicID, FEConfigLinParamDat > &  linparamset,
int  iovId,
std::string  tag 
)

Definition at line 42 of file EcalTPGDBApp.cc.

References gather_cfg::cout, FEConfigLinInfo::getID(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigLinInfo::setIOVId().

Referenced by EcalTPGParamBuilder::analyze(), and to_string().

43  {
44 
45  int result=0;
46 
47  cout << "*********************************************" << endl;
48  cout << "**Inserting Linarization coeff in conf-OMDS**" << endl;
49  cout << "*********************************************" << endl;
50 
51  cout << "creating fe record " <<endl;
52  FEConfigLinInfo fe_lin_info ;
53  fe_lin_info.setIOVId(iovId) ;
54  fe_lin_info.setConfigTag(tag) ;
55  insertConfigSet(&fe_lin_info) ;
56  result = fe_lin_info.getID() ;
57 
58  // Insert the dataset, identifying by iov
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;
64 
65  return result;
66 }
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:31
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 222 of file EcalTPGDBApp.cc.

References gather_cfg::cout, FEConfigLUTInfo::getId(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigLUTInfo::setNumberOfGroups().

Referenced by EcalTPGParamBuilder::analyze(), and to_string().

225 {
226  cout << "*****************************************" << endl;
227  cout << "************Inserting LUT************" << endl;
228  cout << "*****************************************" << endl;
229  int result=0;
230 
231  FEConfigLUTInfo fe_lut_info ;
232  fe_lut_info.setNumberOfGroups(iovId);
233  fe_lut_info.setConfigTag(tag);
234  insertConfigSet(&fe_lut_info);
235 
236  // Tm tdb = fe_lut_info.getDBTime();
237  //tdb.dumpTm();
238 
239  // Insert the dataset
240  insertDataArraySet(&lutgroupset, &fe_lut_info);
241  // Insert the dataset
242  insertDataArraySet(&lutset, &fe_lut_info);
243  // insert the parameters
244  insertDataArraySet(&lutparamset, &fe_lut_info);
245 
246  result=fe_lut_info.getId();
247 
248  cout << "*****************************************" << endl;
249  cout << "************LUT done*********************" << endl;
250  cout << "*****************************************" << endl;
251  return result;
252 
253 }
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:31
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,
std::string  tag,
int  ver 
)

Definition at line 68 of file EcalTPGDBApp.cc.

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

Referenced by EcalTPGParamBuilder::analyze(), and to_string().

68  {
69 
70  int result=0;
71 
72  cout << "*********************************************" << endl;
73  cout << "**Inserting Main FE table in conf-OMDS **" << endl;
74  cout << "*********************************************" << endl;
75 
76  cout << "creating fe record " <<endl;
77 
78  FEConfigMainInfo fe_main ;
79  fe_main.setPedId(ped) ;
80  fe_main.setLinId(lin) ;
81  fe_main.setLUTId(lut) ;
82  fe_main.setFgrId(fgr) ;
83  fe_main.setSliId(sli) ;
84  fe_main.setWeiId(wei) ;
85  fe_main.setSpiId(spi) ;
86  fe_main.setTimId(tim) ;
87  fe_main.setBxtId(bxt) ;
88  fe_main.setBttId(btt) ;
89  fe_main.setBstId(bst) ;
90  fe_main.setConfigTag(tag) ;
91  fe_main.setVersion(ver) ;
92 
93  insertConfigSet(&fe_main) ;
94  result = fe_main.getId() ;
95 
96  cout << "*********Done Main *********" << endl;
97 
98  return result;
99 }
void setSpiId(int x)
void setLinId(int x)
void setTimId(int x)
void setBxtId(int x)
void setVersion(int id)
void setLUTId(int x)
void setFgrId(int x)
void insertConfigSet(ICONF *iconf) noexcept(false)
void setPedId(int x)
int getId() const
void setWeiId(int x)
void setConfigTag(std::string x)
Definition: IODConfig.h:31
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 17 of file EcalTPGDBApp.cc.

References gather_cfg::cout, FEConfigPedInfo::getID(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigPedInfo::setIOVId().

Referenced by EcalTPGParamBuilder::analyze(), and to_string().

17  {
18 
19  int result=0;
20 
21  cout << "*****************************************" << endl;
22  cout << "******** Inserting Peds in conf-OMDS*****" << endl;
23  cout << "*****************************************" << endl;
24 
25  cout << "creating fe record " <<endl;
26  FEConfigPedInfo fe_ped_info ;
27  fe_ped_info.setIOVId(iovId) ;
28  fe_ped_info.setConfigTag(tag) ;
29  insertConfigSet(&fe_ped_info) ;
30  result = fe_ped_info.getID() ;
31 
32 
33  // Insert the dataset, identifying by iov
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;
38 
39  return result;
40 }
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:31
int EcalTPGDBApp::writeToConfDB_TPGSliding ( const std::map< EcalLogicID, FEConfigSlidingDat > &  sliset,
int  iovId,
std::string  tag 
)

Definition at line 194 of file EcalTPGDBApp.cc.

References gather_cfg::cout, FEConfigSlidingInfo::getId(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigSlidingInfo::setIOVId().

Referenced by EcalTPGParamBuilder::analyze(), and to_string().

195 {
196  cout << "*****************************************" << endl;
197  cout << "************Inserting SLIDING************" << endl;
198  cout << "*****************************************" << endl;
199  int result=0;
200 
201  FEConfigSlidingInfo fe_info ;
202  fe_info.setIOVId(iovId);
203  fe_info.setConfigTag(tag);
204  insertConfigSet(&fe_info);
205 
206  // Tm tdb = fe_lut_info.getDBTime();
207  //tdb.dumpTm();
208 
209  // Insert the dataset
210  insertDataArraySet(&sliset, &fe_info);
211 
212  result=fe_info.getId();
213 
214  cout << "*****************************************" << endl;
215  cout << "************SLI done*********************" << endl;
216  cout << "*****************************************" << endl;
217  return result;
218 
219 }
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:31
int EcalTPGDBApp::writeToConfDB_TPGWeight ( const std::map< EcalLogicID, FEConfigWeightGroupDat > &  lutgroup,
const std::map< EcalLogicID, FEConfigWeightDat > &  lutdat,
int  iovId,
std::string  tag 
)

Definition at line 255 of file EcalTPGDBApp.cc.

References gather_cfg::cout, FEConfigWeightInfo::getId(), mps_fire::result, IODConfig::setConfigTag(), and FEConfigWeightInfo::setNumberOfGroups().

Referenced by EcalTPGParamBuilder::analyze(), and to_string().

257 {
258  cout << "*****************************************" << endl;
259  cout << "************Inserting weights************" << endl;
260  cout << "*****************************************" << endl;
261 
262  int result=0;
263 
264  FEConfigWeightInfo fe_wei_info ;
265  fe_wei_info.setNumberOfGroups(5); // this eventually refers to some other table
266  fe_wei_info.setConfigTag(tag);
267  insertConfigSet(&fe_wei_info);
268 
269  // Tm tdb = fe_lut_info.getDBTime();
270  //tdb.dumpTm();
271 
272  // Insert the dataset
273  insertDataArraySet(&lutgroupset, &fe_wei_info);
274  // Insert the dataset
275  insertDataArraySet(&lutset, &fe_wei_info);
276 
277  result=fe_wei_info.getId();
278 
279  cout << "*****************************************" << endl;
280  cout << "************WEIGHT done******************" << endl;
281  cout << "*****************************************" << endl;
282  return result;
283 
284 
285 }
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:31
void setNumberOfGroups(int n)

Member Data Documentation

uint64_t EcalTPGDBApp::endmicros
private

Definition at line 54 of file EcalTPGDBApp.h.

run_t EcalTPGDBApp::endrun
private

Definition at line 56 of file EcalTPGDBApp.h.

uint64_t EcalTPGDBApp::startmicros
private

Definition at line 53 of file EcalTPGDBApp.h.

run_t EcalTPGDBApp::startrun
private

Definition at line 55 of file EcalTPGDBApp.h.