#include <ODRunConfigCycleInfo.h>
Definition at line 14 of file ODRunConfigCycleInfo.h.
ODRunConfigCycleInfo::ODRunConfigCycleInfo |
( |
| ) |
|
Definition at line 12 of file ODRunConfigCycleInfo.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string m_description
ODRunConfigCycleInfo::~ODRunConfigCycleInfo |
( |
| ) |
|
void ODRunConfigCycleInfo::clear |
( |
void |
| ) |
|
|
private |
Definition at line 191 of file ODRunConfigCycleInfo.cc.
References query::result.
196 if(result->
getId()==0){
197 throw(std::runtime_error(
"ODRunConfigCycleInfo::fetchData(): no Id defined for this ODRunConfigCycleInfo "));
201 m_readStmt->setSQL(
"SELECT sequence_id , cycle_num , tag , description FROM ECAL_cycle_DAT WHERE cycle_id = :1 ");
210 result->
setTag( rset->getString(3) );
214 throw(std::runtime_error(
"ODRunConfigCycleInfo::fetchData(): "+e.getMessage()));
void setCycleNumber(int n)
void setDescription(std::string x)
oracle::occi::SQLException SQLException
void setSequenceID(int x)
void setTag(std::string x)
oracle::occi::ResultSet ResultSet
void checkConnection() const
int ODRunConfigCycleInfo::fetchID |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 92 of file ODRunConfigCycleInfo.cc.
107 stmt->setSQL(
"SELECT cycle_id from ECAL_cycle_DAT "
108 "WHERE sequence_id = :id1 "
109 " and cycle_num = :id2 " );
116 m_ID = rset->getInt(1);
120 m_conn->terminateStatement(stmt);
122 throw(std::runtime_error(
"ODRunConfigCycleInfo::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
void checkConnection() const
int ODRunConfigCycleInfo::fetchIDLast |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 131 of file ODRunConfigCycleInfo.cc.
141 stmt->setSQL(
"SELECT max(cycle_id) FROM ecal_cycle_dat " );
145 m_ID = rset->getInt(1);
149 m_conn->terminateStatement(stmt);
151 throw(std::runtime_error(
"ODRunConfigCycleInfo::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 ODRunConfigCycleInfo::getCycleNumber |
( |
| ) |
const |
|
inline |
std::string ODRunConfigCycleInfo::getDescription |
( |
| ) |
const |
|
inline |
int ODRunConfigCycleInfo::getId |
( |
| ) |
const |
|
inline |
int ODRunConfigCycleInfo::getSequenceID |
( |
| ) |
const |
|
inline |
std::string ODRunConfigCycleInfo::getTable |
( |
| ) |
|
|
inlinevirtual |
std::string ODRunConfigCycleInfo::getTag |
( |
| ) |
const |
|
inline |
void ODRunConfigCycleInfo::insertConfig |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 218 of file ODRunConfigCycleInfo.cc.
Referenced by ODEcalCycle::writeDB().
227 }
catch (std::runtime_error &e) {
232 throw(std::runtime_error(
"EcalCondDBInterface::insertDataSet: Unknown exception caught"));
oracle::occi::Connection * m_conn
void terminateWriteStatement()
void ODRunConfigCycleInfo::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IODConfig.
Definition at line 40 of file ODRunConfigCycleInfo.cc.
47 m_writeStmt->setSQL(
"INSERT INTO ECAL_CYCLE_DAT ( sequence_id , cycle_num, tag, description ) "
48 "VALUES (:1, :2, :3 , :4 )");
51 throw(std::runtime_error(
"ODRunConfigCycleInfo::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void ODRunConfigCycleInfo::setByID |
( |
int |
id | ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 159 of file ODRunConfigCycleInfo.cc.
References gather_cfg::cout.
166 cout<<
"ODRunConfigCycleInfo::setByID called for id "<<
id<<endl;
171 stmt->setSQL(
"SELECT sequence_id , cycle_num , tag , description FROM ECAL_cycle_DAT WHERE cycle_id = :1 ");
178 m_tag = rset->getString(3);
182 throw(std::runtime_error(
"ODRunConfigCycleInfo::setByID: Given cycle_id is not in the database"));
184 m_conn->terminateStatement(stmt);
186 throw(std::runtime_error(
"ODRunConfigCycleInfo::setByID: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
std::string m_description
oracle::occi::ResultSet ResultSet
void checkConnection() const
void ODRunConfigCycleInfo::setCycleNumber |
( |
int |
n | ) |
|
|
inline |
void ODRunConfigCycleInfo::setDescription |
( |
std::string |
x | ) |
|
|
inline |
void ODRunConfigCycleInfo::setId |
( |
int |
id | ) |
|
|
inline |
void ODRunConfigCycleInfo::setSequenceID |
( |
int |
x | ) |
|
|
inline |
void ODRunConfigCycleInfo::setTag |
( |
std::string |
x | ) |
|
|
inline |
void ODRunConfigCycleInfo::writeDB |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 56 of file ODRunConfigCycleInfo.cc.
References gather_cfg::cout.
76 throw(std::runtime_error(
"ODRunConfigCycleInfo::writeDB: "+e.getMessage()));
80 throw(std::runtime_error(
"ODRunConfigCycleInfo::writeDB: Failed to write"));
83 cout<<
"ODRunConfigCycleInfo::writeDB>> done inserting ODRunConfigCycleInfo with id="<<
m_ID<<endl;
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string getDescription() const
oracle::occi::SQLException SQLException
int getSequenceID() const
int getCycleNumber() const
std::string getTag() const
void checkConnection() const
int ODRunConfigCycleInfo::m_cycle_num |
|
private |
std::string ODRunConfigCycleInfo::m_description |
|
private |
int ODRunConfigCycleInfo::m_ID |
|
private |
int ODRunConfigCycleInfo::m_sequence_id |
|
private |
std::string ODRunConfigCycleInfo::m_tag |
|
private |