#include <ODFEPedestalOffsetInfo.h>
Definition at line 9 of file ODFEPedestalOffsetInfo.h.
ODFEPedestalOffsetInfo::ODFEPedestalOffsetInfo |
( |
| ) |
|
ODFEPedestalOffsetInfo::~ODFEPedestalOffsetInfo |
( |
| ) |
|
void ODFEPedestalOffsetInfo::clear |
( |
void |
| ) |
|
|
private |
Definition at line 134 of file ODFEPedestalOffsetInfo.cc.
References alignCSCRings::e, and query::result.
140 throw(std::runtime_error(
"ODFEPedestalOffsetInfo::fetchData(): no Id defined for this ODFEPedestalOffsetInfo "));
144 if(result->
getId()!=0) {
146 " where rec_id = :1 ");
150 " where tag=:1 AND version=:2 " );
155 throw(std::runtime_error(
"ODFEPedestalOffsetInfo::fetchData(): no Id defined for this record "));
164 result->
setId(rset->getInt(1));
169 throw(std::runtime_error(
"ODFEPedestalOffsetInfo::fetchData(): "+e.getMessage()));
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
std::string getConfigTag()
void checkConnection() const
int ODFEPedestalOffsetInfo::fetchID |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
Definition at line 195 of file ODFEPedestalOffsetInfo.cc.
References alignCSCRings::e.
206 stmt->setSQL(
"SELECT rec_id FROM "+
getTable()+
207 "WHERE tag=:1 and version=:2 " );
215 m_ID = rset->getInt(1);
219 m_conn->terminateStatement(stmt);
221 throw(std::runtime_error(
"ODFEPedestalOffsetInfo::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
Definition at line 173 of file ODFEPedestalOffsetInfo.cc.
References alignCSCRings::e, and query::result.
181 " where rec_id = ( select max(rec_id) from "+
getTable() +
" ) " );
186 result->
setId(rset->getInt(1));
191 throw(std::runtime_error(
"ODFEPedestalOffsetInfo::fetchData(): "+e.getMessage()));
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
void checkConnection() const
int ODFEPedestalOffsetInfo::fetchNextId |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
Definition at line 37 of file ODFEPedestalOffsetInfo.cc.
References alignCSCRings::e, and query::result.
44 m_readStmt->setSQL(
"select COND2CONF_INFO_SQ.NextVal from DUAL ");
46 while (rset->next ()){
47 result= rset->getInt(1);
54 throw(std::runtime_error(
"ODFEPedestalOffsetInfo::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void checkConnection() const
int ODFEPedestalOffsetInfo::getId |
( |
| ) |
const |
|
inline |
std::string ODFEPedestalOffsetInfo::getTable |
( |
| ) |
|
|
inlinevirtual |
int ODFEPedestalOffsetInfo::getVersion |
( |
| ) |
const |
|
inline |
void ODFEPedestalOffsetInfo::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IODConfig.
Definition at line 59 of file ODFEPedestalOffsetInfo.cc.
References alignCSCRings::e, and getId().
72 " VALUES ( :1, :2, :3 ) " );
78 throw(std::runtime_error(
"ODFEPedestalOffsetInfo::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void ODFEPedestalOffsetInfo::setId |
( |
int |
id | ) |
|
|
inline |
void ODFEPedestalOffsetInfo::setParameters |
( |
std::map< std::string, std::string > |
my_keys_map | ) |
|
Definition at line 83 of file ODFEPedestalOffsetInfo.cc.
88 for( std::map<std::string, std::string >::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 ODFEPedestalOffsetInfo::setVersion |
( |
int |
id | ) |
|
|
inline |
void ODFEPedestalOffsetInfo::writeDB |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 98 of file ODFEPedestalOffsetInfo.cc.
References gather_cfg::cout, and alignCSCRings::e.
114 throw(std::runtime_error(
"ODFEPedestalOffsetInfo::writeDB(): "+e.getMessage()));
120 throw(std::runtime_error(
"ODFEPedestalOffsetInfo::writeDB: Failed to write"));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
std::string getConfigTag()
void fetchData(ODFEPedestalOffsetInfo *result)
void checkConnection() const
int ODFEPedestalOffsetInfo::m_ID |
|
private |
int ODFEPedestalOffsetInfo::m_version |
|
private |