#include <FEConfigSpikeDat.h>
Definition at line 11 of file FEConfigSpikeDat.h.
FEConfigSpikeDat::FEConfigSpikeDat |
( |
| ) |
|
Definition at line 11 of file FEConfigSpikeDat.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
FEConfigSpikeDat::~FEConfigSpikeDat |
( |
| ) |
|
Definition at line 72 of file FEConfigSpikeDat.cc.
References alignCSCRings::e, AlCaHLTBitMon_ParallelJobs::p, and setSpikeThreshold().
87 m_readStmt->setSQL(
"SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
88 "d.spike_threshold FROM channelview cv JOIN "+
getTable()+
" d ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
89 "WHERE spi_conf_id = :spi_conf_id");
93 std::pair< EcalLogicID, FEConfigSpikeDat >
p;
109 throw(std::runtime_error(
"FEConfigSpikeDat::fetchData: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void setSpikeThreshold(int x)
oracle::occi::Statement * m_readStmt
oracle::occi::ResultSet ResultSet
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void checkConnection() const
int FEConfigSpikeDat::getSpikeThreshold |
( |
| ) |
const |
|
inline |
std::string FEConfigSpikeDat::getTable |
( |
| ) |
|
|
inlinevirtual |
void FEConfigSpikeDat::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IDataItem.
Definition at line 30 of file FEConfigSpikeDat.cc.
References alignCSCRings::e.
39 "VALUES (:spi_conf_id, :logic_id, "
40 ":spike_threshold )" );
42 throw(std::runtime_error(
"FEConfigSpikeDat::prepareWrite(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void FEConfigSpikeDat::setSpikeThreshold |
( |
int |
x | ) |
|
|
inline |
Definition at line 113 of file FEConfigSpikeDat.cc.
References prof2calltree::count, AlCaHLTBitMon_QueryRunRegistry::data, alignCSCRings::e, EcalLogicID::getLogicID(), getSpikeThreshold(), AlCaHLTBitMon_ParallelJobs::p, and x.
119 int iconfID = iconf->
fetchID();
120 if (!iconfID) {
throw(std::runtime_error(
"FEConfigSpikeDat::writeArrayDB: ICONF not in DB")); }
123 int nrows=
data->size();
124 int* ids=
new int[nrows];
125 int* iconfid_vec=
new int[nrows];
126 int* xx=
new int[nrows];
128 ub2* ids_len=
new ub2[nrows];
129 ub2* iconf_len=
new ub2[nrows];
130 ub2* x_len=
new ub2[nrows];
136 typedef map< EcalLogicID, FEConfigSpikeDat >::const_iterator CI;
137 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
138 channel = &(
p->first);
140 if (!logicID) {
throw(std::runtime_error(
"FEConfigSpikeDat::writeArrayDB: Bad EcalLogicID")); }
142 iconfid_vec[
count]=iconfID;
144 dataitem = &(
p->second);
160 m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT,
sizeof(iconfid_vec[0]),iconf_len);
161 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len );
162 m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIINT ,
sizeof(xx[0]), x_len );
167 delete [] iconfid_vec;
175 throw(std::runtime_error(
"FEConfigSpikeDat::writeArrayDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
int getSpikeThreshold() const
void checkConnection() const
Definition at line 47 of file FEConfigSpikeDat.cc.
References alignCSCRings::e.
54 if (!iconfID) {
throw(std::runtime_error(
"FEConfigSpikeDat::writeDB: ICONF not in DB")); }
57 if (!logicID) {
throw(std::runtime_error(
"FEConfigSpikeDat::writeDB: Bad EcalLogicID")); }
66 throw(std::runtime_error(
"FEConfigSpikeDat::writeDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
int getSpikeThreshold() const
void checkConnection() const
int FEConfigSpikeDat::m_thr |
|
private |