CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | 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 ( )

Definition at line 12 of file FEConfigMainInfo.cc.

References 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 ( )
override

Definition at line 23 of file FEConfigMainInfo.cc.

23 {}

Member Function Documentation

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
void FEConfigMainInfo::fetchData ( FEConfigMainInfo result)
privatenoexcept

Definition at line 240 of file FEConfigMainInfo.cc.

References gather_cfg::cout, DateHandler::dateToTm(), cuy::dh, alignCSCRings::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)
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
int fetchID() noexcept(false)
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)
int getId() const
void setWeiId(int x)
void setDBTime(const Tm &x)
int getVersion() const
void setConfigTag(std::string x)
Definition: IODConfig.h:29
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
Statement * m_readStmt
Definition: IODConfig.h:34
std::string getConfigTag()
Definition: IODConfig.h:30
tuple cout
Definition: gather_cfg.py:144
void setSliId(int x)
void setBstId(int x)
tuple dh
Definition: cuy.py:354
void setBttId(int x)
int FEConfigMainInfo::fetchID ( )
privatenoexcept

Definition at line 62 of file FEConfigMainInfo.cc.

References gather_cfg::cout, cuy::dh, alignCSCRings::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
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
int getVersion() const
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
std::string getConfigTag()
Definition: IODConfig.h:30
tuple cout
Definition: gather_cfg.py:144
tuple dh
Definition: cuy.py:354
int FEConfigMainInfo::fetchIDLast ( )
privatenoexcept

Definition at line 169 of file FEConfigMainInfo.cc.

References cuy::dh, alignCSCRings::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
tuple dh
Definition: cuy.py:354
int FEConfigMainInfo::fetchNextId ( )
privatenoexcept

Definition at line 43 of file FEConfigMainInfo.cc.

References alignCSCRings::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
tuple result
Definition: mps_fire.py:311
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
Statement * m_readStmt
Definition: IODConfig.h:34
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; }
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; }
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; }
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; }
Tm FEConfigMainInfo::getDBTime ( ) const
inline

Definition at line 27 of file FEConfigMainInfo.h.

References m_db_time.

27 { return m_db_time; }
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
int FEConfigMainInfo::getFgrId ( ) const
inline
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; }
int FEConfigMainInfo::getLinId ( ) const
inline
int FEConfigMainInfo::getLUTId ( ) const
inline
int FEConfigMainInfo::getOddWeiId ( ) const
inline

Definition at line 76 of file FEConfigMainInfo.h.

References m_wei2_id.

76 { return m_wei2_id; }
int FEConfigMainInfo::getPedId ( ) const
inline

Definition at line 34 of file FEConfigMainInfo.h.

References m_ped_id.

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

34 { return m_ped_id; }
int FEConfigMainInfo::getSliId ( ) const
inline
int FEConfigMainInfo::getSpiId ( ) const
inline
std::string FEConfigMainInfo::getTable ( )
inlineoverridevirtual

Implements IODConfig.

Definition at line 21 of file FEConfigMainInfo.h.

21 { return "FE_CONFIG_MAIN"; }
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; }
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; }
int FEConfigMainInfo::getWei2Id ( ) const
inline
int FEConfigMainInfo::getWeight2Id ( ) const
inline

Definition at line 70 of file FEConfigMainInfo.h.

References m_wei2_id.

70 { return m_wei2_id; }
int FEConfigMainInfo::getWeiId ( ) const
inline
void FEConfigMainInfo::insertConfig ( )
privatenoexcept

Definition at line 297 of file FEConfigMainInfo.cc.

References alignCSCRings::e, and Exception.

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
bool FEConfigMainInfo::operator!= ( const FEConfigMainInfo r) const
inline

Definition at line 83 of file FEConfigMainInfo.h.

References alignCSCRings::r.

83 { return !(*this == r); }
bool FEConfigMainInfo::operator== ( const FEConfigMainInfo r) const
inline

Definition at line 82 of file FEConfigMainInfo.h.

References m_ID.

82 { return (m_ID == r.m_ID); }
void FEConfigMainInfo::prepareWrite ( )
overrideprivatevirtualnoexcept

Implements IODConfig.

Definition at line 110 of file FEConfigMainInfo.cc.

References alignCSCRings::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
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().

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().

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().

void FEConfigMainInfo::setByID ( int  id)
privatenoexcept

Definition at line 193 of file FEConfigMainInfo.cc.

References gather_cfg::cout, DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, Exception, and gpuClustering::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)
uint16_t *__restrict__ id
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
tuple cout
Definition: gather_cfg.py:144
void setSliId(int x)
void setBstId(int x)
tuple dh
Definition: cuy.py:354
void setBttId(int x)
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().

