Skip to content

Commit 03499f0

Browse files
committedFeb 28, 2018
changes included from 10.1.X devel IB for oracle occi test
1 parent 9200664 commit 03499f0

File tree

190 files changed

+1162
-1162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+1162
-1162
lines changed
 

‎CaloOnlineTools/HcalOnlineDb/src/ConfigurationDatabaseImplOracle.cc

+10-10
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void ConfigurationDatabaseImplOracle::connect(const std::string& accessor) noexc
4444
env_ = oracle::occi::Environment::createEnvironment (oracle::occi::Environment::DEFAULT);
4545
conn_ = env_->createConnection (user, password, db);
4646
} catch (SQLException& e) {
47-
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
47+
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
4848
}
4949

5050

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

6868

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

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

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

294294

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

403403
}
@@ -428,7 +428,7 @@ void ConfigurationDatabaseImplOracle::getZSThresholds(const std::string& tag, in
428428
unsigned int fiber = rs->getInt(1);
429429
unsigned int fc = rs->getInt(2);
430430
unsigned int zs = rs->getInt(3);
431-
std::string fpga = rs->getString(4);
431+
std::string fpga = getOraString(rs,4);
432432
int tb;
433433
if (fpga=="top") tb = 1;
434434
else tb = 0;
@@ -439,7 +439,7 @@ void ConfigurationDatabaseImplOracle::getZSThresholds(const std::string& tag, in
439439
//Always terminate statement
440440
conn_->terminateStatement(stmt);
441441
} catch (SQLException& e) {
442-
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
442+
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
443443
}
444444

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

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

‎CaloOnlineTools/HcalOnlineDb/src/HCALConfigDB.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ std::vector<unsigned int> HCALConfigDB::getOnlineLUT( std::string tag, uint32_t
189189
_condition_data_set_id = _cdsi;
190190
_crate = rs -> getInt(2);
191191
_slot = rs -> getInt(3);
192-
std::string fpga_ = rs -> getString(4);
192+
std::string fpga_ = getOraString(rs,4);
193193
if ( fpga_ == "top" ) _fpga = hcal::ConfigurationDatabase::Top;
194194
else _fpga = hcal::ConfigurationDatabase::Bottom;
195195
_fiber = rs -> getInt(5);
@@ -207,7 +207,7 @@ std::vector<unsigned int> HCALConfigDB::getOnlineLUT( std::string tag, uint32_t
207207
//Always terminate statement
208208
_connection -> terminateStatement(stmt);
209209
} catch (SQLException& e) {
210-
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
210+
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
211211
}
212212
return result;
213213
}
@@ -255,7 +255,7 @@ std::vector<unsigned int> HCALConfigDB::getOnlineLUTFromXML( std::string tag, ui
255255
_condition_data_set_id = _cdsi;
256256
_crate = rs -> getInt(2);
257257
_slot = rs -> getInt(3);
258-
std::string fpga_ = rs -> getString(4);
258+
std::string fpga_ = getOraString(rs, 4);
259259
if ( fpga_ == "top" ) _fpga = hcal::ConfigurationDatabase::Top;
260260
else _fpga = hcal::ConfigurationDatabase::Bottom;
261261
_fiber = rs -> getInt(5);
@@ -274,7 +274,7 @@ std::vector<unsigned int> HCALConfigDB::getOnlineLUTFromXML( std::string tag, ui
274274
_connection -> terminateStatement(stmt);
275275

276276
} catch (SQLException& e) {
277-
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",e.getMessage().c_str()));
277+
XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,::toolbox::toString("Oracle exception : %s",getOraMessage(&e)));
278278
}
279279
}
280280
else{

0 commit comments

Comments
 (0)
Please sign in to comment.