#include <RunTPGConfigDat.h>
Public Member Functions | |
std::string | getConfigTag () const |
std::string | getTable () |
int | getVersion () const |
RunTPGConfigDat () | |
void | setConfigTag (std::string x) |
void | setVersion (int x) |
~RunTPGConfigDat () | |
Private Member Functions | |
void | fetchData (std::map< EcalLogicID, RunTPGConfigDat > *fillMap, RunIOV *iov) throw (std::runtime_error) |
void | prepareWrite () throw (std::runtime_error) |
void | writeDB (const EcalLogicID *ecid, const RunTPGConfigDat *item, RunIOV *iov) throw (std::runtime_error) |
Private Attributes | |
std::string | m_config |
int | m_version |
Friends | |
class | EcalCondDBInterface |
Definition at line 11 of file RunTPGConfigDat.h.
RunTPGConfigDat::RunTPGConfigDat | ( | ) |
Definition at line 11 of file RunTPGConfigDat.cc.
References NULL.
{ m_env = NULL; m_conn = NULL; m_writeStmt = NULL; m_readStmt = NULL; m_config = ""; m_version=0; }
RunTPGConfigDat::~RunTPGConfigDat | ( | ) |
Definition at line 24 of file RunTPGConfigDat.cc.
{ }
void RunTPGConfigDat::fetchData | ( | std::map< EcalLogicID, RunTPGConfigDat > * | fillMap, |
RunIOV * | iov | ||
) | throw (std::runtime_error) [private] |
std::string RunTPGConfigDat::getConfigTag | ( | ) | const [inline] |
Definition at line 20 of file RunTPGConfigDat.h.
References m_config.
Referenced by popcon::EcalTPGFineGrainEBGroupHandler::getNewObjects(), popcon::EcalTPGFineGrainTowerEEHandler::getNewObjects(), popcon::EcalTPGWeightGroupHandler::getNewObjects(), popcon::EcalTPGBadXTHandler::getNewObjects(), popcon::EcalTPGWeightIdMapHandler::getNewObjects(), popcon::EcalTPGBadTTHandler::getNewObjects(), popcon::EcalTPGSpikeThresholdHandler::getNewObjects(), popcon::EcalTPGPedestalsHandler::getNewObjects(), popcon::EcalTPGSlidingWindowHandler::getNewObjects(), popcon::EcalTPGFineGrainEBIdMapHandler::getNewObjects(), popcon::EcalTPGPhysicsConstHandler::getNewObjects(), popcon::EcalTPGLinConstHandler::getNewObjects(), popcon::EcalTPGLutIdMapHandler::getNewObjects(), popcon::EcalTPGBadStripHandler::getNewObjects(), popcon::EcalTPGFineGrainStripEEHandler::getNewObjects(), and popcon::EcalTPGLutGroupHandler::getNewObjects().
{ return m_config; }
std::string RunTPGConfigDat::getTable | ( | ) | [inline, virtual] |
Implements IDataItem.
Definition at line 18 of file RunTPGConfigDat.h.
{ return "RUN_TPGCONFIG_DAT"; }
int RunTPGConfigDat::getVersion | ( | ) | const [inline] |
Definition at line 22 of file RunTPGConfigDat.h.
References m_version.
Referenced by popcon::EcalTPGFineGrainTowerEEHandler::getNewObjects(), popcon::EcalTPGFineGrainEBGroupHandler::getNewObjects(), popcon::EcalTPGWeightGroupHandler::getNewObjects(), popcon::EcalTPGBadXTHandler::getNewObjects(), popcon::EcalTPGWeightIdMapHandler::getNewObjects(), popcon::EcalTPGSpikeThresholdHandler::getNewObjects(), popcon::EcalTPGBadTTHandler::getNewObjects(), popcon::EcalTPGSlidingWindowHandler::getNewObjects(), popcon::EcalTPGPedestalsHandler::getNewObjects(), popcon::EcalTPGPhysicsConstHandler::getNewObjects(), popcon::EcalTPGFineGrainEBIdMapHandler::getNewObjects(), popcon::EcalTPGLutIdMapHandler::getNewObjects(), popcon::EcalTPGLinConstHandler::getNewObjects(), popcon::EcalTPGBadStripHandler::getNewObjects(), popcon::EcalTPGLutGroupHandler::getNewObjects(), and popcon::EcalTPGFineGrainStripEEHandler::getNewObjects().
{ return m_version; }
void RunTPGConfigDat::prepareWrite | ( | ) | throw (std::runtime_error) [private, virtual] |
Implements IDataItem.
Definition at line 30 of file RunTPGConfigDat.cc.
{ this->checkConnection(); try { m_writeStmt = m_conn->createStatement(); m_writeStmt->setSQL("INSERT INTO run_TPGConfig_dat (iov_id, logic_id, " "Config_tag , version ) " "VALUES (:iov_id, :logic_id, " ":Config_tag , :version ) "); } catch (SQLException &e) { throw(std::runtime_error("RunTPGConfigDat::prepareWrite(): "+e.getMessage())); } }
void RunTPGConfigDat::setConfigTag | ( | std::string | x | ) | [inline] |
void CaliTag::setVersion | ( | int | x | ) | [inline] |
void RunTPGConfigDat::writeDB | ( | const EcalLogicID * | ecid, |
const RunTPGConfigDat * | item, | ||
RunIOV * | iov | ||
) | throw (std::runtime_error) [private] |
Definition at line 48 of file RunTPGConfigDat.cc.
References o2o::iov.
{ this->checkConnection(); this->checkPrepare(); int iovID = iov->fetchID(); if (!iovID) { throw(std::runtime_error("RunTPGConfigDat::writeDB: IOV not in DB")); } int logicID = ecid->getLogicID(); if (!logicID) { throw(std::runtime_error("RunTPGConfigDat::writeDB: Bad EcalLogicID")); } try { m_writeStmt->setInt(1, iovID); m_writeStmt->setInt(2, logicID); m_writeStmt->setString(3, item->getConfigTag()); m_writeStmt->setInt(4, item->getVersion()); m_writeStmt->executeUpdate(); } catch (SQLException &e) { throw(std::runtime_error("RunTPGConfigDat::writeDB(): "+e.getMessage())); } }
friend class EcalCondDBInterface [friend] |
Reimplemented from IDBObject.
Definition at line 13 of file RunTPGConfigDat.h.
std::string RunTPGConfigDat::m_config [private] |
Definition at line 38 of file RunTPGConfigDat.h.
Referenced by getConfigTag(), and setConfigTag().
int RunTPGConfigDat::m_version [private] |
Definition at line 37 of file RunTPGConfigDat.h.
Referenced by getVersion(), and setVersion().