Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CMS custom hacks for Oracle OCCI old C++ ABI compatibility BP #26172

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions CaloOnlineTools/HcalOnlineDb/src/ConfigurationDatabaseImplOracle.cc
Expand Up @@ -44,7 +44,7 @@ void ConfigurationDatabaseImplOracle::connect(const std::string& accessor) noexc
env_ = oracle::occi::Environment::createEnvironment (oracle::occi::Environment::DEFAULT);
conn_ = env_->createConnection (user, password, db);
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}


Expand All @@ -62,7 +62,7 @@ void ConfigurationDatabaseImplOracle::disconnect() {
env_->terminateConnection(conn_);
Environment::terminateEnvironment(env_);
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}


Expand Down Expand Up @@ -136,7 +136,7 @@ void ConfigurationDatabaseImplOracle::getLUTChecksums(const std::string& tag,
//Always terminate statement
conn_->terminateStatement(stmt);
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}

}
Expand Down Expand Up @@ -220,7 +220,7 @@ void ConfigurationDatabaseImplOracle::getLUTs_real(const std::string& tag, int c
//Always terminate statement
conn_->terminateStatement(stmt);
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}

}
Expand Down Expand Up @@ -288,7 +288,7 @@ void ConfigurationDatabaseImplOracle::getPatterns_real(const std::string& tag, i
//Always terminate statement
conn_->terminateStatement(stmt);
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}


