#include <MonH4TablePositionDat.h>
Definition at line 11 of file MonH4TablePositionDat.h.
MonH4TablePositionDat::MonH4TablePositionDat |
( |
| ) |
|
Definition at line 10 of file MonH4TablePositionDat.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
MonH4TablePositionDat::~MonH4TablePositionDat |
( |
| ) |
|
Definition at line 74 of file MonH4TablePositionDat.cc.
References alignCSCRings::e, o2o::iov, AlCaHLTBitMon_ParallelJobs::p, setTableX(), and setTableY().
89 m_readStmt->setSQL(
"SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
90 "d.table_x, d.table_y "
91 "FROM channelview cv JOIN mon_h4_table_position_dat d "
92 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
93 "WHERE d.iov_id = :iov_id");
97 std::pair< EcalLogicID, MonH4TablePositionDat >
p;
114 throw(std::runtime_error(
"MonH4TablePositionDat::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
std::string MonH4TablePositionDat::getTable |
( |
| ) |
|
|
inlinevirtual |
float MonH4TablePositionDat::getTableX |
( |
| ) |
const |
|
inline |
float MonH4TablePositionDat::getTableY |
( |
| ) |
const |
|
inline |
void MonH4TablePositionDat::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IDataItem.
Definition at line 29 of file MonH4TablePositionDat.cc.
References alignCSCRings::e.
36 m_writeStmt->setSQL(
"INSERT INTO mon_h4_table_position_dat (iov_id, logic_id, "
38 "VALUES (:iov_id, :logic_id, "
41 throw(std::runtime_error(
"MonH4TablePositionDat::prepareWrite(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void MonH4TablePositionDat::setTableX |
( |
float |
x | ) |
|
|
inline |
void MonH4TablePositionDat::setTableY |
( |
float |
y | ) |
|
|
inline |
Definition at line 118 of file MonH4TablePositionDat.cc.
References prof2calltree::count, data, alignCSCRings::e, EcalLogicID::getLogicID(), getTableX(), getTableY(), o2o::iov, AlCaHLTBitMon_ParallelJobs::p, x, and detailsBasic3DVector::y.
125 if (!iovID) {
throw(std::runtime_error(
"MonH4TablePositionDat::writeArrayDB: IOV not in DB")); }
128 int nrows=
data->size();
129 int* ids=
new int[nrows];
130 int* iovid_vec=
new int[nrows];
131 float* xx=
new float[nrows];
132 float* yy=
new float[nrows];
135 ub2* ids_len=
new ub2[nrows];
136 ub2* iov_len=
new ub2[nrows];
137 ub2* x_len=
new ub2[nrows];
138 ub2* y_len=
new ub2[nrows];
143 typedef map< EcalLogicID, MonH4TablePositionDat >::const_iterator CI;
144 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
145 channel = &(
p->first);
147 if (!logicID) {
throw(std::runtime_error(
"MonH4TablePositionDat::writeArrayDB: Bad EcalLogicID")); }
149 iovid_vec[
count]=iovID;
151 dataitem = &(
p->second);
170 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
sizeof(iovid_vec[0]),iov_len);
171 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len );
172 m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIFLOAT ,
sizeof(xx[0]), x_len );
173 m_writeStmt->setDataBuffer(4, (dvoid*)yy, OCCIFLOAT ,
sizeof(yy[0]), y_len );
188 throw(std::runtime_error(
"MonH4TablePositionDat::writeArrayDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
char data[epos_bytes_allocation]
void checkConnection() const
Definition at line 47 of file MonH4TablePositionDat.cc.
References alignCSCRings::e, and o2o::iov.
54 if (!iovID) {
throw(std::runtime_error(
"MonH4TablePositionDat::writeDB: IOV not in DB")); }
57 if (!logicID) {
throw(std::runtime_error(
"MonH4TablePositionDat::writeDB: Bad EcalLogicID")); }
68 throw(std::runtime_error(
"MonH4TablePositionDat::writeDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
void checkConnection() const
float MonH4TablePositionDat::m_tableX |
|
private |
float MonH4TablePositionDat::m_tableY |
|
private |