CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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_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 bxt, int btt, 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, Tm evenTm) throw (std::runtime_error)
 
template<class DATT , class ICONF >
void fetchConfigDataSet (std::vector< DATT > *fillMap, ICONF *iconf) throw (std::runtime_error)
 
template<class ICONF >
void fetchConfigSet (ICONF *iconf) throw (std::runtime_error)
 
template<class DATT , class IOVT >
void fetchDataSet (std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) throw (std::runtime_error)
 
template<class DATT , class IOVT >
void fetchDataSetWithMap (std::map< EcalLogicID, DATT > *fillMap, IOVT *iov, std::string mapping_name) throw (std::runtime_error)
 
template<class DATT >
void fetchDCSDataSet (std::list< std::pair< Tm, std::map< EcalLogicID, DATT > > > *fillMap, Tm t) throw (std::runtime_error)
 
DCSPTMTempList fetchDCSPTMTempList (EcalLogicID ecid) throw (std::runtime_error)
 
DCSPTMTempList fetchDCSPTMTempList (EcalLogicID ecid, Tm start, Tm end) throw (std::runtime_error)
 
DCUIOV fetchDCUIOV (DCUTag *tag, Tm evenTm) throw (std::runtime_error)
 
RunList fetchGlobalRunListByLocation (RunTag tag, int min_run, int max_run, const LocationDef locDef) throw (std::runtime_error)
 
template<class ICONF >
void fetchLastConfigSet (ICONF *iconf) throw (std::runtime_error)
 
RunIOV fetchLMFLastRun () const
 
LMFRunIOV fetchLMFRunIOV (RunTag *runtag, LMFRunTag *lmftag, run_t run, subrun_t lmfrun) throw (std::runtime_error)
 
bool fetchLMFRunIOV (const LMFSeqDat &, LMFRunIOV &, int lmr, int type, int color) const
 
MonRunIOV fetchMonRunIOV (RunTag *runtag, MonRunTag *montag, run_t run, subrun_t monrun) throw (std::runtime_error)
 
MonRunList fetchMonRunList (RunTag tag, MonRunTag monruntag) throw (std::runtime_error)
 
MonRunList fetchMonRunList (RunTag tag, MonRunTag monruntag, int min_run, int max_run) throw (std::runtime_error)
 
MonRunList fetchMonRunListLastNRuns (RunTag tag, MonRunTag monruntag, int max_run, int n_runs) throw (std::runtime_error)
 
RunIOV fetchRunIOV (RunTag *tag, run_t run) throw (std::runtime_error)
 
RunIOV fetchRunIOV (std::string location, run_t run) throw (std::runtime_error)
 
RunList fetchRunList (RunTag tag) throw (std::runtime_error)
 
RunList fetchRunList (RunTag tag, int min_run, int max_run) throw (std::runtime_error)
 
RunList fetchRunListByLocation (RunTag tag, int min_run, int max_run, const LocationDef locDef) throw (std::runtime_error)
 
RunList fetchRunListLastNRuns (RunTag tag, int max_run, int n_runs) throw (std::runtime_error)
 
template<class DATT , class IOVT >
void fetchValidDataSet (std::map< EcalLogicID, DATT > *fillMap, IOVT *fillIOV, RunTag *tag, run_t run=(unsigned int)-1) throw (std::runtime_error)
 
template<class DATT , class IOVT >
void fetchValidDataSet (std::map< EcalLogicID, DATT > *fillMap, IOVT *fillIOV, std::string location, run_t run=(unsigned int)-1) throw (std::runtime_error)
 
DateHandlergetDateHandler ()
 
EcalLogicID getEcalLogicID (std::string name, int id1=EcalLogicID::NULLID, int id2=EcalLogicID::NULLID, int id3=EcalLogicID::NULLID, std::string mapsTo="") throw (std::runtime_error)
 
EcalLogicID getEcalLogicID (int logicID) throw (std::runtime_error)
 
std::map< int, int > getEcalLogicID2LmrMap ()
 
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="") throw (std::runtime_error)
 
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) throw (std::runtime_error)
 
