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
 
bool fetchLMFRunIOV (const LMFSeqDat &, LMFRunIOV &, int lmr, int type, int color) const
 
LMFRunIOV fetchLMFRunIOV (RunTag *runtag, LMFRunTag *lmftag, run_t run, subrun_t lmfrun) noexcept(false)
 
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, const Tm &t) noexcept(false)
 
RunIOV fetchRunIOV (std::string location, run_t run) 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 (int logicID) noexcept(false)
 
EcalLogicID getEcalLogicID (std::string name, int id1=EcalLogicID::NULLID, int id2=EcalLogicID::NULLID, int id3=EcalLogicID::NULLID, std::string mapsTo="") noexcept(false)
 
std::map< int, int > getEcalLogicID2LmrMap ()
 
std::vector< EcalLogicIDgetEcalLogicIDForLMPN (const EcalLogicID &lmr_logic_id)
 
std::vector< EcalLogicIDgetEcalLogicIDForLMPN (int lmr_logic_id)
 
std::vector< EcalLogicIDgetEcalLogicIDForLMR (const EcalLogicID &lmr_logic_id)
 
std::vector< EcalLogicIDgetEcalLogicIDForLMR (int 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() [1/2]

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

◆ EcalTPGDBApp() [2/2]

EcalTPGDBApp::EcalTPGDBApp ( std::string  sid,
std::string  user,
std::string  pass 
)

Member Function Documentation

◆ printIOV()

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

Definition at line 381 of file EcalTPGDBApp.cc.

381  {
382  cout << endl;
383  cout << "=============RunIOV:" << endl;
384  RunTag tag = iov->getRunTag();
385  printTag(&tag);
386  cout << "Run Number: " << iov->getRunNumber() << endl;
387  cout << "Run Start: " << iov->getRunStart().str() << endl;
388  cout << "Run End: " << iov->getRunEnd().str() << endl;
389  cout << "====================" << endl;
390 }

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

◆ printTag()

void EcalTPGDBApp::printTag ( const RunTag tag) const
private

Definition at line 372 of file EcalTPGDBApp.cc.

372  {
373  cout << endl;
374  cout << "=============RunTag:" << endl;
375  cout << "GeneralTag: " << tag->getGeneralTag() << endl;
376  cout << "Location: " << tag->getLocationDef().getLocation() << endl;
377  cout << "Run Type: " << tag->getRunTypeDef().getRunType() << endl;
378  cout << "====================" << endl;
379 }

References gather_cfg::cout, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by printIOV().

◆ readFromCondDB_Pedestals()

int EcalTPGDBApp::readFromCondDB_Pedestals ( std::map< EcalLogicID, MonPedestalsDat > &  pedset,
int  runNb 
)

Definition at line 146 of file EcalTPGDBApp.cc.

146  {
147  int iovId = 0;
148 
149  cout << "Retrieving run list from DB from run nb ... " << runNb << endl;
150  RunTag my_runtag;
153  my_locdef.setLocation("P5_Co");
154  my_rundef.setRunType("PEDESTAL");
155  my_runtag.setLocationDef(my_locdef);
156  my_runtag.setRunTypeDef(my_rundef);
157  my_runtag.setGeneralTag("LOCAL");
158 
159  // here we retrieve the Monitoring results
160  MonVersionDef monverdef;
161  monverdef.setMonitoringVersion("test01");
162  MonRunTag montag;
163  montag.setMonVersionDef(monverdef);
164  montag.setGeneralTag("CMSSW");
165 
166  MonRunList mon_list;
167  mon_list.setMonRunTag(montag);
168  mon_list.setRunTag(my_runtag);
169 
170  std::cout << "we are in read ped from condDB and runNb is " << runNb << endl;
171 
172  mon_list = fetchMonRunListLastNRuns(my_runtag, montag, runNb, 10);
173 
174  std::cout << "we are in read ped from condDB" << endl;
175 
176  std::vector<MonRunIOV> mon_run_vec = mon_list.getRuns();
177  cout << "number of ped runs is : " << mon_run_vec.size() << endl;
178  int mon_runs = mon_run_vec.size();
179  //int sm_num = 0;
180 
181  if (mon_runs > 0) {
182  for (int ii = 0; ii < (int)mon_run_vec.size(); ii++)
183  cout << "here is the run number: " << mon_run_vec[ii].getRunIOV().getRunNumber() << endl;
184 
185  // for the first run of the list we retrieve the pedestals
186  int run = 0;
187  cout << " retrieve the data for a given run" << endl;
188  cout << "here is the run number: " << mon_run_vec[run].getRunIOV().getRunNumber() << endl;
189  iovId = mon_run_vec[run].getID();
190 
191  fetchDataSet(&dataset, &mon_run_vec[run]);
192  }
193  return iovId;
194 }

References gather_cfg::cout, EcalCondDBInterface::fetchDataSet(), EcalCondDBInterface::fetchMonRunListLastNRuns(), MonRunList::getRuns(), cuy::ii, createfilelist::int, test_db_connect::my_locdef, test_db_connect::my_rundef, writedatasetfile::run, MonRunTag::setGeneralTag(), RunTag::setGeneralTag(), RunTag::setLocationDef(), MonVersionDef::setMonitoringVersion(), MonRunList::setMonRunTag(), MonRunTag::setMonVersionDef(), MonRunList::setRunTag(), and RunTag::setRunTypeDef().

◆ readFromConfDB_TPGPedestals()

void EcalTPGDBApp::readFromConfDB_TPGPedestals ( int  iconf_req)

Definition at line 108 of file EcalTPGDBApp.cc.

108  {
109  // now we do something else
110  // this is an example for reading the pedestals
111  // for a given config iconf_req
112 
113  // FC alternatively a config set can be retrieved by the tag and version
114 
115  cout << "*****************************************" << endl;
116  cout << "test readinf fe_ped with id=" << iconf_req << endl;
117  cout << "*****************************************" << endl;
118 
119  FEConfigPedInfo fe_ped_info;
120  fe_ped_info.setId(iconf_req);
121 
122  fetchConfigSet(&fe_ped_info);
123 
124  map<EcalLogicID, FEConfigPedDat> dataset_ped;
125  fetchDataSet(&dataset_ped, &fe_ped_info);
126 
127  typedef map<EcalLogicID, FEConfigPedDat>::const_iterator CIfeped;
128  EcalLogicID ecid_xt;
129  FEConfigPedDat rd_ped;
130 
131  for (CIfeped p = dataset_ped.begin(); p != dataset_ped.end(); ++p) {
132  ecid_xt = p->first;
133  rd_ped = p->second;
134  //int sm_num=ecid_xt.getID1();
135  ecid_xt.getID2();
136  rd_ped.getPedMeanG12();
137  rd_ped.getPedMeanG6();
138  rd_ped.getPedMeanG1();
139  }
140 
141  cout << "*****************************************" << endl;
142  cout << "test read done" << iconf_req << endl;
143  cout << "*****************************************" << endl;
144 }

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

◆ to_string()

std::string EcalTPGDBApp::to_string ( char  value[])
inline

Definition at line 21 of file EcalTPGDBApp.h.

21  {
22  std::ostringstream streamOut;
23  streamOut << value;
24  return streamOut.str();
25  }

References relativeConstraints::value.

◆ writeToConfDB_Delay()

int EcalTPGDBApp::writeToConfDB_Delay ( const std::map< EcalLogicID, FEConfigTimingDat > &  delaygroupset,
std::string  tag 
)

Definition at line 348 of file EcalTPGDBApp.cc.

348  {
349  cout << "*****************************************" << endl;
350  cout << "************Inserting Delays************" << endl;
351  cout << "*****************************************" << endl;
352  int result = 0;
353 
354  FEConfigTimingInfo fe_time_info;
355  fe_time_info.setConfigTag(tag);
356  insertConfigSet(&fe_time_info);
357 
358  // Tm tdb = fe_fgr_info.getDBTime();
359  //tdb.dumpTm();
360 
361  // Insert the dataset
362  insertDataArraySet(&timegroupset, &fe_time_info);
363 
364  result = fe_time_info.getId();
365 
366  cout << "*****************************************" << endl;
367  cout << "************Delays done******************" << endl;
368  cout << "*****************************************" << endl;
369  return result;
370 }

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

Referenced by EcalTPGParamBuilder::analyze().

◆ writeToConfDB_Spike()

int EcalTPGDBApp::writeToConfDB_Spike ( const std::map< EcalLogicID, FEConfigSpikeDat > &  spikegroupset,
std::string  tag 
)

Definition at line 324 of file EcalTPGDBApp.cc.

324  {
325  cout << "*****************************************" << endl;
326  cout << "************Inserting Spike************" << endl;
327  cout << "*****************************************" << endl;
328  int result = 0;
329 
330  FEConfigSpikeInfo fe_spike_info;
331  fe_spike_info.setConfigTag(tag);
332  insertConfigSet(&fe_spike_info);
333 
334  // Tm tdb = fe_fgr_info.getDBTime();
335  //tdb.dumpTm();
336 
337  // Insert the dataset
338  insertDataArraySet(&spikegroupset, &fe_spike_info);
339 
340  result = fe_spike_info.getId();
341 
342  cout << "*****************************************" << endl;
343  cout << "************Spike done*******************" << endl;
344  cout << "*****************************************" << endl;
345  return result;
346 }

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

Referenced by EcalTPGParamBuilder::analyze().

◆ writeToConfDB_TPGFgr()

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 285 of file EcalTPGDBApp.cc.

291  {
292  cout << "*****************************************" << endl;
293  cout << "************Inserting Fgr************" << endl;
294  cout << "*****************************************" << endl;
295  int result = 0;
296 
297  FEConfigFgrInfo fe_fgr_info;
298  fe_fgr_info.setNumberOfGroups(iovId); // this eventually refers to some other table
299  fe_fgr_info.setConfigTag(tag);
300  insertConfigSet(&fe_fgr_info);
301 
302  // Tm tdb = fe_fgr_info.getDBTime();
303  //tdb.dumpTm();
304 
305  // Insert the dataset
306  insertDataArraySet(&fgrgroupset, &fe_fgr_info);
307  // Insert the dataset
308  insertDataArraySet(&fgrset, &fe_fgr_info);
309  // Insert the parameters
310  insertDataArraySet(&fgrparamset, &fe_fgr_info);
311  // Insert the parameters
312  insertDataArraySet(&dataset3, &fe_fgr_info);
313  // Insert the parameters
314  insertDataArraySet(&dataset4, &fe_fgr_info);
315 
316  result = fe_fgr_info.getId();
317 
318  cout << "*****************************************" << endl;
319  cout << "************Fgr done*********************" << endl;
320  cout << "*****************************************" << endl;
321  return result;
322 }

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

Referenced by EcalTPGParamBuilder::analyze().

◆ writeToConfDB_TPGLinearCoef()

int EcalTPGDBApp::writeToConfDB_TPGLinearCoef ( const std::map< EcalLogicID, FEConfigLinDat > &  linset,
const std::map< EcalLogicID, FEConfigLinParamDat > &  linparamset,
int  iovId,
std::string  tag 
)

Definition at line 37 of file EcalTPGDBApp.cc.

40  {
41  int result = 0;
42 
43  cout << "*********************************************" << endl;
44  cout << "**Inserting Linarization coeff in conf-OMDS**" << endl;
45  cout << "*********************************************" << endl;
46 
47  cout << "creating fe record " << endl;
48  FEConfigLinInfo fe_lin_info;
49  fe_lin_info.setIOVId(iovId);
50  fe_lin_info.setConfigTag(tag);
51  insertConfigSet(&fe_lin_info);
52  result = fe_lin_info.getID();
53 
54  // Insert the dataset, identifying by iov
55  cout << "*********about to insert linearization coeff *********" << endl;
56  cout << " map size = " << linset.size() << endl;
57  insertDataArraySet(&linset, &fe_lin_info);
58  insertDataArraySet(&linparamset, &fe_lin_info);
59  cout << "*********Done lineraization coeff *********" << endl;
60 
61  return result;
62 }

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

Referenced by EcalTPGParamBuilder::analyze().

◆ writeToConfDB_TPGLUT()

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 221 of file EcalTPGDBApp.cc.

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 }

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

