#include <DCULVRBTempsDat.h>
Definition at line 12 of file DCULVRBTempsDat.h.
DCULVRBTempsDat::DCULVRBTempsDat |
( |
| ) |
|
Definition at line 12 of file DCULVRBTempsDat.cc.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
DCULVRBTempsDat::~DCULVRBTempsDat |
( |
| ) |
|
|
override |
Definition at line 68 of file DCULVRBTempsDat.cc.
References dat, alignCSCRings::e, AlCaHLTBitMon_ParallelJobs::p, setT1(), setT2(), and setT3().
81 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
83 "FROM channelview cv JOIN dcu_lvrb_temps_dat d "
84 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
85 "WHERE d.iov_id = :iov_id");
89 std::pair<EcalLogicID, DCULVRBTempsDat>
p;
91 while (rset->next()) {
99 dat.
setT1(rset->getFloat(7));
100 dat.
setT2(rset->getFloat(8));
101 dat.
setT3(rset->getFloat(9));
106 }
catch (SQLException&
e) {
107 throw(std::runtime_error(
"DCULVRBTempsDat::fetchData(): " + e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::Statement * m_readStmt
static std::vector< std::string > checklist dat
int fetchID() noexcept(false) override
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
float DCULVRBTempsDat::getT1 |
( |
| ) |
const |
|
inline |
float DCULVRBTempsDat::getT2 |
( |
| ) |
const |
|
inline |
float DCULVRBTempsDat::getT3 |
( |
| ) |
const |
|
inline |
std::string DCULVRBTempsDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
void DCULVRBTempsDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 25 of file DCULVRBTempsDat.cc.
References alignCSCRings::e.
31 "INSERT INTO dcu_lvrb_temps_dat (iov_id, logic_id, "
33 "VALUES (:iov_id, :logic_id, "
35 }
catch (SQLException&
e) {
36 throw(std::runtime_error(
"DCULVRBTempsDat::prepareWrite(): " + e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void DCULVRBTempsDat::setT1 |
( |
float |
temp | ) |
|
|
inline |
void DCULVRBTempsDat::setT2 |
( |
float |
temp | ) |
|
|
inline |
void DCULVRBTempsDat::setT3 |
( |
float |
temp | ) |
|
|
inline |
Definition at line 111 of file DCULVRBTempsDat.cc.
References submitPVResolutionJobs::count, data, alignCSCRings::e, EcalLogicID::getLogicID(), getT1(), getT2(), getT3(), AlCaHLTBitMon_ParallelJobs::p, x, y, and z.
117 throw(std::runtime_error(
"DCULVRBTempsDat::writeArrayDB: IOV not in DB"));
120 int nrows =
data->size();
121 int* ids =
new int[nrows];
122 int* iovid_vec =
new int[nrows];
123 float* xx =
new float[nrows];
124 float* yy =
new float[nrows];
125 float* zz =
new float[nrows];
127 ub2* ids_len =
new ub2[nrows];
128 ub2* iov_len =
new ub2[nrows];
129 ub2* x_len =
new ub2[nrows];
130 ub2* y_len =
new ub2[nrows];
131 ub2* z_len =
new ub2[nrows];
136 typedef map<EcalLogicID, DCULVRBTempsDat>::const_iterator CI;
137 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
138 channel = &(
p->first);
141 throw(std::runtime_error(
"DCULVRBTempsDat::writeArrayDB: Bad EcalLogicID"));
143 ids[
count] = logicID;
144 iovid_vec[
count] = iovID;
146 dataitem = &(
p->second);
148 float x = dataitem->
getT1();
149 float y = dataitem->
getT2();
150 float z = dataitem->
getT3();
167 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
sizeof(iovid_vec[0]), iov_len);
168 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
169 m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIFLOAT,
sizeof(xx[0]), x_len);
170 m_writeStmt->setDataBuffer(4, (dvoid*)yy, OCCIFLOAT,
sizeof(yy[0]), y_len);
171 m_writeStmt->setDataBuffer(5, (dvoid*)zz, OCCIFLOAT,
sizeof(zz[0]), z_len);
187 }
catch (SQLException&
e) {
188 throw(std::runtime_error(
"DCULVRBTempsDat::writeArrayDB(): " + e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false) override
char data[epos_bytes_allocation]
Definition at line 40 of file DCULVRBTempsDat.cc.
References alignCSCRings::e, and B2GTnPMonitor_cfi::item.
46 throw(std::runtime_error(
"DCULVRBTempsDat::writeDB: IOV not in DB"));
51 throw(std::runtime_error(
"DCULVRBTempsDat::writeDB: Bad EcalLogicID"));
63 }
catch (SQLException&
e) {
64 throw(std::runtime_error(
"DCULVRBTempsDat::writeDB(): " + e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false) override
float DCULVRBTempsDat::m_t1 |
|
private |
float DCULVRBTempsDat::m_t2 |
|
private |
float DCULVRBTempsDat::m_t3 |
|
private |