14 m_writeStmt =
nullptr;
23 this->checkConnection();
26 m_writeStmt = m_conn->createStatement();
28 "INSERT INTO run_FEConfig_dat (iov_id, logic_id, "
30 "VALUES (:iov_id, :logic_id, "
32 }
catch (SQLException&
e) {
33 throw(std::runtime_error(
"RunFEConfigDat::prepareWrite(): " +
e.getMessage()));
38 this->checkConnection();
41 int iovID = iov->fetchID();
43 throw(std::runtime_error(
"RunFEConfigDat::writeDB: IOV not in DB"));
46 int logicID = ecid->getLogicID();
48 throw(std::runtime_error(
"RunFEConfigDat::writeDB: Bad EcalLogicID"));
52 m_writeStmt->setInt(1, iovID);
53 m_writeStmt->setInt(2, logicID);
54 m_writeStmt->setInt(3,
item->getConfigId());
56 m_writeStmt->executeUpdate();
57 }
catch (SQLException&
e) {
58 throw(std::runtime_error(
"RunFEConfigDat::writeDB(): " +
e.getMessage()));
63 this->checkConnection();
66 iov->setConnection(m_env, m_conn);
67 int iovID = iov->fetchID();
76 Statement* stmt = m_conn->createStatement();
78 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
80 "FROM channelview cv JOIN run_FEConfig_dat d "
81 "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
82 "WHERE d.iov_id = :iov_id");
83 stmt->setInt(1, iovID);
86 ResultSet* rset = stmt->executeQuery();
88 std::pair<EcalLogicID, RunFEConfigDat>
p;
90 while (rset->next()) {
104 m_conn->terminateStatement(stmt);
105 }
catch (SQLException&
e) {
106 throw(std::runtime_error(
"RunFEConfigDat::fetchData(): " +
e.getMessage()));