#include <DCSPTMTempList.h>
Definition at line 15 of file DCSPTMTempList.h.
◆ DCSPTMTempList()
DCSPTMTempList::DCSPTMTempList |
( |
| ) |
|
◆ ~DCSPTMTempList()
DCSPTMTempList::~DCSPTMTempList |
( |
| ) |
|
|
override |
◆ fetchValuesForECID()
void DCSPTMTempList::fetchValuesForECID |
( |
const EcalLogicID & |
ecid | ) |
|
|
noexcept |
Definition at line 20 of file DCSPTMTempList.cc.
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);
68 r.setEcalLogicID(ecid);
74 cout <<
"DCSPTMTempList::fetchValuesForECID>> loop done " << endl;
76 m_conn->terminateStatement(stmt);
77 }
catch (SQLException&
e) {
78 throw(std::runtime_error(
"DCSPTMTempList: " +
e.getMessage()));
References gather_cfg::cout, cuy::dh, MillePedeFileConverter_cfg::e, mps_fire::i, alignCSCRings::r, and x.
◆ fetchValuesForECIDAndTime()
void DCSPTMTempList::fetchValuesForECIDAndTime |
( |
const EcalLogicID & |
ecid, |
|
|
const Tm & |
start, |
|
|
const Tm & |
end |
|
) |
| |
|
noexcept |
Definition at line 82 of file DCSPTMTempList.cc.
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);
139 r.setStart(runStart);
141 r.setEcalLogicID(ecid);
147 m_conn->terminateStatement(stmt);
148 }
catch (SQLException&
e) {
149 throw(std::runtime_error(
"DCSPTMTempList: " +
e.getMessage()));
References gather_cfg::cout, cuy::dh, MillePedeFileConverter_cfg::e, mps_fire::end, mps_fire::i, alignCSCRings::r, and x.
◆ getList()
std::vector< DCSPTMTemp > DCSPTMTempList::getList |
( |
| ) |
|
◆ EcalCondDBInterface
◆ m_vec_temp
std::vector<DCSPTMTemp> DCSPTMTempList::m_vec_temp |
|
private |