#include <DCUIDarkPedDat.h>
Definition at line 12 of file DCUIDarkPedDat.h.
◆ DCUIDarkPedDat()
DCUIDarkPedDat::DCUIDarkPedDat |
( |
| ) |
|
Definition at line 12 of file DCUIDarkPedDat.cc.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
◆ ~DCUIDarkPedDat()
DCUIDarkPedDat::~DCUIDarkPedDat |
( |
| ) |
|
|
override |
◆ fetchData()
Definition at line 64 of file DCUIDarkPedDat.cc.
References MillePedeFileConverter_cfg::e, AlCaHLTBitMon_ParallelJobs::p, and setPed().
77 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " 79 "FROM channelview cv JOIN dcu_idark_ped_dat d " 80 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to " 81 "WHERE d.iov_id = :iov_id");
85 std::pair<EcalLogicID, DCUIDarkPedDat>
p;
87 while (rset->next()) {
95 dat.
setPed(rset->getFloat(7));
100 }
catch (SQLException&
e) {
101 throw(std::runtime_error(
"DCUIDarkPedDat::fetchData(): " +
e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::Statement * m_readStmt
int fetchID() noexcept(false) override
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
◆ getPed()
float DCUIDarkPedDat::getPed |
( |
| ) |
const |
|
inline |
◆ getTable()
std::string DCUIDarkPedDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
◆ prepareWrite()
void DCUIDarkPedDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 23 of file DCUIDarkPedDat.cc.
References MillePedeFileConverter_cfg::e.
29 "INSERT INTO dcu_idark_ped_dat (iov_id, logic_id, " 31 "VALUES (:iov_id, :logic_id, " 33 }
catch (SQLException&
e) {
34 throw(std::runtime_error(
"DCUIDarkPedDat::prepareWrite(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
◆ setPed()
void DCUIDarkPedDat::setPed |
( |
float |
temp | ) |
|
|
inline |
◆ writeArrayDB()
Definition at line 104 of file DCUIDarkPedDat.cc.
References submitPVResolutionJobs::count, data, MillePedeFileConverter_cfg::e, EcalLogicID::getLogicID(), getPed(), AlCaHLTBitMon_ParallelJobs::p, x, and geometryCSVtoXML::xx.
110 throw(std::runtime_error(
"DCUIDarkPedDat::writeArrayDB: IOV not in DB"));
113 int nrows =
data->size();
114 int* ids =
new int[nrows];
115 int* iovid_vec =
new int[nrows];
116 float*
xx =
new float[nrows];
118 ub2* ids_len =
new ub2[nrows];
119 ub2* iov_len =
new ub2[nrows];
120 ub2* x_len =
new ub2[nrows];
125 typedef map<EcalLogicID, DCUIDarkPedDat>::const_iterator CI;
126 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
127 channel = &(
p->first);
130 throw(std::runtime_error(
"DCUIDarkPedDat::writeArrayDB: Bad EcalLogicID"));
132 ids[
count] = logicID;
133 iovid_vec[
count] = iovID;
135 dataitem = &(
p->second);
150 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
sizeof(iovid_vec[0]), iov_len);
151 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len);
152 m_writeStmt->setDataBuffer(3, (dvoid*)
xx, OCCIFLOAT,
sizeof(
xx[0]), x_len);
164 }
catch (SQLException&
e) {
165 throw(std::runtime_error(
"DCUIDarkPedDat::writeArrayDB(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false) override
char data[epos_bytes_allocation]
◆ writeDB()
Definition at line 38 of file DCUIDarkPedDat.cc.
References MillePedeFileConverter_cfg::e, and B2GTnPMonitor_cfi::item.
44 throw(std::runtime_error(
"DCUIDarkPedDat::writeDB: IOV not in DB"));
49 throw(std::runtime_error(
"DCUIDarkPedDat::writeDB: Bad EcalLogicID"));
59 }
catch (SQLException&
e) {
60 throw(std::runtime_error(
"DCUIDarkPedDat::writeDB(): " +
e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
int fetchID() noexcept(false) override
◆ EcalCondDBInterface
◆ m_ped
float DCUIDarkPedDat::m_ped |
|
private |