#include <MODCCSTRDat.h>
Definition at line 11 of file MODCCSTRDat.h.
MODCCSTRDat::MODCCSTRDat |
( |
| ) |
|
Definition at line 11 of file MODCCSTRDat.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
MODCCSTRDat::~MODCCSTRDat |
( |
| ) |
|
Definition at line 72 of file MODCCSTRDat.cc.
References edm::pset::fillMap(), o2o::iov, L1TEmulatorMonitor_cff::p, and setWord().
87 m_readStmt->setSQL(
"SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
89 "FROM channelview cv JOIN OD_CCS_TR_dat d "
90 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
91 "WHERE d.iov_id = :iov_id");
95 std::pair< EcalLogicID, MODCCSTRDat >
p;
105 dat.
setWord( rset->getInt(7) );
111 throw(std::runtime_error(
"MODCCSTRDat::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
oracle::occi::Statement * m_readStmt
oracle::occi::ResultSet ResultSet
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
void fillMap(Registry *reg, regmap_type &fillme)
void checkConnection() const
std::string MODCCSTRDat::getTable |
( |
| ) |
|
|
inlinevirtual |
int MODCCSTRDat::getWord |
( |
| ) |
const |
|
inline |
void MODCCSTRDat::prepareWrite |
( |
| ) |
|
throw | ( | std::runtime_error |
| ) | | |
|
privatevirtual |
Implements IDataItem.
Definition at line 29 of file MODCCSTRDat.cc.
36 m_writeStmt->setSQL(
"INSERT INTO OD_CCS_TR_dat (iov_id, logic_id, "
38 "VALUES (:iov_id, :logic_id, "
41 throw(std::runtime_error(
"MODCCSTRDat::prepareWrite(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void checkConnection() const
void MODCCSTRDat::setWord |
( |
int |
x | ) |
|
|
inline |
Definition at line 115 of file MODCCSTRDat.cc.
References prof2calltree::count, runTheMatrix::data, EcalLogicID::getLogicID(), getWord(), o2o::iov, L1TEmulatorMonitor_cff::p, and x.
122 if (!iovID) {
throw(std::runtime_error(
"MODCCSTRDat::writeArrayDB: IOV not in DB")); }
125 int nrows=
data->size();
126 int* ids=
new int[nrows];
127 int* iovid_vec=
new int[nrows];
128 int* xx=
new int[nrows];
130 ub2* ids_len=
new ub2[nrows];
131 ub2* iov_len=
new ub2[nrows];
132 ub2* x_len=
new ub2[nrows];
137 typedef map< EcalLogicID, MODCCSTRDat >::const_iterator CI;
138 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
139 channel = &(
p->first);
141 if (!logicID) {
throw(std::runtime_error(
"MODCCSTRDat::writeArrayDB: Bad EcalLogicID")); }
143 iovid_vec[
count]=iovID;
145 dataitem = &(
p->second);
161 m_writeStmt->setDataBuffer(1, (dvoid*)iovid_vec, OCCIINT,
sizeof(iovid_vec[0]),iov_len);
162 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len );
163 m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIINT ,
sizeof(xx[0]), x_len );
179 throw(std::runtime_error(
"MonPedestalsDat::writeArrayDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
void checkConnection() const
Definition at line 47 of file MODCCSTRDat.cc.
References o2o::iov.
54 if (!iovID) {
throw(std::runtime_error(
"MODCCSTRDat::writeDB: IOV not in DB")); }
57 if (!logicID) {
throw(std::runtime_error(
"MODCCSTRDat::writeDB: Bad EcalLogicID")); }
66 throw(std::runtime_error(
"MODCCSTRDat::writeDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::SQLException SQLException
void checkConnection() const