#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 |
Definition at line 207 of file ODRunConfigSeqInfo.cc.
References MillePedeFileConverter_cfg::e, and mps_fire::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)
void checkConnection() const noexcept(false)
int fetchID() noexcept(false)
void setNumberOfCycles(int x)
void setEcalConfigId(int x)
oracle::occi::SQLException SQLException
void setByID(int id) noexcept(false)
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
int ODRunConfigSeqInfo::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 43 of file ODRunConfigSeqInfo.cc.
References cuy::dh, and MillePedeFileConverter_cfg::e.
58 stmt->setSQL(
"SELECT sequence_id from ECAL_sequence_DAT " 59 "WHERE ecal_config_id = :id1 " 60 " and sequence_num = :id2 " );
64 ResultSet* rset = stmt->executeQuery();
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
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
void setByID(int id) noexcept(false)
int ODRunConfigSeqInfo::fetchIDLast |
( |
| ) |
|
|
privatenoexcept |
Definition at line 81 of file ODRunConfigSeqInfo.cc.
References cuy::dh, and MillePedeFileConverter_cfg::e.
91 stmt->setSQL(
"SELECT max(sequence_id) FROM ecal_sequence_dat " );
92 ResultSet* rset = stmt->executeQuery();
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
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
void setByID(int id) noexcept(false)
std::string ODRunConfigSeqInfo::getDescription |
( |
| ) |
const |
|
inline |
int ODRunConfigSeqInfo::getEcalConfigId |
( |
| ) |
const |
|
inline |
int ODRunConfigSeqInfo::getId |
( |
void |
| ) |
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 |
( |
| ) |
|
|
privatevirtualnoexcept |
Implements IODConfig.
Definition at line 143 of file ODRunConfigSeqInfo.cc.
References MillePedeFileConverter_cfg::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
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
void ODRunConfigSeqInfo::setByID |
( |
int |
id | ) |
|
|
privatenoexcept |
Definition at line 109 of file ODRunConfigSeqInfo.cc.
References gather_cfg::cout, cuy::dh, MillePedeFileConverter_cfg::e, and hcalTTPDigis_cfi::id.
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 ");
124 ResultSet* rset = stmt->executeQuery();
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
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
void setByID(int id) noexcept(false)
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
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 |
( |
| ) |
|
|
privatenoexcept |
Definition at line 157 of file ODRunConfigSeqInfo.cc.
References gather_cfg::cout, cuy::dh, and MillePedeFileConverter_cfg::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
void checkConnection() const noexcept(false)
std::string getDescription() const
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
int writeDB() noexcept(false)
void checkPrepare() noexcept(false)
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 |