#include <FEConfigOddWeightInfo.h>
Definition at line 11 of file FEConfigOddWeightInfo.h.
◆ FEConfigOddWeightInfo()
FEConfigOddWeightInfo::FEConfigOddWeightInfo |
( |
| ) |
|
◆ ~FEConfigOddWeightInfo()
FEConfigOddWeightInfo::~FEConfigOddWeightInfo |
( |
| ) |
|
|
override |
◆ clear()
void FEConfigOddWeightInfo::clear |
( |
void |
| ) |
|
|
private |
◆ fetchData()
Definition at line 103 of file FEConfigOddWeightInfo.cc.
References cuy::dh, MillePedeFileConverter_cfg::e, Exception, and mps_fire::result.
106 if (
result->getId() == 0 && (
result->getConfigTag().empty())) {
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));
124 result->setConfigTag(rset->getString(2));
125 result->setNumberOfGroups(rset->getInt(3));
126 Date dbdate = rset->getDate(4);
127 result->setDBTime(
dh.dateToTm(dbdate));
130 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightInfo::fetchData(): " <<
e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
std::string getTable() override
oracle::occi::SQLException SQLException
◆ fetchID()
int FEConfigOddWeightInfo::fetchID |
( |
| ) |
|
|
noexcept |
Definition at line 157 of file FEConfigOddWeightInfo.cc.
References MillePedeFileConverter_cfg::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()
◆ fetchLastData()
Definition at line 134 of file FEConfigOddWeightInfo.cc.
References cuy::dh, MillePedeFileConverter_cfg::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));
147 result->setConfigTag(rset->getString(2));
148 result->setNumberOfGroups(rset->getInt(3));
149 Date dbdate = rset->getDate(4);
150 result->setDBTime(
dh.dateToTm(dbdate));
153 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightInfo::fetchData(): " <<
e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
std::string getTable() override
oracle::occi::SQLException SQLException
◆ fetchNextId()
int FEConfigOddWeightInfo::fetchNextId |
( |
| ) |
|
|
noexcept |
◆ getDBTime()
Tm FEConfigOddWeightInfo::getDBTime |
( |
| ) |
const |
|
inline |
◆ getId()
int FEConfigOddWeightInfo::getId |
( |
void |
| ) |
const |
|
inline |
◆ getID()
int FEConfigOddWeightInfo::getID |
( |
| ) |
|
|
inline |
◆ getNumberOfGroups()
int FEConfigOddWeightInfo::getNumberOfGroups |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string FEConfigOddWeightInfo::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getVersion()
int FEConfigOddWeightInfo::getVersion |
( |
| ) |
const |
|
inline |
◆ operator!=()
◆ operator==()
◆ prepareWrite()
void FEConfigOddWeightInfo::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IODConfig.
Definition at line 49 of file FEConfigOddWeightInfo.cc.
References MillePedeFileConverter_cfg::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
◆ setByID()
void FEConfigOddWeightInfo::setByID |
( |
int |
id | ) |
|
|
noexcept |
Definition at line 186 of file FEConfigOddWeightInfo.cc.
References cuy::dh, MillePedeFileConverter_cfg::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
◆ setDBTime()
void FEConfigOddWeightInfo::setDBTime |
( |
const Tm & |
x | ) |
|
|
inline |
◆ setId()
void FEConfigOddWeightInfo::setId |
( |
int |
id | ) |
|
|
inline |
◆ setID()
void FEConfigOddWeightInfo::setID |
( |
int |
id | ) |
|
|
inline |
◆ setNumberOfGroups()
void FEConfigOddWeightInfo::setNumberOfGroups |
( |
int |
n | ) |
|
|
inline |
◆ setParameters()
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)
◆ setVersion()
void FEConfigOddWeightInfo::setVersion |
( |
int |
id | ) |
|
|
inline |
◆ writeDB()
void FEConfigOddWeightInfo::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 83 of file FEConfigOddWeightInfo.cc.
References MillePedeFileConverter_cfg::e, and Exception.
95 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightInfo::writeDB(): " << e.getMessage();
99 throw(std::runtime_error(
"FEConfigOddWeightInfo::writeDB: Failed to write"));
void checkConnection() const noexcept(false)
int fetchID() noexcept(false)
int getNumberOfGroups() const
oracle::occi::SQLException SQLException
std::string getConfigTag()
void checkPrepare() noexcept(false)
◆ EcalCondDBInterface
◆ m_db_time
Tm FEConfigOddWeightInfo::m_db_time |
|
private |
◆ m_ID
int FEConfigOddWeightInfo::m_ID |
|
private |
◆ m_ngr
int FEConfigOddWeightInfo::m_ngr |
|
private |
◆ m_version
int FEConfigOddWeightInfo::m_version |
|
private |