Expand Down Expand Up @@ -397,7 +397,7 @@ void ConfigurationDatabaseImplOracle::getRBXdata(const std::string& tag, const s
//Always terminate statement
conn_->terminateStatement(stmt);
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}

}
Expand Down Expand Up @@ -428,7 +428,7 @@ void ConfigurationDatabaseImplOracle::getZSThresholds(const std::string& tag, in
unsigned int fiber = rs->getInt(1);
unsigned int fc = rs->getInt(2);
unsigned int zs = rs->getInt(3);
std::string fpga = getOraString(rs,4);
std::string fpga = rs -> getString(4);
int tb;
if (fpga=="top") tb = 1;
else tb = 0;
Expand All @@ -439,7 +439,7 @@ void ConfigurationDatabaseImplOracle::getZSThresholds(const std::string& tag, in
//Always terminate statement
conn_->terminateStatement(stmt);
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}

}
Expand Down Expand Up @@ -479,7 +479,7 @@ void ConfigurationDatabaseImplOracle::getHLXMasks_real(const std::string& tag, i
masks.clear();
while (rs->next()) {
int islot = rs->getInt(1);
std::string fpga = getOraString(rs,2);
std::string fpga = rs -> getString(2);

int ifpga;
if (fpga=="top") ifpga = 1;
Expand All @@ -498,7 +498,7 @@ void ConfigurationDatabaseImplOracle::getHLXMasks_real(const std::string& tag, i
//Always terminate statement
conn_->terminateStatement(stmt);
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}
}

Expand Down
8 changes: 4 additions & 4 deletions CaloOnlineTools/HcalOnlineDb/src/HCALConfigDB.cc
Expand Up @@ -189,7 +189,7 @@ std::vector<unsigned int> HCALConfigDB::getOnlineLUT( std::string tag, uint32_t
_condition_data_set_id = _cdsi;
_crate = rs -> getInt(2);
_slot = rs -> getInt(3);
std::string fpga_ = getOraString(rs,4);
std::string fpga_ = rs->getString(4);
if ( fpga_ == "top" ) _fpga = hcal::ConfigurationDatabase::Top;
else _fpga = hcal::ConfigurationDatabase::Bottom;
_fiber = rs -> getInt(5);
Expand All @@ -207,7 +207,7 @@ std::vector<unsigned int> HCALConfigDB::getOnlineLUT( std::string tag, uint32_t
//Always terminate statement
_connection -> terminateStatement(stmt);
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}
return result;
}
Expand Down Expand Up @@ -255,7 +255,7 @@ std::vector<unsigned int> HCALConfigDB::getOnlineLUTFromXML( std::string tag, ui
_condition_data_set_id = _cdsi;
_crate = rs -> getInt(2);
_slot = rs -> getInt(3);
std::string fpga_ = getOraString(rs, 4);
std::string fpga_ = rs->getString( 4);
if ( fpga_ == "top" ) _fpga = hcal::ConfigurationDatabase::Top;
else _fpga = hcal::ConfigurationDatabase::Bottom;
_fiber = rs -> getInt(5);
Expand All @@ -274,7 +274,7 @@ std::vector<unsigned int> HCALConfigDB::getOnlineLUTFromXML( std::string tag, ui
_connection -> terminateStatement(stmt);

} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}
}
else{
Expand Down
6 changes: 3 additions & 3 deletions CaloOnlineTools/HcalOnlineDb/src/HcalAssistant.cc
Expand Up @@ -202,7 +202,7 @@ int HcalAssistant::getListOfChannelsFromDb(){
while (rs->next()) {
_n_channels++;
int _rawid = rs->getInt(1);
int _geomId = getGeomId( getSubdetector(getOraString(rs,2)),
int _geomId = getGeomId( getSubdetector(rs->getString(2)),
rs->getInt(3),
rs->getInt(4),
rs->getInt(5)
Expand All @@ -213,8 +213,8 @@ int HcalAssistant::getListOfChannelsFromDb(){
listIsRead = true;
}
catch (SQLException& e) {
std::cerr << ::toolbox::toString("Oracle exception : %s", getOraMessage(&e)) << std::endl;
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s", getOraMessage(&e)));
std::cerr << ::toolbox::toString("Oracle exception : %s", e.getMessage().c_str()) << std::endl;
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s", e.getMessage().c_str()));
}
conn.disconnect();
return _n_channels;
Expand Down
2 changes: 1 addition & 1 deletion CaloOnlineTools/HcalOnlineDb/src/HcalLutManager.cc
Expand Up @@ -1481,7 +1481,7 @@ std::map<int, boost::shared_ptr<LutXml> > HcalLutManager::get_brickSet_from_orac
_connection -> terminateStatement(stmt);
//std::cout << "Query line count: " << _lines.getCount() << std::endl;
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}

//std::cout << lut_map.size() << std::endl;
Expand Down
12 changes: 6 additions & 6 deletions CaloOnlineTools/HcalOnlineDb/src/HcalQIEManager.cc
Expand Up @@ -178,7 +178,7 @@ void HcalQIEManager::getTableFromDb( std::string query_file, std::string output_
_id.eta = rs->getInt(1);
_id.phi = rs->getInt(2);
_id.depth = rs->getInt(3);
_id.subdetector = getOraString(rs, 4);
_id.subdetector = rs->getString( 4);
for (int j=0; j!=32; j++){
_caps.caps[j] = rs -> getDouble(j+5);
}
Expand All @@ -205,7 +205,7 @@ void HcalQIEManager::getTableFromDb( std::string query_file, std::string output_
//std::cout << "Query count: " << count << std::endl;
cout << "Query line count: " << _lines.getCount() << std::endl;
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}
}
}
Expand Down Expand Up @@ -358,8 +358,8 @@ int HcalQIEManager::getHfQieTable( std::string input_file, std::string output_fi
_id.eta = rs->getInt(1);
_id.phi = rs->getInt(2);
_id.depth = rs->getInt(3);
_id.subdetector = getOraString(rs, 4);
rbx = getOraString(rs,5);
_id.subdetector = rs->getString( 4);
rbx = rs->getString(5);
rm_slot = rs->getInt(6);
qie_slot = rs->getInt(7);
adc = rs->getInt(8);
Expand Down Expand Up @@ -421,7 +421,7 @@ int HcalQIEManager::getHfQieTable( std::string input_file, std::string output_fi
_connection -> terminateStatement(stmt2);

} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}
}
//Always terminate statement
Expand All @@ -430,7 +430,7 @@ int HcalQIEManager::getHfQieTable( std::string input_file, std::string output_fi
//std::cout << "Query count: " << count << std::endl;
std::cout << "Query line count: " << _lines.getCount() << std::endl;
} catch (SQLException& e) {
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
}

db -> disconnect();
Expand Down
12 changes: 6 additions & 6 deletions OnlineDB/CSCCondDB/src/CSCCableRead.cc
Expand Up @@ -43,11 +43,11 @@ std::string *alct_rev, float *cfeb_tmb_skew_delay, float *cfeb_timing_corr)
//
// stmt->execute(); //execute procedure
//
// *chamber_label = getOraString(stmt,2);
// *chamber_label = stmt->getString(2);
// *cfeb_length = stmt->getInt(3);
// *cfeb_rev = getOraString(stmt,4);
// *cfeb_rev = stmt->getString(4);
// *alct_length = stmt->getInt(5);
// *alct_rev = getOraString(stmt,6);
// *alct_rev = stmt->getString(6);
// *cfeb_tmb_skew_delay = stmt->getInt(7);
// *cfeb_timing_corr = stmt->getInt(8);

Expand All @@ -63,11 +63,11 @@ std::string *alct_rev, float *cfeb_tmb_skew_delay, float *cfeb_timing_corr)

