#include <FEConfigMainInfo.h>
Definition at line 19 of file FEConfigMainInfo.h.
FEConfigMainInfo::FEConfigMainInfo |
( |
| ) |
|
Definition at line 12 of file FEConfigMainInfo.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
FEConfigMainInfo::~FEConfigMainInfo |
( |
| ) |
|
void FEConfigMainInfo::clear |
( |
void |
| ) |
|
|
private |
void FEConfigMainInfo::fetchData |
( |
FEConfigMainInfo * |
result | ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 263 of file FEConfigMainInfo.cc.
References gather_cfg::cout, DateHandler::dateToTm(), and query::result.
265 {
std::cout <<
" ### 1 getId from FEConfigMainInfo = " << result->
getId() << std::endl;
274 if(result->
getId()==0){
281 m_readStmt->setSQL(
"SELECT * FROM FE_CONFIG_MAIN WHERE conf_id = :1 ");
283 std::cout <<
" ### 2 getId from FEConfigMainInfo = " << result->
getId() << std::endl;
291 result->
setId( rset->getInt(1) );
308 Date dbdate = rset->getDate(16);
309 result->
setDBTime( dh.dateToTm( dbdate ));
312 throw(std::runtime_error(
"FEConfigMainInfo::fetchData(): "+e.getMessage()));
void setDescription(std::string x)
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
std::string getConfigTag()
void checkConnection() const
int FEConfigMainInfo::fetchID |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 70 of file FEConfigMainInfo.cc.
References gather_cfg::cout.
88 stmt->setSQL(
"SELECT conf_id from FE_CONFIG_MAIN "
90 " and version = :version " );
93 std::cout<<
" using query with version " <<endl;
96 stmt->setSQL(
"SELECT conf_id from FE_CONFIG_MAIN "
97 "WHERE tag = :1 and version= (select max(version) from FE_CONFIG_MAIN where tag=:2) " );
100 std::cout<<
" using query WITHOUT version " <<endl;
106 m_ID = rset->getInt(1);
111 m_conn->terminateStatement(stmt);
113 throw(std::runtime_error(
"FEConfigMainInfo::fetchID: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
oracle::occi::ResultSet ResultSet
std::string getConfigTag()
void checkConnection() const
int FEConfigMainInfo::fetchIDLast |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 190 of file FEConfigMainInfo.cc.
200 stmt->setSQL(
"SELECT max(conf_id) FROM fe_config_main ");
204 m_ID = rset->getInt(1);
208 m_conn->terminateStatement(stmt);
210 throw(std::runtime_error(
"ODRunConfigInfo::fetchIDLast: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
oracle::occi::ResultSet ResultSet
void checkConnection() const
int FEConfigMainInfo::fetchNextId |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 49 of file FEConfigMainInfo.cc.
References query::result.
56 m_readStmt->setSQL(
"select fe_config_main_sq.NextVal from dual");
58 while (rset->next ()){
59 result= rset->getInt(1);
65 throw(std::runtime_error(
"FEConfigMainInfo::fetchNextId(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::ResultSet ResultSet
void checkConnection() const
int FEConfigMainInfo::getBstId |
( |
| ) |
const |
|
inline |
int FEConfigMainInfo::getBttId |
( |
| ) |
const |
|
inline |
int FEConfigMainInfo::getBxtId |
( |
| ) |
const |
|
inline |
Tm FEConfigMainInfo::getDBTime |
( |
| ) |
const |
|
inline |
std::string FEConfigMainInfo::getDescription |
( |
| ) |
const |
|
inline |
int FEConfigMainInfo::getFgrId |
( |
| ) |
const |
|
inline |
int FEConfigMainInfo::getId |
( |
| ) |
const |
|
inline |
int FEConfigMainInfo::getLinId |
( |
| ) |
const |
|
inline |
int FEConfigMainInfo::getLUTId |
( |
| ) |
const |
|
inline |
int FEConfigMainInfo::getPedId |
( |
| ) |
const |
|
inline |
int FEConfigMainInfo::getSliId |
( |
| ) |
const |
|
inline |
int FEConfigMainInfo::getSpiId |
( |
| ) |
const |
|
inline |
std::string FEConfigMainInfo::getTable |
( |
| ) |
|
|
inlinevirtual |
int FEConfigMainInfo::getTimId |
( |
| ) |
const |
|
inline |
int FEConfigMainInfo::getVersion |
( |
| ) |
const |
|
inline |
int FEConfigMainInfo::getWeiId |
( |
| ) |
const |
|
inline |
void FEConfigMainInfo::insertConfig |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 316 of file FEConfigMainInfo.cc.
325 }
catch (std::runtime_error &e) {
330 throw(std::runtime_error(
"FEConfigMainInfo::insertConfig: Unknown exception caught"));
oracle::occi::Connection * m_conn
void terminateWriteStatement()
void FEConfigMainInfo::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IODConfig.
Definition at line 122 of file FEConfigMainInfo.cc.
132 m_writeStmt->setSQL(
"INSERT INTO fe_config_main (conf_id, ped_conf_id, lin_conf_id, lut_conf_id, fgr_conf_id, sli_conf_id, wei_conf_id, spi_conf_id, tim_conf_id, bxt_conf_id, btt_conf_id, bst_conf_id, tag, version, description) "
133 " VALUES (:1, :2, :3 , :4, :5, :6 ,:7, :8, :9, :10, :11, :12, :13, :14, :15 )");
139 throw(std::runtime_error(
"FEConfigMainInfo::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void FEConfigMainInfo::setBstId |
( |
int |
x | ) |
|
|
inline |
void FEConfigMainInfo::setBttId |
( |
int |
x | ) |
|
|
inline |
void FEConfigMainInfo::setBxtId |
( |
int |
x | ) |
|
|
inline |
void FEConfigMainInfo::setByID |
( |
int |
id | ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 218 of file FEConfigMainInfo.cc.
References gather_cfg::cout, and DateHandler::dateToTm().
225 cout<<
"FEConfigMainInfo::setByID called for id "<<
id<<endl;
230 stmt->setSQL(
"SELECT * FROM FE_CONFIG_MAIN WHERE conf_id = :1 ");
235 setId( rset->getInt(1) );
250 Date dbdate = rset->getDate(16);
254 throw(std::runtime_error(
"FEConfigMainInfo::setByID: Given cycle_id is not in the database"));
256 m_conn->terminateStatement(stmt);
258 throw(std::runtime_error(
"FEConfigMainInfo::setByID: "+e.getMessage()));
void setDescription(std::string x)
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
oracle::occi::ResultSet ResultSet
void setConfigTag(std::string x)
void checkConnection() const
void FEConfigMainInfo::setDBTime |
( |
Tm |
x | ) |
|
|
inline |
void FEConfigMainInfo::setDescription |
( |
std::string |
x | ) |
|
|
inline |
void FEConfigMainInfo::setFgrId |
( |
int |
x | ) |
|
|
inline |
void FEConfigMainInfo::setId |
( |
int |
id | ) |
|
|
inline |
void FEConfigMainInfo::setLinId |
( |
int |
x | ) |
|
|
inline |
void FEConfigMainInfo::setLUTId |
( |
int |
x | ) |
|
|
inline |
void FEConfigMainInfo::setPedId |
( |
int |
x | ) |
|
|
inline |
void FEConfigMainInfo::setSliId |
( |
int |
x | ) |
|
|
inline |
void FEConfigMainInfo::setSpiId |
( |
int |
x | ) |
|
|
inline |
void FEConfigMainInfo::setTimId |
( |
int |
x | ) |
|
|
inline |
void FEConfigMainInfo::setVersion |
( |
int |
id | ) |
|
|
inline |
Definition at line 72 of file FEConfigMainInfo.h.
References m_version.
Referenced by popcon::EcalTPGBadTTHandler::getNewObjects(), popcon::EcalTPGFineGrainEBIdMapHandler::getNewObjects(), popcon::EcalTPGLinConstHandler::getNewObjects(), popcon::EcalTPGLutIdMapHandler::getNewObjects(), popcon::EcalTPGPhysicsConstHandler::getNewObjects(), popcon::EcalTPGWeightIdMapHandler::getNewObjects(), popcon::EcalTPGBadXTHandler::getNewObjects(), popcon::EcalTPGFineGrainTowerEEHandler::getNewObjects(), popcon::EcalTPGFineGrainEBGroupHandler::getNewObjects(), popcon::EcalTPGWeightGroupHandler::getNewObjects(), popcon::EcalTPGPedestalsHandler::getNewObjects(), popcon::EcalTPGSlidingWindowHandler::getNewObjects(), popcon::EcalTPGFineGrainStripEEHandler::getNewObjects(), popcon::EcalTPGLutGroupHandler::getNewObjects(), and EcalTPGDBApp::writeToConfDB_TPGMain().
void FEConfigMainInfo::setWeiId |
( |
int |
x | ) |
|
|
inline |
void FEConfigMainInfo::writeDB |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 145 of file FEConfigMainInfo.cc.
References gather_cfg::cout.
175 throw(std::runtime_error(
"FEConfigMainInfo::writeDB: "+e.getMessage()));
179 throw(std::runtime_error(
"FEConfigMainInfo::writeDB: Failed to write"));
183 cout<<
"FEConfigMainInfo::writeDB>> done inserting FEConfigMainInfo with id="<<
m_ID<<endl;
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string getDescription() const
oracle::occi::SQLException SQLException
std::string getConfigTag()
void checkConnection() const
int FEConfigMainInfo::m_bst_id |
|
private |
int FEConfigMainInfo::m_btt_id |
|
private |
int FEConfigMainInfo::m_bxt_id |
|
private |
Tm FEConfigMainInfo::m_db_time |
|
private |
std::string FEConfigMainInfo::m_description |
|
private |
int FEConfigMainInfo::m_fgr_id |
|
private |
int FEConfigMainInfo::m_ID |
|
private |
int FEConfigMainInfo::m_lin_id |
|
private |
int FEConfigMainInfo::m_lut_id |
|
private |
int FEConfigMainInfo::m_ped_id |
|
private |
int FEConfigMainInfo::m_sli_id |
|
private |
int FEConfigMainInfo::m_spi_id |
|
private |
int FEConfigMainInfo::m_tim_id |
|
private |
int FEConfigMainInfo::m_version |
|
private |
int FEConfigMainInfo::m_wei_id |
|
private |