#include <FEConfigTimingInfo.h>
Definition at line 11 of file FEConfigTimingInfo.h.
FEConfigTimingInfo::FEConfigTimingInfo |
( |
| ) |
|
FEConfigTimingInfo::~FEConfigTimingInfo |
( |
| ) |
|
void FEConfigTimingInfo::clear |
( |
void |
| ) |
|
|
private |
Definition at line 125 of file FEConfigTimingInfo.cc.
References DateHandler::dateToTm(), cuy::dh, MillePedeFileConverter_cfg::e, and mps_fire::result.
131 throw(std::runtime_error(
"FEConfigTimingInfo::fetchData(): no Id defined for this FEConfigTimingInfo "));
138 " where ( tim_conf_id= :1 or (tag=:2 AND version=:3 ) )" );
148 result->
setId(rset->getInt(1));
151 Date dbdate = rset->getDate(4);
155 throw(std::runtime_error(
"FEConfigTimingInfo::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
void setDBTime(const Tm &x)
std::string getConfigTag()
int FEConfigTimingInfo::fetchID |
( |
| ) |
|
|
noexcept |
Definition at line 184 of file FEConfigTimingInfo.cc.
References MillePedeFileConverter_cfg::e.
Referenced by setDBTime().
195 stmt->setSQL(
"SELECT tim_conf_id FROM "+
getTable()+
196 " WHERE tag=:1 and version=:2 " );
201 ResultSet* rset = stmt->executeQuery();
204 m_ID = rset->getInt(1);
208 m_conn->terminateStatement(stmt);
210 throw(std::runtime_error(
"FEConfigTimingInfo::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 159 of file FEConfigTimingInfo.cc.
References DateHandler::dateToTm(), cuy::dh, MillePedeFileConverter_cfg::e, and mps_fire::result.
168 " where tim_conf_id = ( select max( tim_conf_id) from "+
getTable() +
" ) " );
173 result->
setId(rset->getInt(1));
176 Date dbdate = rset->getDate(4);
180 throw(std::runtime_error(
"FEConfigTimingInfo::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
void setDBTime(const Tm &x)
int FEConfigTimingInfo::fetchNextId |
( |
| ) |
|
|
noexcept |
Definition at line 37 of file FEConfigTimingInfo.cc.
References MillePedeFileConverter_cfg::e, and mps_fire::result.
Referenced by setDBTime().
44 m_readStmt->setSQL(
"select FE_CONFIG_TIM_SQ.NextVal from DUAL ");
46 while (rset->next ()){
47 result= rset->getInt(1);
54 throw(std::runtime_error(
"FEConfigTimingInfo::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
Tm FEConfigTimingInfo::getDBTime |
( |
| ) |
const |
|
inline |
int FEConfigTimingInfo::getId |
( |
void |
| ) |
const |
|
inline |
int FEConfigTimingInfo::getID |
( |
| ) |
|
|
inline |
std::string FEConfigTimingInfo::getTable |
( |
| ) |
|
|
inlinevirtual |
int FEConfigTimingInfo::getVersion |
( |
| ) |
const |
|
inline |
void FEConfigTimingInfo::prepareWrite |
( |
| ) |
|
|
privatevirtualnoexcept |
Implements IODConfig.
Definition at line 59 of file FEConfigTimingInfo.cc.
References MillePedeFileConverter_cfg::e, and getId().
72 " VALUES ( :1, :2, :3 ) " );
78 throw(std::runtime_error(
"FEConfigTimingInfo::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
int fetchNextId() noexcept(false)
void FEConfigTimingInfo::setByID |
( |
int |
id | ) |
|
|
noexcept |
Definition at line 218 of file FEConfigTimingInfo.cc.
References DateHandler::dateToTm(), cuy::dh, and MillePedeFileConverter_cfg::e.
Referenced by setDBTime().
228 stmt->setSQL(
"SELECT * FROM "+
getTable()+
" WHERE tim_conf_id = :1");
231 ResultSet* rset = stmt->executeQuery();
233 this->
setId(rset->getInt(1));
236 Date dbdate = rset->getDate(4);
239 throw(std::runtime_error(
"FEConfigTimingInfo::setByID: Given tim_conf_id is not in the database"));
242 m_conn->terminateStatement(stmt);
244 throw(std::runtime_error(
"FEConfigTimingInfo::setByID: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
void setConfigTag(std::string x)
oracle::occi::SQLException SQLException
void setDBTime(const Tm &x)
void FEConfigTimingInfo::setDBTime |
( |
const Tm & |
x | ) |
|
|
inline |
void FEConfigTimingInfo::setId |
( |
int |
id | ) |
|
|
inline |
void FEConfigTimingInfo::setID |
( |
int |
id | ) |
|
|
inline |
void FEConfigTimingInfo::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 83 of file FEConfigTimingInfo.cc.
Referenced by setDBTime().
88 for( std::map<std::string, std::string >::const_iterator ci=
89 my_keys_map.begin(); ci!=my_keys_map.end(); ci++ ) {
91 if(ci->first==
"VERSION")
setVersion(atoi(ci->second.c_str()) );
void setConfigTag(std::string x)
void FEConfigTimingInfo::setVersion |
( |
int |
id | ) |
|
|
inline |
void FEConfigTimingInfo::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 98 of file FEConfigTimingInfo.cc.
References MillePedeFileConverter_cfg::e.
114 throw(std::runtime_error(
"FEConfigTimingInfo::writeDB(): "+e.getMessage()));
118 throw(std::runtime_error(
"FEConfigTimingInfo::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 FEConfigTimingInfo::m_db_time |
|
private |
int FEConfigTimingInfo::m_ID |
|
private |
int FEConfigTimingInfo::m_version |
|
private |