stmt->execute(); //execute procedure

*chamber_label = getOraString(stmt,2);
*chamber_label = stmt->getString(2);
*cfeb_length = stmt->getFloat(3);
*cfeb_rev = getOraString(stmt,4);
*cfeb_rev = stmt->getString(4);
*alct_length = stmt->getFloat(5);
*alct_rev = getOraString(stmt,6);
*alct_rev = stmt->getString(6);
*cfeb_tmb_skew_delay = stmt->getFloat(7);
*cfeb_timing_corr = stmt->getFloat(8);

Expand Down
4 changes: 2 additions & 2 deletions OnlineDB/CSCCondDB/src/CSCMap.cc
Expand Up @@ -43,7 +43,7 @@

stmt->execute(); //execute procedure

*chamber_id = getOraString(stmt,3);
*chamber_id = stmt->getString(3);
*chamber_num = stmt->getInt(4);
*chamber_index = stmt->getInt(5);
*first_strip_index = stmt->getInt(6);
Expand Down Expand Up @@ -71,7 +71,7 @@

stmt->execute(); //execute procedure

*chamber_id = getOraString(stmt,3);
*chamber_id = stmt->getString(3);
*chamber_num = stmt->getInt(4);
*chamber_index = stmt->getInt(5);
*first_strip_index = stmt->getInt(6);
Expand Down
24 changes: 12 additions & 12 deletions OnlineDB/CSCCondDB/src/CSCMap1.cc
Expand Up @@ -55,7 +55,7 @@

stmt->execute(); //execute procedure

item->chamberLabel = getOraString(stmt,10);
item->chamberLabel = stmt->getString(10);
item->chamberId = chamberid;
int chamber = chamberid/10%100;
int rest = (chamberid - chamber*10)/1000;
Expand All @@ -73,7 +73,7 @@
item->anodeIndex = stmt->getInt(16);
item->strips = stmt->getInt(11);
item->anodes = stmt->getInt(12);
item->crateLabel = getOraString(stmt,2);
item->crateLabel = stmt->getString(2);
item->crateid = stmt->getInt(3);
item->sector = stmt->getInt(8);
item->trig_sector = stmt->getInt(9);
Expand Down Expand Up @@ -110,10 +110,10 @@

item->fed_crate = stmt->getInt(3);
item->ddu_slot = stmt->getInt(4);
item->dcc_fifo = getOraString(stmt,6);
item->dcc_fifo = stmt->getString(6);
item->fiber_crate = stmt->getInt(8);
item->fiber_pos = stmt->getInt(9);
item->fiber_socket = getOraString(stmt,10);
item->fiber_socket = stmt->getString(10);

con->terminateStatement (stmt);
} //end of chamber
Expand Down Expand Up @@ -144,7 +144,7 @@

stmt->execute(); //execute procedure

