#include <ODScanConfig.h>
Definition at line 9 of file ODScanConfig.h.
ODScanConfig::ODScanConfig |
( |
| ) |
|
Definition at line 11 of file ODScanConfig.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
ODScanConfig::~ODScanConfig |
( |
| ) |
|
void ODScanConfig::clear |
( |
void |
| ) |
|
|
private |
void ODScanConfig::fetchData |
( |
ODScanConfig * |
result | ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 131 of file ODScanConfig.cc.
References query::result.
137 throw(std::runtime_error(
"ODScanConfig::fetchData(): no Id defined for this ODScanConfig "));
143 "FROM ECAL_SCAN_DAT "
144 " where (scan_id = :1 or scan_tag=:2 )" );
153 result->
setId(rset->getInt(1));
158 result->
setToVal( rset->getInt(6) );
159 result->
setStep( rset->getInt(7) );
162 throw(std::runtime_error(
"ODScanConfig::fetchData(): "+e.getMessage()));
oracle::occi::SQLException SQLException
void setScanType(std::string x)
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
std::string getConfigTag()
void checkConnection() const
int ODScanConfig::fetchID |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 166 of file ODScanConfig.cc.
177 stmt->setSQL(
"SELECT scan_id FROM ecal_scan_dat "
178 "WHERE scan_tag=:scan_tag ");
185 m_ID = rset->getInt(1);
189 m_conn->terminateStatement(stmt);
191 throw(std::runtime_error(
"ODScanConfig::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
int ODScanConfig::fetchNextId |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 38 of file ODScanConfig.cc.
References query::result.
45 m_readStmt->setSQL(
"select ecal_scan_config_sq.NextVal from dual");
47 while (rset->next ()){
48 result= rset->getInt(1);
54 throw(std::runtime_error(
"ODScanConfig::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void checkConnection() const
int ODScanConfig::getFromVal |
( |
| ) |
const |
|
inline |
int ODScanConfig::getId |
( |
| ) |
const |
|
inline |
std::string ODScanConfig::getScanType |
( |
| ) |
const |
|
inline |
int ODScanConfig::getStep |
( |
| ) |
const |
|
inline |
std::string ODScanConfig::getTable |
( |
| ) |
|
|
inlinevirtual |
int ODScanConfig::getToVal |
( |
| ) |
const |
|
inline |
int ODScanConfig::getTypeId |
( |
| ) |
const |
|
inline |
void ODScanConfig::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IODConfig.
Definition at line 79 of file ODScanConfig.cc.
87 m_writeStmt->setSQL(
"INSERT INTO ECAL_scan_dat ( scan_id, scan_tag ,"
88 " type_id, scan_type , FROM_VAL , TO_VAL, STEP )"
89 " VALUES ( :1, :2, :3, :4, :5, :6, :7)");
94 throw(std::runtime_error(
"ODScanConfig::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void ODScanConfig::setFromVal |
( |
int |
x | ) |
|
|
inline |
void ODScanConfig::setId |
( |
int |
id | ) |
|
|
inline |
void ODScanConfig::setParameters |
( |
std::map< std::string, std::string > |
my_keys_map | ) |
|
Definition at line 60 of file ODScanConfig.cc.
65 for( std::map<std::string, std::string >::iterator ci=
66 my_keys_map.begin(); ci!=my_keys_map.end(); ci++ ) {
69 if(ci->first==
"TYPE_ID")
setTypeId(atoi(ci->second.c_str()) );
70 if(ci->first==
"TYPE" || ci->first==
"SCAN_TYPE")
setScanType(ci->second.c_str() );
71 if(ci->first==
"FROM" ||ci->first==
"FROM_VAL" )
setFromVal(atoi(ci->second.c_str() ));
72 if(ci->first==
"TO" ||ci->first==
"TO_VAL" )
setToVal(atoi(ci->second.c_str() ));
73 if(ci->first==
"STEP")
setStep(atoi(ci->second.c_str() ));
void setScanType(std::string x)
void setConfigTag(std::string x)
void ODScanConfig::setScanType |
( |
std::string |
x | ) |
|
|
inline |
void ODScanConfig::setStep |
( |
int |
x | ) |
|
|
inline |
void ODScanConfig::setToVal |
( |
int |
x | ) |
|
|
inline |
void ODScanConfig::setTypeId |
( |
int |
x | ) |
|
|
inline |
void ODScanConfig::writeDB |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 98 of file ODScanConfig.cc.
119 throw(std::runtime_error(
"ODScanConfig::writeDB(): "+e.getMessage()));
123 throw(std::runtime_error(
"ODScanConfig::writeDB: Failed to write"));
oracle::occi::SQLException SQLException
std::string getConfigTag()
std::string getScanType() const
void checkConnection() const
int ODScanConfig::m_from_val |
|
private |
int ODScanConfig::m_to_val |
|
private |
std::string ODScanConfig::m_type |
|
private |
int ODScanConfig::m_type_id |
|
private |