#include <FEConfigSpikeDat.h>
Definition at line 11 of file FEConfigSpikeDat.h.
◆ FEConfigSpikeDat()
FEConfigSpikeDat::FEConfigSpikeDat |
( |
| ) |
|
Definition at line 11 of file FEConfigSpikeDat.cc.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
◆ ~FEConfigSpikeDat()
FEConfigSpikeDat::~FEConfigSpikeDat |
( |
| ) |
|
|
override |
◆ fetchData()
Definition at line 64 of file FEConfigSpikeDat.cc.
References MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, and setSpikeThreshold().
78 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " 79 "d.spike_threshold FROM channelview cv JOIN " +
81 " d ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to " 82 "WHERE spi_conf_id = :spi_conf_id");
86 std::pair<EcalLogicID, FEConfigSpikeDat>
p;
88 while (rset->next()) {
101 }
catch (SQLException&
e) {
102 throw(std::runtime_error(
"FEConfigSpikeDat::fetchData: " +
e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setSpikeThreshold(int x)
oracle::occi::Statement * m_readStmt
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
int fetchID() noexcept(false)
std::string getTable() override
◆ getSpikeThreshold()
int FEConfigSpikeDat::getSpikeThreshold |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string FEConfigSpikeDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ prepareWrite()
void FEConfigSpikeDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 22 of file FEConfigSpikeDat.cc.
References MillePedeFileConverter_cfg::e.
28 " (spi_conf_id, logic_id, " 30 "VALUES (:spi_conf_id, :logic_id, " 31 ":spike_threshold )");
32 }
catch (SQLException&
e) {
33 throw(std::runtime_error(
"FEConfigSpikeDat::prepareWrite(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
std::string getTable() override
◆ setSpikeThreshold()
void FEConfigSpikeDat::setSpikeThreshold |
( |
int |
x | ) |
|
|
inline |
◆ writeArrayDB()
Definition at line 106 of file FEConfigSpikeDat.cc.
References submitPVResolutionJobs::count, data, MillePedeFileConverter_cfg::e, EcalLogicID::getLogicID(), getSpikeThreshold(), AlCaHLTBitMon_ParallelJobs::p, x, and geometryCSVtoXML::xx.
111 int iconfID = iconf->
fetchID();
113 throw(std::runtime_error(
"FEConfigSpikeDat::writeArrayDB: ICONF not in DB"));
116 int nrows =
data->size();
117 int* ids =
new int[nrows];
118 int* iconfid_vec =
new int[nrows];
119 int*
xx =
new int[nrows];
121 ub2* ids_len =
new ub2[nrows];
122 ub2* iconf_len =
new ub2[nrows];
123 ub2* x_len =
new ub2[nrows];
128 typedef map<EcalLogicID, FEConfigSpikeDat>::const_iterator CI;
129 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
130 channel = &(
p->first);
133 throw(std::runtime_error(
"FEConfigSpikeDat::writeArrayDB: Bad EcalLogicID"));
135 ids[
count] = logicID;
136 iconfid_vec[
count] = iconfID;
138 dataitem = &(
p->second);
145 iconf_len[
count] =
sizeof(iconfid_vec[
count]);
153 m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT,
sizeof(iconfid_vec[0]), iconf_len);
154 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
155 m_writeStmt->setDataBuffer(3, (dvoid*)
xx, OCCIINT,
sizeof(
xx[0]), x_len);
160 delete[] iconfid_vec;
167 }
catch (SQLException&
e) {
168 throw(std::runtime_error(
"FEConfigSpikeDat::writeArrayDB(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int getSpikeThreshold() const
char data[epos_bytes_allocation]
int fetchID() noexcept(false)
◆ writeDB()
Definition at line 37 of file FEConfigSpikeDat.cc.
References MillePedeFileConverter_cfg::e, and B2GTnPMonitor_cfi::item.
45 throw(std::runtime_error(
"FEConfigSpikeDat::writeDB: ICONF not in DB"));
50 throw(std::runtime_error(
"FEConfigSpikeDat::writeDB: Bad EcalLogicID"));
59 }
catch (SQLException&
e) {
60 throw(std::runtime_error(
"FEConfigSpikeDat::writeDB(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false)
◆ EcalCondDBInterface
◆ m_thr
int FEConfigSpikeDat::m_thr |
|
private |