#include <FEConfigFgrEEStripDat.h>
Definition at line 11 of file FEConfigFgrEEStripDat.h.
◆ FEConfigFgrEEStripDat()
FEConfigFgrEEStripDat::FEConfigFgrEEStripDat |
( |
| ) |
|
Definition at line 11 of file FEConfigFgrEEStripDat.cc.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
◆ ~FEConfigFgrEEStripDat()
FEConfigFgrEEStripDat::~FEConfigFgrEEStripDat |
( |
| ) |
|
|
override |
◆ fetchData()
Definition at line 66 of file FEConfigFgrEEStripDat.cc.
References MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, setLutFg(), and setThreshold().
80 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " 81 "d.threshold, d.lut_fg " 82 "FROM channelview cv JOIN " +
85 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to " 86 "WHERE fgr_conf_id = :fgr_conf_id");
90 std::pair<EcalLogicID, FEConfigFgrEEStripDat>
p;
92 while (rset->next()) {
106 }
catch (SQLException&
e) {
107 throw(std::runtime_error(
"FEConfigFgrEEStripDat::fetchData: " +
e.getMessage()));
int fetchID() noexcept(false)
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setThreshold(unsigned int mean)
void setLutFg(unsigned int mean)
oracle::occi::Statement * m_readStmt
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
std::string getTable() override
◆ getLutFg()
unsigned int FEConfigFgrEEStripDat::getLutFg |
( |
| ) |
const |
|
inline |
◆ getLUTFgr()
unsigned int FEConfigFgrEEStripDat::getLUTFgr |
( |
| ) |
const |
|
inline |
◆ getLutFgr()
unsigned int FEConfigFgrEEStripDat::getLutFgr |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string FEConfigFgrEEStripDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getThreshold()
unsigned int FEConfigFgrEEStripDat::getThreshold |
( |
| ) |
const |
|
inline |
◆ prepareWrite()
void FEConfigFgrEEStripDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 23 of file FEConfigFgrEEStripDat.cc.
References MillePedeFileConverter_cfg::e.
29 " (fgr_conf_id, logic_id, " 30 "threshold, lut_fg ) " 31 "VALUES (:fgr_conf_id, :logic_id, " 32 ":threshold, :lut_fg )");
33 }
catch (SQLException&
e) {
34 throw(std::runtime_error(
"FEConfigFgrEEStripDat::prepareWrite(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
std::string getTable() override
◆ setLutFg()
void FEConfigFgrEEStripDat::setLutFg |
( |
unsigned int |
mean | ) |
|
|
inline |
◆ setLUTFgr()
void FEConfigFgrEEStripDat::setLUTFgr |
( |
unsigned int |
mean | ) |
|
|
inline |
◆ setLutFgr()
void FEConfigFgrEEStripDat::setLutFgr |
( |
unsigned int |
mean | ) |
|
|
inline |
◆ setThreshold()
void FEConfigFgrEEStripDat::setThreshold |
( |
unsigned int |
mean | ) |
|
|
inline |
◆ writeArrayDB()
Definition at line 111 of file FEConfigFgrEEStripDat.cc.
References submitPVResolutionJobs::count, data, MillePedeFileConverter_cfg::e, EcalLogicID::getLogicID(), getLutFg(), getThreshold(), AlCaHLTBitMon_ParallelJobs::p, x, geometryCSVtoXML::xx, y, and geometryCSVtoXML::yy.
116 int iconfID = iconf->
fetchID();
118 throw(std::runtime_error(
"FEConfigFgrEEStripDat::writeArrayDB: ICONF not in DB"));
121 int nrows =
data->size();
122 int* ids =
new int[nrows];
123 int* iconfid_vec =
new int[nrows];
124 unsigned int*
xx =
new unsigned int[nrows];
125 unsigned int*
yy =
new unsigned int[nrows];
127 ub2* ids_len =
new ub2[nrows];
128 ub2* iconf_len =
new ub2[nrows];
129 ub2* x_len =
new ub2[nrows];
130 ub2* y_len =
new ub2[nrows];
135 typedef map<EcalLogicID, FEConfigFgrEEStripDat>::const_iterator CI;
136 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
137 channel = &(
p->first);
140 throw(std::runtime_error(
"FEConfigFgrEEStripDat::writeArrayDB: Bad EcalLogicID"));
142 ids[
count] = logicID;
143 iconfid_vec[
count] = iconfID;
145 dataitem = &(
p->second);
154 iconf_len[
count] =
sizeof(iconfid_vec[
count]);
163 m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT,
sizeof(iconfid_vec[0]), iconf_len);
164 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
165 m_writeStmt->setDataBuffer(3, (dvoid*)
xx, OCCIUNSIGNED_INT,
sizeof(
xx[0]), x_len);
166 m_writeStmt->setDataBuffer(4, (dvoid*)
yy, OCCIUNSIGNED_INT,
sizeof(
yy[0]), y_len);
171 delete[] iconfid_vec;
180 }
catch (SQLException&
e) {
181 throw(std::runtime_error(
"FEConfigFgrEEStripDat::writeArrayDB(): " +
e.getMessage()));
int fetchID() noexcept(false)
oracle::occi::Statement * m_writeStmt
unsigned int getThreshold() const
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
char data[epos_bytes_allocation]
unsigned int getLutFg() const
◆ writeDB()
Definition at line 38 of file FEConfigFgrEEStripDat.cc.
References MillePedeFileConverter_cfg::e, and B2GTnPMonitor_cfi::item.
46 throw(std::runtime_error(
"FEConfigFgrEEStripDat::writeDB: ICONF not in DB"));
51 throw(std::runtime_error(
"FEConfigFgrEEStripDat::writeDB: Bad EcalLogicID"));
61 }
catch (SQLException&
e) {
62 throw(std::runtime_error(
"FEConfigFgrEEStripDat::writeDB(): " +
e.getMessage()));
int fetchID() noexcept(false)
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
◆ EcalCondDBInterface
◆ m_lut_fg
unsigned int FEConfigFgrEEStripDat::m_lut_fg |
|
private |
◆ m_thresh
unsigned int FEConfigFgrEEStripDat::m_thresh |
|
private |