CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
FEConfigMainInfo Class Reference

#include <FEConfigMainInfo.h>

Inheritance diagram for FEConfigMainInfo:
IODConfig IDBObject

Public Member Functions

 FEConfigMainInfo ()
 
int getBstId () const
 
int getBttId () const
 
int getBxtId () const
 
int getCokeId () const
 
Tm getDBTime () const
 
std::string getDescription () const
 
int getFgrId () const
 
int getId () const
 
int getLinId () const
 
int getLUTId () const
 
int getOddWeiId () const
 
int getPedId () const
 
int getSliId () const
 
int getSpiId () const
 
std::string getTable () override
 
int getTimId () const
 
int getVersion () const
 
int getWei2Id () const
 
int getWeight2Id () const
 
int getWeiId () const
 
bool operator!= (const FEConfigMainInfo &r) const
 
bool operator== (const FEConfigMainInfo &r) const
 
void setBstId (int x)
 
void setBttId (int x)
 
void setBxtId (int x)
 
void setCokeId (int x)
 
void setDBTime (const Tm &x)
 
void setDescription (std::string x)
 
void setFgrId (int x)
 
void setId (int id)
 
void setLinId (int x)
 
void setLUTId (int x)
 
void setOddWeiId (int x)
 
void setPedId (int x)
 
void setSliId (int x)
 
void setSpiId (int x)
 
void setTimId (int x)
 
void setVersion (int id)
 
void setWei2Id (int x)
 
void setWeight2Id (int x)
 
void setWeiId (int x)
 
 ~FEConfigMainInfo () override
 
- Public Member Functions inherited from IODConfig
std::string getConfigTag ()
 
void setConfigTag (std::string x)
 
- Public Member Functions inherited from IDBObject
oracle::occi::Connection * getConn () const
 
oracle::occi::Environment * getEnv () const
 
