#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 MillePedeFileConverter_cfg::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 setSequenceID(int x)
void checkConnection() const noexcept(false)
void setTag(std::string x)
oracle::occi::SQLException SQLException
int ODRunConfigCycleInfo::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 92 of file ODRunConfigCycleInfo.cc.
References cuy::dh, and MillePedeFileConverter_cfg::e.
107 stmt->setSQL(
"SELECT cycle_id from ECAL_cycle_DAT " 108 "WHERE sequence_id = :id1 " 109 " and cycle_num = :id2 " );
113 ResultSet* rset = stmt->executeQuery();
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::Statement Statement
void setByID(int id) noexcept(false)
oracle::occi::SQLException SQLException
int ODRunConfigCycleInfo::fetchIDLast |
( |
| ) |
|
|
privatenoexcept |
Definition at line 131 of file ODRunConfigCycleInfo.cc.
References cuy::dh, and MillePedeFileConverter_cfg::e.
141 stmt->setSQL(
"SELECT max(cycle_id) FROM ecal_cycle_dat " );
142 ResultSet* rset = stmt->executeQuery();
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::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 |
( |
| ) |
|
|
inlinevirtual |
std::string ODRunConfigCycleInfo::getTag |
( |
void |
| ) |
const |
|
inline |
void ODRunConfigCycleInfo::insertConfig |
( |
| ) |
|
|
privatenoexcept |
void ODRunConfigCycleInfo::prepareWrite |
( |
| ) |
|
|
privatevirtualnoexcept |
Implements IODConfig.
Definition at line 40 of file ODRunConfigCycleInfo.cc.
References MillePedeFileConverter_cfg::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, MillePedeFileConverter_cfg::e, and hcalTTPDigis_cfi::id.
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 ");
174 ResultSet* rset = stmt->executeQuery();
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::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 56 of file ODRunConfigCycleInfo.cc.
References gather_cfg::cout, cuy::dh, and MillePedeFileConverter_cfg::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
std::string getDescription() const
int getSequenceID() const
void checkConnection() const noexcept(false)
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 |