void FEConfigMainInfo::setDBTime ( const Tm x)
inline

Definition at line 28 of file FEConfigMainInfo.h.

References m_db_time, and x.

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
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().

void FEConfigMainInfo::setId ( int  id)
inline

Definition at line 24 of file FEConfigMainInfo.h.

References gpuClustering::id, and m_ID.

24 { m_ID = id; }
uint16_t *__restrict__ id
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().

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().

void FEConfigMainInfo::setOddWeiId ( int  x)
inline

Definition at line 75 of file FEConfigMainInfo.h.

References m_wei2_id, and x.

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().

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().

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().

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().

void FEConfigMainInfo::setVersion ( int  id)
inline
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().

void FEConfigMainInfo::setWeight2Id ( int  x)
inline

Definition at line 69 of file FEConfigMainInfo.h.

References m_wei2_id, and x.

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().

void FEConfigMainInfo::writeDB ( )
privatenoexcept

Definition at line 131 of file FEConfigMainInfo.cc.

References gather_cfg::cout, cuy::dh, alignCSCRings::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 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
std::string getDescription() const
Statement * m_writeStmt
Definition: IODConfig.h:33
void setByID(int id) noexcept(false)
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
int fetchID() noexcept(false)
int getWei2Id() const
int getTimId() const
int getLinId() const
int getSpiId() const
int getWeiId() const
int getFgrId() const
int getBttId() const
int getCokeId() const
int getVersion() const
int getPedId() const
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
int getBxtId() const
int getBstId() const
std::string getConfigTag()
Definition: IODConfig.h:30
tuple cout
Definition: gather_cfg.py:144
int getLUTId() const
void checkPrepare() noexcept(false)
Definition: IODConfig.h:36
int getSliId() const
tuple dh
Definition: cuy.py:354

Friends And Related Function Documentation

friend class EcalCondDBInterface
friend

Definition at line 16 of file FEConfigMainInfo.h.

Member Data Documentation

int FEConfigMainInfo::m_bst_id
private

Definition at line 96 of file FEConfigMainInfo.h.

Referenced by getBstId(), and setBstId().

int FEConfigMainInfo::m_btt_id
private

Definition at line 95 of file FEConfigMainInfo.h.

Referenced by getBttId(), and setBttId().

int FEConfigMainInfo::m_bxt_id
private

Definition at line 94 of file FEConfigMainInfo.h.

Referenced by getBxtId(), and setBxtId().

int FEConfigMainInfo::m_coke_id
private

Definition at line 99 of file FEConfigMainInfo.h.

Referenced by getCokeId(), and setCokeId().

Tm FEConfigMainInfo::m_db_time
private

Definition at line 102 of file FEConfigMainInfo.h.

Referenced by getDBTime(), and setDBTime().

std::string FEConfigMainInfo::m_description
private

Definition at line 103 of file FEConfigMainInfo.h.

Referenced by getDescription(), and setDescription().

int FEConfigMainInfo::m_fgr_id
private

Definition at line 92 of file FEConfigMainInfo.h.

Referenced by getFgrId(), and setFgrId().

int FEConfigMainInfo::m_ID
private

Definition at line 87 of file FEConfigMainInfo.h.

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

int FEConfigMainInfo::m_lin_id
private

Definition at line 89 of file FEConfigMainInfo.h.

Referenced by getLinId(), and setLinId().

int FEConfigMainInfo::m_lut_id
private

Definition at line 90 of file FEConfigMainInfo.h.

Referenced by getLUTId(), and setLUTId().

int FEConfigMainInfo::m_ped_id
private

Definition at line 88 of file FEConfigMainInfo.h.

Referenced by getPedId(), and setPedId().

int FEConfigMainInfo::m_sli_id
private

Definition at line 91 of file FEConfigMainInfo.h.

Referenced by getSliId(), and setSliId().

int FEConfigMainInfo::m_spi_id
private

Definition at line 98 of file FEConfigMainInfo.h.

Referenced by getSpiId(), and setSpiId().

int FEConfigMainInfo::m_tim_id
private

Definition at line 97 of file FEConfigMainInfo.h.

Referenced by getTimId(), and setTimId().

int FEConfigMainInfo::m_version
private

Definition at line 101 of file FEConfigMainInfo.h.

Referenced by getVersion(), and setVersion().

int FEConfigMainInfo::m_wei2_id
private
int FEConfigMainInfo::m_wei_id
private

Definition at line 93 of file FEConfigMainInfo.h.

Referenced by getWeiId(), and setWeiId().