#include <RunMemTTErrorsDat.h>
Public Member Functions | |
uint64_t | getErrorBits () const |
std::string | getTable () |
RunMemTTErrorsDat () | |
void | setErrorBits (uint64_t bits) |
~RunMemTTErrorsDat () | |
Private Member Functions | |
void | fetchData (std::map< EcalLogicID, RunMemTTErrorsDat > *fillMap, RunIOV *iov) throw (std::runtime_error) |
void | prepareWrite () throw (std::runtime_error) |
void | writeDB (const EcalLogicID *ecid, const RunMemTTErrorsDat *item, RunIOV *iov) throw (std::runtime_error) |
Private Attributes | |
uint64_t | m_errorBits |
Friends | |
class | EcalCondDBInterface |
Definition at line 12 of file RunMemTTErrorsDat.h.
RunMemTTErrorsDat::RunMemTTErrorsDat | ( | ) |
Definition at line 12 of file RunMemTTErrorsDat.cc.
References NULL.
{ m_env = NULL; m_conn = NULL; m_writeStmt = NULL; m_readStmt = NULL; m_errorBits = 0; }
RunMemTTErrorsDat::~RunMemTTErrorsDat | ( | ) |
Definition at line 24 of file RunMemTTErrorsDat.cc.
{ }
void RunMemTTErrorsDat::fetchData | ( | std::map< EcalLogicID, RunMemTTErrorsDat > * | fillMap, |
RunIOV * | iov | ||
) | throw (std::runtime_error) [private] |
uint64_t RunMemTTErrorsDat::getErrorBits | ( | ) | const [inline] |
std::string RunMemTTErrorsDat::getTable | ( | ) | [inline, virtual] |
Implements IDataItem.
Definition at line 19 of file RunMemTTErrorsDat.h.
{ return "RUN_MEM_TT_ERRORS_DAT"; }
void RunMemTTErrorsDat::prepareWrite | ( | ) | throw (std::runtime_error) [private, virtual] |
Implements IDataItem.
Definition at line 30 of file RunMemTTErrorsDat.cc.
References alignCSCRings::e.
{ this->checkConnection(); try { m_writeStmt = m_conn->createStatement(); /* Using TO_NUMBER because OCCI does not support 64-bit integers well */ m_writeStmt->setSQL("INSERT INTO run_mem_tt_errors_dat (iov_id, logic_id, " "error_bits) " "VALUES (:iov_id, :logic_id, " "to_number(:error_bits))"); } catch (SQLException &e) { throw(std::runtime_error("RunMemTTErrorsDat::prepareWrite(): "+e.getMessage())); } }
void RunMemTTErrorsDat::setErrorBits | ( | uint64_t | bits | ) | [inline] |
Definition at line 21 of file RunMemTTErrorsDat.h.
References bits, and m_errorBits.
{ m_errorBits = bits; }
void RunMemTTErrorsDat::writeDB | ( | const EcalLogicID * | ecid, |
const RunMemTTErrorsDat * | item, | ||
RunIOV * | iov | ||
) | throw (std::runtime_error) [private] |
Definition at line 49 of file RunMemTTErrorsDat.cc.
References alignCSCRings::e, and o2o::iov.
{ this->checkConnection(); this->checkPrepare(); int iovID = iov->fetchID(); if (!iovID) { throw(std::runtime_error("RunMemTTErrorsDat::writeDB: IOV not in DB")); } int logicID = ecid->getLogicID(); if (!logicID) { throw(std::runtime_error("RunMemTTErrorsDat::writeDB: Bad EcalLogicID")); } try { m_writeStmt->setInt(1, iovID); m_writeStmt->setInt(2, logicID); m_writeStmt->setString(3, ( boost::lexical_cast<std::string>(item->getErrorBits()) ).c_str()); m_writeStmt->executeUpdate(); } catch (SQLException &e) { throw(std::runtime_error("RunMemTTErrorsDat::writeDB(): "+e.getMessage())); } }
friend class EcalCondDBInterface [friend] |
Reimplemented from IDBObject.
Definition at line 14 of file RunMemTTErrorsDat.h.
uint64_t RunMemTTErrorsDat::m_errorBits [private] |
Definition at line 35 of file RunMemTTErrorsDat.h.
Referenced by getErrorBits(), and setErrorBits().