4 using namespace oracle::occi;
11 m_className =
"LMFIOV";
24 m_className =
"LMFIOV";
84 std::string sql =
"SELECT IOV_ID FROM CMS_ECAL_LASER_COND.LMF_IOV "
85 "WHERE IOV_START = :1 AND IOV_STOP = :2 AND "
86 "VMIN = :3 AND VMIN = :4";
89 stmt->setDate(1, dm.
tmToDate(m_iov_start));
90 stmt->setDate(2, dm.
tmToDate(m_iov_stop));
91 stmt->setInt(3, m_vmin);
92 stmt->setInt(4, m_vmax);
98 std::string sql =
"SELECT IOV_START, IOV_STOP, VMIN, VMAX FROM "
99 "CMS_ECAL_LASER_COND.LMF_IOV "
107 Date d = rset->getDate(1);
110 d = rset->getDate(2);
112 m_vmin = rset->getInt(3);
113 m_vmax = rset->getInt(4);
123 cout <<
"################# LMFIOV ######################" << endl;
124 cout <<
"id : " << m_ID << endl;
125 cout <<
"Start: " << m_iov_start.str() << endl;
126 cout <<
"Stop : " << m_iov_stop.str() << endl;
127 cout <<
"Vers.: " << m_vmin <<
" - " << m_vmax << endl;
128 cout <<
"################# LMFIOV ######################" << endl;
134 std::string seqName = sequencePostfix(m_iov_start);
135 std::string sql =
"INSERT INTO LMF_IOV (IOV_ID, IOV_START, IOV_STOP, "
136 "VMIN, VMAX) VALUES "
137 "(lmf_iov_" + seqName +
"_sq.NextVal, :1, :2, :3, :4)";
140 stmt->setDate(1, dm.
tmToDate(m_iov_start));
141 stmt->setDate(2, dm.
tmToDate(m_iov_stop));
142 stmt->setInt(3, m_vmin);
143 stmt->setInt(4, m_vmax);
tuple start
Check for commandline option errors.
void getParameters(ResultSet *rset)
LMFIOV & setVmin(int vmin)
LMFIOV & setStop(const Tm &stop)
oracle::occi::ResultSet ResultSet
LMFIOV & setVersions(int vmin, int vmax)
oracle::occi::Environment * getEnv() const
oracle::occi::Connection * getConn() const
LMFIOV & setVmax(int vmax)
oracle::occi::Statement Statement
LMFIOV & setStart(const Tm &start)
std::string setByIDSql(Statement *stmt, int id)
oracle::occi::Date tmToDate(const Tm &inTm) const
LMFIOV & setIOV(const Tm &start, const Tm &stop)
LMFUnique * createObject() const
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
std::string writeDBSql(Statement *stmt)
std::string fetchIdSql(Statement *stmt)
Tm dateToTm(oracle::occi::Date &date) const