#include <DCULVRBTempsDat.h>
Definition at line 12 of file DCULVRBTempsDat.h.
DCULVRBTempsDat::DCULVRBTempsDat |
( |
| ) |
|
Definition at line 12 of file DCULVRBTempsDat.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
DCULVRBTempsDat::~DCULVRBTempsDat |
( |
| ) |
|
Definition at line 78 of file DCULVRBTempsDat.cc.
References alignCSCRings::e, o2o::iov, AlCaHLTBitMon_ParallelJobs::p, setT1(), setT2(), and setT3().
93 m_readStmt->setSQL(
"SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
95 "FROM channelview cv JOIN dcu_lvrb_temps_dat d "
96 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
97 "WHERE d.iov_id = :iov_id");
101 std::pair< EcalLogicID, DCULVRBTempsDat >
p;
103 while(rset->next()) {
111 dat.
setT1( rset->getFloat(7) );
112 dat.
setT2( rset->getFloat(8) );
113 dat.
setT3( rset->getFloat(9) );
119 throw(std::runtime_error(
"DCULVRBTempsDat::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::Statement * m_readStmt
oracle::occi::ResultSet ResultSet
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void checkConnection() const
float DCULVRBTempsDat::getT1 |
( |
| ) |
const |
|
inline |
float DCULVRBTempsDat::getT2 |
( |
| ) |
const |
|
inline |
float DCULVRBTempsDat::getT3 |
( |
| ) |
const |
|
inline |
std::string DCULVRBTempsDat::getTable |
( |
| ) |
|
|
inlinevirtual |
void DCULVRBTempsDat::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IDataItem.
Definition at line 32 of file DCULVRBTempsDat.cc.
References alignCSCRings::e.
39 m_writeStmt->setSQL(
"INSERT INTO dcu_lvrb_temps_dat (iov_id, logic_id, "
41 "VALUES (:iov_id, :logic_id, "
44 throw(std::runtime_error(
"DCULVRBTempsDat::prepareWrite(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void DCULVRBTempsDat::setT1 |
( |
float |
temp | ) |
|
|
inline |
void DCULVRBTempsDat::setT2 |
( |
float |
temp | ) |
|
|
inline |
void DCULVRBTempsDat::setT3 |
( |
float |
temp | ) |
|
|
inline |
Definition at line 123 of file DCULVRBTempsDat.cc.
References prof2calltree::count, data, alignCSCRings::e, EcalLogicID::getLogicID(), getT1(), getT2(), getT3(), o2o::iov, AlCaHLTBitMon_ParallelJobs::p, x, y, and z.
130 if (!iovID) {
throw(std::runtime_error(
"DCULVRBTempsDat::writeArrayDB: IOV not in DB")); }
133 int nrows=
data->size();
134 int* ids=
new int[nrows];
135 int* iovid_vec=
new int[nrows];
136 float* xx=
new float[nrows];
137 float* yy=
new float[nrows];
138 float* zz=
new float[nrows];
140 ub2* ids_len=
new ub2[nrows];
141 ub2* iov_len=
new ub2[nrows];
142 ub2* x_len=
new ub2[nrows];
143 ub2* y_len=
new ub2[nrows];
144 ub2* z_len=
new ub2[nrows];
150 typedef map< EcalLogicID, DCULVRBTempsDat >::const_iterator CI;
151 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
152 channel = &(
p->first);
154 if (!logicID) {
throw(std::runtime_error(
"DCULVRBTempsDat::writeArrayDB: Bad EcalLogicID")); }
156 iovid_vec[
count]=iovID;
158 dataitem = &(
p->second);
160 float x=dataitem->
getT1();
161 float y=dataitem->
getT2();
162 float z=dataitem->
getT3();
184 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
sizeof(iovid_vec[0]),iov_len);
185 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len );
186 m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIFLOAT ,
sizeof(xx[0]), x_len );
187 m_writeStmt->setDataBuffer(4, (dvoid*)yy, OCCIFLOAT ,
sizeof(yy[0]), y_len );
188 m_writeStmt->setDataBuffer(5, (dvoid*)zz, OCCIFLOAT ,
sizeof(zz[0]), z_len );
207 throw(std::runtime_error(
"DCULVRBTempsDat::writeArrayDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
char data[epos_bytes_allocation]
void checkConnection() const
Definition at line 50 of file DCULVRBTempsDat.cc.
References alignCSCRings::e, and o2o::iov.
57 if (!iovID) {
throw(std::runtime_error(
"DCULVRBTempsDat::writeDB: IOV not in DB")); }
60 if (!logicID) {
throw(std::runtime_error(
"DCULVRBTempsDat::writeDB: Bad EcalLogicID")); }
72 throw(std::runtime_error(
"DCULVRBTempsDat::writeDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
void checkConnection() const
float DCULVRBTempsDat::m_t1 |
|
private |
float DCULVRBTempsDat::m_t2 |
|
private |
float DCULVRBTempsDat::m_t3 |
|
private |