#include <RunCommentDat.h>
Definition at line 11 of file RunCommentDat.h.
RunCommentDat::RunCommentDat |
( |
| ) |
|
Definition at line 16 of file RunCommentDat.cc.
oracle::occi::Environment * m_env
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
RunCommentDat::~RunCommentDat |
( |
| ) |
|
|
override |
Definition at line 74 of file RunCommentDat.cc.
References DateHandler::dateToTm(), cuy::dh, MillePedeFileConverter_cfg::e, EcalLogicID::NULLID, AlCaHLTBitMon_ParallelJobs::p, setComment(), and setSource().
Referenced by getDBTime().
90 Statement* stmt =
m_conn->createStatement();
91 stmt->setSQL(
"SELECT d.comment_id, " 92 "d.source, d.user_comment, d.db_timestamp " 93 "FROM run_comment_dat d " 94 "WHERE d.iov_id = :iov_id order by d.logic_id ");
95 stmt->setInt(1, iovID);
96 ResultSet* rset = stmt->executeQuery();
98 std::pair< EcalLogicID, RunCommentDat >
p;
100 while(rset->next()) {
102 rset->getInt(1), rset->getInt(1),
109 Date startDate = rset->getDate(4);
115 m_conn->terminateStatement(stmt);
116 }
catch (SQLException &
e) {
117 throw(std::runtime_error(
"RunCommentDat::fetchData(): "+e.getMessage()));
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
int fetchID() noexcept(false) override
std::string RunCommentDat::getComment |
( |
| ) |
const |
|
inline |
Tm RunCommentDat::getDBTime |
( |
| ) |
const |
|
inline |
std::string RunCommentDat::getSource |
( |
| ) |
const |
|
inline |
std::string RunCommentDat::getTable |
( |
| ) |
|
|
inlineoverridevirtual |
void RunCommentDat::prepareWrite |
( |
| ) |
|
|
overrideprivatevirtualnoexcept |
Implements IDataItem.
Definition at line 34 of file RunCommentDat.cc.
References MillePedeFileConverter_cfg::e.
Referenced by getDBTime().
41 m_writeStmt->setSQL(
"INSERT INTO run_comment_dat (iov_id, " 42 "source, user_comment) " 44 ":source, :user_comment)");
45 }
catch (SQLException &
e) {
46 throw(std::runtime_error(
"RunCommentDat::prepareWrite(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void RunCommentDat::setComment |
( |
std::string |
x | ) |
|
|
inline |
void RunCommentDat::setDBTime |
( |
const Tm & |
x | ) |
|
|
inline |
void RunCommentDat::setSource |
( |
std::string |
x | ) |
|
|
inline |
Definition at line 52 of file RunCommentDat.cc.
References MillePedeFileConverter_cfg::e.
Referenced by getDBTime().
59 if (!iovID) {
throw(std::runtime_error(
"RunCommentDat::writeDB: IOV not in DB")); }
67 }
catch (SQLException &
e) {
68 throw(std::runtime_error(
"RunCommentDat::writeDB(): "+e.getMessage()));
oracle::occi::Statement * m_writeStmt
void checkPrepare() noexcept(false)
void checkConnection() const noexcept(false)
int fetchID() noexcept(false) override
std::string RunCommentDat::m_comment |
|
private |
std::string RunCommentDat::m_source |
|
private |