template<class DATT , class ICONF >
void insertConfigDataArraySet (const std::vector< DATT > data, ICONF *iconf) throw (std::runtime_error)
 
template<class DATT , class ICONF >
void insertConfigDataSet (const std::vector< DATT > data, ICONF *iconf) throw (std::runtime_error)
 
template<class ICONF >
void insertConfigSet (ICONF *iconf) throw (std::runtime_error)
 
template<class DATT , class IOVT >
void insertDataArraySet (const std::map< EcalLogicID, DATT > *data, IOVT *iov) throw (std::runtime_error)
 
template<class DATT , class IOVT >
void insertDataSet (const std::map< EcalLogicID, DATT > *data, IOVT *iov) throw (std::runtime_error)
 
template<class DATT , class IOVT >
void insertDataSetVector (std::vector< EcalLogicID > ecid, std::vector< IOVT > run_iov, std::vector< DATT > data) throw (std::runtime_error)
 
void insertDCUIOV (DCUIOV *iov) throw (std::runtime_error)
 
void insertLmfDat (LMFDat *dat) throw (std::runtime_error)
 
void insertLmfDat (std::list< LMFDat * > dat) throw (std::runtime_error)
 
void insertLmfIOV (LMFIOV *iov) throw (std::runtime_error)
 
void insertLmfLmrSubIOV (LMFLmrSubIOV *iov) throw (std::runtime_error)
 
void insertLmfRunIOV (LMFRunIOV *iov) throw (std::runtime_error)
 
void insertLmfSeq (LMFSeqDat *iov) throw (std::runtime_error)
 
void insertMonRunIOV (MonRunIOV *iov) throw (std::runtime_error)
 
void insertRunIOV (RunIOV *iov) throw (std::runtime_error)
 
void updateRunConfig (ODRunConfigInfo *od) throw (std::runtime_error)
 
void updateRunIOV (RunIOV *iov) throw (std::runtime_error)
 
void updateRunIOVEndTime (RunIOV *iov) throw (std::runtime_error)
 
void updateRunIOVStartTime (RunIOV *iov) throw (std::runtime_error)
 
virtual ~EcalCondDBInterface () throw (std::runtime_error)
 
- 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) throw (std::runtime_error)
 
 EcalDBConnection (std::string sid, std::string user, std::string pass) throw (std::runtime_error)
 
oracle::occi::Clob getClobLocator ()
 
oracle::occi::Connection * getConn () const
 
oracle::occi::Environment * getEnv () const
 
void rollback ()
 
void terminateStatement (oracle::occi::Statement *stmt)
 
virtual ~EcalDBConnection ()
 

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 14 of file EcalTPGDBApp.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file EcalTPGDBApp.cc.

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

Definition at line 13 of file EcalTPGDBApp.cc.

15 {}

Member Function Documentation

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

Definition at line 345 of file EcalTPGDBApp.cc.

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

346 {
347  std::cout << std::endl;
348  std::cout << "=============RunIOV:" << std::endl;
349  RunTag tag = iov->getRunTag();
350  printTag(&tag);
351  std::cout << "Run Number: " << iov->getRunNumber() << std::endl;
352  std::cout << "Run Start: " << iov->getRunStart().str() << std::endl;
353  std::cout << "Run End: " << iov->getRunEnd().str() << std::endl;
354  std::cout << "====================" << std::endl;
355 }
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:82
tuple cout
Definition: gather_cfg.py:41
void printTag(const RunTag *tag) const
void EcalTPGDBApp::printTag ( const RunTag tag) const
private

Definition at line 335 of file EcalTPGDBApp.cc.

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

Referenced by printIOV().

336 {
337  std::cout << std::endl;
338  std::cout << "=============RunTag:" << std::endl;
339  std::cout << "GeneralTag: " << tag->getGeneralTag() << std::endl;
340  std::cout << "Location: " << tag->getLocationDef().getLocation() << std::endl;
341  std::cout << "Run Type: " << tag->getRunTypeDef().getRunType() << std::endl;
342  std::cout << "====================" << std::endl;
343 }
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
tuple cout
Definition: gather_cfg.py:41
int EcalTPGDBApp::readFromCondDB_Pedestals ( std::map< EcalLogicID, MonPedestalsDat > &  pedset,
int  runNb 
)

