#include <CaliGainRatioDat.h>
Definition at line 12 of file CaliGainRatioDat.h.
◆ CaliGainRatioDat()
CaliGainRatioDat::CaliGainRatioDat |
( |
| ) |
|
Definition at line 12 of file CaliGainRatioDat.cc.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
◆ ~CaliGainRatioDat()
CaliGainRatioDat::~CaliGainRatioDat |
( |
| ) |
|
|
override |
◆ fetchData()
Definition at line 67 of file CaliGainRatioDat.cc.
References MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, setG1G12(), setG6G12(), and setTaskStatus().
80 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " 81 "d.g1_g6, d.g6_g12, d.task_status " 82 "FROM channelview cv JOIN cali_gain_ratio_dat d " 83 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to " 84 "WHERE d.iov_id = :iov_id");
88 std::pair<EcalLogicID, CaliGainRatioDat>
p;
90 while (rset->next()) {
105 }
catch (SQLException&
e) {
106 throw(std::runtime_error(
"CaliGainRatioDat::fetchData(): " +
e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setTaskStatus(bool s)
oracle::occi::Statement * m_readStmt
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
int fetchID() noexcept(false) override
◆ getG1G12()
float CaliGainRatioDat::getG1G12 |
( |
| ) |
const |
|
inline |
◆ getG6G12()
float CaliGainRatioDat::getG6G12 |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string CaliGainRatioDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getTaskStatus()
bool CaliGainRatioDat::getTaskStatus |
( |
| ) |
const |
|
inline |
◆ prepareWrite()
void CaliGainRatioDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 24 of file CaliGainRatioDat.cc.
References MillePedeFileConverter_cfg::e.
30 "INSERT INTO cali_gain_ratio_dat (iov_id, logic_id, " 31 "g1_g6, g6_g12, task_status) " 32 "VALUES (:iov_id, :logic_id, " 34 }
catch (SQLException&
e) {
35 throw(std::runtime_error(
"CaliGainRatioDat::prepareWrite(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
◆ setG1G12()
void CaliGainRatioDat::setG1G12 |
( |
float |
c | ) |
|
|
inline |
◆ setG6G12()
void CaliGainRatioDat::setG6G12 |
( |
float |
c | ) |
|
|
inline |
◆ setTaskStatus()
void CaliGainRatioDat::setTaskStatus |
( |
bool |
s | ) |
|
|
inline |
◆ writeArrayDB()
Definition at line 110 of file CaliGainRatioDat.cc.
References submitPVResolutionJobs::count, data, MillePedeFileConverter_cfg::e, getG1G12(), getG6G12(), EcalLogicID::getLogicID(), getTaskStatus(), AlCaHLTBitMon_ParallelJobs::p, x, geometryCSVtoXML::xx, y, and geometryCSVtoXML::yy.
116 throw(std::runtime_error(
"CaliGainRatioDat::writeArrayDB: IOV not in DB"));
119 int nrows =
data->size();
120 int* ids =
new int[nrows];
121 int* iovid_vec =
new int[nrows];
122 float*
xx =
new float[nrows];
123 float*
yy =
new float[nrows];
124 int* st =
new int[nrows];
126 ub2* ids_len =
new ub2[nrows];
127 ub2* iov_len =
new ub2[nrows];
128 ub2* x_len =
new ub2[nrows];
129 ub2* y_len =
new ub2[nrows];
130 ub2* st_len =
new ub2[nrows];
135 typedef map<EcalLogicID, CaliGainRatioDat>::const_iterator CI;
136 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
137 channel = &(
p->first);
140 throw(std::runtime_error(
"CaliGainRatioDat::writeArrayDB: Bad EcalLogicID"));
142 ids[
count] = logicID;
143 iovid_vec[
count] = iovID;
145 dataitem = &(
p->second);
166 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
sizeof(iovid_vec[0]), iov_len);
167 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
168 m_writeStmt->setDataBuffer(3, (dvoid*)
xx, OCCIFLOAT,
sizeof(
xx[0]), x_len);
169 m_writeStmt->setDataBuffer(4, (dvoid*)
yy, OCCIFLOAT,
sizeof(
yy[0]), y_len);
170 m_writeStmt->setDataBuffer(5, (dvoid*)st, OCCIINT,
sizeof(st[0]), st_len);
186 }
catch (SQLException&
e) {
187 throw(std::runtime_error(
"CaliGainRatio::writeArrayDB(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
char data[epos_bytes_allocation]
bool getTaskStatus() const
int fetchID() noexcept(false) override
◆ writeDB()
Definition at line 39 of file CaliGainRatioDat.cc.
References MillePedeFileConverter_cfg::e, and B2GTnPMonitor_cfi::item.
45 throw(std::runtime_error(
"CaliGainRatioDat::writeDB: IOV not in DB"));
50 throw(std::runtime_error(
"CaliGainRatioDat::writeDB: Bad EcalLogicID"));
62 }
catch (SQLException&
e) {
63 throw(std::runtime_error(
"CaliGainRatioDat::writeDB(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false) override
◆ EcalCondDBInterface
◆ m_g1_g12
float CaliGainRatioDat::m_g1_g12 |
|
private |
◆ m_g6_g12
float CaliGainRatioDat::m_g6_g12 |
|
private |
◆ m_taskStatus
bool CaliGainRatioDat::m_taskStatus |
|
private |