#include <ODRunConfigSeqInfo.h>
Definition at line 15 of file ODRunConfigSeqInfo.h.
◆ ODRunConfigSeqInfo()
ODRunConfigSeqInfo::ODRunConfigSeqInfo |
( |
| ) |
|
Definition at line 11 of file ODRunConfigSeqInfo.cc.
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
std::string m_description
◆ ~ODRunConfigSeqInfo()
ODRunConfigSeqInfo::~ODRunConfigSeqInfo |
( |
| ) |
|
|
override |
◆ clear()
void ODRunConfigSeqInfo::clear |
( |
void |
| ) |
|
|
private |
◆ fetchData()
Definition at line 181 of file ODRunConfigSeqInfo.cc.
References MillePedeFileConverter_cfg::e, and mps_fire::result.
184 if (result->
getId() == 0) {
191 "SELECT ecal_config_id, sequence_num, num_of_cycles, " 192 "sequence_type_def_id, description FROM ECAL_sequence_DAT WHERE sequence_id = :1 ");
199 result->setEcalConfigId(rset->getInt(1));
200 result->setSequenceNumber(rset->getInt(2));
201 result->setNumberOfCycles(rset->getInt(3));
202 int seq_def_id = rset->getInt(4);
206 result->setDescription(rset->getString(5));
209 throw(std::runtime_error(
"ODRunConfigSeqInfo::fetchData(): " +
e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setByID(int id) noexcept(false) override
oracle::occi::SQLException SQLException
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
◆ fetchID()
int ODRunConfigSeqInfo::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 37 of file ODRunConfigSeqInfo.cc.
References cuy::dh, and MillePedeFileConverter_cfg::e.
50 "SELECT sequence_id from ECAL_sequence_DAT " 51 "WHERE ecal_config_id = :id1 " 52 " and sequence_num = :id2 ");
56 ResultSet* rset = stmt->executeQuery();
59 m_ID = rset->getInt(1);
63 m_conn->terminateStatement(stmt);
65 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)
◆ fetchIDLast()
int ODRunConfigSeqInfo::fetchIDLast |
( |
| ) |
|
|
privatenoexcept |
Definition at line 71 of file ODRunConfigSeqInfo.cc.
References cuy::dh, and MillePedeFileConverter_cfg::e.
78 stmt->setSQL(
"SELECT max(sequence_id) FROM ecal_sequence_dat ");
79 ResultSet* rset = stmt->executeQuery();
82 m_ID = rset->getInt(1);
86 m_conn->terminateStatement(stmt);
88 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)
◆ getDescription()
std::string ODRunConfigSeqInfo::getDescription |
( |
| ) |
const |
|
inline |
◆ getEcalConfigId()
int ODRunConfigSeqInfo::getEcalConfigId |
( |
| ) |
const |
|
inline |
◆ getId()
int ODRunConfigSeqInfo::getId |
( |
void |
| ) |
const |
|
inline |
◆ getNumberOfCycles()
int ODRunConfigSeqInfo::getNumberOfCycles |
( |
| ) |
const |
|
inline |
◆ getRunSeqDef()
RunSeqDef ODRunConfigSeqInfo::getRunSeqDef |
( |
| ) |
const |
◆ getSequenceId()
int ODRunConfigSeqInfo::getSequenceId |
( |
| ) |
const |
|
inline |
◆ getSequenceNumber()
int ODRunConfigSeqInfo::getSequenceNumber |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string ODRunConfigSeqInfo::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ operator!=()
◆ operator==()
◆ prepareWrite()
void ODRunConfigSeqInfo::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IODConfig.
Definition at line 129 of file ODRunConfigSeqInfo.cc.
References MillePedeFileConverter_cfg::e.
135 "INSERT INTO ECAL_SEQUENCE_DAT ( ecal_config_id, " 136 "sequence_num, num_of_cycles, sequence_type_def_id, description ) " 137 "VALUES (:1, :2, :3 , :4, :5 )");
139 throw(std::runtime_error(
"ODRunConfigSeqInfo::prepareWrite(): " +
e.getMessage()));
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
◆ setByID()
void ODRunConfigSeqInfo::setByID |
( |
int |
id | ) |
|
|
privatenoexcept |
Definition at line 95 of file ODRunConfigSeqInfo.cc.
References gather_cfg::cout, cuy::dh, MillePedeFileConverter_cfg::e, and EcalPhiSymFlatTableProducers_cfi::id.
100 cout <<
"ODRunConfigSeqInfo::setByID called for id " <<
id << endl;
106 "SELECT ecal_config_id, sequence_num, num_of_cycles, sequence_type_def_id, description FROM ECAL_sequence_DAT " 107 "WHERE sequence_id = :1 ");
110 ResultSet* rset = stmt->executeQuery();
115 int seq_def_id = rset->getInt(4);
121 throw(std::runtime_error(
"ODRunConfigSeqInfo::setByID: Given config_id is not in the database"));
123 m_conn->terminateStatement(stmt);
125 throw(std::runtime_error(
"ODRunConfigSeqInfo::setByID: " +
e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
std::string m_description
void setByID(int id) noexcept(false) override
oracle::occi::Statement Statement
oracle::occi::SQLException SQLException
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
◆ setDescription()
void ODRunConfigSeqInfo::setDescription |
( |
std::string |
x | ) |
|
|
inline |
◆ setEcalConfigId()
void ODRunConfigSeqInfo::setEcalConfigId |
( |
int |
x | ) |
|
|
inline |
◆ setId()
void ODRunConfigSeqInfo::setId |
( |
int |
id | ) |
|
|
inline |
◆ setNumberOfCycles()
void ODRunConfigSeqInfo::setNumberOfCycles |
( |
int |
x | ) |
|
|
inline |
◆ setRunSeqDef()
void ODRunConfigSeqInfo::setRunSeqDef |
( |
const RunSeqDef & |
runSeqDef | ) |
|
◆ setSequenceId()
void ODRunConfigSeqInfo::setSequenceId |
( |
int |
x | ) |
|
|
inline |
◆ setSequenceNumber()
void ODRunConfigSeqInfo::setSequenceNumber |
( |
int |
x | ) |
|
|
inline |
◆ writeDB()
void ODRunConfigSeqInfo::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 142 of file ODRunConfigSeqInfo.cc.
References gather_cfg::cout, cuy::dh, and MillePedeFileConverter_cfg::e.
164 throw(std::runtime_error(
"ODRunConfigSeqInfo::writeDB(): " +
e.getMessage()));
167 throw(std::runtime_error(
"ODRunConfigSeqInfo::writeDB: Failed to write"));
169 cout <<
"ODRunConfigSeqInfo::writeDB>> done inserting ODRunConfigSeqInfo with id=" <<
m_ID << endl;
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
int getNumberOfCycles() const
std::string getDescription() const
int getEcalConfigId() const
int fetchID() noexcept(false)
int getSequenceNumber() const
oracle::occi::SQLException SQLException
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
int writeDB() noexcept(false)
void checkPrepare() noexcept(false)
◆ EcalCondDBInterface
◆ m_cycles
int ODRunConfigSeqInfo::m_cycles |
|
private |
◆ m_description
std::string ODRunConfigSeqInfo::m_description |
|
private |
◆ m_ecal_config_id
int ODRunConfigSeqInfo::m_ecal_config_id |
|
private |
◆ m_ID
int ODRunConfigSeqInfo::m_ID |
|
private |
◆ m_run_seq
◆ m_seq_num
int ODRunConfigSeqInfo::m_seq_num |
|
private |
◆ m_sequence_id
int ODRunConfigSeqInfo::m_sequence_id |
|
private |