#include <FEConfigOddWeightInfo.h>
Definition at line 11 of file FEConfigOddWeightInfo.h.
FEConfigOddWeightInfo::FEConfigOddWeightInfo |
( |
| ) |
|
FEConfigOddWeightInfo::~FEConfigOddWeightInfo |
( |
| ) |
|
|
override |
void FEConfigOddWeightInfo::clear |
( |
void |
| ) |
|
|
private |
Definition at line 103 of file FEConfigOddWeightInfo.cc.
References DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, Exception, and mps_fire::result.
107 throw(std::runtime_error(
"FEConfigOddWeightInfo::fetchData(): no Id defined for this FEConfigOddWeightInfo "));
113 m_readStmt->setSQL(
"SELECT wei2_conf_id, tag, number_of_groups, db_timestamp FROM " +
getTable() +
114 " where ( wei2_conf_id= :1 or (tag=:2 ) )");
123 result->
setId(rset->getInt(1));
126 Date dbdate = rset->getDate(4);
130 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightInfo::fetchData(): " << e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setNumberOfGroups(int n)
void setDBTime(const Tm &x)
std::string getTable() override
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
std::string getConfigTag()
int FEConfigOddWeightInfo::fetchID |
( |
| ) |
|
|
noexcept |
Definition at line 157 of file FEConfigOddWeightInfo.cc.
References alignCSCRings::e, and Exception.
167 stmt->setSQL(
"SELECT wei2_conf_id FROM " +
getTable() +
" WHERE tag=:1 ");
171 ResultSet* rset = stmt->executeQuery();
174 m_ID = rset->getInt(1);
178 m_conn->terminateStatement(stmt);
180 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightInfo::fetchID: " << e.getMessage();
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
std::string getTable() override
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
std::string getConfigTag()
Definition at line 134 of file FEConfigOddWeightInfo.cc.
References DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, Exception, and mps_fire::result.
140 m_readStmt->setSQL(
"SELECT wei2_conf_id, tag, number_of_groups, db_timestamp FROM " +
getTable() +
141 " where wei2_conf_id = ( select max( wei2_conf_id) from " +
getTable() +
" ) ");
146 result->
setId(rset->getInt(1));
149 Date dbdate = rset->getDate(4);
153 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightInfo::fetchData(): " << e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setNumberOfGroups(int n)
void setDBTime(const Tm &x)
std::string getTable() override
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
int FEConfigOddWeightInfo::fetchNextId |
( |
| ) |
|
|
noexcept |
Definition at line 29 of file FEConfigOddWeightInfo.cc.
References alignCSCRings::e, Exception, and mps_fire::result.
35 m_readStmt->setSQL(
"select FE_CONFIG_WEIGHT2GROUP_SQ.NextVal from DUAL ");
37 while (rset->next()) {
38 result = rset->getInt(1);
45 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightInfo::fetchNextId(): " << e.getMessage();
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
Tm FEConfigOddWeightInfo::getDBTime |
( |
| ) |
const |
|
inline |
int FEConfigOddWeightInfo::getId |
( |
void |
| ) |
const |
|
inline |
int FEConfigOddWeightInfo::getID |
( |
| ) |
|
|
inline |
int FEConfigOddWeightInfo::getNumberOfGroups |
( |
| ) |
const |
|
inline |
std::string FEConfigOddWeightInfo::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
int FEConfigOddWeightInfo::getVersion |
( |
| ) |
const |
|
inline |
void FEConfigOddWeightInfo::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IODConfig.
Definition at line 49 of file FEConfigOddWeightInfo.cc.
References alignCSCRings::e, Exception, and getId().
60 " ( wei2_conf_id, tag, number_of_groups) "
61 " VALUES ( :1, :2, :3 ) ");
67 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightInfo::prepareWrite(): " << e.getMessage();
oracle::occi::Connection * m_conn
int fetchNextId() noexcept(false)
void checkConnection() const noexcept(false)
std::string getTable() override
oracle::occi::SQLException SQLException
void FEConfigOddWeightInfo::setByID |
( |
int |
id | ) |
|
|
noexcept |
Definition at line 186 of file FEConfigOddWeightInfo.cc.
References DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, and Exception.
194 stmt->setSQL(
"SELECT wei2_conf_id, tag, number_of_groups, db_timestamp FROM " +
getTable() +
195 " WHERE wei2_conf_id = :1");
198 ResultSet* rset = stmt->executeQuery();
200 this->
setId(rset->getInt(1));
203 Date dbdate = rset->getDate(4);
206 throw(std::runtime_error(
"FEConfigOddWeightInfo::setByID: Given config_id is not in the database"));
209 m_conn->terminateStatement(stmt);
211 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightInfo::setByID: " << e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setNumberOfGroups(int n)
void setDBTime(const Tm &x)
std::string getTable() override
oracle::occi::Statement Statement
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
void FEConfigOddWeightInfo::setDBTime |
( |
const Tm & |
x | ) |
|
|
inline |
void FEConfigOddWeightInfo::setId |
( |
int |
id | ) |
|
|
inline |
void FEConfigOddWeightInfo::setID |
( |
int |
id | ) |
|
|
inline |
void FEConfigOddWeightInfo::setNumberOfGroups |
( |
int |
n | ) |
|
|
inline |
void FEConfigOddWeightInfo::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 71 of file FEConfigOddWeightInfo.cc.
75 for (std::map<std::string, std::string>::const_iterator ci = my_keys_map.begin(); ci != my_keys_map.end(); ci++) {
76 if (ci->first ==
"TAG")
78 if (ci->first ==
"NUMBER_OF_GROUPS")
void setNumberOfGroups(int n)
void setConfigTag(std::string x)
void FEConfigOddWeightInfo::setVersion |
( |
int |
id | ) |
|
|
inline |
void FEConfigOddWeightInfo::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 83 of file FEConfigOddWeightInfo.cc.
References alignCSCRings::e, and Exception.
95 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightInfo::writeDB(): " << e.getMessage();
99 throw(std::runtime_error(
"FEConfigOddWeightInfo::writeDB: Failed to write"));
int getNumberOfGroups() const
void checkConnection() const noexcept(false)
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
std::string getConfigTag()
void checkPrepare() noexcept(false)
Tm FEConfigOddWeightInfo::m_db_time |
|
private |
int FEConfigOddWeightInfo::m_ID |
|
private |
int FEConfigOddWeightInfo::m_ngr |
|
private |
int FEConfigOddWeightInfo::m_version |
|
private |