#include <DCUIDarkPedDat.h>
Definition at line 12 of file DCUIDarkPedDat.h.
DCUIDarkPedDat::DCUIDarkPedDat |
( |
| ) |
|
Definition at line 12 of file DCUIDarkPedDat.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
DCUIDarkPedDat::~DCUIDarkPedDat |
( |
| ) |
|
Definition at line 74 of file DCUIDarkPedDat.cc.
References alignCSCRings::e, o2o::iov, AlCaHLTBitMon_ParallelJobs::p, and setPed().
89 m_readStmt->setSQL(
"SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
91 "FROM channelview cv JOIN dcu_idark_ped_dat d "
92 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
93 "WHERE d.iov_id = :iov_id");
97 std::pair< EcalLogicID, DCUIDarkPedDat >
p;
107 dat.
setPed( rset->getFloat(7) );
113 throw(std::runtime_error(
"DCUIDarkPedDat::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
int fetchID() noexcept(false)
oracle::occi::SQLException SQLException
oracle::occi::Statement * m_readStmt
oracle::occi::ResultSet ResultSet
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
float DCUIDarkPedDat::getPed |
( |
| ) |
const |
|
inline |
std::string DCUIDarkPedDat::getTable |
( |
| ) |
|
|
inlinevirtual |
void DCUIDarkPedDat::prepareWrite |
( |
| ) |
|
|
privatevirtualnoexcept |
Implements IDataItem.
Definition at line 30 of file DCUIDarkPedDat.cc.
References alignCSCRings::e.
37 m_writeStmt->setSQL(
"INSERT INTO dcu_idark_ped_dat (iov_id, logic_id, "
39 "VALUES (:iov_id, :logic_id, "
42 throw(std::runtime_error(
"DCUIDarkPedDat::prepareWrite(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
void DCUIDarkPedDat::setPed |
( |
float |
temp | ) |
|
|
inline |
Definition at line 116 of file DCUIDarkPedDat.cc.
References KineDebug3::count(), data, alignCSCRings::e, EcalLogicID::getLogicID(), getPed(), o2o::iov, AlCaHLTBitMon_ParallelJobs::p, and x.
123 if (!iovID) {
throw(std::runtime_error(
"DCUIDarkPedDat::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];
131 ub2* ids_len=
new ub2[nrows];
132 ub2* iov_len=
new ub2[nrows];
133 ub2* x_len=
new ub2[nrows];
138 typedef map< EcalLogicID, DCUIDarkPedDat >::const_iterator CI;
139 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
140 channel = &(
p->first);
142 if (!logicID) {
throw(std::runtime_error(
"DCUIDarkPedDat::writeArrayDB: Bad EcalLogicID")); }
144 iovid_vec[
count]=iovID;
146 dataitem = &(
p->second);
164 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
sizeof(iovid_vec[0]),iov_len);
165 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len );
166 m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIFLOAT ,
sizeof(xx[0]), x_len );
181 throw(std::runtime_error(
"DCUIDarkPedDat::writeArrayDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
int fetchID() noexcept(false)
void checkPrepare() noexcept(false)
oracle::occi::SQLException SQLException
char data[epos_bytes_allocation]
Definition at line 48 of file DCUIDarkPedDat.cc.
References alignCSCRings::e, and o2o::iov.
55 if (!iovID) {
throw(std::runtime_error(
"DCUIDarkPedDat::writeDB: IOV not in DB")); }
58 if (!logicID) {
throw(std::runtime_error(
"DCUIDarkPedDat::writeDB: Bad EcalLogicID")); }
68 throw(std::runtime_error(
"DCUIDarkPedDat::writeDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
int fetchID() noexcept(false)
void checkPrepare() noexcept(false)
oracle::occi::SQLException SQLException
float DCUIDarkPedDat::m_ped |
|
private |