#include <ODRunConfigCycleInfo.h>
Definition at line 12 of file ODRunConfigCycleInfo.h.
◆ ODRunConfigCycleInfo()
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::~ODRunConfigCycleInfo |
( |
| ) |
|
|
override |
◆ clear()
void ODRunConfigCycleInfo::clear |
( |
void |
| ) |
|
|
private |
◆ fetchData()
Definition at line 161 of file ODRunConfigCycleInfo.cc.
References MillePedeFileConverter_cfg::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 ");
176 result->setSequenceID(rset->getInt(1));
177 result->setCycleNumber(rset->getInt(2));
178 result->setTag(rset->getString(3));
179 result->setDescription(rset->getString(4));
182 throw(std::runtime_error(
"ODRunConfigCycleInfo::fetchData(): " +
e.getMessage()));
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
◆ fetchID()
int ODRunConfigCycleInfo::fetchID |
( |
| ) |
|
|
privatenoexcept |
Definition at line 73 of file ODRunConfigCycleInfo.cc.
References cuy::dh, and MillePedeFileConverter_cfg::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
◆ fetchIDLast()
int ODRunConfigCycleInfo::fetchIDLast |
( |
| ) |
|
|
privatenoexcept |
Definition at line 108 of file ODRunConfigCycleInfo.cc.
References cuy::dh, and MillePedeFileConverter_cfg::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
◆ getCycleNumber()
int ODRunConfigCycleInfo::getCycleNumber |
( |
| ) |
const |
|
inline |
◆ getDescription()
std::string ODRunConfigCycleInfo::getDescription |
( |
| ) |
const |
|
inline |
◆ getId()
int ODRunConfigCycleInfo::getId |
( |
void |
| ) |
const |
|
inline |
◆ getSequenceID()
int ODRunConfigCycleInfo::getSequenceID |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string ODRunConfigCycleInfo::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getTag()
std::string ODRunConfigCycleInfo::getTag |
( |
| ) |
const |
|
inline |
◆ insertConfig()
void ODRunConfigCycleInfo::insertConfig |
( |
| ) |
|
|
privatenoexcept |
◆ operator!=()
◆ operator==()
◆ prepareWrite()
void ODRunConfigCycleInfo::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IODConfig.
Definition at line 34 of file ODRunConfigCycleInfo.cc.
References MillePedeFileConverter_cfg::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
◆ setByID()
void ODRunConfigCycleInfo::setByID |
( |
int |
id | ) |
|
|
privatenoexcept |
Definition at line 132 of file ODRunConfigCycleInfo.cc.
References gather_cfg::cout, cuy::dh, MillePedeFileConverter_cfg::e, and l1ctLayer2EG_cff::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
void checkConnection() const noexcept(false)
oracle::occi::Statement Statement
std::string m_description
oracle::occi::SQLException SQLException
◆ setCycleNumber()
void ODRunConfigCycleInfo::setCycleNumber |
( |
int |
n | ) |
|
|
inline |
◆ setDescription()
void ODRunConfigCycleInfo::setDescription |
( |
std::string |
x | ) |
|
|
inline |
◆ setId()
void ODRunConfigCycleInfo::setId |
( |
int |
id | ) |
|
|
inline |
◆ setSequenceID()
void ODRunConfigCycleInfo::setSequenceID |
( |
int |
x | ) |
|
|
inline |
◆ setTag()
void ODRunConfigCycleInfo::setTag |
( |
std::string |
x | ) |
|
|
inline |
◆ writeDB()
void ODRunConfigCycleInfo::writeDB |
( |
| ) |
|
|
privatenoexcept |
Definition at line 48 of file ODRunConfigCycleInfo.cc.
References gather_cfg::cout, cuy::dh, and MillePedeFileConverter_cfg::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)
int getSequenceID() const
std::string getDescription() const
int getCycleNumber() const
std::string getTag() const
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
void checkPrepare() noexcept(false)
◆ EcalCondDBInterface
◆ ODEcalCycle
◆ m_cycle_num
int ODRunConfigCycleInfo::m_cycle_num |
|
private |
◆ m_description
std::string ODRunConfigCycleInfo::m_description |
|
private |
◆ m_ID
int ODRunConfigCycleInfo::m_ID |
|
private |
◆ m_sequence_id
int ODRunConfigCycleInfo::m_sequence_id |
|
private |
◆ m_tag
std::string ODRunConfigCycleInfo::m_tag |
|
private |