#include <FEConfigPedDat.h>
Definition at line 11 of file FEConfigPedDat.h.
◆ FEConfigPedDat()
FEConfigPedDat::FEConfigPedDat |
( |
| ) |
|
◆ ~FEConfigPedDat()
FEConfigPedDat::~FEConfigPedDat |
( |
| ) |
|
|
override |
◆ fetchData()
Definition at line 68 of file FEConfigPedDat.cc.
81 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
82 "d.mean_12, d.mean_6, d.mean_1 "
83 "FROM channelview cv JOIN fe_config_ped_dat d "
84 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
85 "WHERE ped_conf_id = :ped_conf_id");
89 std::pair<EcalLogicID, FEConfigPedDat>
p;
91 while (rset->next()) {
106 }
catch (SQLException&
e) {
107 throw(std::runtime_error(
"FEConfigPedDat::fetchData: " +
e.getMessage()));
References MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, setPedMeanG1(), setPedMeanG12(), and setPedMeanG6().
◆ getId()
int FEConfigPedDat::getId |
( |
void |
| ) |
const |
|
inline |
◆ getPedMeanG1()
float FEConfigPedDat::getPedMeanG1 |
( |
| ) |
const |
|
inline |
◆ getPedMeanG12()
float FEConfigPedDat::getPedMeanG12 |
( |
| ) |
const |
|
inline |
◆ getPedMeanG6()
float FEConfigPedDat::getPedMeanG6 |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string FEConfigPedDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ prepareWrite()
void FEConfigPedDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 24 of file FEConfigPedDat.cc.
31 " (ped_conf_id, logic_id, "
32 "mean_12, mean_6, mean_1 ) "
33 "VALUES (:ped_conf_id, :logic_id, "
34 ":ped_mean_g12, :ped_mean_g6, :ped_mean_g1 )");
35 }
catch (SQLException&
e) {
36 throw(std::runtime_error(
"FEConfigPedDat::prepareWrite(): " +
e.getMessage()));
References MillePedeFileConverter_cfg::e.
◆ setId()
void FEConfigPedDat::setId |
( |
int |
x | ) |
|
|
inline |
◆ setPedMeanG1()
void FEConfigPedDat::setPedMeanG1 |
( |
float |
mean | ) |
|
|
inline |
◆ setPedMeanG12()
void FEConfigPedDat::setPedMeanG12 |
( |
float |
mean | ) |
|
|
inline |
◆ setPedMeanG6()
void FEConfigPedDat::setPedMeanG6 |
( |
float |
mean | ) |
|
|
inline |
◆ writeArrayDB()
Definition at line 111 of file FEConfigPedDat.cc.
116 int iconfID = iconf->
fetchID();
118 throw(std::runtime_error(
"FEConfigPedDat::writeArrayDB: ICONF not in DB"));
121 int nrows =
data->size();
122 int* ids =
new int[nrows];
123 int* iconfid_vec =
new int[nrows];
124 float*
xx =
new float[nrows];
125 float*
yy =
new float[nrows];
126 float*
zz =
new float[nrows];
128 ub2* ids_len =
new ub2[nrows];
129 ub2* iconf_len =
new ub2[nrows];
130 ub2* x_len =
new ub2[nrows];
131 ub2* y_len =
new ub2[nrows];
132 ub2* z_len =
new ub2[nrows];
137 typedef map<EcalLogicID, FEConfigPedDat>::const_iterator CI;
138 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
139 channel = &(
p->first);
142 throw(std::runtime_error(
"FEConfigPedDat::writeArrayDB: Bad EcalLogicID"));
144 ids[
count] = logicID;
145 iconfid_vec[
count] = iconfID;
147 dataitem = &(
p->second);
158 iconf_len[
count] =
sizeof(iconfid_vec[
count]);
168 m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT,
sizeof(iconfid_vec[0]), iconf_len);
169 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
170 m_writeStmt->setDataBuffer(3, (dvoid*)
xx, OCCIFLOAT,
sizeof(
xx[0]), x_len);
171 m_writeStmt->setDataBuffer(4, (dvoid*)
yy, OCCIFLOAT,
sizeof(
yy[0]), y_len);
172 m_writeStmt->setDataBuffer(5, (dvoid*)
zz, OCCIFLOAT,
sizeof(
zz[0]), z_len);
177 delete[] iconfid_vec;
188 }
catch (SQLException&
e) {
189 throw(std::runtime_error(
"FEConfigPedDat::writeArrayDB(): " +
e.getMessage()));
References submitPVResolutionJobs::count, data, MillePedeFileConverter_cfg::e, EcalLogicID::getLogicID(), getPedMeanG1(), getPedMeanG12(), getPedMeanG6(), AlCaHLTBitMon_ParallelJobs::p, x, geometryCSVtoXML::xx, y, geometryCSVtoXML::yy, z, and geometryCSVtoXML::zz.
◆ writeDB()
Definition at line 40 of file FEConfigPedDat.cc.
47 throw(std::runtime_error(
"FEConfigPedDat::writeDB: ICONF not in DB"));
52 throw(std::runtime_error(
"FEConfigPedDat::writeDB: Bad EcalLogicID"));
63 }
catch (SQLException&
e) {
64 throw(std::runtime_error(
"FEConfigPedDat::writeDB(): " +
e.getMessage()));
References MillePedeFileConverter_cfg::e, and B2GTnPMonitor_cfi::item.
◆ EcalCondDBInterface
◆ m_ID
◆ m_pedMeanG1
float FEConfigPedDat::m_pedMeanG1 |
|
private |
◆ m_pedMeanG12
float FEConfigPedDat::m_pedMeanG12 |
|
private |
◆ m_pedMeanG6
float FEConfigPedDat::m_pedMeanG6 |
|
private |