item->chamberLabel = getOraString(stmt,3);
item->chamberLabel = stmt->getString(3);
item->chamberId = stmt->getInt(4);
int chamberid = item->chamberId;
int chamber = chamberid/10%100;
Expand All @@ -163,7 +163,7 @@
item->anodeIndex = stmt->getInt(17);
item->strips = stmt->getInt(12);
item->anodes = stmt->getInt(13);
item->crateLabel = getOraString(stmt,11);
item->crateLabel = stmt->getString(11);
item->crateid = stmt->getInt(9);
item->sector = stmt->getInt(7);
item->trig_sector = stmt->getInt(8);
Expand Down Expand Up @@ -200,10 +200,10 @@

item->fed_crate = stmt->getInt(3);
item->ddu_slot = stmt->getInt(4);
item->dcc_fifo = getOraString(stmt,6);
item->dcc_fifo = stmt->getString(6);
item->fiber_crate = stmt->getInt(8);
item->fiber_pos = stmt->getInt(9);
item->fiber_socket = getOraString(stmt,10);
item->fiber_socket = stmt->getString(10);

con->terminateStatement (stmt);
} //end of cratedmb
Expand Down Expand Up @@ -242,10 +242,10 @@

item->fed_crate = stmt->getInt(3);
item->ddu_slot = stmt->getInt(4);
item->dcc_fifo = getOraString(stmt,5);
item->dcc_fifo = stmt->getString(5);
item->fiber_crate = stmt->getInt(7);
item->fiber_pos = stmt->getInt(8);
item->fiber_socket = getOraString(stmt,9);
item->fiber_socket = stmt->getString(9);
int chamberid = stmt->getInt(14);

stmt->setSQL("begin cms_emu_cern.cscmap.chamberid_crate(:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18, :19, :20); end;");
Expand Down Expand Up @@ -273,7 +273,7 @@

stmt->execute(); //execute procedure

item->chamberLabel = getOraString(stmt,10);
item->chamberLabel = stmt->getString(10);
item->chamberId = chamberid;
int chamber = chamberid/10%100;
int rest = (chamberid - chamber*10)/1000;
Expand All @@ -291,7 +291,7 @@
item->anodeIndex = stmt->getInt(16);
item->strips = stmt->getInt(11);
item->anodes = stmt->getInt(12);
item->crateLabel = getOraString(stmt,2);
item->crateLabel = stmt->getString(2);
item->crateid = stmt->getInt(3);
item->sector = stmt->getInt(8);
item->trig_sector = stmt->getInt(9);
Expand Down
2 changes: 1 addition & 1 deletion OnlineDB/CSCCondDB/src/CSCOnlineDB.cc
Expand Up @@ -111,7 +111,7 @@
std::cout<<"Exception thrown for insertBind"<<std::endl;
std::cout<<"Error number: "<< ex.getErrorCode() << std::endl;
#if defined(_GLIBCXX_USE_CXX11_ABI) && (_GLIBCXX_USE_CXX11_ABI == 0)
std::cout << getOraMessage(&ex) << std::endl;
std::cout << e.getMessage(x) << std::endl;
#endif
}
}
Expand Down
4 changes: 2 additions & 2 deletions OnlineDB/EcalCondDB/interface/IODConfig.h
Expand Up @@ -144,7 +144,7 @@ void populateClob (Clob &clob, std::string fname, unsigned int bufsize) noexcept


}catch (SQLException &e) {
throw(std::runtime_error(std::string("populateClob(): ")+getOraMessage(&e)));
throw(std::runtime_error(std::string("populateClob(): ")+e.getMessage()));
}

std::cout << "Populating the Clob - Success" << std::endl;
Expand Down Expand Up @@ -172,7 +172,7 @@ unsigned char* readClob (Clob &clob, int size) noexcept(false)
return buffer;

}catch (SQLException &e) {
throw(std::runtime_error(std::string("readClob(): ")+getOraMessage(&e)));
throw(std::runtime_error(std::string("readClob(): ")+e.getMessage()));
}

}
Expand Down