#include <DCSPTMTempList.h>
Definition at line 15 of file DCSPTMTempList.h.
DCSPTMTempList::DCSPTMTempList |
( |
| ) |
|
DCSPTMTempList::~DCSPTMTempList |
( |
| ) |
|
void DCSPTMTempList::fetchValuesForECID |
( |
const EcalLogicID & |
ecid | ) |
|
|
noexcept |
Definition at line 31 of file DCSPTMTempList.cc.
References gather_cfg::cout, DateHandler::dateToTm(), cuy::dh, MillePedeFileConverter_cfg::e, mps_fire::i, alignCSCRings::r, DCSPTMTemp::setEcalLogicID(), DCSPTMTemp::setEnd(), DCSPTMTemp::setStart(), DCSPTMTemp::setTemperature(), and x.
Referenced by EcalCondDBInterface::fetchDCSPTMTempList().
41 Statement* stmt0 =
m_conn->createStatement();
42 stmt0->setSQL(
"SELECT count(since) FROM PVSS_TEMPERATURE_DAT " 43 "WHERE logic_id = :logic_id " );
44 stmt0->setInt(1, ecid_id);
46 ResultSet* rset0 = stmt0->executeQuery();
48 nruns = rset0->getInt(1);
50 m_conn->terminateStatement(stmt0);
52 cout <<
"DCSPTMTempList::fetchValuesForECID>> Number of records in DB="<< nruns << endl;
55 Statement* stmt =
m_conn->createStatement();
56 stmt->setSQL(
"SELECT " 57 "since, till, temperature FROM PVSS_TEMPERATURE_DAT " 58 "WHERE logic_id = :logic_id order by since " );
59 stmt->setInt(1, ecid_id);
65 ResultSet* rset = stmt->executeQuery();
70 Date startDate = rset->getDate(1);
71 Date endDate = rset->getDate(2);
72 float x = rset->getFloat(3);
73 runStart =
dh.dateToTm( startDate );
74 runEnd =
dh.dateToTm( endDate );
86 cout <<
"DCSPTMTempList::fetchValuesForECID>> loop done " << endl;
88 m_conn->terminateStatement(stmt);
89 }
catch (SQLException &
e) {
90 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 96 of file DCSPTMTempList.cc.
References gather_cfg::cout, DateHandler::dateToTm(), cuy::dh, MillePedeFileConverter_cfg::e, end, mps_fire::i, alignCSCRings::r, DCSPTMTemp::setEcalLogicID(), DCSPTMTemp::setEnd(), DCSPTMTemp::setStart(), DCSPTMTemp::setTemperature(), DateHandler::tmToDate(), and x.
Referenced by EcalCondDBInterface::fetchDCSPTMTempList().
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));
142 ResultSet* rset = stmt->executeQuery();
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);
165 }
catch (SQLException &
e) {
166 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 |