Definition at line 148 of file EcalTPGDBApp.cc.

References gather_cfg::cout, EcalCondDBInterface::fetchDataSet(), EcalCondDBInterface::fetchMonRunListLastNRuns(), MonRunList::getRuns(), DTTTrigCorrFirst::run, RunTag::setGeneralTag(), MonRunTag::setGeneralTag(), LocationDef::setLocation(), RunTag::setLocationDef(), MonVersionDef::setMonitoringVersion(), MonRunList::setMonRunTag(), MonRunTag::setMonVersionDef(), MonRunList::setRunTag(), RunTypeDef::setRunType(), and RunTag::setRunTypeDef().

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

Definition at line 99 of file EcalTPGDBApp.cc.

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

99  {
100  // now we do something else
101  // this is an example for reading the pedestals
102  // for a given config iconf_req
103 
104  // FC alternatively a config set can be retrieved by the tag and version
105 
106  std::cout << "*****************************************" << std::endl;
107  std::cout << "test readinf fe_ped with id="<<iconf_req << std::endl;
108  std::cout << "*****************************************" << std::endl;
109 
110  FEConfigPedInfo fe_ped_info;
111  fe_ped_info.setId(iconf_req);
112 
113  fetchConfigSet(&fe_ped_info);
114 
115  std::map<EcalLogicID, FEConfigPedDat> dataset_ped;
116  fetchDataSet(&dataset_ped, &fe_ped_info);
117 
118  typedef std::map<EcalLogicID, FEConfigPedDat>::const_iterator CIfeped;
119  EcalLogicID ecid_xt;
120  FEConfigPedDat rd_ped;
121 
122  float ped_m12[61200];
123  float ped_m6[61200];
124  float ped_m1[61200];
125  for (int i=0; i<61200; i++){
126  ped_m12[i]=0;
127  ped_m6[i]=0;
128  ped_m1[i]=0;
129  }
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  int xt_num=ecid_xt.getID2();
136  ped_m12[xt_num]=rd_ped.getPedMeanG12();
137  ped_m6[xt_num]=rd_ped.getPedMeanG6();
138  ped_m1[xt_num]=rd_ped.getPedMeanG1();
139  }
140 
141  std::cout << "*****************************************" << std::endl;
142  std::cout << "test read done"<<iconf_req << std::endl;
143  std::cout << "*****************************************" << std::endl;
144 
145 }
int i
Definition: DBlmapReader.cc:9
float getPedMeanG1() const
int getID2() const
Definition: EcalLogicID.cc:52
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov)
float getPedMeanG12() const
void fetchConfigSet(ICONF *iconf)
float getPedMeanG6() const
void setId(int id)
tuple cout
Definition: gather_cfg.py:41
std::string EcalTPGDBApp::to_string ( char  value[])
inline

Definition at line 20 of file EcalTPGDBApp.h.

References relativeConstraints::value.

21  {
22  std::ostringstream streamOut;
23  streamOut << value;
24  return streamOut.str();
25  }
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 293 of file EcalTPGDBApp.cc.

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

Referenced by EcalTPGParamBuilder::analyze().

299 {
300  std::cout << "*****************************************" << std::endl;
301  std::cout << "************Inserting Fgr************" << std::endl;
302  std::cout << "*****************************************" << std::endl;
303  int result=0;
304 
305  FEConfigFgrInfo fe_fgr_info ;
306  fe_fgr_info.setNumberOfGroups(iovId); // this eventually refers to some other table
307  fe_fgr_info.setConfigTag(tag);
308  insertConfigSet(&fe_fgr_info);
309 
310  // Tm tdb = fe_fgr_info.getDBTime();
311  //tdb.dumpTm();
312 
313  // Insert the dataset
314  insertDataArraySet(&fgrgroupset, &fe_fgr_info);
315  // Insert the dataset
316  insertDataArraySet(&fgrset, &fe_fgr_info);
317  // Insert the parameters
318  insertDataArraySet(&fgrparamset, &fe_fgr_info);
319  // Insert the parameters
320  insertDataArraySet(&dataset3, &fe_fgr_info);
321  // Insert the parameters
322  insertDataArraySet(&dataset4, &fe_fgr_info);
323 
324  result=fe_fgr_info.getId();
325 
326  std::cout << "*****************************************" << std::endl;
327  std::cout << "************Fgr done*********************" << std::endl;
328  std::cout << "*****************************************" << std::endl;
329  return result;
330 
331 }
int getId() const
void insertConfigSet(ICONF *iconf)
void setNumberOfGroups(int iov_id)
tuple result
Definition: query.py:137
void setConfigTag(std::string x)
Definition: IODConfig.h:31
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
tuple cout
Definition: gather_cfg.py:41
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(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), query::result, IODConfig::setConfigTag(), and FEConfigLinInfo::setIOVId().

