Commit 68d83e83 authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Remove duplicate member function DataItem::name().

parent 7b295062
......@@ -69,8 +69,6 @@ public:
Workspace_uptr clone() const { return Workspace_uptr(doClone()); }
Workspace &operator=(const Workspace &other) = delete;
// DataItem interface
/// Name
const std::string name() const override { return this->getName(); }
/** Marks the workspace as safe for multiple threads to edit data
* simutaneously.
* Workspace creation is always considered to be a single threaded operation.
......@@ -83,7 +81,7 @@ public:
void setComment(const std::string &);
virtual const std::string getTitle() const;
const std::string &getComment() const;
const std::string &getName() const;
const std::string &getName() const override;
bool isDirty(const int n = 1) const;
/// Get the footprint in memory in bytes.
virtual size_t getMemorySize() const = 0;
......
......@@ -93,16 +93,16 @@ public:
/// Invokes the ADS to sort group members by orkspace name
void sortByName() {
AnalysisDataService::Instance().sortGroupByName(this->name());
AnalysisDataService::Instance().sortGroupByName(this->getName());
}
/// Adds a workspace to the group.
void add(const std::string &wsName) {
AnalysisDataService::Instance().addToGroup(this->name(), wsName);
AnalysisDataService::Instance().addToGroup(this->getName(), wsName);
}
/// Remove a name from the group
void remove(const std::string &wsName) {
AnalysisDataService::Instance().removeFromGroup(this->name(), wsName);
AnalysisDataService::Instance().removeFromGroup(this->getName(), wsName);
}
/// Does a workspace exist within the group
bool contains(const std::string &wsName) const;
......
......@@ -108,7 +108,7 @@ operator=(const WorkspaceProperty &right) {
template <typename TYPE>
boost::shared_ptr<TYPE> &WorkspaceProperty<TYPE>::
operator=(const boost::shared_ptr<TYPE> &value) {
std::string wsName = value->name();
std::string wsName = value->getName();
if (this->direction() == Kernel::Direction::Input && !wsName.empty()) {
m_workspaceName = wsName;
}
......@@ -180,7 +180,7 @@ std::string WorkspaceProperty<TYPE>::setDataItem(
const boost::shared_ptr<Kernel::DataItem> value) {
boost::shared_ptr<TYPE> typed = boost::dynamic_pointer_cast<TYPE>(value);
if (typed) {
std::string wsName = typed->name();
std::string wsName = typed->getName();
if (this->direction() == Kernel::Direction::Input && !wsName.empty()) {
m_workspaceName = wsName;
}
......
......@@ -1124,7 +1124,7 @@ bool Algorithm::checkGroups() {
AnalysisDataService::Instance().retrieve(name);
if (!memberWS)
throw std::invalid_argument("One of the members of " +
wsGroup->name() + ", " + name +
wsGroup->getName() + ", " + name +
" was not found!.");
thisGroup.push_back(memberWS);
}
......@@ -1288,12 +1288,12 @@ bool Algorithm::processGroups() {
// Append the names together
if (!outputBaseName.empty())
outputBaseName += "_";
outputBaseName += ws->name();
outputBaseName += ws->getName();
// Set the property using the name of that workspace
if (Property *prop =
dynamic_cast<Property *>(m_inputWorkspaceProps[iwp])) {
alg->setPropertyValue(prop->name(), ws->name());
alg->setPropertyValue(prop->name(), ws->getName());
} else {
throw std::logic_error("Found a Workspace property which doesn't "
"inherit from Property.");
......@@ -1326,7 +1326,7 @@ bool Algorithm::processGroups() {
const auto &inputGroup =
m_groups[inputProp - m_inputWorkspaceProps.begin()];
if (!inputGroup.empty())
outName = inputGroup[entry]->name();
outName = inputGroup[entry]->getName();
}
// Except if all inputs had similar names, then the name is "out_1"
......
......@@ -79,7 +79,7 @@ void AnalysisDataServiceImpl::add(
group->observeADSNotifications(true);
for (size_t i = 0; i < group->size(); ++i) {
auto ws = group->getItem(i);
std::string wsName = ws->name();
std::string wsName = ws->getName();
// if anonymous make up a name and add
if (wsName.empty()) {
wsName = name + "_" + std::to_string(i + 1);
......@@ -118,7 +118,7 @@ void AnalysisDataServiceImpl::addOrReplace(
group->observeADSNotifications(true);
for (size_t i = 0; i < group->size(); ++i) {
auto ws = group->getItem(i);
std::string wsName = ws->name();
std::string wsName = ws->getName();
// make up a name for an anonymous workspace
if (wsName.empty()) {
wsName = name + "_" + std::to_string(i + 1);
......@@ -211,9 +211,9 @@ void AnalysisDataServiceImpl::deepRemoveGroup(const std::string &name) {
WorkspaceGroup_sptr gws = boost::dynamic_pointer_cast<WorkspaceGroup>(ws);
if (gws) {
// if a member is a group remove its items as well
deepRemoveGroup(gws->name());
deepRemoveGroup(gws->getName());
} else {
remove(ws->name());
remove(ws->getName());
}
}
remove(name);
......
......@@ -136,7 +136,8 @@ std::string MultiPeriodGroupWorker::createFormattedInputWorkspaceNames(
std::string prefix;
std::string inputWorkspaces;
for (const auto &vecWorkspaceGroup : vecWorkspaceGroups) {
inputWorkspaces += prefix + vecWorkspaceGroup->getItem(periodIndex)->name();
inputWorkspaces +=
prefix + vecWorkspaceGroup->getItem(periodIndex)->getName();
prefix = ",";
}
return inputWorkspaces;
......@@ -283,7 +284,7 @@ void MultiPeriodGroupWorker::validateMultiPeriodGroupInputs(
if (nPeriods != benchMarkGroupSize) {
throw std::runtime_error("Missmatch between nperiods log and the "
"number of workspaces in the input group: " +
vecMultiPeriodGroups[i]->name());
vecMultiPeriodGroups[i]->getName());
}
Property *currentPeriodProperty =
currentNestedWS->run().getLogData("current_period");
......@@ -291,7 +292,7 @@ void MultiPeriodGroupWorker::validateMultiPeriodGroupInputs(
if (currentPeriod != (j + 1)) {
throw std::runtime_error("Multiperiod group workspaces must be "
"ordered by current_period. Correct: " +
currentNestedWS->name());
currentNestedWS->getName());
}
}
}
......
......@@ -74,9 +74,9 @@ void ScopedWorkspace::remove() {
void ScopedWorkspace::set(Workspace_sptr newWS) {
AnalysisDataServiceImpl &ads = AnalysisDataService::Instance();
if (!newWS->name().empty() && ads.doesExist(newWS->name()))
if (!newWS->getName().empty() && ads.doesExist(newWS->getName()))
throw std::invalid_argument(
"Workspace is already in the ADS under the name " + newWS->name());
"Workspace is already in the ADS under the name " + newWS->getName());
// Remove previous workspace entry
remove();
......
......@@ -36,7 +36,7 @@ const std::string WorkspaceGroup::toString() const {
std::string descr = this->id() + "\n";
std::lock_guard<std::recursive_mutex> _lock(m_mutex);
for (const auto &workspace : m_workspaces) {
descr += " -- " + workspace->name() + "\n";
descr += " -- " + workspace->getName() + '\n';
}
return descr;
}
......@@ -94,7 +94,7 @@ void WorkspaceGroup::sortMembersByName() {
}
std::sort(m_workspaces.begin(), m_workspaces.end(),
[](const Workspace_sptr &w1, const Workspace_sptr &w2) {
return (w1->name() < w2->name());
return (w1->getName() < w2->getName());
});
}
......@@ -123,7 +123,7 @@ void WorkspaceGroup::addWorkspace(Workspace_sptr workspace) {
bool WorkspaceGroup::contains(const std::string &wsName) const {
std::lock_guard<std::recursive_mutex> _lock(m_mutex);
for (const auto &workspace : m_workspaces) {
if ((*workspace).name() == wsName)
if (workspace->getName() == wsName)
return true;
}
return false;
......@@ -158,7 +158,7 @@ std::vector<std::string> WorkspaceGroup::getNames() const {
std::lock_guard<std::recursive_mutex> _lock(m_mutex);
std::vector<std::string> out;
for (const auto &workspace : m_workspaces) {
out.push_back((*workspace).name());
out.push_back(workspace->getName());
}
return out;
}
......@@ -188,7 +188,7 @@ Workspace_sptr WorkspaceGroup::getItem(const size_t index) const {
Workspace_sptr WorkspaceGroup::getItem(const std::string wsName) const {
std::lock_guard<std::recursive_mutex> _lock(m_mutex);
for (const auto &workspace : m_workspaces) {
if ((*workspace).name() == wsName)
if (workspace->getName() == wsName)
return workspace;
}
throw std::out_of_range("Workspace " + wsName +
......@@ -207,7 +207,7 @@ void WorkspaceGroup::removeByADS(const std::string &wsName) {
std::lock_guard<std::recursive_mutex> _lock(m_mutex);
auto it = m_workspaces.begin();
for (; it != m_workspaces.end(); ++it) {
if ((**it).name() == wsName) {
if ((**it).getName() == wsName) {
m_workspaces.erase(it);
break;
}
......@@ -219,8 +219,8 @@ void WorkspaceGroup::removeByADS(const std::string &wsName) {
void WorkspaceGroup::print() const {
std::lock_guard<std::recursive_mutex> _lock(m_mutex);
for (const auto &workspace : m_workspaces) {
g_log.debug() << "Workspace name in group vector = " << (*workspace).name()
<< '\n';
g_log.debug() << "Workspace name in group vector = "
<< workspace->getName() << '\n';
}
}
......@@ -233,7 +233,7 @@ void WorkspaceGroup::print() const {
void WorkspaceGroup::removeItem(const size_t index) {
std::lock_guard<std::recursive_mutex> _lock(m_mutex);
// do not allow this way of removing for groups in the ADS
if (!name().empty()) {
if (!this->getName().empty()) {
throw std::runtime_error(
"AnalysisDataService must be used to remove a workspace from group.");
}
......@@ -339,7 +339,7 @@ bool WorkspaceGroup::areNamesSimilar() const {
// Check all the members are of similar names
for (const auto &workspace : m_workspaces) {
const std::string wsName = (*workspace).name();
const std::string &wsName = workspace->getName();
// Find the last underscore _
std::size_t pos = wsName.find_last_of('_');
// No underscore = not similar
......@@ -348,7 +348,7 @@ bool WorkspaceGroup::areNamesSimilar() const {
// The part before the underscore has to be the same
// as the group name to be similar
std::string commonpart(wsName.substr(0, pos));
if (this->name() != commonpart)
if (this->getName() != commonpart)
return false;
}
return true;
......
......@@ -577,7 +577,7 @@ public:
WorkspaceGroup_sptr group =
boost::dynamic_pointer_cast<WorkspaceGroup>(out1);
TS_ASSERT_EQUALS(group->name(), "D")
TS_ASSERT_EQUALS(group->getName(), "D")
TS_ASSERT_EQUALS(group->getNumberOfEntries(), expectedNumber)
if (group->getNumberOfEntries() < 1)
return group;
......@@ -603,12 +603,12 @@ public:
WorkspaceGroup_sptr group = do_test_groups(
"A", "A_1,A_2,A_3", "B", "B_1,B_2,B_3", "C", "C_1,C_2,C_3");
TS_ASSERT_EQUALS(ws1->name(), "D_1");
TS_ASSERT_EQUALS(ws1->getName(), "D_1");
TS_ASSERT_EQUALS(ws1->getTitle(), "A_1+B_1+C_1");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
TS_ASSERT_EQUALS(ws2->name(), "D_2");
TS_ASSERT_EQUALS(ws2->getName(), "D_2");
TS_ASSERT_EQUALS(ws2->getTitle(), "A_2+B_2+C_2");
TS_ASSERT_EQUALS(ws3->name(), "D_3");
TS_ASSERT_EQUALS(ws3->getName(), "D_3");
TS_ASSERT_EQUALS(ws3->getTitle(), "A_3+B_3+C_3");
}
......@@ -617,12 +617,12 @@ public:
WorkspaceGroup_sptr group = do_test_groups(
"A", "A_1,A_2,A_3", "B", "B_1,B_2,B_3", "C", "alice,bob,charlie");
TS_ASSERT_EQUALS(ws1->name(), "A_1_B_1_alice_D");
TS_ASSERT_EQUALS(ws1->getName(), "A_1_B_1_alice_D");
TS_ASSERT_EQUALS(ws1->getTitle(), "A_1+B_1+alice");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
TS_ASSERT_EQUALS(ws2->name(), "A_2_B_2_bob_D");
TS_ASSERT_EQUALS(ws2->getName(), "A_2_B_2_bob_D");
TS_ASSERT_EQUALS(ws2->getTitle(), "A_2+B_2+bob");
TS_ASSERT_EQUALS(ws3->name(), "A_3_B_3_charlie_D");
TS_ASSERT_EQUALS(ws3->getName(), "A_3_B_3_charlie_D");
TS_ASSERT_EQUALS(ws3->getTitle(), "A_3+B_3+charlie");
}
......@@ -631,12 +631,12 @@ public:
WorkspaceGroup_sptr group =
do_test_groups("A", "A_1,A_2,A_3", "B", "", "C", "");
TS_ASSERT_EQUALS(ws1->name(), "D_1");
TS_ASSERT_EQUALS(ws1->getName(), "D_1");
TS_ASSERT_EQUALS(ws1->getTitle(), "A_1+B+C");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
TS_ASSERT_EQUALS(ws2->name(), "D_2");
TS_ASSERT_EQUALS(ws2->getName(), "D_2");
TS_ASSERT_EQUALS(ws2->getTitle(), "A_2+B+C");
TS_ASSERT_EQUALS(ws3->name(), "D_3");
TS_ASSERT_EQUALS(ws3->getName(), "D_3");
TS_ASSERT_EQUALS(ws3->getTitle(), "A_3+B+C");
}
......@@ -645,12 +645,12 @@ public:
WorkspaceGroup_sptr group =
do_test_groups("A", "A_1,A_2,A_3", "B", "", "", "");
TS_ASSERT_EQUALS(ws1->name(), "D_1");
TS_ASSERT_EQUALS(ws1->getName(), "D_1");
TS_ASSERT_EQUALS(ws1->getTitle(), "A_1+B+");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
TS_ASSERT_EQUALS(ws2->name(), "D_2");
TS_ASSERT_EQUALS(ws2->getName(), "D_2");
TS_ASSERT_EQUALS(ws2->getTitle(), "A_2+B+");
TS_ASSERT_EQUALS(ws3->name(), "D_3");
TS_ASSERT_EQUALS(ws3->getName(), "D_3");
TS_ASSERT_EQUALS(ws3->getTitle(), "A_3+B+");
}
......@@ -659,12 +659,12 @@ public:
WorkspaceGroup_sptr group =
do_test_groups("A", "A_1,A_2,A_3", "", "", "C", "C_1,C_2,C_3");
TS_ASSERT_EQUALS(ws1->name(), "D_1");
TS_ASSERT_EQUALS(ws1->getName(), "D_1");
TS_ASSERT_EQUALS(ws1->getTitle(), "A_1++C_1");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
TS_ASSERT_EQUALS(ws2->name(), "D_2");
TS_ASSERT_EQUALS(ws2->getName(), "D_2");
TS_ASSERT_EQUALS(ws2->getTitle(), "A_2++C_2");
TS_ASSERT_EQUALS(ws3->name(), "D_3");
TS_ASSERT_EQUALS(ws3->getName(), "D_3");
TS_ASSERT_EQUALS(ws3->getTitle(), "A_3++C_3");
}
......@@ -673,7 +673,7 @@ public:
WorkspaceGroup_sptr group =
do_test_groups("A", "A_1", "B", "", "C", "", false, 1);
TS_ASSERT_EQUALS(ws1->name(), "D_1");
TS_ASSERT_EQUALS(ws1->getName(), "D_1");
TS_ASSERT_EQUALS(ws1->getTitle(), "A_1+B+C");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
}
......@@ -683,7 +683,7 @@ public:
WorkspaceGroup_sptr group =
do_test_groups("A", "A_1", "B", "B_1", "C", "", false, 1);
TS_ASSERT_EQUALS(ws1->name(), "D_1");
TS_ASSERT_EQUALS(ws1->getName(), "D_1");
TS_ASSERT_EQUALS(ws1->getTitle(), "A_1+B_1+C");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
}
......@@ -715,12 +715,12 @@ public:
WorkspaceGroup_sptr group =
do_test_groups("D", "D1,D2,D3", "B", "B1,B2,B3", "C", "C1,C2,C3");
TS_ASSERT_EQUALS(ws1->name(), "D1");
TS_ASSERT_EQUALS(ws1->getName(), "D1");
TS_ASSERT_EQUALS(ws1->getTitle(), "D1+B1+C1");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
TS_ASSERT_EQUALS(ws2->name(), "D2");
TS_ASSERT_EQUALS(ws2->getName(), "D2");
TS_ASSERT_EQUALS(ws2->getTitle(), "D2+B2+C2");
TS_ASSERT_EQUALS(ws3->name(), "D3");
TS_ASSERT_EQUALS(ws3->getName(), "D3");
TS_ASSERT_EQUALS(ws3->getTitle(), "D3+B3+C3");
}
......@@ -730,12 +730,12 @@ public:
WorkspaceGroup_sptr group =
do_test_groups("A", "A1,A2,A3", "D", "D1,D2,D3", "C", "C1,C2,C3");
TS_ASSERT_EQUALS(ws1->name(), "D1");
TS_ASSERT_EQUALS(ws1->getName(), "D1");
TS_ASSERT_EQUALS(ws1->getTitle(), "A1+D1+C1");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
TS_ASSERT_EQUALS(ws2->name(), "D2");
TS_ASSERT_EQUALS(ws2->getName(), "D2");
TS_ASSERT_EQUALS(ws2->getTitle(), "A2+D2+C2");
TS_ASSERT_EQUALS(ws3->name(), "D3");
TS_ASSERT_EQUALS(ws3->getName(), "D3");
TS_ASSERT_EQUALS(ws3->getTitle(), "A3+D3+C3");
}
......@@ -745,12 +745,12 @@ public:
WorkspaceGroup_sptr group =
do_test_groups("A", "A1,A2,A3", "D", "D1,D2,D3", "D", "D1,D2,D3");
TS_ASSERT_EQUALS(ws1->name(), "D1");
TS_ASSERT_EQUALS(ws1->getName(), "D1");
TS_ASSERT_EQUALS(ws1->getTitle(), "A1+D1+D1");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
TS_ASSERT_EQUALS(ws2->name(), "D2");
TS_ASSERT_EQUALS(ws2->getName(), "D2");
TS_ASSERT_EQUALS(ws2->getTitle(), "A2+D2+D2");
TS_ASSERT_EQUALS(ws3->name(), "D3");
TS_ASSERT_EQUALS(ws3->getName(), "D3");
TS_ASSERT_EQUALS(ws3->getTitle(), "A3+D3+D3");
}
......
......@@ -234,7 +234,7 @@ public:
view->unrollAll();
NotebookBuilder builder(view);
std::string notebookText =
builder.build(ws->name(), ws->getTitle(), ws->getComment());
builder.build(ws->getName(), ws->getTitle(), ws->getComment());
std::vector<std::string> notebookLines;
std::string line;
......@@ -286,7 +286,7 @@ public:
NotebookBuilder builder(view);
std::string notebookText =
builder.build(ws->name(), ws->getTitle(), ws->getComment());
builder.build(ws->getName(), ws->getTitle(), ws->getComment());
std::vector<std::string> notebookLines;
std::string line;
......@@ -329,7 +329,7 @@ public:
NotebookBuilder builder(wsHist.createView());
std::string notebookText =
builder.build(ws->name(), ws->getTitle(), ws->getComment());
builder.build(ws->getName(), ws->getTitle(), ws->getComment());
std::vector<std::string> notebookLines;
std::string line;
......@@ -346,4 +346,4 @@ public:
}
};
#endif // MANTID_NOTEBOOKBUILDERTEST_H_
\ No newline at end of file
#endif // MANTID_NOTEBOOKBUILDERTEST_H_
......@@ -179,13 +179,13 @@ public:
MockWorkspace_sptr ws1 = MockWorkspace_sptr(new MockWorkspace);
test.set(ws1);
TS_ASSERT_EQUALS(ws1->name(), test.name());
TS_ASSERT_EQUALS(ws1->getName(), test.name());
MockWorkspace_sptr ws2 = MockWorkspace_sptr(new MockWorkspace);
test.set(ws2);
TS_ASSERT_EQUALS(ws2->name(), test.name());
TS_ASSERT(ws1->name().empty());
TS_ASSERT_EQUALS(ws2->getName(), test.name());
TS_ASSERT(ws1->getName().empty());
TS_ASSERT_EQUALS(
m_ads.getObjectNames(Mantid::Kernel::DataServiceSort::Unsorted,
Mantid::Kernel::DataServiceHidden::Include).size(),
......
......@@ -192,7 +192,7 @@ public:
void test_getItem() {
WorkspaceGroup_sptr group = makeGroup();
Workspace_sptr ws1 = group->getItem(1);
TS_ASSERT_EQUALS(ws1->name(), "ws1");
TS_ASSERT_EQUALS(ws1->getName(), "ws1");
// Test the 'by name' overload
Workspace_sptr ws11 = group->getItem("ws1");
TS_ASSERT_EQUALS(ws1, ws11);
......
......@@ -151,7 +151,7 @@ void CalculateCountRate::exec() {
DataObjects::EventWorkspace_sptr sourceWS = getProperty("Workspace");
API::EventType et = sourceWS->getEventType();
if (et == API::EventType::WEIGHTED_NOTIME) {
throw std::runtime_error("Event workspace " + sourceWS->name() +
throw std::runtime_error("Event workspace " + sourceWS->getName() +
" contains events without necessary frame "
"information. Can not process counting rate");
}
......@@ -510,7 +510,7 @@ void CalculateCountRate::setSourceWSandXRanges(
API::MatrixWorkspace_sptr wst;
if (unit->unitID() != RangeUnits) {
auto conv = createChildAlgorithm("ConvertUnits", 0, 1);
std::string wsName = InputWorkspace->name();
std::string wsName = InputWorkspace->getName();
if (wsName.empty()) {
wsName = "_CountRate_UnitsConverted";
} else {
......
......@@ -130,8 +130,10 @@ void CompareWorkspaces::exec() {
std::string message = m_Messages->cell<std::string>(0, 0);
g_log.notice() << "The workspaces did not match: " << message << '\n';
} else {
std::string ws1 = Workspace_const_sptr(getProperty("Workspace1"))->name();
std::string ws2 = Workspace_const_sptr(getProperty("Workspace2"))->name();
std::string ws1 =
Workspace_const_sptr(getProperty("Workspace1"))->getName();
std::string ws2 =
Workspace_const_sptr(getProperty("Workspace2"))->getName();
g_log.notice() << "The workspaces \"" << ws1 << "\" and \"" << ws2
<< "\" matched!\n";
}
......@@ -174,8 +176,8 @@ bool CompareWorkspaces::processGroups() {
}
if (m_Result && ws1 && ws2) {
g_log.notice() << "All workspaces in workspace groups \"" << ws1->name()
<< "\" and \"" << ws2->name() << "\" matched!\n";
g_log.notice() << "All workspaces in workspace groups \"" << ws1->getName()
<< "\" and \"" << ws2->getName() << "\" matched!\n";
}
setProperty("Result", m_Result);
......@@ -1156,11 +1158,11 @@ void CompareWorkspaces::recordMismatch(std::string msg, std::string ws1,
// Workspace names default to the workspaces currently being compared
if (ws1.empty()) {
Workspace_const_sptr w1 = getProperty("Workspace1");
ws1 = w1->name();
ws1 = w1->getName();
}
if (ws2.empty()) {
Workspace_const_sptr w2 = getProperty("Workspace2");
ws2 = w2->name();
ws2 = w2->getName();
}
// Add new row and flag this comparison as a mismatch
......
......@@ -49,7 +49,7 @@ void CreateLogTimeCorrection::exec() {
// Check whether the output workspace name is same as input
string outwsname = getPropertyValue("OutputWorkspace");
if (outwsname.compare(m_dataWS->name()) == 0) {
if (outwsname.compare(m_dataWS->getName()) == 0) {
stringstream errmsg;
errmsg << "It is not allowed to use the same name by both input matrix "
"workspace and output table workspace.";
......
......@@ -56,7 +56,7 @@ void ExtractMaskToTable::exec() {
bool m_inputIsMask = false;
if (maskws) {
g_log.notice() << "InputWorkspace " << m_dataWS->name()
g_log.notice() << "InputWorkspace " << m_dataWS->getName()
<< " is a MaskWorkspace.\n";
m_inputIsMask = true;
} else {
......@@ -135,8 +135,8 @@ std::vector<detid_t> ExtractMaskToTable::parseMaskTable(
chkcolumans[2] = "DetectorIDsList";
for (int i = 0; i < 3; ++i) {
if (colnames[i] != chkcolumans[i]) {
g_log.error() << "Mask table workspace " << masktablews->name() << "'s "
<< i << "-th column name is " << colnames[i]
g_log.error() << "Mask table workspace " << masktablews->getName()
<< "'s " << i << "-th column name is " << colnames[i]
<< ", while it should be " << chkcolumans[i]
<< ". MaskWorkspace is invalid"
<< " and thus not used.\n";
......@@ -264,7 +264,7 @@ void ExtractMaskToTable::copyTableWorkspaceContent(
vector<string> targetcolnames = targetWS->getColumnNames();
if (sourcecolnames.size() != targetcolnames.size()) {
stringstream errmsg;
errmsg << "Soruce table workspace " << sourceWS->name()
errmsg << "Soruce table workspace " << sourceWS->getName()
<< " has different number of columns (" << sourcecolnames.size()
<< ") than target table workspace's (" << targetcolnames.size()
<< ")";
......
......@@ -90,7 +90,7 @@ std::map<std::string, std::string> FilterByLogValue::validateInputs() {
} catch (Exception::NotFoundError &) {
errors["LogName"] = "The log '" + logname +
"' does not exist in the workspace '" +
inputWS->name() + "'.";
inputWS->getName() + "'.";
return errors;
}
......
......@@ -207,7 +207,7 @@ void FilterEvents::exec() {
std::vector<std::string> outputwsnames;
std::map<int, DataObjects::EventWorkspace_sptr>::iterator miter;
for (miter = m_outputWS.begin(); miter != m_outputWS.end(); ++miter) {
outputwsnames.push_back(miter->second->name());
outputwsnames.push_back(miter->second->getName());
}
setProperty("OutputWorkspaceNames", outputwsnames);
......@@ -706,13 +706,13 @@ void FilterEvents::setupCustomizedTOFCorrection() {
if (toffactormap.size() > numhist) {
g_log.warning() << "Input correction table workspace has more detectors ("
<< toffactormap.size() << ") than input workspace "
<< m_eventWS->name() << "'s spectra number (" << numhist
<< m_eventWS->getName() << "'s spectra number (" << numhist
<< ".\n";
} else if (toffactormap.size() < numhist) {
stringstream errss;
errss << "Input correction table workspace has more detectors ("
<< toffactormap.size() << ") than input workspace "
<< m_eventWS->name() << "'s spectra number (" << numhist << ".\n";
<< m_eventWS->getName() << "'s spectra number (" << numhist << ".\n";
throw runtime_error(errss.str());
}