#include <CaliTempDat.h>
Definition at line 12 of file CaliTempDat.h.
◆ CaliTempDat()
CaliTempDat::CaliTempDat |
( |
| ) |
|
◆ ~CaliTempDat()
CaliTempDat::~CaliTempDat |
( |
| ) |
|
|
override |
◆ fetchData()
Definition at line 69 of file CaliTempDat.cc.
82 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
83 "d.beta, d.r25, d.offset, d.task_status "
84 "FROM channelview cv JOIN cali_temp_dat d "
85 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
86 "WHERE d.iov_id = :iov_id");
90 std::pair<EcalLogicID, CaliTempDat>
p;
92 while (rset->next()) {
100 dat.
setBeta(rset->getFloat(7));
101 dat.
setR25(rset->getFloat(8));
108 }
catch (SQLException&
e) {
109 throw(std::runtime_error(
"CaliTempDat::fetchData(): " +
e.getMessage()));
References MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, setBeta(), setOffset(), setR25(), and setTaskStatus().
◆ getBeta()
float CaliTempDat::getBeta |
( |
| ) |
const |
|
inline |
◆ getOffset()
float CaliTempDat::getOffset |
( |
| ) |
const |
|
inline |
◆ getR25()
float CaliTempDat::getR25 |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string CaliTempDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getTaskStatus()
bool CaliTempDat::getTaskStatus |
( |
| ) |
const |
|
inline |
◆ prepareWrite()
void CaliTempDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 25 of file CaliTempDat.cc.
31 "INSERT INTO cali_temp_dat (iov_id, logic_id, "
32 " beta, r25, offset, task_status) "
33 "VALUES (:iov_id, :logic_id, "
35 }
catch (SQLException&
e) {
36 throw(std::runtime_error(
"CaliTempDat::prepareWrite(): " +
e.getMessage()));
References MillePedeFileConverter_cfg::e.
◆ setBeta()
void CaliTempDat::setBeta |
( |
float |
c | ) |
|
|
inline |
◆ setOffset()
void CaliTempDat::setOffset |
( |
float |
c | ) |
|
|
inline |
◆ setR25()
void CaliTempDat::setR25 |
( |
float |
c | ) |
|
|
inline |
◆ setTaskStatus()
void CaliTempDat::setTaskStatus |
( |
bool |
s | ) |
|
|
inline |
◆ writeArrayDB()
Definition at line 113 of file CaliTempDat.cc.
119 throw(std::runtime_error(
"CaliTempDat::writeArrayDB: IOV not in DB"));
122 int nrows =
data->size();
123 int* ids =
new int[nrows];
124 int* iovid_vec =
new int[nrows];
125 float*
xx =
new float[nrows];
126 float*
yy =
new float[nrows];
127 float*
zz =
new float[nrows];
128 int* st =
new int[nrows];
130 ub2* ids_len =
new ub2[nrows];
131 ub2* iov_len =
new ub2[nrows];
132 ub2* x_len =
new ub2[nrows];
133 ub2* y_len =
new ub2[nrows];
134 ub2* z_len =
new ub2[nrows];
135 ub2* st_len =
new ub2[nrows];
140 typedef map<EcalLogicID, CaliTempDat>::const_iterator CI;
141 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
142 channel = &(
p->first);
145 throw(std::runtime_error(
"CaliTempDat::writeArrayDB: Bad EcalLogicID"));
147 ids[
count] = logicID;
148 iovid_vec[
count] = iovID;
150 dataitem = &(
p->second);
174 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
sizeof(iovid_vec[0]), iov_len);
175 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
176 m_writeStmt->setDataBuffer(3, (dvoid*)
xx, OCCIFLOAT,
sizeof(
xx[0]), x_len);
177 m_writeStmt->setDataBuffer(4, (dvoid*)
yy, OCCIFLOAT,
sizeof(
yy[0]), y_len);
178 m_writeStmt->setDataBuffer(5, (dvoid*)
zz, OCCIFLOAT,
sizeof(
zz[0]), z_len);
179 m_writeStmt->setDataBuffer(6, (dvoid*)st, OCCIINT,
sizeof(st[0]), st_len);
198 }
catch (SQLException&
e) {
199 throw(std::runtime_error(
"MonPedestalsDat::writeArrayDB(): " +
e.getMessage()));
References KineDebug3::count(), std::data(), MillePedeFileConverter_cfg::e, getBeta(), EcalLogicID::getLogicID(), getOffset(), getR25(), getTaskStatus(), AlCaHLTBitMon_ParallelJobs::p, x, geometryCSVtoXML::xx, y, geometryCSVtoXML::yy, z, and geometryCSVtoXML::zz.
◆ writeDB()
Definition at line 40 of file CaliTempDat.cc.
46 throw(std::runtime_error(
"CaliTempDat::writeDB: IOV not in DB"));
51 throw(std::runtime_error(
"CaliTempDat::writeDB: Bad EcalLogicID"));
64 }
catch (SQLException&
e) {
65 throw(std::runtime_error(
"CaliTempDat::writeDB(): " +
e.getMessage()));
References MillePedeFileConverter_cfg::e, and B2GTnPMonitor_cfi::item.
◆ EcalCondDBInterface
◆ m_beta
float CaliTempDat::m_beta |
|
private |
◆ m_offset
float CaliTempDat::m_offset |
|
private |
◆ m_r25
◆ m_taskStatus
bool CaliTempDat::m_taskStatus |
|
private |