#include <FEConfigLUTDat.h>
Definition at line 11 of file FEConfigLUTDat.h.
FEConfigLUTDat::FEConfigLUTDat |
( |
| ) |
|
Definition at line 11 of file FEConfigLUTDat.cc.
References NULL.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
oracle::occi::Statement * m_readStmt
FEConfigLUTDat::~FEConfigLUTDat |
( |
| ) |
|
Definition at line 72 of file FEConfigLUTDat.cc.
References alignCSCRings::e, AlCaHLTBitMon_ParallelJobs::p, and setLUTGroupId().
87 m_readStmt->setSQL(
"SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
89 "FROM channelview cv JOIN fe_config_lut_dat d "
90 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
91 "WHERE lut_conf_id = :lut_conf_id");
95 std::pair< EcalLogicID, FEConfigLUTDat >
p;
111 throw(std::runtime_error(
"FEConfigLUTDat::fetchData: "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
void setLUTGroupId(int x)
oracle::occi::Statement * m_readStmt
int fetchID() noexcept(false)
oracle::occi::ResultSet ResultSet
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
int FEConfigLUTDat::getLUTGroupId |
( |
| ) |
const |
|
inline |
std::string FEConfigLUTDat::getTable |
( |
| ) |
|
|
inlinevirtual |
void FEConfigLUTDat::prepareWrite |
( |
| ) |
|
|
privatevirtualnoexcept |
Implements IDataItem.
Definition at line 30 of file FEConfigLUTDat.cc.
References alignCSCRings::e.
37 m_writeStmt->setSQL(
"INSERT INTO fe_config_lut_dat (lut_conf_id, logic_id, "
39 "VALUES (:lut_conf_id, :logic_id, "
42 throw(std::runtime_error(
"FEConfigLUTDat::prepareWrite(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
oracle::occi::SQLException SQLException
void FEConfigLUTDat::setLUTGroupId |
( |
int |
x | ) |
|
|
inline |
Definition at line 115 of file FEConfigLUTDat.cc.
References KineDebug3::count(), data, alignCSCRings::e, EcalLogicID::getLogicID(), getLUTGroupId(), AlCaHLTBitMon_ParallelJobs::p, and x.
121 int iconfID = iconf->
fetchID();
122 if (!iconfID) {
throw(std::runtime_error(
"FEConfigLUTDat::writeArrayDB: ICONF not in DB")); }
125 int nrows=
data->size();
126 int* ids=
new int[nrows];
127 int* iconfid_vec=
new int[nrows];
128 int* xx=
new int[nrows];
130 ub2* ids_len=
new ub2[nrows];
131 ub2* iconf_len=
new ub2[nrows];
132 ub2* x_len=
new ub2[nrows];
138 typedef map< EcalLogicID, FEConfigLUTDat >::const_iterator CI;
139 for (CI
p =
data->begin();
p !=
data->end(); ++
p) {
140 channel = &(
p->first);
142 if (!logicID) {
throw(std::runtime_error(
"FEConfigLUTDat::writeArrayDB: Bad EcalLogicID")); }
144 iconfid_vec[
count]=iconfID;
146 dataitem = &(
p->second);
162 m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT,
sizeof(iconfid_vec[0]),iconf_len);
163 m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT,
sizeof(ids[0]), ids_len );
164 m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIINT ,
sizeof(xx[0]), x_len );
169 delete [] iconfid_vec;
177 throw(std::runtime_error(
"FEConfigLUTDat::writeArrayDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
oracle::occi::SQLException SQLException
int fetchID() noexcept(false)
char data[epos_bytes_allocation]
int getLUTGroupId() const
Definition at line 47 of file FEConfigLUTDat.cc.
References alignCSCRings::e.
54 if (!iconfID) {
throw(std::runtime_error(
"FEConfigLUTDat::writeDB: ICONF not in DB")); }
57 if (!logicID) {
throw(std::runtime_error(
"FEConfigLUTDat::writeDB: Bad EcalLogicID")); }
66 throw(std::runtime_error(
"FEConfigLUTDat::writeDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkConnection() const noexcept(false)
void checkPrepare() noexcept(false)
oracle::occi::SQLException SQLException
int fetchID() noexcept(false)
int getLUTGroupId() const
int FEConfigLUTDat::m_group_id |
|
private |