#include <MonH4TablePositionDat.h>
Definition at line 11 of file MonH4TablePositionDat.h.
MonH4TablePositionDat::MonH4TablePositionDat |
( |
| ) |
|
Definition at line 10 of file MonH4TablePositionDat.cc.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
MonH4TablePositionDat::~MonH4TablePositionDat |
( |
| ) |
|
|
override |
Definition at line 74 of file MonH4TablePositionDat.cc.
References MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, setTableX(), setTableY(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getTableY().
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;
105 getOraString(rset,6));
113 }
catch (SQLException &
e) {
114 throw(std::runtime_error(
std::string(
"MonH4TablePositionDat::fetchData(): ")+getOraMessage(&e)));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
int fetchID() noexcept(false) override
void checkConnection() const noexcept(false)
oracle::occi::Statement * m_readStmt
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
std::string MonH4TablePositionDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
float MonH4TablePositionDat::getTableX |
( |
| ) |
const |
|
inline |
float MonH4TablePositionDat::getTableY |
( |
| ) |
const |
|
inline |
void MonH4TablePositionDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
void MonH4TablePositionDat::setTableX |
( |
float |
x | ) |
|
|
inline |
void MonH4TablePositionDat::setTableY |
( |
float |
y | ) |
|
|
inline |
Definition at line 118 of file MonH4TablePositionDat.cc.
References KineDebug3::count(), data, MillePedeFileConverter_cfg::e, EcalLogicID::getLogicID(), getTableX(), getTableY(), electrons_cff::ids, AlCaHLTBitMon_ParallelJobs::p, AlCaHLTBitMon_QueryRunRegistry::string, x, geometryCSVtoXML::xx, y, and geometryCSVtoXML::yy.
Referenced by getTableY().
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 );
187 }
catch (SQLException &
e) {
188 throw(std::runtime_error(
std::string(
"MonH4TablePositionDat::writeArrayDB(): ")+getOraMessage(&e)));
oracle::occi::Statement * m_writeStmt
void checkPrepare() noexcept(false)
int fetchID() noexcept(false) override
void checkConnection() const noexcept(false)
char data[epos_bytes_allocation]
Definition at line 47 of file MonH4TablePositionDat.cc.
References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getTableY().
54 if (!iovID) {
throw(std::runtime_error(
"MonH4TablePositionDat::writeDB: IOV not in DB")); }
57 if (!logicID) {
throw(std::runtime_error(
"MonH4TablePositionDat::writeDB: Bad EcalLogicID")); }
67 }
catch (SQLException &
e) {
68 throw(std::runtime_error(
std::string(
"MonH4TablePositionDat::writeDB(): ")+getOraMessage(&e)));
oracle::occi::Statement * m_writeStmt
void checkPrepare() noexcept(false)
int fetchID() noexcept(false) override
void checkConnection() const noexcept(false)
float MonH4TablePositionDat::m_tableX |
|
private |
float MonH4TablePositionDat::m_tableY |
|
private |