13 using namespace oracle::occi;
47 throw(std::runtime_error)
56 throw(std::runtime_error)
63 throw(std::runtime_error)
66 std::cout<<
"going to call fetchLastData"<<std::endl;
67 fetchLastData(fillMap);
68 std::cout<<
"returned from fetchLastData"<<std::endl;
78 string query=
"SELECT c.name, c.logic_id, c.id1, c.id2, c.id3, c.maps_to , v.value_number, v.change_date from "+ getMagnetAccount()+
79 ".CMSFWMAGNET_LV v, channelview c where v.dpe_name= 'CURRENT' and c.name=maps_to and c.name='EB' " ;
84 m_readStmt->setSQL(query);
85 rset = m_readStmt->executeQuery();
88 throw(std::runtime_error(
"RunDCSMagnetDat::getBarrelRset(): " + e.getMessage() +
" " +
query));
96 map< EcalLogicID, RunDCSMagnetDat >* fillMap) {
100 std::pair< EcalLogicID, RunDCSMagnetDat >
p;
105 while(rset->next()) {
113 std::cout<<
"done the logic id"<<std::endl;
115 std::cout<<
"done the magnet current"<<std::endl;
117 Date sinceDate = rset->getDate(8);
128 throw(std::runtime_error(
"RunDCSMagnetDat::fetchData(): "+e.getMessage()));
139 int t_now_gmt_micros = t_now_gmt.
microsTime();
140 return t_now_gmt_micros;
146 throw(std::runtime_error)
148 this->checkConnection();
150 std::cout<<
"fetchLastData>>1"<<std::endl;
154 std::cout<<
"fetchLastData>>2"<<std::endl;
158 std::pair< EcalLogicID, RunDCSMagnetDat >
p;
160 std::cout<<
"fetchLastData>>3"<<std::endl;
164 std::cout<<
"fetchLastData>>4"<<std::endl;
166 fillTheMap(rset, fillMap);
167 std::cout<<
"fetchLastData>>5"<<std::endl;
172 throw(std::runtime_error(
"RunDCSMagnetDat::fetchData(): "+e.getMessage()));
tuple start
Check for commandline option errors.
void writeDB(const EcalLogicID *ecid, const RunDCSMagnetDat *item, RunIOV *iov)
void setToCurrentGMTime()
oracle::occi::SQLException SQLException
uint64_t microsTime() const
void fetchLastData(std::map< EcalLogicID, RunDCSMagnetDat > *fillMap)
void setMagnetCurrent(float t)
oracle::occi::ResultSet ResultSet
void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSMagnetDat > *)
void fetchData(std::map< EcalLogicID, RunDCSMagnetDat > *fillMap, RunIOV *iov)
ResultSet * getMagnetRset()
void setTime(const Tm &start)
Tm dateToTm(oracle::occi::Date &date) const