Commit 5f008949 authored by Owen Arnold's avatar Owen Arnold
Browse files

refs #11868. Complete move

parent eb707112
...@@ -17,6 +17,7 @@ DECLARE_ALGORITHM(IndexSXPeaks) ...@@ -17,6 +17,7 @@ DECLARE_ALGORITHM(IndexSXPeaks)
using namespace Geometry; using namespace Geometry;
using namespace API; using namespace API;
using namespace Kernel;
/** Initialisation method. /** Initialisation method.
* *
......
...@@ -839,7 +839,7 @@ void IntegratePeakTimeSlices::FindPlane(V3D &center, V3D &xvec, V3D &yvec, ...@@ -839,7 +839,7 @@ void IntegratePeakTimeSlices::FindPlane(V3D &center, V3D &xvec, V3D &yvec,
double &ROW, double &COL, int &NROWS, double &ROW, double &COL, int &NROWS,
int &NCOLS, double &pixWidthx, int &NCOLS, double &pixWidthx,
double &pixHeighty, double &pixHeighty,
API::IPeak const &peak) const { Geometry::IPeak const &peak) const {
NROWS = NCOLS = -1; NROWS = NCOLS = -1;
IDetector_const_sptr det = peak.getDetector(); IDetector_const_sptr det = peak.getDetector();
......
...@@ -26,6 +26,7 @@ using Mantid::Geometry::IndexingUtils; ...@@ -26,6 +26,7 @@ using Mantid::Geometry::IndexingUtils;
using Mantid::Geometry::Instrument; using Mantid::Geometry::Instrument;
using Mantid::Geometry::Instrument_const_sptr; using Mantid::Geometry::Instrument_const_sptr;
using Mantid::Geometry::ParameterMap; using Mantid::Geometry::ParameterMap;
using namespace Mantid::Geometry;
namespace Mantid { namespace Mantid {
......
...@@ -308,7 +308,7 @@ int PeakIntegration::fitneighbours(int ipeak, std::string det_name, int x0, ...@@ -308,7 +308,7 @@ int PeakIntegration::fitneighbours(int ipeak, std::string det_name, int x0,
UNUSED_ARG(det_name); UNUSED_ARG(det_name);
UNUSED_ARG(x0); UNUSED_ARG(x0);
UNUSED_ARG(y0); UNUSED_ARG(y0);
API::IPeak &peak = Peaks->getPeak(ipeak); Geometry::IPeak &peak = Peaks->getPeak(ipeak);
// Number of slices // Number of slices
int TOFmax = 0; int TOFmax = 0;
......
...@@ -122,7 +122,7 @@ SCDCalibratePanels::calcWorkspace(DataObjects::PeaksWorkspace_sptr &pwks, ...@@ -122,7 +122,7 @@ SCDCalibratePanels::calcWorkspace(DataObjects::PeaksWorkspace_sptr &pwks,
for (size_t k = 0; k < bankNames.size(); ++k) { for (size_t k = 0; k < bankNames.size(); ++k) {
for (int j = 0; j < pwks->getNumberPeaks(); ++j) { for (int j = 0; j < pwks->getNumberPeaks(); ++j) {
const API::IPeak &peak = pwks->getPeak((int)j); const Geometry::IPeak &peak = pwks->getPeak((int)j);
if (std::find(bankNames.begin(), bankNames.end(), peak.getBankName()) != if (std::find(bankNames.begin(), bankNames.end(), peak.getBankName()) !=
bankNames.end()) bankNames.end())
if (IndexingUtils::ValidIndex(peak.getHKL(), tolerance)) { if (IndexingUtils::ValidIndex(peak.getHKL(), tolerance)) {
...@@ -978,7 +978,7 @@ void SCDCalibratePanels::exec() { ...@@ -978,7 +978,7 @@ void SCDCalibratePanels::exec() {
int BankNumDef = 200; int BankNumDef = 200;
for (size_t q = 0; q < nData; q += 3) { for (size_t q = 0; q < nData; q += 3) {
int pk = (int)xVals[q]; int pk = (int)xVals[q];
const API::IPeak &peak = peaksWs->getPeak(pk); const Geometry::IPeak &peak = peaksWs->getPeak(pk);
string bankName = peak.getBankName(); string bankName = peak.getBankName();
size_t pos = bankName.find_last_not_of("0123456789"); size_t pos = bankName.find_last_not_of("0123456789");
......
...@@ -1206,7 +1206,7 @@ SCDPanelErrors::calcWorkspace(DataObjects::PeaksWorkspace_sptr &pwks, ...@@ -1206,7 +1206,7 @@ SCDPanelErrors::calcWorkspace(DataObjects::PeaksWorkspace_sptr &pwks,
for (size_t k = 0; k < bankNames.size(); ++k) for (size_t k = 0; k < bankNames.size(); ++k)
for (size_t j = 0; j < pwks->rowCount(); ++j) { for (size_t j = 0; j < pwks->rowCount(); ++j) {
API::IPeak &peak = pwks->getPeak((int)j); Geometry::IPeak &peak = pwks->getPeak((int)j);
if (peak.getBankName().compare(bankNames[k]) == 0) if (peak.getBankName().compare(bankNames[k]) == 0)
if (peak.getH() != 0 || peak.getK() != 0 || peak.getL() != 0) if (peak.getH() != 0 || peak.getK() != 0 || peak.getL() != 0)
if (peak.getH() - floor(peak.getH()) < tolerance || if (peak.getH() - floor(peak.getH()) < tolerance ||
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "MantidTestHelpers/ComponentCreationHelper.h" #include "MantidTestHelpers/ComponentCreationHelper.h"
using Mantid::Crystal::AddPeakHKL; using Mantid::Crystal::AddPeakHKL;
using Mantid::Geometry::IPeak;
using namespace Mantid::Kernel; using namespace Mantid::Kernel;
using namespace Mantid::API; using namespace Mantid::API;
using namespace Mantid::DataObjects; using namespace Mantid::DataObjects;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <cxxtest/TestSuite.h> #include <cxxtest/TestSuite.h>
#include "MantidTestHelpers/WorkspaceCreationHelper.h" #include "MantidTestHelpers/WorkspaceCreationHelper.h"
#include "MantidCrystal/FindSXPeaks.h" #include "MantidCrystal/FindSXPeaks.h"
#include "MantidAPI/IPeak.h" #include "MantidGeometry/Crystal/IPeak.h"
using namespace Mantid::API; using namespace Mantid::API;
using namespace Mantid::Crystal; using namespace Mantid::Crystal;
......
...@@ -8,10 +8,11 @@ ...@@ -8,10 +8,11 @@
#include "MantidCrystal/IndexSXPeaks.h" #include "MantidCrystal/IndexSXPeaks.h"
#include "MantidCrystal/LoadIsawPeaks.h" #include "MantidCrystal/LoadIsawPeaks.h"
#include "MantidCrystal/LoadIsawUB.h" #include "MantidCrystal/LoadIsawUB.h"
#include "MantidAPI/IPeak.h" #include "MantidGeometry/Crystal/IPeak.h"
#include <cmath> #include <cmath>
using namespace Mantid::API; using namespace Mantid::API;
using namespace Mantid::Geometry;
using namespace Mantid::Crystal; using namespace Mantid::Crystal;
using namespace Mantid::DataObjects; using namespace Mantid::DataObjects;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "MantidAPI/FrameworkManager.h" #include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/AnalysisDataService.h" #include "MantidAPI/AnalysisDataService.h"
#include "MantidKernel/Unit.h" #include "MantidKernel/Unit.h"
#include "MantidAPI/IPeak.h" #include "MantidGeometry/Crystal/IPeak.h"
#include <math.h> #include <math.h>
#include <map> #include <map>
......
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
for (int i = 0; i < peaks1->getNumberPeaks(); ++i) for (int i = 0; i < peaks1->getNumberPeaks(); ++i)
if (peaks1->getPeak(i).getRunNumber() == 5638) if (peaks1->getPeak(i).getRunNumber() == 5638)
{ {
API::IPeak& peak = peaks1->getPeak(i); Geometry::IPeak& peak = peaks1->getPeak(i);
if (Gon == ZMat) if (Gon == ZMat)
{ {
origGon5638 = peak.getGoniometerMatrix(); origGon5638 = peak.getGoniometerMatrix();
...@@ -160,7 +160,7 @@ public: ...@@ -160,7 +160,7 @@ public:
for (int i = 0; i < peaks1->getNumberPeaks(); ++i) for (int i = 0; i < peaks1->getNumberPeaks(); ++i)
{ {
API::IPeak & peak = peaks1->getPeak(i); Geometry::IPeak & peak = peaks1->getPeak(i);
int RunNum = peak.getRunNumber(); int RunNum = peak.getRunNumber();
Kernel::Matrix<double> GG; Kernel::Matrix<double> GG;
...@@ -234,7 +234,7 @@ public: ...@@ -234,7 +234,7 @@ public:
void test_SamplePosition() void test_SamplePosition()
{ {
init(); init();
API::IPeak & peak = peaks1->getPeak(0); Geometry::IPeak & peak = peaks1->getPeak(0);
boost::shared_ptr<const Geometry::Instrument> Inst = peak.getInstrument(); boost::shared_ptr<const Geometry::Instrument> Inst = peak.getInstrument();
Kernel::V3D SampPos(.0003, -.00025, .00015); Kernel::V3D SampPos(.0003, -.00025, .00015);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "MantidAPI/FrameworkManager.h" #include "MantidAPI/FrameworkManager.h"
#include "MantidAPI/IMDHistoWorkspace.h" #include "MantidAPI/IMDHistoWorkspace.h"
#include "MantidAPI/IPeaksWorkspace.h" #include "MantidAPI/IPeaksWorkspace.h"
#include "MantidAPI/IPeak.h" #include "MantidGeometry/Crystal/IPeak.h"
#include "MantidDataObjects/PeaksWorkspace.h" #include "MantidDataObjects/PeaksWorkspace.h"
#include "MantidTestHelpers/MDEventsTestHelper.h" #include "MantidTestHelpers/MDEventsTestHelper.h"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "MantidCrystal/SCDPanelErrors.h" #include "MantidCrystal/SCDPanelErrors.h"
#include "MantidDataObjects/PeaksWorkspace.h" #include "MantidDataObjects/PeaksWorkspace.h"
#include "MantidDataObjects/Workspace2D.h" #include "MantidDataObjects/Workspace2D.h"
#include "MantidAPI/IPeak.h" #include "MantidGeometry/Crystal/IPeak.h"
#include "MantidGeometry/Instrument/RectangularDetector.h" #include "MantidGeometry/Instrument/RectangularDetector.h"
#include "MantidCrystal/SCDPanelErrors.h" #include "MantidCrystal/SCDPanelErrors.h"
#include "MantidGeometry/Instrument.h" #include "MantidGeometry/Instrument.h"
......
...@@ -99,7 +99,7 @@ public: ...@@ -99,7 +99,7 @@ public:
p.setRunNumber(1234); p.setRunNumber(1234);
p.addContributingDetID(10103); p.addContributingDetID(10103);
const Mantid::API::IPeak & ipeak = p; const Mantid::Geometry::IPeak & ipeak = p;
Peak p2(ipeak); Peak p2(ipeak);
TS_ASSERT_EQUALS(p.getRow(), p2.getRow()); TS_ASSERT_EQUALS(p.getRow(), p2.getRow());
TS_ASSERT_EQUALS(p.getCol(), p2.getCol()); TS_ASSERT_EQUALS(p.getCol(), p2.getCol());
......
...@@ -272,7 +272,7 @@ public: ...@@ -272,7 +272,7 @@ public:
{ {
auto pw = buildPW(); // 1 peaks each with single detector auto pw = buildPW(); // 1 peaks each with single detector
// Add a detector to the peak // Add a detector to the peak
Mantid::API::IPeak & ipeak = pw->getPeak(0); Mantid::Geometry::IPeak & ipeak = pw->getPeak(0);
auto & peak = static_cast<Peak&>(ipeak); auto & peak = static_cast<Peak&>(ipeak);
peak.addContributingDetID(2); peak.addContributingDetID(2);
peak.addContributingDetID(3); peak.addContributingDetID(3);
...@@ -299,10 +299,10 @@ public: ...@@ -299,10 +299,10 @@ public:
auto pw = createSaveTestPeaksWorkspace(); // 5 peaks each with single detector auto pw = createSaveTestPeaksWorkspace(); // 5 peaks each with single detector
// Add some detectors // Add some detectors
Mantid::API::IPeak & ipeak3 = pw->getPeak(2); Mantid::Geometry::IPeak & ipeak3 = pw->getPeak(2);
auto & peak3 = static_cast<Peak&>(ipeak3); auto & peak3 = static_cast<Peak&>(ipeak3);
peak3.addContributingDetID(11); peak3.addContributingDetID(11);
Mantid::API::IPeak & ipeak5 = pw->getPeak(4); Mantid::Geometry::IPeak & ipeak5 = pw->getPeak(4);
auto & peak5 = static_cast<Peak&>(ipeak5); auto & peak5 = static_cast<Peak&>(ipeak5);
peak5.addContributingDetID(51); peak5.addContributingDetID(51);
peak5.addContributingDetID(52); peak5.addContributingDetID(52);
......
...@@ -126,7 +126,7 @@ void PeakMarker2D::drawSquare(QPainter& painter)const ...@@ -126,7 +126,7 @@ void PeakMarker2D::drawSquare(QPainter& painter)const
/** /**
* Save some peak information. * Save some peak information.
*/ */
void PeakMarker2D::setPeak(const Mantid::API::IPeak& peak, int row) void PeakMarker2D::setPeak(const Mantid::Geometry::IPeak& peak, int row)
{ {
m_h = peak.getH(); m_h = peak.getH();
m_k = peak.getK(); m_k = peak.getK();
...@@ -139,7 +139,7 @@ void PeakMarker2D::setPeak(const Mantid::API::IPeak& peak, int row) ...@@ -139,7 +139,7 @@ void PeakMarker2D::setPeak(const Mantid::API::IPeak& peak, int row)
/** /**
* Return reference to the peak. * Return reference to the peak.
*/ */
const Mantid::API::IPeak& PeakMarker2D::getPeak() const const Mantid::Geometry::IPeak& PeakMarker2D::getPeak() const
{ {
return m_peakOverlay.getPeak(m_row); return m_peakOverlay.getPeak(m_row);
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define MANTIDPLOT_PEAKMARKER2D_H_ #define MANTIDPLOT_PEAKMARKER2D_H_
#include "Shape2D.h" #include "Shape2D.h"
#include "MantidAPI/IPeak.h" #include "MantidGeometry/Crystal/IPeak.h"
class PeakOverlay; class PeakOverlay;
...@@ -38,8 +38,8 @@ public: ...@@ -38,8 +38,8 @@ public:
Symbol getSymbol()const{return m_symbol;} Symbol getSymbol()const{return m_symbol;}
void setSymbol(Symbol s){m_symbol=s;} void setSymbol(Symbol s){m_symbol=s;}
Style getStyle() const; Style getStyle() const;
void setPeak(const Mantid::API::IPeak& peak, int row = -1); void setPeak(const Mantid::Geometry::IPeak& peak, int row = -1);
const Mantid::API::IPeak& getPeak() const; const Mantid::Geometry::IPeak& getPeak() const;
double getH()const{return m_h;} double getH()const{return m_h;}
double getK()const{return m_k;} double getK()const{return m_k;}
double getL()const{return m_l;} double getL()const{return m_l;}
......
...@@ -192,7 +192,7 @@ void PeakOverlay::createMarkers(const PeakMarker2D::Style& style) ...@@ -192,7 +192,7 @@ void PeakOverlay::createMarkers(const PeakMarker2D::Style& style)
this->clear(); this->clear();
for(int i = 0; i < nPeaks; ++i) for(int i = 0; i < nPeaks; ++i)
{ {
Mantid::API::IPeak& peak = getPeak(i); Mantid::Geometry::IPeak& peak = getPeak(i);
const Mantid::Kernel::V3D & pos = peak.getDetPos(); const Mantid::Kernel::V3D & pos = peak.getDetPos();
// Project the peak (detector) position onto u,v coords // Project the peak (detector) position onto u,v coords
double u,v, uscale, vscale; double u,v, uscale, vscale;
...@@ -288,7 +288,7 @@ int PeakOverlay::getNumberPeaks()const ...@@ -288,7 +288,7 @@ int PeakOverlay::getNumberPeaks()const
* @param i :: Peak index. * @param i :: Peak index.
* @return A reference to the peak. * @return A reference to the peak.
*/ */
Mantid::API::IPeak& PeakOverlay::getPeak(int i) Mantid::Geometry::IPeak& PeakOverlay::getPeak(int i)
{ {
return m_peaksWorkspace->getPeak(i); return m_peaksWorkspace->getPeak(i);
} }
...@@ -345,7 +345,7 @@ void PeakOverlay::setPeakVisibility(double xmin, double xmax, QString units) ...@@ -345,7 +345,7 @@ void PeakOverlay::setPeakVisibility(double xmin, double xmax, QString units)
{ {
PeakMarker2D* marker = dynamic_cast<PeakMarker2D*>(shape); PeakMarker2D* marker = dynamic_cast<PeakMarker2D*>(shape);
if (!marker) continue; if (!marker) continue;
Mantid::API::IPeak& peak = getPeak(marker->getRow()); Mantid::Geometry::IPeak& peak = getPeak(marker->getRow());
double x = 0.0; double x = 0.0;
switch (xUnits) switch (xUnits)
{ {
......
...@@ -65,7 +65,7 @@ public: ...@@ -65,7 +65,7 @@ public:
void addMarker(PeakMarker2D* m); void addMarker(PeakMarker2D* m);
QList<PeakMarker2D*> getMarkersWithID(int detID)const; QList<PeakMarker2D*> getMarkersWithID(int detID)const;
int getNumberPeaks()const; int getNumberPeaks()const;
Mantid::API::IPeak& getPeak(int); Mantid::Geometry::IPeak& getPeak(int);
/// Return PeaksWorkspace associated with this overlay. /// Return PeaksWorkspace associated with this overlay.
boost::shared_ptr<Mantid::API::IPeaksWorkspace> getPeaksWorkspace() {return m_peaksWorkspace;} boost::shared_ptr<Mantid::API::IPeaksWorkspace> getPeaksWorkspace() {return m_peaksWorkspace;}
/// set HKL precision /// set HKL precision
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "MantidAPI/IEventWorkspace.h" #include "MantidAPI/IEventWorkspace.h"
#include "MantidAPI/IMDWorkspace.h" #include "MantidAPI/IMDWorkspace.h"
#include "MantidAPI/IPeaksWorkspace.h" #include "MantidAPI/IPeaksWorkspace.h"
#include "MantidAPI/IPeak.h" #include "MantidGeometry/Crystal/IPeak.h"
#include "MantidGeometry/Crystal/OrientedLattice.h" #include "MantidGeometry/Crystal/OrientedLattice.h"
#include "MantidKernel/EmptyValues.h" #include "MantidKernel/EmptyValues.h"
#include "MantidKernel/Logger.h" #include "MantidKernel/Logger.h"
...@@ -20,6 +20,7 @@ namespace CustomInterfaces ...@@ -20,6 +20,7 @@ namespace CustomInterfaces
{ {
using namespace Mantid::Kernel; using namespace Mantid::Kernel;
using namespace Mantid::Geometry;
using namespace Mantid::API; using namespace Mantid::API;
namespace namespace
...@@ -306,7 +307,7 @@ bool MantidEVWorker::findPeaks( const std::string & ev_ws_name, ...@@ -306,7 +307,7 @@ bool MantidEVWorker::findPeaks( const std::string & ev_ws_name,
IPeaksWorkspace_sptr peaks_ws = ADS.retrieveWS<IPeaksWorkspace>(peaks_ws_name); IPeaksWorkspace_sptr peaks_ws = ADS.retrieveWS<IPeaksWorkspace>(peaks_ws_name);
for (int iPeak=0; iPeak < peaks_ws->getNumberPeaks(); iPeak++) for (int iPeak=0; iPeak < peaks_ws->getNumberPeaks(); iPeak++)
{ {
Mantid::API::IPeak& peak = peaks_ws->getPeak( iPeak); Mantid::Geometry::IPeak& peak = peaks_ws->getPeak( iPeak);
if (use_monitor_counts) if (use_monitor_counts)
peak.setMonitorCount( monitor_count ); peak.setMonitorCount( monitor_count );
else else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment