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