#include <FEConfigSlidingDat.h>
Definition at line 11 of file FEConfigSlidingDat.h.
FEConfigSlidingDat::FEConfigSlidingDat |
( |
| ) |
|
Definition at line 11 of file FEConfigSlidingDat.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
FEConfigSlidingDat::~FEConfigSlidingDat |
( |
| ) |
|
Definition at line 73 of file FEConfigSlidingDat.cc.
References alignCSCRings::e, AlCaHLTBitMon_ParallelJobs::p, and setSliding().
88 m_readStmt->setSQL(
"SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
90 "FROM channelview cv JOIN fe_config_sliding_dat d "
91 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
92 "WHERE sli_conf_id = :sli_conf_id");
96 std::pair< EcalLogicID, FEConfigSlidingDat >
p;
112 throw(std::runtime_error(
"FEConfigSlidingDat::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 setSliding(float mean)
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void checkConnection() const
float FEConfigSlidingDat::getSliding |
( |
| ) |
const |
|
inline |
std::string FEConfigSlidingDat::getTable |
( |
| ) |
|
|
inlinevirtual |
void FEConfigSlidingDat::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IDataItem.
Definition at line 30 of file FEConfigSlidingDat.cc.
References alignCSCRings::e.
37 m_writeStmt->setSQL(
"INSERT INTO fe_config_sliding_dat (sli_conf_id, logic_id, "
39 "VALUES (:sli_conf_id, :logic_id, "
42 throw(std::runtime_error(
"FEConfigSlidingDat::prepareWrite(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void FEConfigSlidingDat::setSliding |
( |
float |
mean | ) |
|
|
inline |
Definition at line 116 of file FEConfigSlidingDat.cc.
References prof2calltree::count, data, alignCSCRings::e, EcalLogicID::getLogicID(), getSliding(), AlCaHLTBitMon_ParallelJobs::p, and x.
122 int iconfID = iconf->
fetchID();
123 if (!iconfID) {
throw(std::runtime_error(
"FEConfigSlidingDat::writeArrayDB: ICONF not in DB")); }
126 int nrows=
data->size();
127 int* ids=
new int[nrows];
128 int* iconfid_vec=
new int[nrows];
129 float* xx=
new float[nrows];
132 ub2* ids_len=
new ub2[nrows];
133 ub2* iconf_len=
new ub2[nrows];
134 ub2* x_len=
new ub2[nrows];
140 typedef map< EcalLogicID, FEConfigSlidingDat >::const_iterator CI;
141 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
142 channel = &(
p->first);
144 if (!logicID) {
throw(std::runtime_error(
"FEConfigSlidingDat::writeArrayDB: Bad EcalLogicID")); }
146 iconfid_vec[
count]=iconfID;
148 dataitem = &(
p->second);
166 m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT,
sizeof(iconfid_vec[0]),iconf_len);
167 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len );
168 m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIFLOAT ,
sizeof(xx[0]), x_len );
173 delete [] iconfid_vec;
181 throw(std::runtime_error(
"FEConfigSlidingDat::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 FEConfigSlidingDat.cc.
References alignCSCRings::e.
55 if (!iconfID) {
throw(std::runtime_error(
"FEConfigSlidingDat::writeDB: ICONF not in DB")); }
58 if (!logicID) {
throw(std::runtime_error(
"FEConfigSlidingDat::writeDB: Bad EcalLogicID")); }
67 throw(std::runtime_error(
"FEConfigSlidingDat::writeDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
void checkConnection() const
float FEConfigSlidingDat::m_sliding |
|
private |