Referenced by EcalTPGParamBuilder::analyze().

◆ writeToConfDB_TPGMain()

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 64 of file EcalTPGDBApp.cc.

76  {
77  int result = 0;
78 
79  cout << "*********************************************" << endl;
80  cout << "**Inserting Main FE table in conf-OMDS **" << endl;
81  cout << "*********************************************" << endl;
82 
83  cout << "creating fe record " << endl;
84 
85  FEConfigMainInfo fe_main;
86  fe_main.setPedId(ped);
87  fe_main.setLinId(lin);
88  fe_main.setLUTId(lut);
89  fe_main.setFgrId(fgr);
90  fe_main.setSliId(sli);
91  fe_main.setWeiId(wei);
92  fe_main.setSpiId(spi);
93  fe_main.setTimId(tim);
94  fe_main.setBxtId(bxt);
95  fe_main.setBttId(btt);
96  fe_main.setBstId(bst);
97  fe_main.setConfigTag(tag);
98  fe_main.setVersion(ver);
99 
100  insertConfigSet(&fe_main);
101  result = fe_main.getId();
102 
103  cout << "*********Done Main *********" << endl;
104 
105  return result;
106 }

References gather_cfg::cout, FEConfigMainInfo::getId(), EcalCondDBInterface::insertConfigSet(), 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(), FEConfigMainInfo::setWeiId(), and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by EcalTPGParamBuilder::analyze().

