111 Statement* stmt0 =
m_conn->createStatement();
112 stmt0->setSQL(
"SELECT count(since) FROM PVSS_TEMPERATURE_DAT "
113 "WHERE logic_id = :logic_id "
114 "AND since >= :start_time "
115 "AND since <= :till_time "
117 stmt0->setInt(1, ecid_id);
118 stmt0->setDate(2, dh.tmToDate(start));
119 stmt0->setDate(3, dh.tmToDate(end));
121 ResultSet* rset0 = stmt0->executeQuery();
123 nruns = rset0->getInt(1);
125 m_conn->terminateStatement(stmt0);
127 cout <<
"DCSPTMTempList::fetchValuesForECIDAndTime>> Number of records in DB="<< nruns << endl;
130 Statement* stmt =
m_conn->createStatement();
131 stmt->setSQL(
"SELECT "
132 "since, till, temperature FROM PVSS_TEMPERATURE_DAT "
133 "WHERE logic_id = :logic_id "
134 "AND since >= :start_time "
135 "AND since <= :till_time "
136 " order by since " );
137 stmt->setInt(1, ecid_id);
138 stmt->setDate(2, dh.tmToDate(start));
139 stmt->setDate(3, dh.tmToDate(end));
147 Date startDate = rset->getDate(1);
148 Date endDate = rset->getDate(2);
149 float x = rset->getFloat(3);
150 runStart = dh.dateToTm( startDate );
151 runEnd = dh.dateToTm( endDate );
164 m_conn->terminateStatement(stmt);
166 throw(std::runtime_error(
"DCSPTMTempList: "+e.getMessage()));
void setTemperature(float temp)
std::vector< DCSPTMTemp > m_vec_temp
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
oracle::occi::SQLException SQLException
void setEcalLogicID(EcalLogicID ecid)
oracle::occi::ResultSet ResultSet
void checkConnection() const