Referenced by EcalTPGParamBuilder::analyze().

43  {
44 
45  int result=0;
46 
47  std::cout << "*********************************************" << std::endl;
48  std::cout << "**Inserting Linarization coeff in conf-OMDS**" << std::endl;
49  std::cout << "*********************************************" << std::endl;
50 
51  std::cout << "creating fe record " <<std::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  std::cout << "*********about to insert linearization coeff *********" << std::endl;
60  std::cout << " map size = "<<linset.size()<<std::endl ;
61  insertDataArraySet(&linset, &fe_lin_info);
62  insertDataArraySet(&linparamset, &fe_lin_info);
63  std::cout << "*********Done lineraization coeff *********" << std::endl;
64 
65  return result;
66 }
void insertConfigSet(ICONF *iconf)
void setIOVId(int iov_id)
tuple result
Definition: query.py:137
void setConfigTag(std::string x)
Definition: IODConfig.h:31
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
tuple cout
Definition: gather_cfg.py:41
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 227 of file EcalTPGDBApp.cc.

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

Referenced by EcalTPGParamBuilder::analyze().

230 {
231  std::cout << "*****************************************" << std::endl;
232  std::cout << "************Inserting LUT************" << std::endl;
233  std::cout << "*****************************************" << std::endl;
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  std::cout << "*****************************************" << std::endl;
254  std::cout << "************LUT done*********************" << std::endl;
255  std::cout << "*****************************************" << std::endl;
256  return result;
257 
258 }
void insertConfigSet(ICONF *iconf)
void setNumberOfGroups(int iov_id)
tuple result
Definition: query.py:137
int getId() const
void setConfigTag(std::string x)
Definition: IODConfig.h:31
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
tuple cout
Definition: gather_cfg.py:41
int EcalTPGDBApp::writeToConfDB_TPGMain ( int  ped,
int  lin,
int  lut,
int  fgr,
int  sli,
int  wei,
int  bxt,
int  btt,
std::string  tag,
int  ver 
)

Definition at line 68 of file EcalTPGDBApp.cc.

References gather_cfg::cout, FEConfigMainInfo::getId(), EcalCondDBInterface::insertConfigSet(), query::result, FEConfigMainInfo::setBttId(), FEConfigMainInfo::setBxtId(), IODConfig::setConfigTag(), FEConfigMainInfo::setFgrId(), FEConfigMainInfo::setLinId(), FEConfigMainInfo::setLUTId(), FEConfigMainInfo::setPedId(), FEConfigMainInfo::setSliId(), FEConfigMainInfo::setVersion(), and FEConfigMainInfo::setWeiId().

Referenced by EcalTPGParamBuilder::analyze().

