#include <DCSPTMTempList.h>
Definition at line 15 of file DCSPTMTempList.h.
DCSPTMTempList::DCSPTMTempList |
( |
| ) |
|
DCSPTMTempList::~DCSPTMTempList |
( |
| ) |
|
|
override |
void DCSPTMTempList::fetchValuesForECID |
( |
const EcalLogicID & |
ecid | ) |
|
|
noexcept |
Definition at line 20 of file DCSPTMTempList.cc.
References gather_cfg::cout, DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, mps_fire::i, alignCSCRings::r, DCSPTMTemp::setEcalLogicID(), DCSPTMTemp::setEnd(), DCSPTMTemp::setStart(), DCSPTMTemp::setTemperature(), and x.
Referenced by EcalCondDBInterface::fetchDCSPTMTempList().
27 Statement* stmt0 =
m_conn->createStatement();
29 "SELECT count(since) FROM PVSS_TEMPERATURE_DAT "
30 "WHERE logic_id = :logic_id ");
31 stmt0->setInt(1, ecid_id);
33 ResultSet* rset0 = stmt0->executeQuery();
35 nruns = rset0->getInt(1);
37 m_conn->terminateStatement(stmt0);
39 cout <<
"DCSPTMTempList::fetchValuesForECID>> Number of records in DB=" << nruns << endl;
42 Statement* stmt =
m_conn->createStatement();
45 "since, till, temperature FROM PVSS_TEMPERATURE_DAT "
46 "WHERE logic_id = :logic_id order by since ");
47 stmt->setInt(1, ecid_id);
53 ResultSet* rset = stmt->executeQuery();
58 Date startDate = rset->getDate(1);
59 Date endDate = rset->getDate(2);
60 float x = rset->getFloat(3);
61 runStart =
dh.dateToTm(startDate);
62 runEnd =
dh.dateToTm(endDate);
74 cout <<
"DCSPTMTempList::fetchValuesForECID>> loop done " << endl;
76 m_conn->terminateStatement(stmt);
77 }
catch (SQLException&
e) {
78 throw(std::runtime_error(
"DCSPTMTempList: " + e.getMessage()));
void setEnd(const Tm &end)
void setEcalLogicID(const EcalLogicID &ecid)
void setTemperature(float temp)
std::vector< DCSPTMTemp > m_vec_temp
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setStart(const Tm &start)
void DCSPTMTempList::fetchValuesForECIDAndTime |
( |
const EcalLogicID & |
ecid, |
|
|
const Tm & |
start, |
|
|
const Tm & |
end |
|
) |
| |
|
noexcept |
Definition at line 82 of file DCSPTMTempList.cc.
References gather_cfg::cout, DateHandler::dateToTm(), cuy::dh, alignCSCRings::e, dataset::end, mps_fire::i, alignCSCRings::r, DCSPTMTemp::setEcalLogicID(), DCSPTMTemp::setEnd(), DCSPTMTemp::setStart(), DCSPTMTemp::setTemperature(), command_line::start, DateHandler::tmToDate(), and x.
Referenced by EcalCondDBInterface::fetchDCSPTMTempList().
95 Statement* stmt0 =
m_conn->createStatement();
97 "SELECT count(since) FROM PVSS_TEMPERATURE_DAT "
98 "WHERE logic_id = :logic_id "
99 "AND since >= :start_time "
100 "AND since <= :till_time ");
101 stmt0->setInt(1, ecid_id);
102 stmt0->setDate(2,
dh.tmToDate(start));
103 stmt0->setDate(3,
dh.tmToDate(end));
105 ResultSet* rset0 = stmt0->executeQuery();
107 nruns = rset0->getInt(1);
109 m_conn->terminateStatement(stmt0);
111 cout <<
"DCSPTMTempList::fetchValuesForECIDAndTime>> Number of records in DB=" << nruns << endl;
114 Statement* stmt =
m_conn->createStatement();
117 "since, till, temperature FROM PVSS_TEMPERATURE_DAT "
118 "WHERE logic_id = :logic_id "
119 "AND since >= :start_time "
120 "AND since <= :till_time "
122 stmt->setInt(1, ecid_id);
123 stmt->setDate(2,
dh.tmToDate(start));
124 stmt->setDate(3,
dh.tmToDate(end));
126 ResultSet* rset = stmt->executeQuery();
131 Date startDate = rset->getDate(1);
132 Date endDate = rset->getDate(2);
133 float x = rset->getFloat(3);
134 runStart =
dh.dateToTm(startDate);
135 runEnd =
dh.dateToTm(endDate);
147 m_conn->terminateStatement(stmt);
148 }
catch (SQLException&
e) {
149 throw(std::runtime_error(
"DCSPTMTempList: " + e.getMessage()));
void setEnd(const Tm &end)
void setEcalLogicID(const EcalLogicID &ecid)
void setTemperature(float temp)
std::vector< DCSPTMTemp > m_vec_temp
oracle::occi::Environment * m_env
oracle::occi::Connection * m_conn
void checkConnection() const noexcept(false)
void setStart(const Tm &start)
std::vector< DCSPTMTemp > DCSPTMTempList::getList |
( |
| ) |
|
std::vector<DCSPTMTemp> DCSPTMTempList::m_vec_temp |
|
private |