void setConnection (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
virtual ~IDBObject ()
 

Private Member Functions

void clear ()
 
void fetchData (FEConfigMainInfo *result) noexcept(false)
 
int fetchID () noexcept(false)
 
int fetchIDLast () noexcept(false)
 
int fetchNextId () noexcept(false)
 
void insertConfig () noexcept(false)
 
void prepareWrite () noexcept(false) override
 
void setByID (int id) noexcept(false)
 
void writeDB () noexcept(false)
 

Private Attributes

int m_bst_id
 
int m_btt_id
 
int m_bxt_id
 
int m_coke_id
 
Tm m_db_time
 
std::string m_description
 
int m_fgr_id
 
int m_ID
 
int m_lin_id
 
int m_lut_id
 
int m_ped_id
 
int m_sli_id
 
int m_spi_id
 
int m_tim_id
 
int m_version
 
int m_wei2_id
 
int m_wei_id
 

Friends

class EcalCondDBInterface
 

Additional Inherited Members

- Public Types inherited from IODConfig
typedef oracle::occi::Clob Clob
 
typedef oracle::occi::SQLException SQLException
 
typedef oracle::occi::Statement Statement
 
typedef oracle::occi::Stream Stream
 
- Public Attributes inherited from IODConfig
std::string m_config_tag
 
- Static Public Attributes inherited from IDBObject
static int const ECALDB_NROWS = 1024
 
- Protected Member Functions inherited from IODConfig
void checkPrepare () noexcept(false)
 
void createReadStatement () noexcept(false)
 
void populateClob (Clob &clob, std::string fname, unsigned int bufsize) noexcept(false)
 
unsigned char * readClob (Clob &clob, int size) noexcept(false)
 
void setPrefetchRowCount (int ncount) noexcept(false)
 
void terminateReadStatement () noexcept(false)
 
void terminateWriteStatement () noexcept(false)
 
- Protected Member Functions inherited from IDBObject
void checkConnection () const noexcept(false)
 
- Protected Attributes inherited from IODConfig
Statementm_readStmt
 
Statementm_writeStmt
 
- Protected Attributes inherited from IDBObject
oracle::occi::Connection * m_conn
 
oracle::occi::Environment * m_env
 

Detailed Description

Definition at line 14 of file FEConfigMainInfo.h.

Constructor & Destructor Documentation

◆ FEConfigMainInfo()

FEConfigMainInfo::FEConfigMainInfo ( )

Definition at line 12 of file FEConfigMainInfo.cc.

References l1ct::clear().

12  {
13  m_env = nullptr;
14  m_conn = nullptr;
15  m_writeStmt = nullptr;
16  m_readStmt = nullptr;
17 
18  m_ID = 0;
19  m_version = 0;
20  clear();
21 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
Statement * m_writeStmt
Definition: IODConfig.h:33
Statement * m_readStmt
Definition: IODConfig.h:34

◆ ~FEConfigMainInfo()

FEConfigMainInfo::~FEConfigMainInfo ( )
override

Definition at line 23 of file FEConfigMainInfo.cc.

23 {}

Member Function Documentation

◆ clear()

void FEConfigMainInfo::clear ( void  )
private

Definition at line 25 of file FEConfigMainInfo.cc.

25  {
26  m_description = "";
27  m_ped_id = 0;
28  m_lin_id = 0;
29  m_lut_id = 0;
30  m_sli_id = 0;
31  m_fgr_id = 0;
32  m_wei_id = 0;
33  m_bxt_id = 0;
34  m_btt_id = 0;
35  m_tim_id = 0;
36  m_spi_id = 0;
37  m_bst_id = 0;
38  m_coke_id = 0;
39  m_wei2_id = 0;
40 
41  m_db_time = Tm();
42 }
std::string m_description
Definition: Tm.h:13

◆ fetchData()

void FEConfigMainInfo::fetchData ( FEConfigMainInfo result)
privatenoexcept

Definition at line 240 of file FEConfigMainInfo.cc.

References gather_cfg::cout, cuy::dh, MillePedeFileConverter_cfg::e, Exception, and mps_fire::result.

240  {
241  std::cout << " ### 1 getId from FEConfigMainInfo = " << result->getId() << std::endl;
242  std::cout << " tag/version " << result->getConfigTag() << "/" << result->getVersion() << std::endl;
243 
244  this->checkConnection();
246  // result->clear();
247 
248  int idid = 0;
249 
250  if (result->getId() == 0) {
251  //throw(std::runtime_error("FEConfigMainInfo::fetchData(): no Id defined for this FEConfigMainInfo "));
252  idid = result->fetchID();
253  result->setId(idid);
254  }
255 
256  try {
257  m_readStmt->setSQL(
258  "SELECT conf_id, ped_conf_id, lin_conf_id, lut_conf_id, fgr_conf_id, sli_conf_id, wei_conf_id, spi_conf_id, "
259  "tim_conf_id, bxt_conf_id, btt_conf_id, bst_conf_id, coke_conf_id, wei2_conf_id, tag, version, description, "
260  "db_timestamp FROM FE_CONFIG_MAIN WHERE conf_id = :1 ");
261 
262  std::cout << " ### 2 getId from FEConfigMainInfo = " << result->getId() << std::endl;
263 
264  // good m_readStmt->setInt(1, result->getId());
265  m_readStmt->setInt(1, result->getId());
266  ResultSet* rset = m_readStmt->executeQuery();
267 
268  rset->next();
269 
270  result->setId(rset->getInt(1));
271 
272  setPedId(rset->getInt(2));
273  setLinId(rset->getInt(3));
274  setLUTId(rset->getInt(4));
275  setFgrId(rset->getInt(5));
276  setSliId(rset->getInt(6));
277  setWeiId(rset->getInt(7));
278  setSpiId(rset->getInt(8));
279  setTimId(rset->getInt(9));
280  setBxtId(rset->getInt(10));
281  setBttId(rset->getInt(11));
282  setBstId(rset->getInt(12));
283  setCokeId(rset->getInt(13));
284  setWei2Id(rset->getInt(14));
285 
286  result->setConfigTag(rset->getString(15));
287  result->setVersion(rset->getInt(16));
288  result->setDescription(rset->getString(17));
289  Date dbdate = rset->getDate(18);
290  result->setDBTime(dh.dateToTm(dbdate));
291 
292  } catch (SQLException& e) {
293  throw cms::Exception("SQLException") << "FEConfigMainInfo::fetchData(): " << e.getMessage();
294  }
295 }
void setSpiId(int x)
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
void setLinId(int x)
void setTimId(int x)
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
void setBxtId(int x)
void setLUTId(int x)
void setFgrId(int x)
void setWei2Id(int x)
void setCokeId(int x)
void setPedId(int x)
void setWeiId(int x)
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
Statement * m_readStmt
Definition: IODConfig.h:34
void setSliId(int x)
dh
Definition: cuy.py:354
void setBstId(int x)
void setBttId(int x)

◆ fetchID()

int FEConfigMainInfo::fetchID ( )
privatenoexcept

Definition at line 62 of file FEConfigMainInfo.cc.

References gather_cfg::cout, cuy::dh, MillePedeFileConverter_cfg::e, and Exception.

62  {
63  // Return from memory if available
64  if (m_ID > 0) {
65  return m_ID;
66  }
67 
68  this->checkConnection();
69 
71 
72  std::cout << " tag/version " << getConfigTag() << "/" << getVersion() << std::endl;
73 
74  try {
75  Statement* stmt = m_conn->createStatement();
76  if (m_version != 0) {
77  stmt->setSQL(
78  "SELECT conf_id from FE_CONFIG_MAIN "
79  "WHERE tag = :tag "
80  " and version = :version ");
81  stmt->setString(1, m_config_tag);
82  stmt->setInt(2, m_version);
83  std::cout << " using query with version " << endl;
84  } else {
85  // always select the last inserted one with a given tag
86  stmt->setSQL(
87  "SELECT conf_id from FE_CONFIG_MAIN "
88  "WHERE tag = :1 and version= (select max(version) from FE_CONFIG_MAIN where tag=:2) ");
89  stmt->setString(1, m_config_tag);
90  stmt->setString(2, m_config_tag);
91  std::cout << " using query WITHOUT version " << endl;
92  }
93 
94  ResultSet* rset = stmt->executeQuery();
95 
96  if (rset->next()) {
97  m_ID = rset->getInt(1);
98  } else {
99  m_ID = 0;
100  }
101  std::cout << m_ID << endl;
102  m_conn->terminateStatement(stmt);
103  } catch (SQLException& e) {
104  throw cms::Exception("SQLException") << "FEConfigMainInfo::fetchID: " << e.getMessage();
105  }
106  setByID(m_ID);
107  return m_ID;
108 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
int getVersion() const
void setByID(int id) noexcept(false)
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
std::string m_config_tag
Definition: IODConfig.h:25
oracle::occi::Statement Statement
Definition: IODConfig.h:21
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
std::string getConfigTag()
Definition: IODConfig.h:30
dh
Definition: cuy.py:354

◆ fetchIDLast()

int FEConfigMainInfo::fetchIDLast ( )
privatenoexcept

Definition at line 169 of file FEConfigMainInfo.cc.

References cuy::dh, MillePedeFileConverter_cfg::e, and Exception.

169  {
170  this->checkConnection();
171 
173 
174  try {
175  Statement* stmt = m_conn->createStatement();
176  stmt->setSQL("SELECT max(conf_id) FROM fe_config_main ");
177  ResultSet* rset = stmt->executeQuery();
178 
179  if (rset->next()) {
180  m_ID = rset->getInt(1);
181  } else {
182  m_ID = 0;
183  }
184  m_conn->terminateStatement(stmt);
185  } catch (SQLException& e) {
186  throw cms::Exception("SQLException") << "ODRunConfigInfo::fetchIDLast: " << e.getMessage();
187  }
188 
189  setByID(m_ID);
190  return m_ID;
191 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
void setByID(int id) noexcept(false)
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
oracle::occi::Statement Statement
Definition: IODConfig.h:21
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
dh
Definition: cuy.py:354

◆ fetchNextId()

int FEConfigMainInfo::fetchNextId ( )
privatenoexcept

Definition at line 43 of file FEConfigMainInfo.cc.

References MillePedeFileConverter_cfg::e, Exception, and mps_fire::result.

43  {
44  int result = 0;
45  try {
46  this->checkConnection();
47 
48  m_readStmt = m_conn->createStatement();
49  m_readStmt->setSQL("select fe_config_main_sq.NextVal from dual");
50  ResultSet* rset = m_readStmt->executeQuery();
51  while (rset->next()) {
52  result = rset->getInt(1);
53  }
54  m_conn->terminateStatement(m_readStmt);
55  return result;
56 
57  } catch (SQLException& e) {
58  throw cms::Exception("SQLException") << "FEConfigMainInfo::fetchNextId(): " << e.getMessage();
59  }
60 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
Statement * m_readStmt
Definition: IODConfig.h:34

◆ getBstId()

int FEConfigMainInfo::getBstId ( ) const
inline

Definition at line 64 of file FEConfigMainInfo.h.

References m_bst_id.

Referenced by EcalTPGParamBuilder::analyze(), and popcon::EcalTPGBadStripHandler::getNewObjects().

64 { return m_bst_id; }

◆ getBttId()

int FEConfigMainInfo::getBttId ( ) const
inline

Definition at line 61 of file FEConfigMainInfo.h.

References m_btt_id.

Referenced by EcalTPGParamBuilder::analyze(), and popcon::EcalTPGBadTTHandler::getNewObjects().

61 { return m_btt_id; }

◆ getBxtId()

int FEConfigMainInfo::getBxtId ( ) const
inline

Definition at line 58 of file FEConfigMainInfo.h.

References m_bxt_id.

Referenced by EcalTPGParamBuilder::analyze(), and popcon::EcalTPGBadXTHandler::getNewObjects().

58 { return m_bxt_id; }

◆ getCokeId()

int FEConfigMainInfo::getCokeId ( ) const
inline

Definition at line 67 of file FEConfigMainInfo.h.

References m_coke_id.

Referenced by EcalTPGParamBuilder::analyze().

67 { return m_coke_id; }

◆ getDBTime()

Tm FEConfigMainInfo::getDBTime ( ) const
inline

Definition at line 27 of file FEConfigMainInfo.h.

References m_db_time.

27 { return m_db_time; }

◆ getDescription()

std::string FEConfigMainInfo::getDescription ( ) const
inline

Definition at line 31 of file FEConfigMainInfo.h.

References m_description.

31 { return m_description; }
std::string m_description

◆ getFgrId()

int FEConfigMainInfo::getFgrId ( ) const
inline

◆ getId()

int FEConfigMainInfo::getId ( void  ) const
inline

Definition at line 25 of file FEConfigMainInfo.h.

References m_ID.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

25 { return m_ID; }

◆ getLinId()

int FEConfigMainInfo::getLinId ( ) const
inline

◆ getLUTId()

int FEConfigMainInfo::getLUTId ( ) const
inline

◆ getOddWeiId()

int FEConfigMainInfo::getOddWeiId ( ) const
inline

Definition at line 76 of file FEConfigMainInfo.h.

References m_wei2_id.

76 { return m_wei2_id; }

◆ getPedId()

int FEConfigMainInfo::getPedId ( ) const
inline

◆ getSliId()

int FEConfigMainInfo::getSliId ( ) const
inline

◆ getSpiId()

int FEConfigMainInfo::getSpiId ( ) const
inline

◆ getTable()

std::string FEConfigMainInfo::getTable ( )
inlineoverridevirtual

Implements IODConfig.

Definition at line 21 of file FEConfigMainInfo.h.

21 { return "FE_CONFIG_MAIN"; }

◆ getTimId()

int FEConfigMainInfo::getTimId ( ) const
inline

Definition at line 55 of file FEConfigMainInfo.h.

References m_tim_id.

Referenced by EcalTPGParamBuilder::analyze().

55 { return m_tim_id; }

◆ getVersion()

int FEConfigMainInfo::getVersion ( ) const
inline

Definition at line 79 of file FEConfigMainInfo.h.

References m_version.

Referenced by popcon::EcalTPGBadXTHandler::getNewObjects().

79 { return m_version; }

◆ getWei2Id()

int FEConfigMainInfo::getWei2Id ( ) const
inline

◆ getWeight2Id()

int FEConfigMainInfo::getWeight2Id ( ) const
inline

Definition at line 70 of file FEConfigMainInfo.h.

References m_wei2_id.

70 { return m_wei2_id; }

◆ getWeiId()

int FEConfigMainInfo::getWeiId ( ) const
inline

◆ insertConfig()

void FEConfigMainInfo::insertConfig ( )
privatenoexcept

Definition at line 297 of file FEConfigMainInfo.cc.

References MillePedeFileConverter_cfg::e, Exception, and dtFineDelayCorr_cfi::writeDB.

297  {
298  try {
299  prepareWrite();
300  writeDB();
301  m_conn->commit();
303  } catch (std::runtime_error& e) {
304  m_conn->rollback();
305  throw cms::Exception("RuntimeError") << e.what();
306  }
307 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
void prepareWrite() noexcept(false) override
void writeDB() noexcept(false)
void terminateWriteStatement() noexcept(false)
Definition: IODConfig.h:42

◆ operator!=()

bool FEConfigMainInfo::operator!= ( const FEConfigMainInfo r) const
inline

Definition at line 83 of file FEConfigMainInfo.h.

References alignCSCRings::r.

83 { return !(*this == r); }

◆ operator==()

bool FEConfigMainInfo::operator== ( const FEConfigMainInfo r) const
inline

Definition at line 82 of file FEConfigMainInfo.h.

References m_ID, and alignCSCRings::r.

82 { return (m_ID == r.m_ID); }

◆ prepareWrite()

void FEConfigMainInfo::prepareWrite ( )
overrideprivatevirtualnoexcept

Implements IODConfig.

Definition at line 110 of file FEConfigMainInfo.cc.

References MillePedeFileConverter_cfg::e, and Exception.

110  {
111  this->checkConnection();
112 
113  int next_id = fetchNextId();
114 
115  try {
116  m_writeStmt = m_conn->createStatement();
117  m_writeStmt->setSQL(
118  "INSERT INTO fe_config_main (conf_id, ped_conf_id, lin_conf_id, lut_conf_id, fgr_conf_id, sli_conf_id, "
119  "wei_conf_id, spi_conf_id, tim_conf_id, bxt_conf_id, btt_conf_id, bst_conf_id, coke_conf_id, wei2_conf_id, "
120  "tag, version, description) "
121  " VALUES (:1, :2, :3 , :4, :5, :6 ,:7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17 )");
122 
123  m_writeStmt->setInt(1, next_id);
124  m_ID = next_id;
125 
126  } catch (SQLException& e) {
127  throw cms::Exception("SQLException") << "FEConfigMainInfo::prepareWrite(): " << e.getMessage();
128  }
129 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
Statement * m_writeStmt
Definition: IODConfig.h:33
int fetchNextId() noexcept(false)
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20

◆ setBstId()

void FEConfigMainInfo::setBstId ( int  x)
inline

Definition at line 63 of file FEConfigMainInfo.h.

References m_bst_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setBttId()

void FEConfigMainInfo::setBttId ( int  x)
inline

Definition at line 60 of file FEConfigMainInfo.h.

References m_btt_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setBxtId()

void FEConfigMainInfo::setBxtId ( int  x)
inline

Definition at line 57 of file FEConfigMainInfo.h.

References m_bxt_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setByID()

void FEConfigMainInfo::setByID ( int  id)
privatenoexcept

Definition at line 193 of file FEConfigMainInfo.cc.

References gather_cfg::cout, cuy::dh, MillePedeFileConverter_cfg::e, Exception, and l1ctLayer2EG_cff::id.

193  {
194  this->checkConnection();
195 
197 
198  cout << "FEConfigMainInfo::setByID called for id " << id << endl;
199 
200  try {
201  Statement* stmt = m_conn->createStatement();
202 
203  stmt->setSQL(
204  "SELECT conf_id, ped_conf_id, lin_conf_id, lut_conf_id, fgr_conf_id, sli_conf_id, wei_conf_id, spi_conf_id, "
205  "tim_conf_id, bxt_conf_id, btt_conf_id, bst_conf_id, coke_conf_id, wei2_conf_id, tag, version, description, "
206  "db_timestamp FROM FE_CONFIG_MAIN WHERE conf_id = :1 ");
207  stmt->setInt(1, id);
208 
209  ResultSet* rset = stmt->executeQuery();
210  if (rset->next()) {
211  setId(rset->getInt(1));
212  setPedId(rset->getInt(2));
213  setLinId(rset->getInt(3));
214  setLUTId(rset->getInt(4));
215  setFgrId(rset->getInt(5));
216  setSliId(rset->getInt(6));
217  setWeiId(rset->getInt(7));
218  setSpiId(rset->getInt(8));
219  setTimId(rset->getInt(9));
220  setBxtId(rset->getInt(10));
221  setBttId(rset->getInt(11));
222  setBstId(rset->getInt(12));
223  setCokeId(rset->getInt(13));
224  setWei2Id(rset->getInt(14));
225  setConfigTag(rset->getString(15));
226  setVersion(rset->getInt(16));
227  setDescription(rset->getString(17));
228  Date dbdate = rset->getDate(18);
229  setDBTime(dh.dateToTm(dbdate));
230  m_ID = id;
231  } else {
232  throw(std::runtime_error("FEConfigMainInfo::setByID: Given cycle_id is not in the database"));
233  }
234  m_conn->terminateStatement(stmt);
235  } catch (SQLException& e) {
236  throw cms::Exception("SQLException") << "FEConfigMainInfo::setByID: " << e.getMessage();
237  }
238 }
void setSpiId(int x)
void setDescription(std::string x)
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
void setLinId(int x)
void setTimId(int x)
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
void setBxtId(int x)
void setId(int id)
void setVersion(int id)
void setLUTId(int x)
void setFgrId(int x)
void setWei2Id(int x)
void setCokeId(int x)
void setPedId(int x)
void setWeiId(int x)
oracle::occi::Statement Statement
Definition: IODConfig.h:21
void setDBTime(const Tm &x)
void setConfigTag(std::string x)
Definition: IODConfig.h:29
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
void setSliId(int x)
dh
Definition: cuy.py:354
void setBstId(int x)
void setBttId(int x)

◆ setCokeId()

void FEConfigMainInfo::setCokeId ( int  x)
inline

Definition at line 66 of file FEConfigMainInfo.h.

References m_coke_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setDBTime()

void FEConfigMainInfo::setDBTime ( const Tm x)
inline

Definition at line 28 of file FEConfigMainInfo.h.

References m_db_time, and x.

◆ setDescription()

void FEConfigMainInfo::setDescription ( std::string  x)
inline

Definition at line 30 of file FEConfigMainInfo.h.

References m_description, and x.

30 { m_description = x; }
std::string m_description

◆ setFgrId()

void FEConfigMainInfo::setFgrId ( int  x)
inline

Definition at line 42 of file FEConfigMainInfo.h.

References m_fgr_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setId()

void FEConfigMainInfo::setId ( int  id)
inline

Definition at line 24 of file FEConfigMainInfo.h.

References l1ctLayer2EG_cff::id, and m_ID.

◆ setLinId()

void FEConfigMainInfo::setLinId ( int  x)
inline

Definition at line 36 of file FEConfigMainInfo.h.

References m_lin_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setLUTId()

void FEConfigMainInfo::setLUTId ( int  x)
inline

Definition at line 39 of file FEConfigMainInfo.h.

References m_lut_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setOddWeiId()

void FEConfigMainInfo::setOddWeiId ( int  x)
inline

Definition at line 75 of file FEConfigMainInfo.h.

References m_wei2_id, and x.

◆ setPedId()

void FEConfigMainInfo::setPedId ( int  x)
inline

Definition at line 33 of file FEConfigMainInfo.h.

References m_ped_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setSliId()

void FEConfigMainInfo::setSliId ( int  x)
inline

Definition at line 45 of file FEConfigMainInfo.h.

References m_sli_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setSpiId()

void FEConfigMainInfo::setSpiId ( int  x)
inline

Definition at line 51 of file FEConfigMainInfo.h.

References m_spi_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setTimId()

void FEConfigMainInfo::setTimId ( int  x)
inline

Definition at line 54 of file FEConfigMainInfo.h.

References m_tim_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setVersion()

void FEConfigMainInfo::setVersion ( int  id)
inline

◆ setWei2Id()

void FEConfigMainInfo::setWei2Id ( int  x)
inline

Definition at line 72 of file FEConfigMainInfo.h.

References m_wei2_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ setWeight2Id()

void FEConfigMainInfo::setWeight2Id ( int  x)
inline

Definition at line 69 of file FEConfigMainInfo.h.

References m_wei2_id, and x.

◆ setWeiId()

void FEConfigMainInfo::setWeiId ( int  x)
inline

Definition at line 48 of file FEConfigMainInfo.h.

References m_wei_id, and x.

Referenced by EcalTPGDBApp::writeToConfDB_TPGMain().

◆ writeDB()

void FEConfigMainInfo::writeDB ( )
privatenoexcept

Definition at line 131 of file FEConfigMainInfo.cc.

References gather_cfg::cout, cuy::dh, MillePedeFileConverter_cfg::e, and Exception.

131  {
132  this->checkConnection();
133  this->checkPrepare();
134 
135  // Validate the data, use infinity-till convention
137 
138  try {
139  m_writeStmt->setInt(2, this->getPedId());
140  m_writeStmt->setInt(3, this->getLinId());
141  m_writeStmt->setInt(4, this->getLUTId());
142  m_writeStmt->setInt(5, this->getFgrId());
143  m_writeStmt->setInt(6, this->getSliId());
144  m_writeStmt->setInt(7, this->getWeiId());
145  m_writeStmt->setInt(8, this->getSpiId());
146  m_writeStmt->setInt(9, this->getTimId());
147  m_writeStmt->setInt(10, this->getBxtId());
148  m_writeStmt->setInt(11, this->getBttId());
149  m_writeStmt->setInt(12, this->getBstId());
150  m_writeStmt->setInt(13, this->getCokeId());
151  m_writeStmt->setInt(14, this->getWei2Id());
152  m_writeStmt->setString(15, this->getConfigTag());
153  m_writeStmt->setInt(16, this->getVersion());
154  m_writeStmt->setString(17, this->getDescription());
155  m_writeStmt->executeUpdate();
156 
157  } catch (SQLException& e) {
158  throw cms::Exception("SQLException") << "FEConfigMainInfo::writeDB: " << e.getMessage();
159  }
160  // Now get the ID
161  if (!this->fetchID()) {
162  throw(std::runtime_error("FEConfigMainInfo::writeDB: Failed to write"));
163  }
164  setByID(m_ID);
165 
166  cout << "FEConfigMainInfo::writeDB>> done inserting FEConfigMainInfo with id=" << m_ID << endl;
167 }
std::string getDescription() const
int getBstId() const
int getFgrId() const
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
Statement * m_writeStmt
Definition: IODConfig.h:33
int getVersion() const
void setByID(int id) noexcept(false)
int getSpiId() const
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
int getBttId() const
int fetchID() noexcept(false)
int getPedId() const
int getWeiId() const
int getLinId() const
int getCokeId() const
int getSliId() const
int getBxtId() const
int getTimId() const
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
std::string getConfigTag()
Definition: IODConfig.h:30
int getLUTId() const
dh
Definition: cuy.py:354
int getWei2Id() const
void checkPrepare() noexcept(false)
Definition: IODConfig.h:36

Friends And Related Function Documentation

◆ EcalCondDBInterface

friend class EcalCondDBInterface
friend

Definition at line 16 of file FEConfigMainInfo.h.

Member Data Documentation

◆ m_bst_id

int FEConfigMainInfo::m_bst_id
private

Definition at line 96 of file FEConfigMainInfo.h.

Referenced by getBstId(), and setBstId().

◆ m_btt_id

int FEConfigMainInfo::m_btt_id
private

Definition at line 95 of file FEConfigMainInfo.h.

Referenced by getBttId(), and setBttId().

◆ m_bxt_id

int FEConfigMainInfo::m_bxt_id
private

Definition at line 94 of file FEConfigMainInfo.h.

Referenced by getBxtId(), and setBxtId().

◆ m_coke_id

int FEConfigMainInfo::m_coke_id
private

Definition at line 99 of file FEConfigMainInfo.h.

Referenced by getCokeId(), and setCokeId().

◆ m_db_time

Tm FEConfigMainInfo::m_db_time
private

Definition at line 102 of file FEConfigMainInfo.h.

Referenced by getDBTime(), and setDBTime().

◆ m_description

std::string FEConfigMainInfo::m_description
private

Definition at line 103 of file FEConfigMainInfo.h.

Referenced by getDescription(), and setDescription().

◆ m_fgr_id

int FEConfigMainInfo::m_fgr_id
private

Definition at line 92 of file FEConfigMainInfo.h.

Referenced by getFgrId(), and setFgrId().

◆ m_ID

int FEConfigMainInfo::m_ID
private

Definition at line 87 of file FEConfigMainInfo.h.

Referenced by getId(), operator==(), and setId().

◆ m_lin_id

int FEConfigMainInfo::m_lin_id
private

Definition at line 89 of file FEConfigMainInfo.h.

Referenced by getLinId(), and setLinId().

◆ m_lut_id

int FEConfigMainInfo::m_lut_id
private

Definition at line 90 of file FEConfigMainInfo.h.

Referenced by getLUTId(), and setLUTId().

◆ m_ped_id

int FEConfigMainInfo::m_ped_id
private

Definition at line 88 of file FEConfigMainInfo.h.

Referenced by getPedId(), and setPedId().

◆ m_sli_id

int FEConfigMainInfo::m_sli_id
private

Definition at line 91 of file FEConfigMainInfo.h.

Referenced by getSliId(), and setSliId().

◆ m_spi_id

int FEConfigMainInfo::m_spi_id
private

Definition at line 98 of file FEConfigMainInfo.h.

Referenced by getSpiId(), and setSpiId().

◆ m_tim_id

int FEConfigMainInfo::m_tim_id
private

Definition at line 97 of file FEConfigMainInfo.h.

Referenced by getTimId(), and setTimId().

◆ m_version

int FEConfigMainInfo::m_version
private

Definition at line 101 of file FEConfigMainInfo.h.

Referenced by getVersion(), and setVersion().

◆ m_wei2_id

int FEConfigMainInfo::m_wei2_id
private

◆ m_wei_id

int FEConfigMainInfo::m_wei_id
private

Definition at line 93 of file FEConfigMainInfo.h.

Referenced by getWeiId(), and setWeiId().