15 m_writeStmt =
nullptr;
33 this->checkConnection();
36 m_writeStmt = m_conn->createStatement();
37 m_writeStmt->setSQL(
"INSERT INTO run_FEConfig_dat (iov_id, logic_id, " 39 "VALUES (:iov_id, :logic_id, " 41 }
catch (SQLException &
e) {
42 throw(std::runtime_error(
std::string(
"RunFEConfigDat::prepareWrite(): ")+getOraMessage(&e)));
51 this->checkConnection();
54 int iovID = iov->fetchID();
55 if (!iovID) {
throw(std::runtime_error(
"RunFEConfigDat::writeDB: IOV not in DB")); }
57 int logicID = ecid->getLogicID();
58 if (!logicID) {
throw(std::runtime_error(
"RunFEConfigDat::writeDB: Bad EcalLogicID")); }
61 m_writeStmt->setInt(1, iovID);
62 m_writeStmt->setInt(2, logicID);
63 m_writeStmt->setInt(3, item->getConfigId());
66 m_writeStmt->executeUpdate();
67 }
catch (SQLException &
e) {
68 throw(std::runtime_error(
std::string(
"RunFEConfigDat::writeDB(): ")+getOraMessage(&e)));
77 this->checkConnection();
80 iov->setConnection(m_env, m_conn);
81 int iovID = iov->fetchID();
91 Statement* stmt = m_conn->createStatement();
92 stmt->setSQL(
"SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " 94 "FROM channelview cv JOIN run_FEConfig_dat d " 95 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to " 96 "WHERE d.iov_id = :iov_id");
97 stmt->setInt(1, iovID);
100 ResultSet* rset = stmt->executeQuery();
102 std::pair< EcalLogicID, RunFEConfigDat >
p;
104 while(rset->next()) {
110 getOraString(rset,6));
118 m_conn->terminateStatement(stmt);
119 }
catch (SQLException &
e) {
120 throw(std::runtime_error(
std::string(
"RunFEConfigDat::fetchData(): ")+getOraMessage(&e)));
void prepareWrite() noexcept(false) override
void writeDB(const EcalLogicID *ecid, const RunFEConfigDat *item, RunIOV *iov) noexcept(false)
void fetchData(std::map< EcalLogicID, RunFEConfigDat > *fillMap, RunIOV *iov) noexcept(false)
~RunFEConfigDat() override