◆ writeToConfDB_TPGPedestals()

int EcalTPGDBApp::writeToConfDB_TPGPedestals ( const std::map< EcalLogicID, FEConfigPedDat > &  pedset,
int  iovId,
std::string  tag 
)

Definition at line 14 of file EcalTPGDBApp.cc.

14  {
15  int result = 0;
16 
17  cout << "*****************************************" << endl;
18  cout << "******** Inserting Peds in conf-OMDS*****" << endl;
19  cout << "*****************************************" << endl;
20 
21  cout << "creating fe record " << endl;
22  FEConfigPedInfo fe_ped_info;
23  fe_ped_info.setIOVId(iovId);
24  fe_ped_info.setConfigTag(tag);
25  insertConfigSet(&fe_ped_info);
26  result = fe_ped_info.getID();
27 
28  // Insert the dataset, identifying by iov
29  cout << "*********about to insert peds *********" << endl;
30  cout << " map size = " << pedset.size() << endl;
31  insertDataArraySet(&pedset, &fe_ped_info);
32  cout << "*********Done peds *********" << endl;
33 
34  return result;
35 }

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

Referenced by EcalTPGParamBuilder::analyze().

◆ writeToConfDB_TPGSliding()

int EcalTPGDBApp::writeToConfDB_TPGSliding ( const std::map< EcalLogicID, FEConfigSlidingDat > &  sliset,
int  iovId,
std::string  tag 
)

