#include <ODRunConfigSeqInfo.h>
Definition at line 15 of file ODRunConfigSeqInfo.h.
ODRunConfigSeqInfo::ODRunConfigSeqInfo |
( |
| ) |
|
Definition at line 12 of file ODRunConfigSeqInfo.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string m_description
ODRunConfigSeqInfo::~ODRunConfigSeqInfo |
( |
| ) |
|
void ODRunConfigSeqInfo::clear |
( |
void |
| ) |
|
|
private |
void ODRunConfigSeqInfo::fetchData |
( |
ODRunConfigSeqInfo * |
result | ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 207 of file ODRunConfigSeqInfo.cc.
References alignCSCRings::e, and query::result.
212 if(result->
getId()==0){
219 m_readStmt->setSQL(
"SELECT ecal_config_id, sequence_num, num_of_cycles, "
220 "sequence_type_def_id, description FROM ECAL_sequence_DAT WHERE sequence_id = :1 ");
230 int seq_def_id=rset->getInt(4);
238 throw(std::runtime_error(
"ODRunConfigSeqInfo::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void setSequenceNumber(int x)
void setDescription(std::string x)
oracle::occi::SQLException SQLException
void setNumberOfCycles(int x)
void setEcalConfigId(int x)
oracle::occi::ResultSet ResultSet
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void checkConnection() const
int ODRunConfigSeqInfo::fetchID |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 43 of file ODRunConfigSeqInfo.cc.
References cuy::dh, and alignCSCRings::e.
58 stmt->setSQL(
"SELECT sequence_id from ECAL_sequence_DAT "
59 "WHERE ecal_config_id = :id1 "
60 " and sequence_num = :id2 " );
67 m_ID = rset->getInt(1);
71 m_conn->terminateStatement(stmt);
73 throw(std::runtime_error(
"ODRunConfigSeqInfo::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 ODRunConfigSeqInfo::fetchIDLast |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 81 of file ODRunConfigSeqInfo.cc.
References cuy::dh, and alignCSCRings::e.
91 stmt->setSQL(
"SELECT max(sequence_id) FROM ecal_sequence_dat " );
95 m_ID = rset->getInt(1);
99 m_conn->terminateStatement(stmt);
101 throw(std::runtime_error(
"ODRunConfigSeqInfo::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
std::string ODRunConfigSeqInfo::getDescription |
( |
| ) |
const |
|
inline |
int ODRunConfigSeqInfo::getEcalConfigId |
( |
| ) |
const |
|
inline |
int ODRunConfigSeqInfo::getId |
( |
| ) |
const |
|
inline |
int ODRunConfigSeqInfo::getNumberOfCycles |
( |
| ) |
const |
|
inline |
RunSeqDef ODRunConfigSeqInfo::getRunSeqDef |
( |
| ) |
const |
int ODRunConfigSeqInfo::getSequenceId |
( |
| ) |
const |
|
inline |
int ODRunConfigSeqInfo::getSequenceNumber |
( |
| ) |
const |
|
inline |
std::string ODRunConfigSeqInfo::getTable |
( |
| ) |
|
|
inlinevirtual |
void ODRunConfigSeqInfo::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IODConfig.
Definition at line 143 of file ODRunConfigSeqInfo.cc.
References alignCSCRings::e.
150 m_writeStmt->setSQL(
"INSERT INTO ECAL_SEQUENCE_DAT ( ecal_config_id, "
151 "sequence_num, num_of_cycles, sequence_type_def_id, description ) "
152 "VALUES (:1, :2, :3 , :4, :5 )");
154 throw(std::runtime_error(
"ODRunConfigSeqInfo::prepareWrite(): "+e.getMessage()));
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void ODRunConfigSeqInfo::setByID |
( |
int |
id | ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 109 of file ODRunConfigSeqInfo.cc.
References gather_cfg::cout, cuy::dh, and alignCSCRings::e.
116 cout<<
"ODRunConfigSeqInfo::setByID called for id "<<
id<<endl;
121 stmt->setSQL(
"SELECT ecal_config_id, sequence_num, num_of_cycles, sequence_type_def_id, description FROM ECAL_sequence_DAT WHERE sequence_id = :1 ");
129 int seq_def_id=rset->getInt(4);
135 throw(std::runtime_error(
"ODRunConfigSeqInfo::setByID: Given config_id is not in the database"));
137 m_conn->terminateStatement(stmt);
139 throw(std::runtime_error(
"ODRunConfigSeqInfo::setByID: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string m_description
oracle::occi::SQLException SQLException
oracle::occi::Statement Statement
oracle::occi::ResultSet ResultSet
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void checkConnection() const
void ODRunConfigSeqInfo::setDescription |
( |
std::string |
x | ) |
|
|
inline |
void ODRunConfigSeqInfo::setEcalConfigId |
( |
int |
x | ) |
|
|
inline |
void ODRunConfigSeqInfo::setId |
( |
int |
id | ) |
|
|
inline |
void ODRunConfigSeqInfo::setNumberOfCycles |
( |
int |
x | ) |
|
|
inline |
void ODRunConfigSeqInfo::setRunSeqDef |
( |
const RunSeqDef & |
runSeqDef | ) |
|
void ODRunConfigSeqInfo::setSequenceId |
( |
int |
x | ) |
|
|
inline |
void ODRunConfigSeqInfo::setSequenceNumber |
( |
int |
x | ) |
|
|
inline |
void ODRunConfigSeqInfo::writeDB |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
private |
Definition at line 157 of file ODRunConfigSeqInfo.cc.
References gather_cfg::cout, cuy::dh, and alignCSCRings::e.
187 throw(std::runtime_error(
"ODRunConfigSeqInfo::writeDB(): "+e.getMessage()));
190 throw(std::runtime_error(
"ODRunConfigSeqInfo::writeDB: Failed to write"));
192 cout<<
"ODRunConfigSeqInfo::writeDB>> done inserting ODRunConfigSeqInfo with id="<<
m_ID<<endl;
int getNumberOfCycles() const
int getSequenceNumber() const
oracle::occi::Environment * m_env
int getEcalConfigId() const
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
std::string getDescription() const
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void checkConnection() const
int ODRunConfigSeqInfo::m_cycles |
|
private |
std::string ODRunConfigSeqInfo::m_description |
|
private |
int ODRunConfigSeqInfo::m_ecal_config_id |
|
private |
int ODRunConfigSeqInfo::m_ID |
|
private |
int ODRunConfigSeqInfo::m_seq_num |
|
private |
int ODRunConfigSeqInfo::m_sequence_id |
|
private |