#include <FEConfigLUTGroupDat.h>
Definition at line 11 of file FEConfigLUTGroupDat.h.
◆ FEConfigLUTGroupDat()
FEConfigLUTGroupDat::FEConfigLUTGroupDat |
( |
| ) |
|
Definition at line 11 of file FEConfigLUTGroupDat.cc.
References mps_fire::i.
18 for (
int i = 0;
i < 1024;
i++) {
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
◆ ~FEConfigLUTGroupDat()
FEConfigLUTGroupDat::~FEConfigLUTGroupDat |
( |
| ) |
|
|
override |
◆ fetchData()
Definition at line 105 of file FEConfigLUTGroupDat.cc.
References MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, setLUTGroupId(), setLUTValue(), and AlCaHLTBitMon_QueryRunRegistry::string.
111 int iconfID = iconf->
fetchID();
113 throw(std::runtime_error(
"FEConfigLUTGroupDat::fetchData: ICONF not in DB"));
119 "SELECT d.group_id, d.lut_id, d.lut_value " 120 "FROM fe_lut_per_group_dat d " 121 "WHERE lut_conf_id = :lut_conf_id order by d.group_id, d.lut_id ");
126 std::pair<EcalLogicID, FEConfigLUTGroupDat>
p;
132 while (rset->next()) {
133 ig = rset->getInt(1);
134 int il = rset->getInt(2);
135 int ival = rset->getInt(3);
145 if (il == (nrows - 1)) {
150 }
catch (SQLException&
e) {
151 throw(std::runtime_error(
std::string(
"FEConfigLUTGroupDat::fetchData: ") +
e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void setLUTGroupId(int x)
void checkConnection() const noexcept(false)
void setLUTValue(int i, int x)
oracle::occi::Statement * m_readStmt
int fetchID() noexcept(false)
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
◆ getLUTGroupId()
int FEConfigLUTGroupDat::getLUTGroupId |
( |
| ) |
const |
|
inline |
◆ getLUTValue()
int FEConfigLUTGroupDat::getLUTValue |
( |
int |
i | ) |
const |
|
inline |
◆ getTable()
std::string FEConfigLUTGroupDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ prepareWrite()
void FEConfigLUTGroupDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 25 of file FEConfigLUTGroupDat.cc.
References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.
31 "INSERT INTO fe_lut_per_group_dat (lut_conf_id, group_id, " 32 " lut_id, lut_value ) " 33 "VALUES (:lut_conf_id, :group_id, " 34 ":lut_id, :lut_value )");
35 }
catch (SQLException&
e) {
36 throw(std::runtime_error(
std::string(
"FEConfigLUTGroupDat::prepareWrite(): ") +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
◆ setLUTGroupId()
void FEConfigLUTGroupDat::setLUTGroupId |
( |
int |
x | ) |
|
|
inline |
◆ setLUTValue()
void FEConfigLUTGroupDat::setLUTValue |
( |
int |
i, |
|
|
int |
x |
|
) |
| |
|
inline |
◆ writeArrayDB()
Definition at line 155 of file FEConfigLUTGroupDat.cc.
References submitPVResolutionJobs::count, gather_cfg::cout, data, MillePedeFileConverter_cfg::e, getLUTGroupId(), getLUTValue(), mps_fire::i, AlCaHLTBitMon_ParallelJobs::p, AlCaHLTBitMon_QueryRunRegistry::string, x, geometryCSVtoXML::xx, y, geometryCSVtoXML::yy, z, and geometryCSVtoXML::zz.
160 int iconfID = iconf->
fetchID();
162 throw(std::runtime_error(
"FEConfigLUTGroupDat::writeArrayDB: ICONF not in DB"));
165 int nrows =
data->size() * 1024;
167 int* iconfid_vec =
new int[nrows];
168 int*
xx =
new int[nrows];
169 int*
yy =
new int[nrows];
170 int*
zz =
new int[nrows];
172 ub2* iconf_len =
new ub2[nrows];
173 ub2* x_len =
new ub2[nrows];
174 ub2* y_len =
new ub2[nrows];
175 ub2* z_len =
new ub2[nrows];
179 typedef map<EcalLogicID, FEConfigLUTGroupDat>::const_iterator CI;
180 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
181 dataitem = &(
p->second);
184 for (
int i = 0;
i < 1024;
i++) {
185 iconfid_vec[
count] = iconfID;
193 iconf_len[
count] =
sizeof(iconfid_vec[
count]);
207 cout <<
"about to insert " << iconfid_vec[
i] <<
" " <<
xx[
i] <<
" " <<
yy[
i] <<
" " <<
zz[
i] << endl;
209 cout <<
"about to insert " << iconfid_vec[
i] <<
" " <<
xx[
i] <<
" " <<
yy[
i] <<
" " <<
zz[
i] << endl;
211 m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT,
sizeof(iconfid_vec[0]), iconf_len);
212 m_writeStmt->setDataBuffer(2, (dvoid*)
xx, OCCIINT,
sizeof(
xx[0]), x_len);
213 m_writeStmt->setDataBuffer(3, (dvoid*)
yy, OCCIINT,
sizeof(
yy[0]), y_len);
214 m_writeStmt->setDataBuffer(4, (dvoid*)
zz, OCCIINT,
sizeof(
zz[0]), z_len);
218 delete[] iconfid_vec;
228 }
catch (SQLException&
e) {
229 throw(std::runtime_error(
std::string(
"FEConfigLUTGroupDat::writeArrayDB(): ") +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
int getLUTValue(int i) const
int getLUTGroupId() const
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false)
char data[epos_bytes_allocation]
◆ writeDB()
Definition at line 40 of file FEConfigLUTGroupDat.cc.
References submitPVResolutionJobs::count, gather_cfg::cout, MillePedeFileConverter_cfg::e, B2GTnPMonitor_cfi::item, AlCaHLTBitMon_QueryRunRegistry::string, x, geometryCSVtoXML::xx, y, geometryCSVtoXML::yy, z, and geometryCSVtoXML::zz.
48 cout <<
"iconf=" << iconfID << endl;
51 throw(std::runtime_error(
"FEConfigLUTGroupDat::writeArrayDB: ICONF not in DB"));
55 int* iconfid_vec =
new int[nrows];
56 int*
xx =
new int[nrows];
57 int*
yy =
new int[nrows];
58 int*
zz =
new int[nrows];
60 ub2* iconf_len =
new ub2[nrows];
61 ub2* x_len =
new ub2[nrows];
62 ub2* y_len =
new ub2[nrows];
63 ub2* z_len =
new ub2[nrows];
66 iconfid_vec[
count] = iconfID;
67 int x =
item->getLUTGroupId();
83 m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT,
sizeof(iconfid_vec[0]), iconf_len);
84 m_writeStmt->setDataBuffer(2, (dvoid*)
xx, OCCIINT,
sizeof(
xx[0]), x_len);
85 m_writeStmt->setDataBuffer(3, (dvoid*)
yy, OCCIINT,
sizeof(
yy[0]), y_len);
86 m_writeStmt->setDataBuffer(4, (dvoid*)
zz, OCCIINT,
sizeof(
zz[0]), z_len);
100 }
catch (SQLException&
e) {
101 throw(std::runtime_error(
std::string(
"FEConfigLUTGroupDat::writeArrayDB(): ") +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false)
◆ EcalCondDBInterface
◆ m_group_id
int FEConfigLUTGroupDat::m_group_id |
|
private |
◆ m_lut
int FEConfigLUTGroupDat::m_lut[1024] |
|
private |