68  {
69 
70  int result=0;
71 
72  std::cout << "*********************************************" << std::endl;
73  std::cout << "**Inserting Main FE table in conf-OMDS **" << std::endl;
74  std::cout << "*********************************************" << std::endl;
75 
76  std::cout << "creating fe record " <<std::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.setBxtId(bxt) ;
86  fe_main.setBttId(btt) ;
87  fe_main.setConfigTag(tag) ;
88  fe_main.setVersion(ver) ;
89 
90  insertConfigSet(&fe_main) ;
91  result = fe_main.getId() ;
92 
93  std::cout << "*********Done Main *********" << std::endl;
94 
95  return result;
96 }
void setLinId(int x)
void insertConfigSet(ICONF *iconf)
void setBxtId(int x)
void setVersion(int id)
void setLUTId(int x)
void setFgrId(int x)
tuple result
Definition: query.py:137
void setPedId(int x)
int getId() const
void setWeiId(int x)
void setConfigTag(std::string x)
Definition: IODConfig.h:31
tuple cout
Definition: gather_cfg.py:41
void setSliId(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(), EcalCondDBInterface::insertConfigSet(), EcalCondDBInterface::insertDataArraySet(), query::result, IODConfig::setConfigTag(), and FEConfigPedInfo::setIOVId().

Referenced by EcalTPGParamBuilder::analyze().

17  {
18 
19  int result=0;
20 
21  std::cout << "*****************************************" << std::endl;
22  std::cout << "******** Inserting Peds in conf-OMDS*****" << std::endl;
23  std::cout << "*****************************************" << std::endl;
24 
25  std::cout << "creating fe record " <<std::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  std::cout << "*********about to insert peds *********" << std::endl;
35  std::cout << " map size = "<<pedset.size()<<std::endl ;
36  insertDataArraySet(&pedset, &fe_ped_info);
37  std::cout << "*********Done peds *********" << std::endl;
38 
39  return result;
40 }
void insertConfigSet(ICONF *iconf)
tuple result
Definition: query.py:137
void setIOVId(int iov_id)
void setConfigTag(std::string x)
Definition: IODConfig.h:31
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
tuple cout
Definition: gather_cfg.py:41
int EcalTPGDBApp::writeToConfDB_TPGSliding ( const std::map< EcalLogicID, FEConfigSlidingDat > &  sliset,
int  iovId,
std::string  tag 
)

Definition at line 200 of file EcalTPGDBApp.cc.

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

Referenced by EcalTPGParamBuilder::analyze().

201 {
202  std::cout << "*****************************************" << std::endl;
203  std::cout << "************Inserting SLIDING************" << std::endl;
204  std::cout << "*****************************************" << std::endl;
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  std::cout << "*****************************************" << std::endl;
221  std::cout << "************SLI done*********************" << std::endl;
222  std::cout << "*****************************************" << std::endl;
223  return result;
224 
225 }
void insertConfigSet(ICONF *iconf)
void setIOVId(int iov_id)
tuple result
Definition: query.py:137
void setConfigTag(std::string x)
Definition: IODConfig.h:31
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
tuple cout
Definition: gather_cfg.py:41
int EcalTPGDBApp::writeToConfDB_TPGWeight ( const std::map< EcalLogicID, FEConfigWeightGroupDat > &  lutgroup,
const std::map< EcalLogicID, FEConfigWeightDat > &  lutdat,
int  iovId,
std::string  tag 
)

Definition at line 260 of file EcalTPGDBApp.cc.

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

Referenced by EcalTPGParamBuilder::analyze().

262 {
263  std::cout << "*****************************************" << std::endl;
264  std::cout << "************Inserting weights************" << std::endl;
265  std::cout << "*****************************************" << std::endl;
266 
267  int result=0;
268 
269  FEConfigWeightInfo fe_wei_info ;
270  fe_wei_info.setNumberOfGroups(5); // this eventually refers to some other table
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  std::cout << "*****************************************" << std::endl;
285  std::cout << "************WEIGHT done******************" << std::endl;
286  std::cout << "*****************************************" << std::endl;
287  return result;
288 
289 
290 }
void insertConfigSet(ICONF *iconf)
tuple result
Definition: query.py:137
void setConfigTag(std::string x)
Definition: IODConfig.h:31
void setNumberOfGroups(int n)
void insertDataArraySet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
tuple cout
Definition: gather_cfg.py:41

Member Data Documentation

uint64_t EcalTPGDBApp::endmicros
private

Definition at line 49 of file EcalTPGDBApp.h.

run_t EcalTPGDBApp::endrun
private

Definition at line 51 of file EcalTPGDBApp.h.

uint64_t EcalTPGDBApp::startmicros
private

Definition at line 48 of file EcalTPGDBApp.h.

run_t EcalTPGDBApp::startrun
private

Definition at line 50 of file EcalTPGDBApp.h.