14 m_writeStmt =
nullptr;
30 fetchLastData(fillMap);
36 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
37 " d.value_number , '5' NOMINAL_VALUE , d.VALUE_TIMESTAMP "
40 ".FWWIENERMARATHONCHANNEL_LV d "
44 " h.DPID = d.DPID join channelview cv on cv.logic_id=h.logic_id WHERE cv.maps_to = cv.name and "
45 "dpe_name='MEASUREMENTSENSEVOLTAGE' ";
47 m_readStmt->setSQL(
query);
48 rset = m_readStmt->executeQuery();
49 }
catch (SQLException&
e) {
50 #if defined(_GLIBCXX_USE_CXX11_ABI) && (_GLIBCXX_USE_CXX11_ABI == 0)
51 throw(std::runtime_error(
std::string(
"RunDCSLVDat::getBarrelRset(): ") +
e.getMessage() +
" " +
query));
53 throw(std::runtime_error(
std::string(
"RunDCSLVDat::getBarrelRset(): error code ") +
54 std::to_string(
e.getErrorCode()) +
" " +
query));
63 "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
64 " d.VALUE_NUMBER, '5' NOMINAL_VALUE , d.VALUE_TIMESTAMP "
67 ".FWWIENERMARATHONCHANNEL_LV d "
70 ".EE_LV_MAPPING h on "
71 " h.DPID = d.DPID join channelview cv on cv.logic_id=h.logic_id WHERE cv.maps_to = cv.name and "
72 "dpe_name='MEASUREMENTSENSEVOLTAGE' ";
74 m_readStmt->setSQL(
query);
75 rset = m_readStmt->executeQuery();
76 }
catch (SQLException&
e) {
77 #if defined(_GLIBCXX_USE_CXX11_ABI) && (_GLIBCXX_USE_CXX11_ABI == 0)
78 throw(std::runtime_error(
std::string(
"RunDCSLVDat::getEndcapRset(): ") +
e.getMessage() +
" " +
query));
80 throw(std::runtime_error(
std::string(
"RunDCSLVDat::getEndcapRset(): error code ") +
81 std::to_string(
e.getErrorCode()) +
" " +
query));
88 std::pair<EcalLogicID, RunDCSLVDat>
p;
93 while (rset->next()) {
101 dat.
setLV(rset->getFloat(7));
103 Date sinceDate = rset->getDate(9);
104 Tm sinceTm =
dh.dateToTm(sinceDate);
106 if (
p.first.getName() ==
"EB_LV_channel") {
107 setStatusForBarrel(dat, sinceTm);
109 setStatusForEndcaps(dat, sinceTm);
114 }
catch (SQLException&
e) {
115 #if defined(_GLIBCXX_USE_CXX11_ABI) && (_GLIBCXX_USE_CXX11_ABI == 0)
116 throw(std::runtime_error(
std::string(
"RunDCSLVDat::fetchData(): ") +
e.getMessage()));
118 throw(std::runtime_error(
std::string(
"RunDCSLVDat::fetchData(): error code ") + std::to_string(
e.getErrorCode())));
127 int t_now_gmt_micros = t_now_gmt.
microsTime();
128 return t_now_gmt_micros;
132 int t_now_gmt_micros = nowMicroseconds();
137 if (dat.
getLV() * 1000 < minLV) {
143 if (
d > maxDifference) {
150 int t_now_gmt_micros = nowMicroseconds();
155 if (dat.
getLV() * 1000 < minLV) {
161 if (
d > maxDifference) {
168 this->checkConnection();
173 std::pair<EcalLogicID, RunDCSLVDat>
p;
178 fillTheMap(rset, fillMap);
179 rset = getEndcapRset();
181 fillTheMap(rset, fillMap);
182 }
catch (SQLException&
e) {
183 #if defined(_GLIBCXX_USE_CXX11_ABI) && (_GLIBCXX_USE_CXX11_ABI == 0)
184 throw(std::runtime_error(
std::string(
"RunDCSLVDat::fetchData(): ") +
e.getMessage()));
186 throw(std::runtime_error(
std::string(
"RunDCSLVDat::fetchData(): error code ") + std::to_string(
e.getErrorCode())));