#include <FEConfigCokeInfo.h>
Definition at line 11 of file FEConfigCokeInfo.h.
◆ FEConfigCokeInfo()
FEConfigCokeInfo::FEConfigCokeInfo |
( |
| ) |
|
◆ ~FEConfigCokeInfo()
FEConfigCokeInfo::~FEConfigCokeInfo |
( |
| ) |
|
|
override |
◆ clear()
void FEConfigCokeInfo::clear |
( |
void |
| ) |
|
|
private |
◆ fetchData()
Definition at line 103 of file FEConfigCokeInfo.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(
"FEConfigCokeInfo::fetchData(): no Id defined for this FEConfigCokeInfo "));
113 m_readStmt->setSQL(
"SELECT * FROM " +
getTable() +
" where ( coke_conf_id= :1 or (tag=:2 AND version=:3 ) )");
123 result->setId(rset->getInt(1));
124 result->setConfigTag(rset->getString(2));
125 result->setVersion(rset->getInt(3));
127 Date dbdate = rset->getDate(4);
128 result->setDBTime(
dh.dateToTm(dbdate));
131 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::fetchData(): " <<
e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string getTable() override
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
◆ fetchID()
int FEConfigCokeInfo::fetchID |
( |
| ) |
|
|
noexcept |
Definition at line 158 of file FEConfigCokeInfo.cc.
References MillePedeFileConverter_cfg::e, and Exception.
168 stmt->setSQL(
"SELECT coke_conf_id FROM " +
getTable() +
" WHERE tag=:1 and version=:2 ");
173 ResultSet* rset = stmt->executeQuery();
176 m_ID = rset->getInt(1);
180 m_conn->terminateStatement(stmt);
182 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::fetchID: " <<
e.getMessage();
oracle::occi::Connection * m_conn
std::string getTable() override
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
std::string getConfigTag()
◆ fetchLastData()
Definition at line 135 of file FEConfigCokeInfo.cc.
References cuy::dh, MillePedeFileConverter_cfg::e, Exception, and mps_fire::result.
141 m_readStmt->setSQL(
"SELECT * FROM " +
getTable() +
" where coke_conf_id = ( select max( coke_conf_id) from " +
147 result->setId(rset->getInt(1));
148 result->setConfigTag(rset->getString(2));
149 result->setVersion(rset->getInt(3));
150 Date dbdate = rset->getDate(4);
151 result->setDBTime(
dh.dateToTm(dbdate));
154 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::fetchData(): " <<
e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string getTable() override
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
◆ fetchNextId()
int FEConfigCokeInfo::fetchNextId |
( |
| ) |
|
|
noexcept |
◆ getDBTime()
Tm FEConfigCokeInfo::getDBTime |
( |
| ) |
const |
|
inline |
◆ getId()
int FEConfigCokeInfo::getId |
( |
void |
| ) |
const |
|
inline |
◆ getID()
int FEConfigCokeInfo::getID |
( |
| ) |
|
|
inline |
◆ getTable()
std::string FEConfigCokeInfo::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getVersion()
int FEConfigCokeInfo::getVersion |
( |
| ) |
const |
|
inline |
◆ operator!=()
◆ operator==()
◆ prepareWrite()
void FEConfigCokeInfo::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IODConfig.
Definition at line 49 of file FEConfigCokeInfo.cc.
References MillePedeFileConverter_cfg::e, Exception, and getId().
60 " ( coke_conf_id, tag, version) " 61 " VALUES ( :1, :2, :3 ) ");
67 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::prepareWrite(): " <<
e.getMessage();
oracle::occi::Connection * m_conn
std::string getTable() override
void checkConnection() const noexcept(false)
int fetchNextId() noexcept(false)
oracle::occi::SQLException SQLException
◆ setByID()
void FEConfigCokeInfo::setByID |
( |
int |
id | ) |
|
|
noexcept |
Definition at line 188 of file FEConfigCokeInfo.cc.
References cuy::dh, MillePedeFileConverter_cfg::e, and Exception.
196 stmt->setSQL(
"SELECT * FROM " +
getTable() +
" WHERE coke_conf_id = :1");
199 ResultSet* rset = stmt->executeQuery();
201 this->
setId(rset->getInt(1));
205 Date dbdate = rset->getDate(4);
208 throw(std::runtime_error(
"FEConfigCokeInfo::setByID: Given config_id is not in the database"));
211 m_conn->terminateStatement(stmt);
213 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::setByID: " <<
e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string getTable() override
void setDBTime(const Tm &x)
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
◆ setDBTime()
void FEConfigCokeInfo::setDBTime |
( |
const Tm & |
x | ) |
|
|
inline |
◆ setId()
void FEConfigCokeInfo::setId |
( |
int |
id | ) |
|
|
inline |
◆ setID()
void FEConfigCokeInfo::setID |
( |
int |
id | ) |
|
|
inline |
◆ setParameters()
void FEConfigCokeInfo::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 71 of file FEConfigCokeInfo.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 ==
"VERSION")
78 if (ci->first ==
"TAG")
void setConfigTag(std::string x)
◆ setVersion()
void FEConfigCokeInfo::setVersion |
( |
int |
id | ) |
|
|
inline |
◆ writeDB()
void FEConfigCokeInfo::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 83 of file FEConfigCokeInfo.cc.
References MillePedeFileConverter_cfg::e, and Exception.
95 throw cms::Exception(
"SQLException") <<
"FEConfigCokeInfo::writeDB(): " << e.getMessage();
99 throw(std::runtime_error(
"FEConfigCokeInfo::writeDB: Failed to write"));
void checkConnection() const noexcept(false)
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
std::string getConfigTag()
void checkPrepare() noexcept(false)
◆ EcalCondDBInterface
◆ m_db_time
Tm FEConfigCokeInfo::m_db_time |
|
private |
◆ m_ID
int FEConfigCokeInfo::m_ID |
|
private |
◆ m_version
int FEConfigCokeInfo::m_version |
|
private |