#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 alignCSCRings::e, and mps_fire::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)
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
void setSequenceID(int x)
void setTag(std::string x)
oracle::occi::ResultSet ResultSet
int ODRunConfigCycleInfo::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 92 of file ODRunConfigCycleInfo.cc.
References cuy::dh, and alignCSCRings::e.
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
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
void setByID(int id) noexcept(false)
oracle::occi::ResultSet ResultSet
int ODRunConfigCycleInfo::fetchIDLast |
( |
| ) |
|
|
privatenoexcept |
Definition at line 131 of file ODRunConfigCycleInfo.cc.
References cuy::dh, and alignCSCRings::e.
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
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
void setByID(int id) noexcept(false)
oracle::occi::ResultSet ResultSet
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 |
( |
void |
| ) |
const |
|
inline |
void ODRunConfigCycleInfo::insertConfig |
( |
| ) |
|
|
privatenoexcept |
Definition at line 218 of file ODRunConfigCycleInfo.cc.
References alignCSCRings::e.
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 prepareWrite() noexcept(false)
void writeDB() noexcept(false)
void terminateWriteStatement() noexcept(false)
void ODRunConfigCycleInfo::prepareWrite |
( |
| ) |
|
|
privatevirtualnoexcept |
Implements IODConfig.
Definition at line 40 of file ODRunConfigCycleInfo.cc.
References alignCSCRings::e.
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
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
void ODRunConfigCycleInfo::setByID |
( |
int |
id | ) |
|
|
privatenoexcept |
Definition at line 159 of file ODRunConfigCycleInfo.cc.
References gather_cfg::cout, cuy::dh, and alignCSCRings::e.
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
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
std::string m_description
oracle::occi::ResultSet ResultSet
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 |
( |
| ) |
|
|
privatenoexcept |
Definition at line 56 of file ODRunConfigCycleInfo.cc.
References gather_cfg::cout, cuy::dh, and alignCSCRings::e.
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
void checkConnection() const noexcept(false)
std::string getDescription() const
oracle::occi::SQLException SQLException
int getSequenceID() const
int getCycleNumber() const
int fetchID() noexcept(false)
std::string getTag() const
void checkPrepare() noexcept(false)
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 |