#include <RunH4TablePositionDat.h>
Public Member Functions | |
int | getNumEvents () const |
int | getNumSpills () const |
std::string | getTable () |
int | getTableX () const |
int | getTableY () const |
RunH4TablePositionDat () | |
void | setNumEvents (int num) |
void | setNumSpills (int num) |
void | setTableX (int num) |
void | setTableY (int num) |
~RunH4TablePositionDat () | |
Private Member Functions | |
void | fetchData (std::map< EcalLogicID, RunH4TablePositionDat > *fillMap, RunIOV *iov) throw (std::runtime_error) |
void | prepareWrite () throw (std::runtime_error) |
void | writeDB (const EcalLogicID *ecid, const RunH4TablePositionDat *item, RunIOV *iov) throw (std::runtime_error) |
Private Attributes | |
int | m_numEvents |
int | m_numSpills |
int | m_table_x |
int | m_table_y |
Friends | |
class | EcalCondDBInterface |
Definition at line 11 of file RunH4TablePositionDat.h.
RunH4TablePositionDat::RunH4TablePositionDat | ( | ) |
Definition at line 11 of file RunH4TablePositionDat.cc.
References NULL.
{ m_env = NULL; m_conn = NULL; m_writeStmt = NULL; m_readStmt = NULL; m_table_x = 0; m_table_y = 0; m_numSpills = 0; m_numEvents = 0; }
RunH4TablePositionDat::~RunH4TablePositionDat | ( | ) |
Definition at line 26 of file RunH4TablePositionDat.cc.
{ }
void RunH4TablePositionDat::fetchData | ( | std::map< EcalLogicID, RunH4TablePositionDat > * | fillMap, |
RunIOV * | iov | ||
) | throw (std::runtime_error) [private] |
int RunH4TablePositionDat::getNumEvents | ( | ) | const [inline] |
Definition at line 30 of file RunH4TablePositionDat.h.
References m_numEvents.
{ return m_numEvents; }
int RunH4TablePositionDat::getNumSpills | ( | ) | const [inline] |
Definition at line 27 of file RunH4TablePositionDat.h.
References m_numSpills.
{ return m_numSpills; }
std::string RunH4TablePositionDat::getTable | ( | ) | [inline, virtual] |
Implements IDataItem.
Definition at line 18 of file RunH4TablePositionDat.h.
{ return "RUN_H4_TABLE_POSITION_DAT"; }
int RunH4TablePositionDat::getTableX | ( | ) | const [inline] |
int RunH4TablePositionDat::getTableY | ( | ) | const [inline] |
void RunH4TablePositionDat::prepareWrite | ( | ) | throw (std::runtime_error) [private, virtual] |
Implements IDataItem.
Definition at line 32 of file RunH4TablePositionDat.cc.
{ this->checkConnection(); try { m_writeStmt = m_conn->createStatement(); m_writeStmt->setSQL("INSERT INTO run_h4_table_position_dat (iov_id, logic_id, " "table_x, table_y, number_of_spills, number_of_events ) " "VALUES (:iov_id, :logic_id, " ":table_x, :table_y, :number_of_spills, :number_of_events)"); } catch (SQLException &e) { throw(std::runtime_error("RunH4TablePositionDat::prepareWrite(): "+e.getMessage())); } }
void RunH4TablePositionDat::setNumEvents | ( | int | num | ) | [inline] |
Definition at line 29 of file RunH4TablePositionDat.h.
References m_numEvents.
{ m_numEvents = num; }
void RunH4TablePositionDat::setNumSpills | ( | int | num | ) | [inline] |
Definition at line 26 of file RunH4TablePositionDat.h.
References m_numSpills.
{ m_numSpills = num; }
void RunH4TablePositionDat::setTableX | ( | int | num | ) | [inline] |
void RunH4TablePositionDat::setTableY | ( | int | num | ) | [inline] |
void RunH4TablePositionDat::writeDB | ( | const EcalLogicID * | ecid, |
const RunH4TablePositionDat * | item, | ||
RunIOV * | iov | ||
) | throw (std::runtime_error) [private] |
Definition at line 50 of file RunH4TablePositionDat.cc.
References o2o::iov.
{ this->checkConnection(); this->checkPrepare(); int iovID = iov->fetchID(); if (!iovID) { throw(std::runtime_error("RunH4TablePositionDat::writeDB: IOV not in DB")); } int logicID = ecid->getLogicID(); if (!logicID) { throw(std::runtime_error("RunH4TablePositionDat::writeDB: Bad EcalLogicID")); } try { m_writeStmt->setInt(1, iovID); m_writeStmt->setInt(2, logicID); m_writeStmt->setInt(3, item->getTableX()); m_writeStmt->setInt(4, item->getTableY()); m_writeStmt->setInt(5, item->getNumSpills()); m_writeStmt->setInt(6, item->getNumEvents()); m_writeStmt->executeUpdate(); } catch (SQLException &e) { throw(std::runtime_error("RunH4TablePositionDat::writeDB(): "+e.getMessage())); } }
friend class EcalCondDBInterface [friend] |
Reimplemented from IDBObject.
Definition at line 13 of file RunH4TablePositionDat.h.
int RunH4TablePositionDat::m_numEvents [private] |
Definition at line 46 of file RunH4TablePositionDat.h.
Referenced by getNumEvents(), and setNumEvents().
int RunH4TablePositionDat::m_numSpills [private] |
Definition at line 45 of file RunH4TablePositionDat.h.
Referenced by getNumSpills(), and setNumSpills().
int RunH4TablePositionDat::m_table_x [private] |
Definition at line 43 of file RunH4TablePositionDat.h.
Referenced by getTableX(), and setTableX().
int RunH4TablePositionDat::m_table_y [private] |
Definition at line 44 of file RunH4TablePositionDat.h.
Referenced by getTableY(), and setTableY().