#include <FEConfigOddWeightDat.h>
Definition at line 11 of file FEConfigOddWeightDat.h.
FEConfigOddWeightDat::FEConfigOddWeightDat |
( |
| ) |
|
Definition at line 12 of file FEConfigOddWeightDat.cc.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
FEConfigOddWeightDat::~FEConfigOddWeightDat |
( |
| ) |
|
|
override |
Definition at line 65 of file FEConfigOddWeightDat.cc.
References dat, alignCSCRings::e, Exception, AlCaHLTBitMon_ParallelJobs::p, and setWeightGroupId().
79 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
81 "FROM channelview cv JOIN fe_config_weight2_dat d "
82 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
83 "WHERE wei2_conf_id = :wei2_conf_id");
87 std::pair<EcalLogicID, FEConfigOddWeightDat>
p;
89 while (rset->next()) {
102 }
catch (SQLException&
e) {
103 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightDat::fetchData: " << e.getMessage();
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setWeightGroupId(int x)
int fetchID() noexcept(false)
oracle::occi::Statement * m_readStmt
static std::vector< std::string > checklist dat
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
std::string FEConfigOddWeightDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
int FEConfigOddWeightDat::getWeightGroupId |
( |
| ) |
const |
|
inline |
void FEConfigOddWeightDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 23 of file FEConfigOddWeightDat.cc.
References alignCSCRings::e, and Exception.
29 "INSERT INTO fe_config_weight2_dat (wei2_conf_id, logic_id, "
31 "VALUES (:wei2_conf_id, :logic_id, "
33 }
catch (SQLException&
e) {
34 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightDat::prepareWrite(): " << e.getMessage();
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void FEConfigOddWeightDat::setWeightGroupId |
( |
int |
x | ) |
|
|
inline |
Definition at line 107 of file FEConfigOddWeightDat.cc.
References submitPVResolutionJobs::count, data, alignCSCRings::e, Exception, EcalLogicID::getLogicID(), getWeightGroupId(), AlCaHLTBitMon_ParallelJobs::p, and x.
112 int iconfID = iconf->
fetchID();
114 throw(std::runtime_error(
"FEConfigOddWeightDat::writeArrayDB: ICONF not in DB"));
117 int nrows =
data->size();
118 int* ids =
new int[nrows];
119 int* iconfid_vec =
new int[nrows];
120 int* xx =
new int[nrows];
122 ub2* ids_len =
new ub2[nrows];
123 ub2* iconf_len =
new ub2[nrows];
124 ub2* x_len =
new ub2[nrows];
129 typedef map<EcalLogicID, FEConfigOddWeightDat>::const_iterator CI;
130 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
131 channel = &(
p->first);
134 throw(std::runtime_error(
"FEConfigOddWeightDat::writeArrayDB: Bad EcalLogicID"));
136 ids[
count] = logicID;
137 iconfid_vec[
count] = iconfID;
139 dataitem = &(
p->second);
146 iconf_len[
count] =
sizeof(iconfid_vec[
count]);
154 m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT,
sizeof(iconfid_vec[0]), iconf_len);
155 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
156 m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIINT,
sizeof(xx[0]), x_len);
161 delete[] iconfid_vec;
168 }
catch (SQLException&
e) {
169 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightDat::writeArrayDB(): " << e.getMessage();
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false)
char data[epos_bytes_allocation]
int getWeightGroupId() const
Definition at line 38 of file FEConfigOddWeightDat.cc.
References alignCSCRings::e, Exception, and B2GTnPMonitor_cfi::item.
46 throw(std::runtime_error(
"FEConfigOddWeightDat::writeDB: ICONF not in DB"));
51 throw(std::runtime_error(
"FEConfigOddWeightDat::writeDB: Bad EcalLogicID"));
60 }
catch (SQLException&
e) {
61 throw cms::Exception(
"SQLException") <<
"FEConfigOddWeightDat::writeDB(): " << e.getMessage();
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false)
int getWeightGroupId() const
int FEConfigOddWeightDat::m_group_id |
|
private |