#include <RunFEConfigDat.h>
Public Member Functions | |
int | getConfigId () const |
std::string | getTable () |
RunFEConfigDat () | |
void | setConfigId (int x) |
~RunFEConfigDat () | |
Private Member Functions | |
void | fetchData (std::map< EcalLogicID, RunFEConfigDat > *fillMap, RunIOV *iov) throw (std::runtime_error) |
void | prepareWrite () throw (std::runtime_error) |
void | writeDB (const EcalLogicID *ecid, const RunFEConfigDat *item, RunIOV *iov) throw (std::runtime_error) |
Private Attributes | |
int | m_config |
Friends | |
class | EcalCondDBInterface |
Definition at line 11 of file RunFEConfigDat.h.
RunFEConfigDat::RunFEConfigDat | ( | ) |
Definition at line 11 of file RunFEConfigDat.cc.
References NULL.
{ m_env = NULL; m_conn = NULL; m_writeStmt = NULL; m_readStmt = NULL; m_config = 0; }
RunFEConfigDat::~RunFEConfigDat | ( | ) |
Definition at line 24 of file RunFEConfigDat.cc.
{ }
void RunFEConfigDat::fetchData | ( | std::map< EcalLogicID, RunFEConfigDat > * | fillMap, |
RunIOV * | iov | ||
) | throw (std::runtime_error) [private] |
int RunFEConfigDat::getConfigId | ( | ) | const [inline] |
Definition at line 20 of file RunFEConfigDat.h.
References m_config.
Referenced by popcon::EcalChannelStatusHandler::daqOut(), popcon::EcalDAQHandler::getNewObjects(), and popcon::EcalSRPHandler::getNewObjects().
{ return m_config; }
std::string RunFEConfigDat::getTable | ( | ) | [inline, virtual] |
Implements IDataItem.
Definition at line 18 of file RunFEConfigDat.h.
{ return "RUN_FECONFIG_DAT"; }
void RunFEConfigDat::prepareWrite | ( | ) | throw (std::runtime_error) [private, virtual] |
Implements IDataItem.
Definition at line 30 of file RunFEConfigDat.cc.
{ this->checkConnection(); try { m_writeStmt = m_conn->createStatement(); m_writeStmt->setSQL("INSERT INTO run_FEConfig_dat (iov_id, logic_id, " "Config_id ) " "VALUES (:iov_id, :logic_id, " ":Config_id ) "); } catch (SQLException &e) { throw(std::runtime_error("RunFEConfigDat::prepareWrite(): "+e.getMessage())); } }
void RunFEConfigDat::setConfigId | ( | int | x | ) | [inline] |
void RunFEConfigDat::writeDB | ( | const EcalLogicID * | ecid, |
const RunFEConfigDat * | item, | ||
RunIOV * | iov | ||
) | throw (std::runtime_error) [private] |
Definition at line 48 of file RunFEConfigDat.cc.
References o2o::iov.
{ this->checkConnection(); this->checkPrepare(); int iovID = iov->fetchID(); if (!iovID) { throw(std::runtime_error("RunFEConfigDat::writeDB: IOV not in DB")); } int logicID = ecid->getLogicID(); if (!logicID) { throw(std::runtime_error("RunFEConfigDat::writeDB: Bad EcalLogicID")); } try { m_writeStmt->setInt(1, iovID); m_writeStmt->setInt(2, logicID); m_writeStmt->setInt(3, item->getConfigId()); m_writeStmt->executeUpdate(); } catch (SQLException &e) { throw(std::runtime_error("RunFEConfigDat::writeDB(): "+e.getMessage())); } }
friend class EcalCondDBInterface [friend] |
Reimplemented from IDBObject.
Definition at line 13 of file RunFEConfigDat.h.
int RunFEConfigDat::m_config [private] |
Definition at line 36 of file RunFEConfigDat.h.
Referenced by getConfigId(), and setConfigId().