Skip to content

Commit

Permalink
Refs #10702. Using PointGroupFactory in PoldiPeakCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wedel committed Apr 23, 2015
1 parent de84c52 commit 0521e7c
Showing 1 changed file with 4 additions and 6 deletions.
Expand Up @@ -2,6 +2,7 @@
#include "MantidAPI/TableRow.h"
#include "MantidAPI/WorkspaceFactory.h"
#include "MantidAPI/LogManager.h"
#include "MantidGeometry/Crystal/PointGroupFactory.h"
#include "boost/format.hpp"
#include "boost/algorithm/string/join.hpp"

Expand Down Expand Up @@ -271,19 +272,16 @@ PoldiPeakCollection::intensityTypeFromString(std::string typeString) const {
std::string PoldiPeakCollection::pointGroupToString(
const PointGroup_sptr &pointGroup) const {
if (pointGroup) {
return pointGroup->getName();
return pointGroup->getSymbol();
}

return "";
}

PointGroup_sptr PoldiPeakCollection::pointGroupFromString(
const std::string &pointGroupString) const {
std::vector<PointGroup_sptr> allPointGroups = getAllPointGroups();
for (auto it = allPointGroups.begin(); it != allPointGroups.end(); ++it) {
if ((*it)->getName() == pointGroupString) {
return *it;
}
if (PointGroupFactory::Instance().isSubscribed(pointGroupString)) {
return PointGroupFactory::Instance().createPointGroup(pointGroupString);
}

return PointGroup_sptr();
Expand Down

0 comments on commit 0521e7c

Please sign in to comment.