#include <FEConfigLUTInfo.h>
Definition at line 11 of file FEConfigLUTInfo.h.
FEConfigLUTInfo::FEConfigLUTInfo |
( |
| ) |
|
FEConfigLUTInfo::~FEConfigLUTInfo |
( |
| ) |
|
void FEConfigLUTInfo::clear |
( |
void |
| ) |
|
|
private |
void FEConfigLUTInfo::fetchData |
( |
FEConfigLUTInfo * |
result | ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 128 of file FEConfigLUTInfo.cc.
References DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, and query::result.
134 throw(std::runtime_error(
"FEConfigLUTInfo::fetchData(): no Id defined for this FEConfigLUTInfo "));
141 " where ( lut_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(
"FEConfigLUTInfo::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void setNumberOfGroups(int iov_id)
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
std::string getConfigTag()
void setDBTime(const Tm &x)
void checkConnection() const
int FEConfigLUTInfo::fetchID |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
Definition at line 189 of file FEConfigLUTInfo.cc.
References alignCSCRings::e.
200 stmt->setSQL(
"SELECT lut_conf_id FROM "+
getTable()+
201 " WHERE tag=:1 and version=:2 " );
209 m_ID = rset->getInt(1);
213 m_conn->terminateStatement(stmt);
215 throw(std::runtime_error(
"FEConfigLUTInfo::fetchID: "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
oracle::occi::ResultSet ResultSet
std::string getConfigTag()
void checkConnection() const
void FEConfigLUTInfo::fetchLastData |
( |
FEConfigLUTInfo * |
result | ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 163 of file FEConfigLUTInfo.cc.
References DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, and query::result.
172 " where lut_conf_id = ( select max( lut_conf_id) from "+
getTable() +
" ) " );
177 result->
setId(rset->getInt(1));
181 Date dbdate = rset->getDate(5);
185 throw(std::runtime_error(
"FEConfigLUTInfo::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void setNumberOfGroups(int iov_id)
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
void setDBTime(const Tm &x)
void checkConnection() const
int FEConfigLUTInfo::fetchNextId |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
Definition at line 38 of file FEConfigLUTInfo.cc.
References alignCSCRings::e, and query::result.
45 m_readStmt->setSQL(
"select FE_CONFIG_LUT_SQ.NextVal from DUAL ");
47 while (rset->next ()){
48 result= rset->getInt(1);
55 throw(std::runtime_error(
"FEConfigLUTInfo::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void checkConnection() const
Tm FEConfigLUTInfo::getDBTime |
( |
| ) |
const |
|
inline |
int FEConfigLUTInfo::getId |
( |
| ) |
const |
|
inline |
int FEConfigLUTInfo::getID |
( |
| ) |
|
|
inline |
int FEConfigLUTInfo::getNumberOfGroups |
( |
| ) |
const |
|
inline |
std::string FEConfigLUTInfo::getTable |
( |
| ) |
|
|
inlinevirtual |
int FEConfigLUTInfo::getVersion |
( |
| ) |
const |
|
inline |
void FEConfigLUTInfo::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IODConfig.
Definition at line 60 of file FEConfigLUTInfo.cc.
References alignCSCRings::e, and getId().
72 m_writeStmt->setSQL(
"INSERT INTO "+
getTable()+
" ( lut_conf_id, tag, version, number_of_groups) "
73 " VALUES ( :1, :2, :3 , :4) " );
79 throw(std::runtime_error(
"FEConfigLUTInfo::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void FEConfigLUTInfo::setByID |
( |
int |
id | ) |
|
throw | ( | std::runtime_error |
| ) | | |
Definition at line 223 of file FEConfigLUTInfo.cc.
References DateHandler::dateToTm(), cuy::dh, and alignCSCRings::e.
233 stmt->setSQL(
"SELECT * FROM fe_config_lut_info WHERE lut_conf_id = :1");
238 this->
setId(rset->getInt(1));
242 Date dbdate = rset->getDate(5);
245 throw(std::runtime_error(
"FEConfigLUTInfo::setByID: Given config_id is not in the database"));
248 m_conn->terminateStatement(stmt);
250 throw(std::runtime_error(
"FEConfigLUTInfo::setByID: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void setNumberOfGroups(int iov_id)
oracle::occi::Statement Statement
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
void setDBTime(const Tm &x)
void checkConnection() const
void FEConfigLUTInfo::setDBTime |
( |
const Tm & |
x | ) |
|
|
inline |
void FEConfigLUTInfo::setId |
( |
int |
id | ) |
|
|
inline |
void FEConfigLUTInfo::setID |
( |
int |
id | ) |
|
|
inline |
void FEConfigLUTInfo::setNumberOfGroups |
( |
int |
iov_id | ) |
|
|
inline |
void FEConfigLUTInfo::setParameters |
( |
const std::map< std::string, std::string > & |
my_keys_map | ) |
|
Definition at line 84 of file FEConfigLUTInfo.cc.
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()) );
void setNumberOfGroups(int iov_id)
void setConfigTag(std::string x)
void FEConfigLUTInfo::setVersion |
( |
int |
id | ) |
|
|
inline |
void FEConfigLUTInfo::writeDB |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 100 of file FEConfigLUTInfo.cc.
References alignCSCRings::e.
117 throw(std::runtime_error(
"FEConfigLUTInfo::writeDB(): "+e.getMessage()));
121 throw(std::runtime_error(
"FEConfigLUTInfo::writeDB: Failed to write"));
oracle::occi::SQLException SQLException
std::string getConfigTag()
int getNumberOfGroups() const
void checkConnection() const
Tm FEConfigLUTInfo::m_db_time |
|
private |
int FEConfigLUTInfo::m_ID |
|
private |
int FEConfigLUTInfo::m_iov_id |
|
private |
int FEConfigLUTInfo::m_version |
|
private |