#include <FEConfigSlidingInfo.h>
Definition at line 11 of file FEConfigSlidingInfo.h.
FEConfigSlidingInfo::FEConfigSlidingInfo |
( |
| ) |
|
FEConfigSlidingInfo::~FEConfigSlidingInfo |
( |
| ) |
|
void FEConfigSlidingInfo::clear |
( |
void |
| ) |
|
|
private |
Definition at line 128 of file FEConfigSlidingInfo.cc.
References DateHandler::dateToTm(), cuy::dh, MillePedeFileConverter_cfg::e, and mps_fire::result.
134 throw(std::runtime_error(
"FEConfigSlidingInfo::fetchData(): no Id defined for this FEConfigSlidingInfo "));
141 " where ( sli_conf_id= :1 or (tag=:2 AND version=:3 ) )" );
151 result->
setId(rset->getInt(1));
155 Date dbdate = rset->getDate(5);
159 throw(std::runtime_error(
"FEConfigSlidingInfo::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setIOVId(int iov_id)
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
std::string getConfigTag()
void setDBTime(const Tm &x)
int FEConfigSlidingInfo::fetchID |
( |
| ) |
|
|
noexcept |
Definition at line 189 of file FEConfigSlidingInfo.cc.
References MillePedeFileConverter_cfg::e.
Referenced by setDBTime().
200 stmt->setSQL(
"SELECT sli_conf_id FROM "+
getTable()+
201 " WHERE tag=:1 and version=:2 " );
206 ResultSet* rset = stmt->executeQuery();
209 m_ID = rset->getInt(1);
213 m_conn->terminateStatement(stmt);
215 throw(std::runtime_error(
"FEConfigSlidingInfo::fetchID: "+e.getMessage()));
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
std::string getConfigTag()
Definition at line 163 of file FEConfigSlidingInfo.cc.
References DateHandler::dateToTm(), cuy::dh, MillePedeFileConverter_cfg::e, and mps_fire::result.
172 " where sli_conf_id = ( select max( sli_conf_id) from "+
getTable() +
" ) " );
177 result->
setId(rset->getInt(1));
181 Date dbdate = rset->getDate(5);
185 throw(std::runtime_error(
"FEConfigSlidingInfo::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setIOVId(int iov_id)
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
void setDBTime(const Tm &x)
int FEConfigSlidingInfo::fetchNextId |
( |
| ) |
|
|
noexcept |
Definition at line 38 of file FEConfigSlidingInfo.cc.
References MillePedeFileConverter_cfg::e, and mps_fire::result.
Referenced by setDBTime().
45 m_readStmt->setSQL(
"select FE_CONFIG_SLI_SQ.NextVal from DUAL ");
47 while (rset->next ()){
48 result= rset->getInt(1);
55 throw(std::runtime_error(
"FEConfigSlidingInfo::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
Tm FEConfigSlidingInfo::getDBTime |
( |
| ) |
const |
|
inline |
int FEConfigSlidingInfo::getId |
( |
void |
| ) |
const |
|
inline |
int FEConfigSlidingInfo::getID |
( |
| ) |
|
|
inline |
int FEConfigSlidingInfo::getIOVId |
( |
| ) |
const |
|
inline |
std::string FEConfigSlidingInfo::getTable |
( |
| ) |
|
|
inlinevirtual |
int FEConfigSlidingInfo::getVersion |
( |
| ) |
const |
|
inline |
void FEConfigSlidingInfo::prepareWrite |
( |
| ) |
|
|
privatevirtualnoexcept |
Implements IODConfig.
Definition at line 60 of file FEConfigSlidingInfo.cc.
References MillePedeFileConverter_cfg::e, and getId().
73 " VALUES ( :1, :2, :3 , :4) " );
79 throw(std::runtime_error(
"FEConfigSlidingInfo::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
int fetchNextId() noexcept(false)
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
void FEConfigSlidingInfo::setByID |
( |
int |
id | ) |
|
|
noexcept |
Definition at line 223 of file FEConfigSlidingInfo.cc.
References DateHandler::dateToTm(), cuy::dh, and MillePedeFileConverter_cfg::e.
Referenced by setDBTime().
233 stmt->setSQL(
"SELECT * FROM " +
getTable() +
" WHERE sli_conf_id = :1");
236 ResultSet* rset = stmt->executeQuery();
238 this->
setId(rset->getInt(1));
242 Date dbdate = rset->getDate(5);
245 throw(std::runtime_error(
"FEConfigSlidingInfo::setByID: Given config_id is not in the database"));
248 m_conn->terminateStatement(stmt);
250 throw(std::runtime_error(
"FEConfigSlidingInfo::setByID: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setIOVId(int iov_id)
oracle::occi::Statement Statement
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
void setDBTime(const Tm &x)
void FEConfigSlidingInfo::setDBTime |
( |
const Tm & |
x | ) |
|
|
inline |
void FEConfigSlidingInfo::setId |
( |
int |
id | ) |
|
|
inline |
void FEConfigSlidingInfo::setID |
( |
int |
id | ) |
|
|
inline |
void FEConfigSlidingInfo::setIOVId |
( |
int |
iov_id | ) |
|
|
inline |
void FEConfigSlidingInfo::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 84 of file FEConfigSlidingInfo.cc.
Referenced by setDBTime().
89 for( std::map<std::string, std::string >::const_iterator ci=
90 my_keys_map.begin(); ci!=my_keys_map.end(); ci++ ) {
92 if(ci->first==
"VERSION")
setVersion(atoi(ci->second.c_str()) );
94 if(ci->first==
"IOV_ID")
setIOVId(atoi(ci->second.c_str()) );
void setIOVId(int iov_id)
void setConfigTag(std::string x)
void FEConfigSlidingInfo::setVersion |
( |
int |
id | ) |
|
|
inline |
void FEConfigSlidingInfo::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 100 of file FEConfigSlidingInfo.cc.
References MillePedeFileConverter_cfg::e.
117 throw(std::runtime_error(
"FEConfigSlidingInfo::writeDB(): "+e.getMessage()));
121 throw(std::runtime_error(
"FEConfigSlidingInfo::writeDB: Failed to write"));
void checkConnection() const noexcept(false)
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
std::string getConfigTag()
void checkPrepare() noexcept(false)
Tm FEConfigSlidingInfo::m_db_time |
|
private |
int FEConfigSlidingInfo::m_ID |
|
private |
int FEConfigSlidingInfo::m_iov_id |
|
private |
int FEConfigSlidingInfo::m_version |
|
private |