#include <ODRunConfigCycleInfo.h>
Definition at line 12 of file ODRunConfigCycleInfo.h.
ODRunConfigCycleInfo::ODRunConfigCycleInfo |
( |
| ) |
|
Definition at line 11 of file ODRunConfigCycleInfo.cc.
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string m_description
ODRunConfigCycleInfo::~ODRunConfigCycleInfo |
( |
| ) |
|
|
override |
void ODRunConfigCycleInfo::clear |
( |
void |
| ) |
|
|
private |
Definition at line 161 of file ODRunConfigCycleInfo.cc.
References alignCSCRings::e, and mps_fire::result.
164 if (result->
getId() == 0) {
165 throw(std::runtime_error(
"ODRunConfigCycleInfo::fetchData(): no Id defined for this ODRunConfigCycleInfo "));
169 m_readStmt->setSQL(
"SELECT sequence_id , cycle_num , tag , description FROM ECAL_cycle_DAT WHERE cycle_id = :1 ");
178 result->
setTag(rset->getString(3));
182 throw(std::runtime_error(
"ODRunConfigCycleInfo::fetchData(): " + e.getMessage()));
void setCycleNumber(int n)
void setDescription(std::string x)
void checkConnection() const noexcept(false)
void setSequenceID(int x)
void setTag(std::string x)
oracle::occi::SQLException SQLException
int ODRunConfigCycleInfo::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 73 of file ODRunConfigCycleInfo.cc.
References cuy::dh, and alignCSCRings::e.
86 "SELECT cycle_id from ECAL_cycle_DAT "
87 "WHERE sequence_id = :id1 "
88 " and cycle_num = :id2 ");
92 ResultSet* rset = stmt->executeQuery();
95 m_ID = rset->getInt(1);
99 m_conn->terminateStatement(stmt);
101 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::Statement Statement
void setByID(int id) noexcept(false)
oracle::occi::SQLException SQLException
int ODRunConfigCycleInfo::fetchIDLast |
( |
| ) |
|
|
privatenoexcept |
Definition at line 108 of file ODRunConfigCycleInfo.cc.
References cuy::dh, and alignCSCRings::e.
115 stmt->setSQL(
"SELECT max(cycle_id) FROM ecal_cycle_dat ");
116 ResultSet* rset = stmt->executeQuery();
119 m_ID = rset->getInt(1);
123 m_conn->terminateStatement(stmt);
125 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::Statement Statement
void setByID(int id) noexcept(false)
oracle::occi::SQLException SQLException
int ODRunConfigCycleInfo::getCycleNumber |
( |
| ) |
const |
|
inline |
std::string ODRunConfigCycleInfo::getDescription |
( |
| ) |
const |
|
inline |
int ODRunConfigCycleInfo::getId |
( |
void |
| ) |
const |
|
inline |
int ODRunConfigCycleInfo::getSequenceID |
( |
| ) |
const |
|
inline |
std::string ODRunConfigCycleInfo::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
std::string ODRunConfigCycleInfo::getTag |
( |
| ) |
const |
|
inline |
void ODRunConfigCycleInfo::insertConfig |
( |
| ) |
|
|
privatenoexcept |
Definition at line 186 of file ODRunConfigCycleInfo.cc.
References alignCSCRings::e.
Referenced by ODEcalCycle::writeDB().
192 }
catch (std::runtime_error&
e) {
197 throw(std::runtime_error(
"EcalCondDBInterface::insertDataSet: Unknown exception caught"));
oracle::occi::Connection * m_conn
void writeDB() noexcept(false)
void terminateWriteStatement() noexcept(false)
void prepareWrite() noexcept(false) override
void ODRunConfigCycleInfo::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IODConfig.
Definition at line 34 of file ODRunConfigCycleInfo.cc.
References alignCSCRings::e.
40 "INSERT INTO ECAL_CYCLE_DAT ( sequence_id , cycle_num, tag, description ) "
41 "VALUES (:1, :2, :3 , :4 )");
44 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 132 of file ODRunConfigCycleInfo.cc.
References gather_cfg::cout, cuy::dh, alignCSCRings::e, and gpuClustering::id.
137 cout <<
"ODRunConfigCycleInfo::setByID called for id " <<
id << endl;
142 stmt->setSQL(
"SELECT sequence_id , cycle_num , tag , description FROM ECAL_cycle_DAT WHERE cycle_id = :1 ");
145 ResultSet* rset = stmt->executeQuery();
149 m_tag = rset->getString(3);
153 throw(std::runtime_error(
"ODRunConfigCycleInfo::setByID: Given cycle_id is not in the database"));
155 m_conn->terminateStatement(stmt);
157 throw(std::runtime_error(
"ODRunConfigCycleInfo::setByID: " + e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
uint16_t *__restrict__ id
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
std::string m_description
oracle::occi::SQLException SQLException
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 48 of file ODRunConfigCycleInfo.cc.
References gather_cfg::cout, cuy::dh, and alignCSCRings::e.
63 throw(std::runtime_error(
"ODRunConfigCycleInfo::writeDB: " + e.getMessage()));
67 throw(std::runtime_error(
"ODRunConfigCycleInfo::writeDB: Failed to write"));
70 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
int getSequenceID() const
int getCycleNumber() const
int fetchID() noexcept(false)
std::string getTag() const
oracle::occi::SQLException SQLException
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 |