18 m_writeStmt =
nullptr;
36 std::cout <<
"going to call fetchLastData" << std::endl;
37 fetchLastData(fillMap);
38 std::cout <<
"returned from fetchLastData" << std::endl;
45 string query =
"SELECT c.name, c.logic_id, c.id1, c.id2, c.id3, c.maps_to , v.value_number, v.change_date from " +
47 ".CMSFWMAGNET_LV v, channelview c where v.dpe_name= 'CURRENT' and c.name=maps_to and c.name='EB' ";
51 m_readStmt->setSQL(
query);
52 rset = m_readStmt->executeQuery();
53 }
catch (SQLException&
e) {
54 #if defined(_GLIBCXX_USE_CXX11_ABI) && (_GLIBCXX_USE_CXX11_ABI == 0)
55 throw(std::runtime_error(
std::string(
"RunDCSMagnetDat::getBarrelRset(): ") +
e.getMessage() +
" " +
query));
57 throw(std::runtime_error(
std::string(
"RunDCSMagnetDat::getBarrelRset(): error code ") +
58 std::to_string(
e.getErrorCode()) +
" " +
query));
67 std::pair<EcalLogicID, RunDCSMagnetDat>
p;
72 while (rset->next()) {
80 std::cout <<
"done the logic id" << std::endl;
82 std::cout <<
"done the magnet current" << std::endl;
84 Date sinceDate = rset->getDate(8);
85 std::cout <<
"done the date" << std::endl;
87 Tm sinceTm =
dh.dateToTm(sinceDate);
93 }
catch (SQLException&
e) {
94 #if defined(_GLIBCXX_USE_CXX11_ABI) && (_GLIBCXX_USE_CXX11_ABI == 0)
95 throw(std::runtime_error(
std::string(
"RunDCSMagnetDat::fetchData(): ") +
e.getMessage()));
97 throw(std::runtime_error(
std::string(
"RunDCSMagnetDat::fetchData(): error code ") +
98 std::to_string(
e.getErrorCode())));
107 int t_now_gmt_micros = t_now_gmt.
microsTime();
108 return t_now_gmt_micros;
112 this->checkConnection();
114 std::cout <<
"fetchLastData>>1" << std::endl;
118 std::cout <<
"fetchLastData>>2" << std::endl;
121 std::pair<EcalLogicID, RunDCSMagnetDat>
p;
123 std::cout <<
"fetchLastData>>3" << std::endl;
127 std::cout <<
"fetchLastData>>4" << std::endl;
129 fillTheMap(rset, fillMap);
130 std::cout <<
"fetchLastData>>5" << std::endl;
132 }
catch (SQLException&
e) {
133 #if defined(_GLIBCXX_USE_CXX11_ABI) && (_GLIBCXX_USE_CXX11_ABI == 0)
134 throw(std::runtime_error(
std::string(
"RunDCSMagnetDat::fetchData(): ") +
e.getMessage()));
136 throw(std::runtime_error(
std::string(
"RunDCSMagnetDat::fetchData(): error code ") +
137 std::to_string(
e.getErrorCode())));