#include <RunLaserRunDat.h>
Public Member Functions | |
std::string | getLaserSequenceCond () const |
std::string | getLaserSequenceType () const |
std::string | getTable () |
RunLaserRunDat () | |
void | setLaserSequenceCond (std::string x) |
void | setLaserSequenceType (std::string x) |
~RunLaserRunDat () | |
Private Member Functions | |
void | fetchData (std::map< EcalLogicID, RunLaserRunDat > *fillMap, RunIOV *iov) throw (std::runtime_error) |
void | prepareWrite () throw (std::runtime_error) |
void | writeDB (const EcalLogicID *ecid, const RunLaserRunDat *item, RunIOV *iov) throw (std::runtime_error) |
Private Attributes | |
std::string | m_laserSeqCond |
std::string | m_laserSeqType |
Friends | |
class | EcalCondDBInterface |
Definition at line 11 of file RunLaserRunDat.h.
RunLaserRunDat::RunLaserRunDat | ( | ) |
Definition at line 11 of file RunLaserRunDat.cc.
References NULL.
{ m_env = NULL; m_conn = NULL; m_writeStmt = NULL; m_laserSeqType = ""; m_laserSeqCond = ""; }
RunLaserRunDat::~RunLaserRunDat | ( | ) |
Definition at line 22 of file RunLaserRunDat.cc.
{ }
void RunLaserRunDat::fetchData | ( | std::map< EcalLogicID, RunLaserRunDat > * | fillMap, |
RunIOV * | iov | ||
) | throw (std::runtime_error) [private] |
std::string RunLaserRunDat::getLaserSequenceCond | ( | ) | const [inline] |
Definition at line 24 of file RunLaserRunDat.h.
References m_laserSeqCond.
{ return m_laserSeqCond; }
std::string RunLaserRunDat::getLaserSequenceType | ( | ) | const [inline] |
Definition at line 21 of file RunLaserRunDat.h.
References m_laserSeqType.
{ return m_laserSeqType; }
std::string RunLaserRunDat::getTable | ( | ) | [inline, virtual] |
Implements IDataItem.
Definition at line 18 of file RunLaserRunDat.h.
{ return "RUN_LASERRUN_CONFIG_DAT"; }
void RunLaserRunDat::prepareWrite | ( | ) | throw (std::runtime_error) [private, virtual] |
Implements IDataItem.
Definition at line 28 of file RunLaserRunDat.cc.
{ this->checkConnection(); try { m_writeStmt = m_conn->createStatement(); m_writeStmt->setSQL("INSERT INTO run_laserrun_config_dat (iov_id, logic_id, " "laser_sequence_type, laser_sequence_cond) " "VALUES (:1, :2, " ":3, :4 )"); } catch (SQLException &e) { throw(std::runtime_error("RunLaserRunDat::prepareWrite(): "+e.getMessage())); } }
void RunLaserRunDat::setLaserSequenceCond | ( | std::string | x | ) | [inline] |
Definition at line 23 of file RunLaserRunDat.h.
References m_laserSeqCond, and x.
{ m_laserSeqCond = x; }
void RunLaserRunDat::setLaserSequenceType | ( | std::string | x | ) | [inline] |
Definition at line 20 of file RunLaserRunDat.h.
References m_laserSeqType, and x.
{ m_laserSeqType = x; }
void RunLaserRunDat::writeDB | ( | const EcalLogicID * | ecid, |
const RunLaserRunDat * | item, | ||
RunIOV * | iov | ||
) | throw (std::runtime_error) [private] |
Definition at line 46 of file RunLaserRunDat.cc.
References o2o::iov.
{ this->checkConnection(); this->checkPrepare(); int iovID = iov->fetchID(); if (!iovID) { throw(std::runtime_error("RunLaserRunDat::writeDB: IOV not in DB")); } int logicID = ecid->getLogicID(); if (!logicID) { throw(std::runtime_error("RunLaserRunDat::writeDB: Bad EcalLogicID")); } try { m_writeStmt->setInt(1, iovID); m_writeStmt->setInt(2, logicID); m_writeStmt->setString(3, item->getLaserSequenceType()); m_writeStmt->setString(4, item->getLaserSequenceCond()); m_writeStmt->executeUpdate(); } catch (SQLException &e) { throw(std::runtime_error("RunLaserRunDat::writeDB(): "+e.getMessage())); } }
friend class EcalCondDBInterface [friend] |
Reimplemented from IDBObject.
Definition at line 13 of file RunLaserRunDat.h.
std::string RunLaserRunDat::m_laserSeqCond [private] |
Definition at line 38 of file RunLaserRunDat.h.
Referenced by getLaserSequenceCond(), and setLaserSequenceCond().
std::string RunLaserRunDat::m_laserSeqType [private] |
Definition at line 37 of file RunLaserRunDat.h.
Referenced by getLaserSequenceType(), and setLaserSequenceType().