#include <CaliCrystalIntercalDat.h>
Definition at line 12 of file CaliCrystalIntercalDat.h.
◆ CaliCrystalIntercalDat()
CaliCrystalIntercalDat::CaliCrystalIntercalDat |
( |
| ) |
|
Definition at line 12 of file CaliCrystalIntercalDat.cc.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
◆ ~CaliCrystalIntercalDat()
CaliCrystalIntercalDat::~CaliCrystalIntercalDat |
( |
| ) |
|
|
override |
◆ fetchData()
Definition at line 71 of file CaliCrystalIntercalDat.cc.
References MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, setCali(), setCaliRMS(), setNumEvents(), and setTaskStatus().
85 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " 86 "d.cali, d.cali_rms, d.num_events, d.task_status " 87 "FROM channelview cv JOIN cali_crystal_intercal_dat d " 88 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to " 89 "WHERE d.iov_id = :iov_id");
93 std::pair<EcalLogicID, CaliCrystalIntercalDat>
p;
95 while (rset->next()) {
103 dat.
setCali(rset->getFloat(7));
111 }
catch (SQLException&
e) {
112 throw(std::runtime_error(
"CaliCrystalIntercalDat::fetchData(): " +
e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::Statement * m_readStmt
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
int fetchID() noexcept(false) override
void setTaskStatus(bool s)
◆ getCali()
float CaliCrystalIntercalDat::getCali |
( |
| ) |
const |
|
inline |
◆ getCaliRMS()
float CaliCrystalIntercalDat::getCaliRMS |
( |
| ) |
const |
|
inline |
◆ getNumEvents()
int CaliCrystalIntercalDat::getNumEvents |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string CaliCrystalIntercalDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getTaskStatus()
bool CaliCrystalIntercalDat::getTaskStatus |
( |
| ) |
const |
|
inline |
◆ prepareWrite()
void CaliCrystalIntercalDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 25 of file CaliCrystalIntercalDat.cc.
References MillePedeFileConverter_cfg::e.
31 "INSERT INTO cali_crystal_intercal_dat (iov_id, logic_id, " 32 "cali, cali_rms, num_events, task_status) " 33 "VALUES (:iov_id, :logic_id, " 35 }
catch (SQLException&
e) {
36 throw(std::runtime_error(
"CaliCrystalIntercalDat::prepareWrite(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
◆ setCali()
void CaliCrystalIntercalDat::setCali |
( |
float |
c | ) |
|
|
inline |
◆ setCaliRMS()
void CaliCrystalIntercalDat::setCaliRMS |
( |
float |
c | ) |
|
|
inline |
◆ setNumEvents()
void CaliCrystalIntercalDat::setNumEvents |
( |
int |
n | ) |
|
|
inline |
◆ setTaskStatus()
void CaliCrystalIntercalDat::setTaskStatus |
( |
bool |
s | ) |
|
|
inline |
◆ writeArrayDB()
Definition at line 116 of file CaliCrystalIntercalDat.cc.
References submitPVResolutionJobs::count, data, MillePedeFileConverter_cfg::e, getCali(), getCaliRMS(), EcalLogicID::getLogicID(), getNumEvents(), getTaskStatus(), AlCaHLTBitMon_ParallelJobs::p, groupFilesInBlocks::tt, x, geometryCSVtoXML::xx, y, and geometryCSVtoXML::yy.
123 throw(std::runtime_error(
"CaliCrystalIntercalDat::writeArrayDB: IOV not in DB"));
126 int nrows =
data->size();
127 int* ids =
new int[nrows];
128 int* iovid_vec =
new int[nrows];
129 float*
xx =
new float[nrows];
130 float*
yy =
new float[nrows];
131 int*
tt =
new int[nrows];
132 int* st =
new int[nrows];
134 ub2* ids_len =
new ub2[nrows];
135 ub2* iov_len =
new ub2[nrows];
136 ub2* x_len =
new ub2[nrows];
137 ub2* y_len =
new ub2[nrows];
138 ub2* tt_len =
new ub2[nrows];
139 ub2* st_len =
new ub2[nrows];
144 typedef map<EcalLogicID, CaliCrystalIntercalDat>::const_iterator CI;
145 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
146 channel = &(
p->first);
149 throw(std::runtime_error(
"CaliCrystalIntercalDat::writeArrayDB: Bad EcalLogicID"));
151 ids[
count] = logicID;
152 iovid_vec[
count] = iovID;
154 dataitem = &(
p->second);
178 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
sizeof(iovid_vec[0]), iov_len);
179 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
180 m_writeStmt->setDataBuffer(3, (dvoid*)
xx, OCCIFLOAT,
sizeof(
xx[0]), x_len);
181 m_writeStmt->setDataBuffer(4, (dvoid*)
yy, OCCIFLOAT,
sizeof(
yy[0]), y_len);
182 m_writeStmt->setDataBuffer(5, (dvoid*)
tt, OCCIINT,
sizeof(
tt[0]), tt_len);
183 m_writeStmt->setDataBuffer(6, (dvoid*)st, OCCIINT,
sizeof(st[0]), st_len);
201 }
catch (SQLException&
e) {
202 throw(std::runtime_error(
"MonPedestalsDat::writeArrayDB(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
char data[epos_bytes_allocation]
int fetchID() noexcept(false) override
bool getTaskStatus() const
◆ writeDB()
Definition at line 40 of file CaliCrystalIntercalDat.cc.
References MillePedeFileConverter_cfg::e, and B2GTnPMonitor_cfi::item.
48 throw(std::runtime_error(
"CaliCrystalIntercalDat::writeDB: IOV not in DB"));
53 throw(std::runtime_error(
"CaliCrystalIntercalDat::writeDB: Bad EcalLogicID"));
66 }
catch (SQLException&
e) {
67 throw(std::runtime_error(
"CaliCrystalIntercalDat::writeDB(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false) override
◆ EcalCondDBInterface
◆ m_cali
float CaliCrystalIntercalDat::m_cali |
|
private |
◆ m_caliRMS
float CaliCrystalIntercalDat::m_caliRMS |
|
private |
◆ m_numEvents
int CaliCrystalIntercalDat::m_numEvents |
|
private |
◆ m_taskStatus
bool CaliCrystalIntercalDat::m_taskStatus |
|
private |