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: ...@@ -69,8 +69,6 @@ public:
Workspace_uptr clone() const { return Workspace_uptr(doClone()); } Workspace_uptr clone() const { return Workspace_uptr(doClone()); }
Workspace &operator=(const Workspace &other) = delete; Workspace &operator=(const Workspace &other) = delete;
// DataItem interface // DataItem interface
/// Name
const std::string name() const override { return this->getName(); }
/** Marks the workspace as safe for multiple threads to edit data /** Marks the workspace as safe for multiple threads to edit data
* simutaneously. * simutaneously.
* Workspace creation is always considered to be a single threaded operation. * Workspace creation is always considered to be a single threaded operation.
...@@ -83,7 +81,7 @@ public: ...@@ -83,7 +81,7 @@ public:
void setComment(const std::string &); void setComment(const std::string &);
virtual const std::string getTitle() const; virtual const std::string getTitle() const;
const std::string &getComment() const; const std::string &getComment() const;
const std::string &getName() const; const std::string &getName() const override;
bool isDirty(const int n = 1) const; bool isDirty(const int n = 1) const;
/// Get the footprint in memory in bytes. /// Get the footprint in memory in bytes.
virtual size_t getMemorySize() const = 0; virtual size_t getMemorySize() const = 0;
......
...@@ -93,16 +93,16 @@ public: ...@@ -93,16 +93,16 @@ public:
/// Invokes the ADS to sort group members by orkspace name /// Invokes the ADS to sort group members by orkspace name
void sortByName() { void sortByName() {
AnalysisDataService::Instance().sortGroupByName(this->name()); AnalysisDataService::Instance().sortGroupByName(this->getName());
} }
/// Adds a workspace to the group. /// Adds a workspace to the group.
void add(const std::string &wsName) { void add(const std::string &wsName) {
AnalysisDataService::Instance().addToGroup(this->name(), wsName); AnalysisDataService::Instance().addToGroup(this->getName(), wsName);
} }
/// Remove a name from the group /// Remove a name from the group
void remove(const std::string &wsName) { 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 /// Does a workspace exist within the group
bool contains(const std::string &wsName) const; bool contains(const std::string &wsName) const;
......
...@@ -108,7 +108,7 @@ operator=(const WorkspaceProperty &right) { ...@@ -108,7 +108,7 @@ operator=(const WorkspaceProperty &right) {
template <typename TYPE> template <typename TYPE>
boost::shared_ptr<TYPE> &WorkspaceProperty<TYPE>:: boost::shared_ptr<TYPE> &WorkspaceProperty<TYPE>::
operator=(const boost::shared_ptr<TYPE> &value) { 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()) { if (this->direction() == Kernel::Direction::Input && !wsName.empty()) {
m_workspaceName = wsName; m_workspaceName = wsName;
} }
...@@ -180,7 +180,7 @@ std::string WorkspaceProperty<TYPE>::setDataItem( ...@@ -180,7 +180,7 @@ std::string WorkspaceProperty<TYPE>::setDataItem(
const boost::shared_ptr<Kernel::DataItem> value) { const boost::shared_ptr<Kernel::DataItem> value) {
boost::shared_ptr<TYPE> typed = boost::dynamic_pointer_cast<TYPE>(value); boost::shared_ptr<TYPE> typed = boost::dynamic_pointer_cast<TYPE>(value);
if (typed) { if (typed) {
std::string wsName = typed->name(); std::string wsName = typed->getName();
if (this->direction() == Kernel::Direction::Input && !wsName.empty()) { if (this->direction() == Kernel::Direction::Input && !wsName.empty()) {
m_workspaceName = wsName; m_workspaceName = wsName;
} }
......
...@@ -1124,7 +1124,7 @@ bool Algorithm::checkGroups() { ...@@ -1124,7 +1124,7 @@ bool Algorithm::checkGroups() {
AnalysisDataService::Instance().retrieve(name); AnalysisDataService::Instance().retrieve(name);
if (!memberWS) if (!memberWS)
throw std::invalid_argument("One of the members of " + throw std::invalid_argument("One of the members of " +
wsGroup->name() + ", " + name + wsGroup->getName() + ", " + name +
" was not found!."); " was not found!.");
thisGroup.push_back(memberWS); thisGroup.push_back(memberWS);
} }
...@@ -1288,12 +1288,12 @@ bool Algorithm::processGroups() { ...@@ -1288,12 +1288,12 @@ bool Algorithm::processGroups() {
// Append the names together // Append the names together
if (!outputBaseName.empty()) if (!outputBaseName.empty())
outputBaseName += "_"; outputBaseName += "_";
outputBaseName += ws->name(); outputBaseName += ws->getName();
// Set the property using the name of that workspace // Set the property using the name of that workspace
if (Property *prop = if (Property *prop =
dynamic_cast<Property *>(m_inputWorkspaceProps[iwp])) { dynamic_cast<Property *>(m_inputWorkspaceProps[iwp])) {
alg->setPropertyValue(prop->name(), ws->name()); alg->setPropertyValue(prop->name(), ws->getName());
} else { } else {
throw std::logic_error("Found a Workspace property which doesn't " throw std::logic_error("Found a Workspace property which doesn't "
"inherit from Property."); "inherit from Property.");
...@@ -1326,7 +1326,7 @@ bool Algorithm::processGroups() { ...@@ -1326,7 +1326,7 @@ bool Algorithm::processGroups() {
const auto &inputGroup = const auto &inputGroup =
m_groups[inputProp - m_inputWorkspaceProps.begin()]; m_groups[inputProp - m_inputWorkspaceProps.begin()];
if (!inputGroup.empty()) if (!inputGroup.empty())
outName = inputGroup[entry]->name(); outName = inputGroup[entry]->getName();
} }
// Except if all inputs had similar names, then the name is "out_1" // Except if all inputs had similar names, then the name is "out_1"
......
...@@ -79,7 +79,7 @@ void AnalysisDataServiceImpl::add( ...@@ -79,7 +79,7 @@ void AnalysisDataServiceImpl::add(
group->observeADSNotifications(true); group->observeADSNotifications(true);
for (size_t i = 0; i < group->size(); ++i) { for (size_t i = 0; i < group->size(); ++i) {
auto ws = group->getItem(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 anonymous make up a name and add
if (wsName.empty()) { if (wsName.empty()) {
wsName = name + "_" + std::to_string(i + 1); wsName = name + "_" + std::to_string(i + 1);
...@@ -118,7 +118,7 @@ void AnalysisDataServiceImpl::addOrReplace( ...@@ -118,7 +118,7 @@ void AnalysisDataServiceImpl::addOrReplace(
group->observeADSNotifications(true); group->observeADSNotifications(true);
for (size_t i = 0; i < group->size(); ++i) { for (size_t i = 0; i < group->size(); ++i) {
auto ws = group->getItem(i); auto ws = group->getItem(i);
std::string wsName = ws->name(); std::string wsName = ws->getName();
// make up a name for an anonymous workspace // make up a name for an anonymous workspace
if (wsName.empty()) { if (wsName.empty()) {
wsName = name + "_" + std::to_string(i + 1); wsName = name + "_" + std::to_string(i + 1);
...@@ -211,9 +211,9 @@ void AnalysisDataServiceImpl::deepRemoveGroup(const std::string &name) { ...@@ -211,9 +211,9 @@ void AnalysisDataServiceImpl::deepRemoveGroup(const std::string &name) {
WorkspaceGroup_sptr gws = boost::dynamic_pointer_cast<WorkspaceGroup>(ws); WorkspaceGroup_sptr gws = boost::dynamic_pointer_cast<WorkspaceGroup>(ws);
if (gws) { if (gws) {
// if a member is a group remove its items as well // if a member is a group remove its items as well
deepRemoveGroup(gws->name()); deepRemoveGroup(gws->getName());
} else { } else {
remove(ws->name()); remove(ws->getName());
} }
} }
remove(name); remove(name);
......
...@@ -136,7 +136,8 @@ std::string MultiPeriodGroupWorker::createFormattedInputWorkspaceNames( ...@@ -136,7 +136,8 @@ std::string MultiPeriodGroupWorker::createFormattedInputWorkspaceNames(
std::string prefix; std::string prefix;
std::string inputWorkspaces; std::string inputWorkspaces;
for (const auto &vecWorkspaceGroup : vecWorkspaceGroups) { for (const auto &vecWorkspaceGroup : vecWorkspaceGroups) {
inputWorkspaces += prefix + vecWorkspaceGroup->getItem(periodIndex)->name(); inputWorkspaces +=
prefix + vecWorkspaceGroup->getItem(periodIndex)->getName();
prefix = ","; prefix = ",";
} }
return inputWorkspaces; return inputWorkspaces;
...@@ -283,7 +284,7 @@ void MultiPeriodGroupWorker::validateMultiPeriodGroupInputs( ...@@ -283,7 +284,7 @@ void MultiPeriodGroupWorker::validateMultiPeriodGroupInputs(
if (nPeriods != benchMarkGroupSize) { if (nPeriods != benchMarkGroupSize) {
throw std::runtime_error("Missmatch between nperiods log and the " throw std::runtime_error("Missmatch between nperiods log and the "
"number of workspaces in the input group: " + "number of workspaces in the input group: " +
vecMultiPeriodGroups[i]->name()); vecMultiPeriodGroups[i]->getName());
} }
Property *currentPeriodProperty = Property *currentPeriodProperty =
currentNestedWS->run().getLogData("current_period"); currentNestedWS->run().getLogData("current_period");
...@@ -291,7 +292,7 @@ void MultiPeriodGroupWorker::validateMultiPeriodGroupInputs( ...@@ -291,7 +292,7 @@ void MultiPeriodGroupWorker::validateMultiPeriodGroupInputs(
if (currentPeriod != (j + 1)) { if (currentPeriod != (j + 1)) {
throw std::runtime_error("Multiperiod group workspaces must be " throw std::runtime_error("Multiperiod group workspaces must be "
"ordered by current_period. Correct: " + "ordered by current_period. Correct: " +
currentNestedWS->name()); currentNestedWS->getName());
} }
} }
} }
......
...@@ -74,9 +74,9 @@ void ScopedWorkspace::remove() { ...@@ -74,9 +74,9 @@ void ScopedWorkspace::remove() {
void ScopedWorkspace::set(Workspace_sptr newWS) { void ScopedWorkspace::set(Workspace_sptr newWS) {
AnalysisDataServiceImpl &ads = AnalysisDataService::Instance(); AnalysisDataServiceImpl &ads = AnalysisDataService::Instance();
if (!newWS->name().empty() && ads.doesExist(newWS->name())) if (!newWS->getName().empty() && ads.doesExist(newWS->getName()))
throw std::invalid_argument( 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 previous workspace entry
remove(); remove();
......
...@@ -36,7 +36,7 @@ const std::string WorkspaceGroup::toString() const { ...@@ -36,7 +36,7 @@ const std::string WorkspaceGroup::toString() const {
std::string descr = this->id() + "\n"; std::string descr = this->id() + "\n";
std::lock_guard<std::recursive_mutex> _lock(m_mutex); std::lock_guard<std::recursive_mutex> _lock(m_mutex);
for (const auto &workspace : m_workspaces) { for (const auto &workspace : m_workspaces) {
descr += " -- " + workspace->name() + "\n"; descr += " -- " + workspace->getName() + '\n';
} }
return descr; return descr;
} }
...@@ -94,7 +94,7 @@ void WorkspaceGroup::sortMembersByName() { ...@@ -94,7 +94,7 @@ void WorkspaceGroup::sortMembersByName() {
} }
std::sort(m_workspaces.begin(), m_workspaces.end(), std::sort(m_workspaces.begin(), m_workspaces.end(),
[](const Workspace_sptr &w1, const Workspace_sptr &w2) { [](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) { ...@@ -123,7 +123,7 @@ void WorkspaceGroup::addWorkspace(Workspace_sptr workspace) {
bool WorkspaceGroup::contains(const std::string &wsName) const { bool WorkspaceGroup::contains(const std::string &wsName) const {
std::lock_guard<std::recursive_mutex> _lock(m_mutex); std::lock_guard<std::recursive_mutex> _lock(m_mutex);
for (const auto &workspace : m_workspaces) { for (const auto &workspace : m_workspaces) {
if ((*workspace).name() == wsName) if (workspace->getName() == wsName)
return true; return true;
} }
return false; return false;
...@@ -158,7 +158,7 @@ std::vector<std::string> WorkspaceGroup::getNames() const { ...@@ -158,7 +158,7 @@ std::vector<std::string> WorkspaceGroup::getNames() const {
std::lock_guard<std::recursive_mutex> _lock(m_mutex); std::lock_guard<std::recursive_mutex> _lock(m_mutex);
std::vector<std::string> out; std::vector<std::string> out;
for (const auto &workspace : m_workspaces) { for (const auto &workspace : m_workspaces) {
out.push_back((*workspace).name()); out.push_back(workspace->getName());
} }
return out; return out;
} }
...@@ -188,7 +188,7 @@ Workspace_sptr WorkspaceGroup::getItem(const size_t index) const { ...@@ -188,7 +188,7 @@ Workspace_sptr WorkspaceGroup::getItem(const size_t index) const {
Workspace_sptr WorkspaceGroup::getItem(const std::string wsName) const { Workspace_sptr WorkspaceGroup::getItem(const std::string wsName) const {
std::lock_guard<std::recursive_mutex> _lock(m_mutex); std::lock_guard<std::recursive_mutex> _lock(m_mutex);
for (const auto &workspace : m_workspaces) { for (const auto &workspace : m_workspaces) {
if ((*workspace).name() == wsName) if (workspace->getName() == wsName)
return workspace; return workspace;
} }
throw std::out_of_range("Workspace " + wsName + throw std::out_of_range("Workspace " + wsName +
...@@ -207,7 +207,7 @@ void WorkspaceGroup::removeByADS(const std::string &wsName) { ...@@ -207,7 +207,7 @@ void WorkspaceGroup::removeByADS(const std::string &wsName) {
std::lock_guard<std::recursive_mutex> _lock(m_mutex); std::lock_guard<std::recursive_mutex> _lock(m_mutex);
auto it = m_workspaces.begin(); auto it = m_workspaces.begin();
for (; it != m_workspaces.end(); ++it) { for (; it != m_workspaces.end(); ++it) {
if ((**it).name() == wsName) { if ((**it).getName() == wsName) {
m_workspaces.erase(it); m_workspaces.erase(it);
break; break;
} }
...@@ -219,8 +219,8 @@ void WorkspaceGroup::removeByADS(const std::string &wsName) { ...@@ -219,8 +219,8 @@ void WorkspaceGroup::removeByADS(const std::string &wsName) {
void WorkspaceGroup::print() const { void WorkspaceGroup::print() const {
std::lock_guard<std::recursive_mutex> _lock(m_mutex); std::lock_guard<std::recursive_mutex> _lock(m_mutex);
for (const auto &workspace : m_workspaces) { for (const auto &workspace : m_workspaces) {
g_log.debug() << "Workspace name in group vector = " << (*workspace).name() g_log.debug() << "Workspace name in group vector = "
<< '\n'; << workspace->getName() << '\n';
} }
} }
...@@ -233,7 +233,7 @@ void WorkspaceGroup::print() const { ...@@ -233,7 +233,7 @@ void WorkspaceGroup::print() const {
void WorkspaceGroup::removeItem(const size_t index) { void WorkspaceGroup::removeItem(const size_t index) {
std::lock_guard<std::recursive_mutex> _lock(m_mutex); std::lock_guard<std::recursive_mutex> _lock(m_mutex);
// do not allow this way of removing for groups in the ADS // do not allow this way of removing for groups in the ADS
if (!name().empty()) { if (!this->getName().empty()) {
throw std::runtime_error( throw std::runtime_error(
"AnalysisDataService must be used to remove a workspace from group."); "AnalysisDataService must be used to remove a workspace from group.");
} }
...@@ -339,7 +339,7 @@ bool WorkspaceGroup::areNamesSimilar() const { ...@@ -339,7 +339,7 @@ bool WorkspaceGroup::areNamesSimilar() const {
// Check all the members are of similar names // Check all the members are of similar names
for (const auto &workspace : m_workspaces) { for (const auto &workspace : m_workspaces) {
const std::string wsName = (*workspace).name(); const std::string &wsName = workspace->getName();
// Find the last underscore _ // Find the last underscore _
std::size_t pos = wsName.find_last_of('_'); std::size_t pos = wsName.find_last_of('_');
// No underscore = not similar // No underscore = not similar
...@@ -348,7 +348,7 @@ bool WorkspaceGroup::areNamesSimilar() const { ...@@ -348,7 +348,7 @@ bool WorkspaceGroup::areNamesSimilar() const {
// The part before the underscore has to be the same // The part before the underscore has to be the same
// as the group name to be similar // as the group name to be similar
std::string commonpart(wsName.substr(0, pos)); std::string commonpart(wsName.substr(0, pos));
if (this->name() != commonpart) if (this->getName() != commonpart)
return false; return false;
} }
return true; return true;
......
...@@ -577,7 +577,7 @@ public: ...@@ -577,7 +577,7 @@ public:
WorkspaceGroup_sptr group = WorkspaceGroup_sptr group =
boost::dynamic_pointer_cast<WorkspaceGroup>(out1); boost::dynamic_pointer_cast<WorkspaceGroup>(out1);
TS_ASSERT_EQUALS(group->name(), "D") TS_ASSERT_EQUALS(group->getName(), "D")
TS_ASSERT_EQUALS(group->getNumberOfEntries(), expectedNumber) TS_ASSERT_EQUALS(group->getNumberOfEntries(), expectedNumber)
if (group->getNumberOfEntries() < 1) if (group->getNumberOfEntries() < 1)
return group; return group;
...@@ -603,12 +603,12 @@ public: ...@@ -603,12 +603,12 @@ public:
WorkspaceGroup_sptr group = do_test_groups( 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"); "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->getTitle(), "A_1+B_1+C_1");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234); 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(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"); TS_ASSERT_EQUALS(ws3->getTitle(), "A_3+B_3+C_3");
} }
...@@ -617,12 +617,12 @@ public: ...@@ -617,12 +617,12 @@ public:
WorkspaceGroup_sptr group = do_test_groups( WorkspaceGroup_sptr group = do_test_groups(
"A", "A_1,A_2,A_3", "B", "B_1,B_2,B_3", "C", "alice,bob,charlie"); "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->getTitle(), "A_1+B_1+alice");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234); 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(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"); TS_ASSERT_EQUALS(ws3->getTitle(), "A_3+B_3+charlie");
} }
...@@ -631,12 +631,12 @@ public: ...@@ -631,12 +631,12 @@ public:
WorkspaceGroup_sptr group = WorkspaceGroup_sptr group =
do_test_groups("A", "A_1,A_2,A_3", "B", "", "C", ""); 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->getTitle(), "A_1+B+C");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234); 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(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"); TS_ASSERT_EQUALS(ws3->getTitle(), "A_3+B+C");
} }
...@@ -645,12 +645,12 @@ public: ...@@ -645,12 +645,12 @@ public:
WorkspaceGroup_sptr group = WorkspaceGroup_sptr group =
do_test_groups("A", "A_1,A_2,A_3", "B", "", "", ""); 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->getTitle(), "A_1+B+");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234); 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(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+"); TS_ASSERT_EQUALS(ws3->getTitle(), "A_3+B+");
} }
...@@ -659,12 +659,12 @@ public: ...@@ -659,12 +659,12 @@ public:
WorkspaceGroup_sptr group = WorkspaceGroup_sptr group =
do_test_groups("A", "A_1,A_2,A_3", "", "", "C", "C_1,C_2,C_3"); 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->getTitle(), "A_1++C_1");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234); 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(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"); TS_ASSERT_EQUALS(ws3->getTitle(), "A_3++C_3");
} }
...@@ -673,7 +673,7 @@ public: ...@@ -673,7 +673,7 @@ public:
WorkspaceGroup_sptr group = WorkspaceGroup_sptr group =
do_test_groups("A", "A_1", "B", "", "C", "", false, 1); 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->getTitle(), "A_1+B+C");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234); TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
} }
...@@ -683,7 +683,7 @@ public: ...@@ -683,7 +683,7 @@ public:
WorkspaceGroup_sptr group = WorkspaceGroup_sptr group =
do_test_groups("A", "A_1", "B", "B_1", "C", "", false, 1); 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->getTitle(), "A_1+B_1+C");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234); TS_ASSERT_EQUALS(ws1->readY(0)[0], 234);
} }
...@@ -715,12 +715,12 @@ public: ...@@ -715,12 +715,12 @@ public:
WorkspaceGroup_sptr group = WorkspaceGroup_sptr group =
do_test_groups("D", "D1,D2,D3", "B", "B1,B2,B3", "C", "C1,C2,C3"); 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->getTitle(), "D1+B1+C1");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234); 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(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"); TS_ASSERT_EQUALS(ws3->getTitle(), "D3+B3+C3");
} }
...@@ -730,12 +730,12 @@ public: ...@@ -730,12 +730,12 @@ public:
WorkspaceGroup_sptr group = WorkspaceGroup_sptr group =
do_test_groups("A", "A1,A2,A3", "D", "D1,D2,D3", "C", "C1,C2,C3"); 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->getTitle(), "A1+D1+C1");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234); 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(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"); TS_ASSERT_EQUALS(ws3->getTitle(), "A3+D3+C3");
} }
...@@ -745,12 +745,12 @@ public: ...@@ -745,12 +745,12 @@ public:
WorkspaceGroup_sptr group = WorkspaceGroup_sptr group =
do_test_groups("A", "A1,A2,A3", "D", "D1,D2,D3", "D", "D1,D2,D3"); 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->getTitle(), "A1+D1+D1");
TS_ASSERT_EQUALS(ws1->readY(0)[0], 234); 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");