#include <MonShapeQualityDat.h>
Definition at line 12 of file MonShapeQualityDat.h.
MonShapeQualityDat::MonShapeQualityDat |
( |
| ) |
|
Definition at line 12 of file MonShapeQualityDat.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
MonShapeQualityDat::~MonShapeQualityDat |
( |
| ) |
|
Definition at line 74 of file MonShapeQualityDat.cc.
References alignCSCRings::e, edm::pset::fillMap(), o2o::iov, AlCaHLTBitMon_ParallelJobs::p, and setAvgChi2().
89 m_readStmt->setSQL(
"SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
91 "FROM channelview cv JOIN mon_shape_quality_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, MonShapeQualityDat >
p;
113 throw(std::runtime_error(
"MonShapeQualityDat::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void setAvgChi2(float chi2)
oracle::occi::Statement * m_readStmt
oracle::occi::ResultSet ResultSet
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void fillMap(Registry *reg, regmap_type &fillme)
void checkConnection() const
float MonShapeQualityDat::getAvgChi2 |
( |
| ) |
const |
|
inline |
std::string MonShapeQualityDat::getTable |
( |
| ) |
|
|
inlinevirtual |
void MonShapeQualityDat::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IDataItem.
Definition at line 30 of file MonShapeQualityDat.cc.
References alignCSCRings::e.
37 m_writeStmt->setSQL(
"INSERT INTO mon_shape_quality_dat (iov_id, logic_id, "
39 "VALUES (:iov_id, :logic_id, "
42 throw(std::runtime_error(
"MonShapeQualityDat::prepareWrite(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void MonShapeQualityDat::setAvgChi2 |
( |
float |
chi2 | ) |
|
|
inline |
Definition at line 117 of file MonShapeQualityDat.cc.
References prof2calltree::count, data, alignCSCRings::e, getAvgChi2(), EcalLogicID::getLogicID(), o2o::iov, AlCaHLTBitMon_ParallelJobs::p, and x.
124 if (!iovID) {
throw(std::runtime_error(
"MonShapeQualityDat::writeArrayDB: IOV not in DB")); }
127 int nrows=
data->size();
128 int* ids=
new int[nrows];
129 int* iovid_vec=
new int[nrows];
130 float* xx=
new float[nrows];
133 ub2* ids_len=
new ub2[nrows];
134 ub2* iov_len=
new ub2[nrows];
135 ub2* x_len=
new ub2[nrows];
141 typedef map< EcalLogicID, MonShapeQualityDat >::const_iterator CI;
142 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
143 channel = &(
p->first);
145 if (!logicID) {
throw(std::runtime_error(
"MonShapeQualityDat::writeArrayDB: Bad EcalLogicID")); }
147 iovid_vec[
count]=iovID;
149 dataitem = &(
p->second);
165 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
sizeof(iovid_vec[0]),iov_len);
166 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len );
167 m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIFLOAT ,
sizeof(xx[0]), x_len );
181 throw(std::runtime_error(
"MonPedestalsDat::writeArrayDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
char data[epos_bytes_allocation]
void checkConnection() const
Definition at line 48 of file MonShapeQualityDat.cc.
References alignCSCRings::e, and o2o::iov.
55 if (!iovID) {
throw(std::runtime_error(
"MonShapeQualityDat::writeDB: IOV not in DB")); }
58 if (!logicID) {
throw(std::runtime_error(
"MonShapeQualityDat::writeDB: Bad EcalLogicID")); }
68 throw(std::runtime_error(
"MonShapeQualityDat::writeDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
void checkConnection() const
float MonShapeQualityDat::m_avgChi2 |
|
private |