#include <MonDelaysTTDat.h>
Definition at line 12 of file MonDelaysTTDat.h.
MonDelaysTTDat::MonDelaysTTDat |
( |
| ) |
|
Definition at line 12 of file MonDelaysTTDat.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
MonDelaysTTDat::~MonDelaysTTDat |
( |
| ) |
|
Definition at line 78 of file MonDelaysTTDat.cc.
References alignCSCRings::e, o2o::iov, AlCaHLTBitMon_ParallelJobs::p, setDelayMean(), setDelayRMS(), and setTaskStatus().
93 m_readStmt->setSQL(
"SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
94 "d.delay_mean, d.delay_rms, d.task_status "
95 "FROM channelview cv JOIN mon_delays_tt_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, MonDelaysTTDat >
p;
103 while(rset->next()) {
120 throw(std::runtime_error(
"MonDelaysTTDat::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void setDelayRMS(float rms)
void setTaskStatus(bool status)
oracle::occi::Statement * m_readStmt
oracle::occi::ResultSet ResultSet
void setDelayMean(float mean)
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void checkConnection() const
float MonDelaysTTDat::getDelayMean |
( |
| ) |
const |
|
inline |
float MonDelaysTTDat::getDelayRMS |
( |
| ) |
const |
|
inline |
std::string MonDelaysTTDat::getTable |
( |
| ) |
|
|
inlinevirtual |
bool MonDelaysTTDat::getTaskStatus |
( |
| ) |
const |
|
inline |
void MonDelaysTTDat::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IDataItem.
Definition at line 32 of file MonDelaysTTDat.cc.
References alignCSCRings::e.
39 m_writeStmt->setSQL(
"INSERT INTO mon_delays_tt_dat (iov_id, logic_id, "
40 "delay_mean, delay_rms, task_status) "
41 "VALUES (:iov_id, :logic_id, "
42 ":delay_mean, :delay_rms, :task_status)");
44 throw(std::runtime_error(
"MonDelaysTTDat::prepareWrite(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void MonDelaysTTDat::setDelayMean |
( |
float |
mean | ) |
|
|
inline |
void MonDelaysTTDat::setDelayRMS |
( |
float |
rms | ) |
|
|
inline |
void MonDelaysTTDat::setTaskStatus |
( |
bool |
status | ) |
|
|
inline |
Definition at line 124 of file MonDelaysTTDat.cc.
References prof2calltree::count, data, alignCSCRings::e, getDelayMean(), getDelayRMS(), EcalLogicID::getLogicID(), getTaskStatus(), o2o::iov, AlCaHLTBitMon_ParallelJobs::p, x, and detailsBasic3DVector::y.
131 if (!iovID) {
throw(std::runtime_error(
"MonDelaysTTDat::writeArrayDB: IOV not in DB")); }
134 int nrows=
data->size();
135 int* ids=
new int[nrows];
136 int* iovid_vec=
new int[nrows];
137 float* xx=
new float[nrows];
138 float* yy=
new float[nrows];
139 int* st=
new int[nrows];
141 ub2* ids_len=
new ub2[nrows];
142 ub2* iov_len=
new ub2[nrows];
143 ub2* x_len=
new ub2[nrows];
144 ub2* y_len=
new ub2[nrows];
145 ub2* st_len=
new ub2[nrows];
150 typedef map< EcalLogicID, MonDelaysTTDat >::const_iterator CI;
151 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
152 channel = &(
p->first);
154 if (!logicID) {
throw(std::runtime_error(
"MonDelaysTTDat::writeArrayDB: Bad EcalLogicID")); }
156 iovid_vec[
count]=iovID;
158 dataitem = &(
p->second);
183 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
sizeof(iovid_vec[0]),iov_len);
184 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len );
185 m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIFLOAT ,
sizeof(xx[0]), x_len );
186 m_writeStmt->setDataBuffer(4, (dvoid*)yy, OCCIFLOAT ,
sizeof(yy[0]), y_len );
187 m_writeStmt->setDataBuffer(5, (dvoid*)st, OCCIINT ,
sizeof(st[0]), st_len );
207 throw(std::runtime_error(
"MonDelaysTTDat::writeArrayDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
float getDelayRMS() const
bool getTaskStatus() const
float getDelayMean() const
char data[epos_bytes_allocation]
void checkConnection() const
Definition at line 50 of file MonDelaysTTDat.cc.
References alignCSCRings::e, and o2o::iov.
57 if (!iovID) {
throw(std::runtime_error(
"MonDelaysTTDat::writeDB: IOV not in DB")); }
60 if (!logicID) {
throw(std::runtime_error(
"MonDelaysTTDat::writeDB: Bad EcalLogicID")); }
72 throw(std::runtime_error(
"MonDelaysTTDat::writeDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
float getDelayRMS() const
bool getTaskStatus() const
float getDelayMean() const
void checkConnection() const
float MonDelaysTTDat::m_delayMean |
|
private |
float MonDelaysTTDat::m_delayRMS |
|
private |
bool MonDelaysTTDat::m_taskStatus |
|
private |