Definition at line 196 of file EcalTPGDBApp.cc.

196  {
197  cout << "*****************************************" << endl;
198  cout << "************Inserting SLIDING************" << endl;
199  cout << "*****************************************" << endl;
200  int result = 0;
201 
202  FEConfigSlidingInfo fe_info;
203  fe_info.setIOVId(iovId);
204  fe_info.setConfigTag(tag);
205  insertConfigSet(&fe_info);
206 
207  // Tm tdb = fe_lut_info.getDBTime();
208  //tdb.dumpTm();
209 
210  // Insert the dataset
211  insertDataArraySet(&sliset, &fe_info);
212 
213  result = fe_info.getId();
214 
215  cout << "*****************************************" << endl;
216  cout << "************SLI done*********************" << endl;
217  cout << "*****************************************" << endl;
218  return result;
219 }

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

Referenced by EcalTPGParamBuilder::analyze().

◆ writeToConfDB_TPGWeight()

int EcalTPGDBApp::writeToConfDB_TPGWeight ( const std::map< EcalLogicID, FEConfigWeightGroupDat > &  lutgroup,
const std::map< EcalLogicID, FEConfigWeightDat > &  lutdat,
int  iovId,
std::string  tag 
)

Definition at line 254 of file EcalTPGDBApp.cc.

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 }

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

Referenced by EcalTPGParamBuilder::analyze().

Member Data Documentation

◆ endmicros

uint64_t EcalTPGDBApp::endmicros
private

Definition at line 72 of file EcalTPGDBApp.h.

