#include <LMFIOV.h>
Public Member Functions | |
void | dump () const |
Tm | getStart () const |
Tm | getStop () const |
int | getVmax () const |
int | getVmin () const |
LMFIOV () | |
LMFIOV (EcalDBConnection *c) | |
LMFIOV (const oracle::occi::Environment *env, const oracle::occi::Connection *conn) | |
LMFIOV & | setIOV (const Tm &start, const Tm &stop) |
LMFIOV & | setStart (const Tm &start) |
LMFIOV & | setStop (const Tm &stop) |
LMFIOV & | setVersions (int vmin, int vmax) |
LMFIOV & | setVmax (int vmax) |
LMFIOV & | setVmin (int vmin) |
~LMFIOV () | |
Private Member Functions | |
LMFUnique * | createObject () const |
std::string | fetchIdSql (Statement *stmt) |
void | fetchParentIDs () |
void | getParameters (ResultSet *rset) |
std::string | setByIDSql (Statement *stmt, int id) |
std::string | writeDBSql (Statement *stmt) |
Private Attributes | |
Tm | m_iov_start |
Tm | m_iov_stop |
int | m_vmax |
int | m_vmin |
Friends | |
class | EcalCondDBInterface |
LMFIOV::LMFIOV | ( | ) |
Definition at line 6 of file LMFIOV.cc.
References NULL.
{ //standard m_env = NULL; m_conn = NULL; m_className = "LMFIOV"; m_ID = 0; // custom m_iov_start = Tm(); m_iov_stop = Tm(); m_vmin = 0; m_vmax = 0; }
LMFIOV::LMFIOV | ( | EcalDBConnection * | c | ) |
Definition at line 20 of file LMFIOV.cc.
References EcalDBConnection::getConn(), and EcalDBConnection::getEnv().
{ //standard setConnection(c->getEnv(), c->getConn()); m_className = "LMFIOV"; m_ID = 0; // custom m_iov_start = Tm(); m_iov_stop = Tm(); m_vmin = 0; m_vmax = 0; }
LMFIOV::LMFIOV | ( | const oracle::occi::Environment * | env, |
const oracle::occi::Connection * | conn | ||
) |
LMFUnique * LMFIOV::createObject | ( | ) | const [private, virtual] |
Reimplemented from LMFUnique.
Definition at line 116 of file LMFIOV.cc.
References IDBObject::setConnection(), and lumiQTWidget::t.
void LMFIOV::dump | ( | void | ) | const [virtual] |
Reimplemented from LMFUnique.
Definition at line 122 of file LMFIOV.cc.
References gather_cfg::cout.
{ cout << "################# LMFIOV ######################" << endl; cout << "id : " << m_ID << endl; cout << "Start: " << m_iov_start.str() << endl; cout << "Stop : " << m_iov_stop.str() << endl; cout << "Vers.: " << m_vmin << " - " << m_vmax << endl; cout << "################# LMFIOV ######################" << endl; }
std::string LMFIOV::fetchIdSql | ( | Statement * | stmt | ) | [private, virtual] |
Reimplemented from LMFUnique.
Definition at line 83 of file LMFIOV.cc.
References AlCaHLTBitMon_QueryRunRegistry::string, and DateHandler::tmToDate().
{ std::string sql = "SELECT IOV_ID FROM CMS_ECAL_LASER_COND.LMF_IOV " "WHERE IOV_START = :1 AND IOV_STOP = :2 AND " "VMIN = :3 AND VMIN = :4"; DateHandler dm(m_env, m_conn); stmt->setSQL(sql); stmt->setDate(1, dm.tmToDate(m_iov_start)); stmt->setDate(2, dm.tmToDate(m_iov_stop)); stmt->setInt(3, m_vmin); stmt->setInt(4, m_vmax); return sql; }
void LMFIOV::fetchParentIDs | ( | ) | [inline, private, virtual] |
void LMFIOV::getParameters | ( | ResultSet * | rset | ) | [private, virtual] |
Reimplemented from LMFUnique.
Definition at line 106 of file LMFIOV.cc.
References DateHandler::dateToTm().
{ Date d = rset->getDate(1); DateHandler dh(m_env, m_conn); m_iov_start = dh.dateToTm(d); d = rset->getDate(2); m_iov_stop = dh.dateToTm(d); m_vmin = rset->getInt(3); m_vmax = rset->getInt(4); }
Tm LMFIOV::getStart | ( | ) | const |
Definition at line 67 of file LMFIOV.cc.
{ return m_iov_start; }
Tm LMFIOV::getStop | ( | ) | const |
Definition at line 71 of file LMFIOV.cc.
{ return m_iov_stop; }
std::string LMFIOV::setByIDSql | ( | Statement * | stmt, |
int | id | ||
) | [private, virtual] |
Reimplemented from LMFUnique.
Definition at line 96 of file LMFIOV.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
{ std::string sql = "SELECT IOV_START, IOV_STOP, VMIN, VMAX FROM " "CMS_ECAL_LASER_COND.LMF_IOV " "WHERE IOV_ID = :1"; stmt->setSQL(sql); stmt->setInt(1, id); return sql; }
Definition at line 37 of file LMFIOV.cc.
References dqm_diff::start.
{ m_iov_start = start; return *this; }
Definition at line 42 of file LMFIOV.cc.
{ m_iov_stop = stop; return *this; }
LMFIOV & LMFIOV::setVersions | ( | int | vmin, |
int | vmax | ||
) |
LMFIOV & LMFIOV::setVmax | ( | int | vmax | ) |
LMFIOV & LMFIOV::setVmin | ( | int | vmin | ) |
std::string LMFIOV::writeDBSql | ( | Statement * | stmt | ) | [private, virtual] |
Reimplemented from LMFUnique.
Definition at line 131 of file LMFIOV.cc.
References hcal_timing_source_file_cfg::dump, AlCaHLTBitMon_QueryRunRegistry::string, and DateHandler::tmToDate().
{ // check that everything has been setup std::string seqName = sequencePostfix(m_iov_start); std::string sql = "INSERT INTO LMF_IOV (IOV_ID, IOV_START, IOV_STOP, " "VMIN, VMAX) VALUES " "(lmf_iov_" + seqName + "_sq.NextVal, :1, :2, :3, :4)"; stmt->setSQL(sql); DateHandler dm(m_env, m_conn); stmt->setDate(1, dm.tmToDate(m_iov_start)); stmt->setDate(2, dm.tmToDate(m_iov_stop)); stmt->setInt(3, m_vmin); stmt->setInt(4, m_vmax); if (m_debug) { dump(); } return sql; }
friend class EcalCondDBInterface [friend] |
Tm LMFIOV::m_iov_start [private] |
Tm LMFIOV::m_iov_stop [private] |
int LMFIOV::m_vmax [private] |
int LMFIOV::m_vmin [private] |