◆ endrun

run_t EcalTPGDBApp::endrun
private

Definition at line 74 of file EcalTPGDBApp.h.

◆ startmicros

uint64_t EcalTPGDBApp::startmicros
private

Definition at line 71 of file EcalTPGDBApp.h.

◆ startrun

run_t EcalTPGDBApp::startrun
private

Definition at line 73 of file EcalTPGDBApp.h.

Tm::str
std::string str() const
Definition: Tm.cc:66
MonRunList::setRunTag
void setRunTag(const RunTag &tag)
Definition: MonRunList.cc:18
FEConfigMainInfo::setSliId
void setSliId(int x)
Definition: FEConfigMainInfo.h:45
EcalCondDBInterface::insertConfigSet
void insertConfigSet(ICONF *iconf) noexcept(false)
Definition: EcalCondDBInterface.h:365
FEConfigWeightInfo::getId
int getId() const
Definition: FEConfigWeightInfo.h:25
MonVersionDef::setMonitoringVersion
void setMonitoringVersion(std::string ver)
Definition: MonVersionDef.cc:21
EcalCondDBInterface::insertDataArraySet
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
Definition: EcalCondDBInterface.h:298
FEConfigMainInfo::getId
int getId() const
Definition: FEConfigMainInfo.h:25
MonRunList
Definition: MonRunList.h:16
FEConfigLUTInfo::getId
int getId() const
Definition: FEConfigLUTInfo.h:25
FEConfigSlidingInfo
Definition: FEConfigSlidingInfo.h:11
FEConfigMainInfo::setBttId
void setBttId(int x)
Definition: FEConfigMainInfo.h:60
FEConfigFgrInfo::getId
int getId() const
Definition: FEConfigFgrInfo.h:25
FEConfigFgrInfo::setNumberOfGroups
void setNumberOfGroups(int iov_id)
Definition: FEConfigFgrInfo.h:21
FEConfigSpikeInfo
Definition: FEConfigSpikeInfo.h:11
FEConfigLinInfo::getID
int getID()
Definition: FEConfigLinInfo.h:28
FEConfigMainInfo::setLinId
void setLinId(int x)
Definition: FEConfigMainInfo.h:36
FEConfigSpikeInfo::getId
int getId() const
Definition: FEConfigSpikeInfo.h:22
RunTag
Definition: RunTag.h:13
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EcalCondDBInterface::fetchConfigSet
void fetchConfigSet(ICONF *iconf) noexcept(false)
Definition: EcalCondDBInterface.h:387
gather_cfg.cout
cout
Definition: gather_cfg.py:144
FEConfigMainInfo
Definition: FEConfigMainInfo.h:14
FEConfigPedDat::getPedMeanG12
float getPedMeanG12() const
Definition: FEConfigPedDat.h:30
FEConfigMainInfo::setLUTId
void setLUTId(int x)
Definition: FEConfigMainInfo.h:39
LocationDef
Definition: LocationDef.h:12
FEConfigLinInfo
Definition: FEConfigLinInfo.h:11
FEConfigWeightInfo::setNumberOfGroups
void setNumberOfGroups(int n)
Definition: FEConfigWeightInfo.h:21
FEConfigMainInfo::setVersion
void setVersion(int id)
Definition: FEConfigMainInfo.h:66
FEConfigLUTInfo::setNumberOfGroups
void setNumberOfGroups(int iov_id)
Definition: FEConfigLUTInfo.h:21
MonRunTag::setGeneralTag
void setGeneralTag(std::string tag)
Definition: MonRunTag.cc:21
EcalLogicID::getID2
int getID2() const
Definition: EcalLogicID.cc:32
RunIOV::getRunEnd
Tm getRunEnd() const
Definition: RunIOV.cc:49
RunTag::setGeneralTag
void setGeneralTag(std::string tag)
Definition: RunTag.cc:24
test_db_connect.my_rundef
my_rundef
Definition: test_db_connect.py:13
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
FEConfigPedDat::getPedMeanG1
float getPedMeanG1() const
Definition: FEConfigPedDat.h:24
RunIOV::getRunTag
RunTag getRunTag() const
Definition: RunIOV.cc:58
FEConfigWeightInfo
Definition: FEConfigWeightInfo.h:11
EcalLogicID
Definition: EcalLogicID.h:7
MonVersionDef
Definition: MonVersionDef.h:12
FEConfigPedDat::getPedMeanG6
float getPedMeanG6() const
Definition: FEConfigPedDat.h:27
FEConfigMainInfo::setBxtId
void setBxtId(int x)
Definition: FEConfigMainInfo.h:57
FEConfigPedInfo::setIOVId
void setIOVId(int iov_id)
Definition: FEConfigPedInfo.h:21
RunIOV::getRunNumber
run_t getRunNumber() const
Definition: RunIOV.cc:31
RunTypeDef
Definition: RunTypeDef.h:12
FEConfigTimingInfo::getId
int getId() const
Definition: FEConfigTimingInfo.h:22
test_db_connect.my_locdef
my_locdef
Definition: test_db_connect.py:11
FEConfigFgrInfo
Definition: FEConfigFgrInfo.h:11
FEConfigTimingInfo
Definition: FEConfigTimingInfo.h:11
FEConfigMainInfo::setFgrId
void setFgrId(int x)
Definition: FEConfigMainInfo.h:42
FEConfigSlidingInfo::getId
int getId() const
Definition: FEConfigSlidingInfo.h:25
FEConfigMainInfo::setPedId
void setPedId(int x)
Definition: FEConfigMainInfo.h:33
FEConfigMainInfo::setWeiId
void setWeiId(int x)
Definition: FEConfigMainInfo.h:48
createfilelist.int
int
Definition: createfilelist.py:10
FEConfigLUTInfo
Definition: FEConfigLUTInfo.h:11
EcalCondDBInterface::fetchDataSet
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
Definition: EcalCondDBInterface.h:495
FEConfigPedDat
Definition: FEConfigPedDat.h:11
MonRunTag
Definition: MonRunTag.h:13
FEConfigMainInfo::setSpiId
void setSpiId(int x)
Definition: FEConfigMainInfo.h:51
FEConfigSlidingInfo::setIOVId
void setIOVId(int iov_id)
Definition: FEConfigSlidingInfo.h:21
writedatasetfile.run
run
Definition: writedatasetfile.py:27
RunTag::setLocationDef
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:33
FEConfigMainInfo::setTimId
void setTimId(int x)
Definition: FEConfigMainInfo.h:54
FEConfigPedInfo::setId
void setId(int id)
Definition: FEConfigPedInfo.h:24
relativeConstraints.value
value
Definition: relativeConstraints.py:53
FEConfigMainInfo::setBstId
void setBstId(int x)
Definition: FEConfigMainInfo.h:63
MonRunList::setMonRunTag
void setMonRunTag(const MonRunTag &tag)
Definition: MonRunList.cc:23
dataset
Definition: dataset.py:1
RunTag::setRunTypeDef
void setRunTypeDef(const RunTypeDef &runTypeDef)
Definition: RunTag.cc:42
FEConfigPedInfo::getID
int getID()
Definition: FEConfigPedInfo.h:28
mps_fire.result
result
Definition: mps_fire.py:303
EcalTPGDBApp::printTag
void printTag(const RunTag *tag) const
Definition: EcalTPGDBApp.cc:372
MonRunTag::setMonVersionDef
void setMonVersionDef(const MonVersionDef &ver)
Definition: MonRunTag.cc:30
IODConfig::setConfigTag
void setConfigTag(std::string x)
Definition: IODConfig.h:29
FEConfigPedInfo
Definition: FEConfigPedInfo.h:11
RunIOV::getRunStart
Tm getRunStart() const
Definition: RunIOV.cc:40
FEConfigLinInfo::setIOVId
void setIOVId(int iov_id)
Definition: FEConfigLinInfo.h:21
cuy.ii
ii
Definition: cuy.py:590
EcalCondDBInterface::fetchMonRunListLastNRuns
MonRunList fetchMonRunListLastNRuns(const RunTag &tag, const MonRunTag &monruntag, int max_run, int n_runs) noexcept(false)
Definition: EcalCondDBInterface.cc:846
MonRunList::getRuns
std::vector< MonRunIOV > getRuns()
Definition: MonRunList.cc:32