diff --git a/Code/Mantid/Framework/API/CMakeLists.txt b/Code/Mantid/Framework/API/CMakeLists.txt index 9db3514d3b5a..7fc20591275c 100644 --- a/Code/Mantid/Framework/API/CMakeLists.txt +++ b/Code/Mantid/Framework/API/CMakeLists.txt @@ -63,7 +63,6 @@ set ( SRC_FILES src/IMDIterator.cpp src/IMDWorkspace.cpp src/IPawleyFunction.cpp - src/IPeak.cpp src/IPeakFunction.cpp src/IPeaksWorkspace.cpp src/IPowderDiffPeakFunction.cpp @@ -99,11 +98,6 @@ set ( SRC_FILES src/ParameterReference.cpp src/ParameterTie.cpp src/PeakFunctionIntegrator.cpp - src/PeakTransform.cpp - src/PeakTransformHKL.cpp - src/PeakTransformQLab.cpp - src/PeakTransformQSample.cpp - src/PeakTransformSelector.cpp src/Progress.cpp src/Projection.cpp src/PropertyManagerDataService.cpp @@ -165,7 +159,6 @@ set ( INC_FILES inc/MantidAPI/CompositeDomain.h inc/MantidAPI/CompositeDomainMD.h inc/MantidAPI/CompositeFunction.h - inc/MantidAPI/ConcretePeakTransformFactory.h inc/MantidAPI/ConstraintFactory.h inc/MantidAPI/CoordTransform.h inc/MantidAPI/CostFunctionFactory.h @@ -223,7 +216,6 @@ set ( INC_FILES inc/MantidAPI/IMDWorkspace.h inc/MantidAPI/IMaskWorkspace.h inc/MantidAPI/IPawleyFunction.h - inc/MantidAPI/IPeak.h inc/MantidAPI/IPeakFunction.h inc/MantidAPI/IPeaksWorkspace.h inc/MantidAPI/IPowderDiffPeakFunction.h @@ -267,12 +259,6 @@ set ( INC_FILES inc/MantidAPI/ParameterReference.h inc/MantidAPI/ParameterTie.h inc/MantidAPI/PeakFunctionIntegrator.h - inc/MantidAPI/PeakTransform.h - inc/MantidAPI/PeakTransformFactory.h - inc/MantidAPI/PeakTransformHKL.h - inc/MantidAPI/PeakTransformQLab.h - inc/MantidAPI/PeakTransformQSample.h - inc/MantidAPI/PeakTransformSelector.h inc/MantidAPI/Progress.h inc/MantidAPI/Projection.h inc/MantidAPI/PropertyManagerDataService.h @@ -370,10 +356,6 @@ set ( TEST_FILES ParameterReferenceTest.h ParameterTieTest.h PeakFunctionIntegratorTest.h - PeakTransformHKLTest.h - PeakTransformQLabTest.h - PeakTransformQSampleTest.h - PeakTransformSelectorTest.h ProjectionTest.h PropertyManagerDataServiceTest.h PropertyNexusTest.h diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/IPeaksWorkspace.h b/Code/Mantid/Framework/API/inc/MantidAPI/IPeaksWorkspace.h index 03e115047abb..cac84d3aa784 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/IPeaksWorkspace.h +++ b/Code/Mantid/Framework/API/inc/MantidAPI/IPeaksWorkspace.h @@ -1,5 +1,5 @@ #ifndef MANTID_API_IPEAKSPACE_H_ -#define MANTID_API_IPEAKSPACE_H_ 1 +#define MANTID_API_IPEAKSPACE_H_ //---------------------------------------------------------------------- // Includes @@ -10,9 +10,11 @@ #include namespace Mantid { - -namespace API { +namespace Geometry { class IPeak; +} +namespace API { + //========================================================================================== /** Interface to the class Mantid::DataObjects::PeaksWorkspace @@ -70,28 +72,28 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace, /** Add a peak to the list * @param ipeak :: Peak object to add (copy) into this. */ - virtual void addPeak(const IPeak &ipeak) = 0; + virtual void addPeak(const Mantid::Geometry::IPeak &ipeak) = 0; //--------------------------------------------------------------------------------------------- /** Return a reference to the Peak * @param peakNum :: index of the peak to get. * @return a reference to a Peak object. */ - virtual IPeak &getPeak(int peakNum) = 0; + virtual Mantid::Geometry::IPeak &getPeak(int peakNum) = 0; //--------------------------------------------------------------------------------------------- /** Return a reference to the Peak (const version) * @param peakNum :: index of the peak to get. * @return a reference to a Peak object. */ - virtual const IPeak &getPeak(int peakNum) const = 0; + virtual const Mantid::Geometry::IPeak &getPeak(int peakNum) const = 0; //--------------------------------------------------------------------------------------------- /** Return a pointer to the Peak * @param peakNum :: index of the peak to get. * @return a pointer to a Peak object. */ - IPeak *getPeakPtr(const int peakNum) { return &this->getPeak(peakNum); } + Mantid::Geometry::IPeak *getPeakPtr(const int peakNum) { return &this->getPeak(peakNum); } //--------------------------------------------------------------------------------------------- /** Create an instance of a Peak @@ -101,7 +103,7 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace, * detector. Calculated if not provided. * @return a pointer to a new Peak object. */ - virtual IPeak *createPeak(Mantid::Kernel::V3D QLabFrame, + virtual Mantid::Geometry::IPeak *createPeak(Mantid::Kernel::V3D QLabFrame, boost::optional detectorDistance) const = 0; /** @@ -109,7 +111,7 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace, * @param HKL V3D * @return a pointer to a new Peak object. */ - virtual IPeak *createPeakHKL(Mantid::Kernel::V3D HKL) const = 0; + virtual Mantid::Geometry::IPeak *createPeakHKL(Mantid::Kernel::V3D HKL) const = 0; //--------------------------------------------------------------------------------------------- /** Determine if the workspace has been integrated using a peaks integration diff --git a/Code/Mantid/Framework/Algorithms/src/AddPeak.cpp b/Code/Mantid/Framework/Algorithms/src/AddPeak.cpp index c4a39ac8ebb8..c525e93bbc02 100644 --- a/Code/Mantid/Framework/Algorithms/src/AddPeak.cpp +++ b/Code/Mantid/Framework/Algorithms/src/AddPeak.cpp @@ -1,7 +1,7 @@ #include "MantidAlgorithms/AddPeak.h" #include "MantidKernel/System.h" #include "MantidAPI/IPeaksWorkspace.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidAPI/MatrixWorkspace.h" using namespace Mantid::PhysicalConstants; @@ -112,7 +112,7 @@ void AddPeak::exec() { Qy *= knorm; Qz *= knorm; - Mantid::API::IPeak *peak = + Mantid::Geometry::IPeak *peak = peaksWS->createPeak(Mantid::Kernel::V3D(Qx, Qy, Qz), l2); peak->setDetectorID(detID); peak->setGoniometerMatrix(runWS->run().getGoniometer().getR()); diff --git a/Code/Mantid/Framework/Algorithms/src/CheckWorkspacesMatch.cpp b/Code/Mantid/Framework/Algorithms/src/CheckWorkspacesMatch.cpp index 7f7c4cbec7d0..b55b520a6f84 100644 --- a/Code/Mantid/Framework/Algorithms/src/CheckWorkspacesMatch.cpp +++ b/Code/Mantid/Framework/Algorithms/src/CheckWorkspacesMatch.cpp @@ -1,12 +1,13 @@ //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- +#include "MantidGeometry/Crystal/IPeak.h" + #include "MantidAlgorithms/CheckWorkspacesMatch.h" #include "MantidAPI/IMDWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/IMDHistoWorkspace.h" #include "MantidAPI/WorkspaceGroup.h" -#include "MantidAPI/IPeak.h" #include "MantidAPI/NumericAxis.h" #include "MantidAPI/TableRow.h" #include "MantidDataObjects/EventWorkspace.h" diff --git a/Code/Mantid/Framework/Crystal/inc/MantidCrystal/IntegratePeakTimeSlices.h b/Code/Mantid/Framework/Crystal/inc/MantidCrystal/IntegratePeakTimeSlices.h index 5666d4cb9395..72b587a4221d 100644 --- a/Code/Mantid/Framework/Crystal/inc/MantidCrystal/IntegratePeakTimeSlices.h +++ b/Code/Mantid/Framework/Crystal/inc/MantidCrystal/IntegratePeakTimeSlices.h @@ -8,7 +8,7 @@ #define INTEGRATEPEAKTIMESLICES_H_ #include "MantidAPI/Algorithm.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidDataObjects/TableWorkspace.h" #include "MantidAPI/ITableWorkspace.h" #include "MantidAPI/MatrixWorkspace.h" @@ -287,11 +287,11 @@ class DLLExport IntegratePeakTimeSlices : public Mantid::API::Algorithm { bool getNeighborPixIDs(boost::shared_ptr comp, Kernel::V3D &Center, double &Radius, int *&ArryofID); - int CalculateTimeChannelSpan(API::IPeak const &peak, const double dQ, + int CalculateTimeChannelSpan(Geometry::IPeak const &peak, const double dQ, Mantid::MantidVec const &X, const int specNum, int &Centerchan); - double CalculatePositionSpan(API::IPeak const &peak, const double dQ); + double CalculatePositionSpan(Geometry::IPeak const &peak, const double dQ); void InitializeColumnNamesInTableWorkspace( DataObjects::TableWorkspace_sptr &TabWS); @@ -354,7 +354,7 @@ class DLLExport IntegratePeakTimeSlices : public Mantid::API::Algorithm { void FindPlane(Kernel::V3D ¢er, Kernel::V3D &xvec, Kernel::V3D &yvec, double &ROW, double &COL, int &NROWS, int &NCOLS, double &pixWidthx, double &pixHeighty, - API::IPeak const &peak) const; + Geometry::IPeak const &peak) const; int find(Mantid::MantidVec const &X, const double time); diff --git a/Code/Mantid/Framework/Crystal/inc/MantidCrystal/PeakBackground.h b/Code/Mantid/Framework/Crystal/inc/MantidCrystal/PeakBackground.h index c25e7dcc33fb..168829fb768e 100644 --- a/Code/Mantid/Framework/Crystal/inc/MantidCrystal/PeakBackground.h +++ b/Code/Mantid/Framework/Crystal/inc/MantidCrystal/PeakBackground.h @@ -10,7 +10,7 @@ #include namespace Mantid { -namespace API { +namespace Geometry { class IPeak; } namespace Crystal { @@ -51,7 +51,7 @@ class DLLExport PeakBackground : public HardThresholdBackground { /// MD coordinates to use Mantid::Kernel::SpecialCoordinateSystem m_mdCoordinates; /// Pointer to member function used for coordinate determination. - boost::function + boost::function m_coordFunction; public: @@ -84,4 +84,4 @@ class DLLExport PeakBackground : public HardThresholdBackground { } // namespace Crystal } // namespace Mantid -#endif /* MANTID_CRYSTAL_PEAKBACKGROUND_H_ */ \ No newline at end of file +#endif /* MANTID_CRYSTAL_PEAKBACKGROUND_H_ */ diff --git a/Code/Mantid/Framework/Crystal/inc/MantidCrystal/PeakClusterProjection.h b/Code/Mantid/Framework/Crystal/inc/MantidCrystal/PeakClusterProjection.h index 776c92aeae42..ec0fe0dba8e9 100644 --- a/Code/Mantid/Framework/Crystal/inc/MantidCrystal/PeakClusterProjection.h +++ b/Code/Mantid/Framework/Crystal/inc/MantidCrystal/PeakClusterProjection.h @@ -7,11 +7,13 @@ #include namespace Mantid { -namespace API { +namespace Geometry{ class IPeak; +class PeakTransform; +} +namespace API { class IMDHistoWorkspace; class IMDEventWorkspace; -class PeakTransform; } namespace Crystal { @@ -51,11 +53,11 @@ class DLLExport PeakClusterProjection { boost::shared_ptr &mdWS); /// Get the signal value at the peak center Mantid::signal_t - signalAtPeakCenter(const Mantid::API::IPeak &peak, + signalAtPeakCenter(const Mantid::Geometry::IPeak &peak, Mantid::API::MDNormalization normalization = Mantid::API::NoNormalization) const; /// Get the peak center - Mantid::Kernel::V3D peakCenter(const Mantid::API::IPeak &peak) const; + Mantid::Kernel::V3D peakCenter(const Mantid::Geometry::IPeak &peak) const; /// Destructor virtual ~PeakClusterProjection(); @@ -68,7 +70,7 @@ class DLLExport PeakClusterProjection { boost::shared_ptr m_mdWS; /// Peak Transform - boost::shared_ptr m_peakTransform; + boost::shared_ptr m_peakTransform; }; } // namespace Crystal diff --git a/Code/Mantid/Framework/Crystal/inc/MantidCrystal/SCDPanelErrors.h b/Code/Mantid/Framework/Crystal/inc/MantidCrystal/SCDPanelErrors.h index 961b89b35c80..951f72955c40 100644 --- a/Code/Mantid/Framework/Crystal/inc/MantidCrystal/SCDPanelErrors.h +++ b/Code/Mantid/Framework/Crystal/inc/MantidCrystal/SCDPanelErrors.h @@ -134,7 +134,7 @@ class DLLExport SCDPanelErrors : public API::ParamFunction, * @return The new peak with the new instrument( adjusted with the *parameters) and time adjusted. */ - static DataObjects::Peak createNewPeak(const API::IPeak &peak_old, + static DataObjects::Peak createNewPeak(const Geometry::IPeak &peak_old, Geometry::Instrument_sptr instrNew, double T0, double L0); @@ -155,7 +155,7 @@ class DLLExport SCDPanelErrors : public API::ParamFunction, * * @return A new instrument with the parameters applied. */ - Geometry::Instrument_sptr getNewInstrument(const API::IPeak &peak) const; + Geometry::Instrument_sptr getNewInstrument(const Geometry::IPeak &peak) const; private: /** diff --git a/Code/Mantid/Framework/Crystal/src/AddPeakHKL.cpp b/Code/Mantid/Framework/Crystal/src/AddPeakHKL.cpp index 76ef41cf46b3..efae8e2cf2ca 100644 --- a/Code/Mantid/Framework/Crystal/src/AddPeakHKL.cpp +++ b/Code/Mantid/Framework/Crystal/src/AddPeakHKL.cpp @@ -1,6 +1,8 @@ #include "MantidCrystal/AddPeakHKL.h" + +#include "MantidGeometry/Crystal/IPeak.h" + #include "MantidAPI/IPeaksWorkspace.h" -#include "MantidAPI/IPeak.h" #include "MantidKernel/ArrayProperty.h" #include "MantidKernel/ArrayLengthValidator.h" @@ -62,7 +64,7 @@ namespace Crystal { IPeaksWorkspace_sptr peakWS = this->getProperty("Workspace"); const std::vector hklValue = this->getProperty("HKL"); - IPeak * peak = peakWS->createPeakHKL(V3D(hklValue[0], hklValue[1], hklValue[2])); + Mantid::Geometry::IPeak * peak = peakWS->createPeakHKL(V3D(hklValue[0], hklValue[1], hklValue[2])); peakWS->addPeak(*peak); delete peak; } diff --git a/Code/Mantid/Framework/Crystal/src/FilterPeaks.cpp b/Code/Mantid/Framework/Crystal/src/FilterPeaks.cpp index 86ff9a78ccc8..8e398c2b0de6 100644 --- a/Code/Mantid/Framework/Crystal/src/FilterPeaks.cpp +++ b/Code/Mantid/Framework/Crystal/src/FilterPeaks.cpp @@ -4,17 +4,17 @@ #include "MantidDataObjects/PeaksWorkspace.h" namespace { -double HKLSum(const Mantid::API::IPeak &p) { +double HKLSum(const Mantid::Geometry::IPeak &p) { return p.getH() + p.getK() + p.getL(); } -double HKL2(const Mantid::API::IPeak &p) { +double HKL2(const Mantid::Geometry::IPeak &p) { return p.getH() * p.getH() + p.getK() * p.getK() + p.getL() * p.getL(); } -double intensity(const Mantid::API::IPeak &p) { return p.getIntensity(); } +double intensity(const Mantid::Geometry::IPeak &p) { return p.getIntensity(); } -double SN(const Mantid::API::IPeak &p) { +double SN(const Mantid::Geometry::IPeak &p) { return p.getIntensity() / p.getSigmaIntensity(); } } @@ -89,7 +89,7 @@ void FilterPeaks::exec() { filteredWS->copyExperimentInfoFrom(inputWS.get()); const std::string FilterVariable = getProperty("FilterVariable"); - double (*filterFunction)(const Mantid::API::IPeak &) = 0; + double (*filterFunction)(const Mantid::Geometry::IPeak &) = 0; if (FilterVariable == "h+k+l") filterFunction = &HKLSum; else if (FilterVariable == "h^2+k^2+l^2") @@ -104,7 +104,7 @@ void FilterPeaks::exec() { for (int i = 0; i < inputWS->getNumberPeaks(); ++i) { bool pass(false); - const API::IPeak ¤tPeak = inputWS->getPeak(i); + const Geometry::IPeak ¤tPeak = inputWS->getPeak(i); const double currentValue = filterFunction(currentPeak); // filterFunction pointer set above diff --git a/Code/Mantid/Framework/Crystal/src/FindClusterFaces.cpp b/Code/Mantid/Framework/Crystal/src/FindClusterFaces.cpp index e1828c1f71b0..01d670084629 100644 --- a/Code/Mantid/Framework/Crystal/src/FindClusterFaces.cpp +++ b/Code/Mantid/Framework/Crystal/src/FindClusterFaces.cpp @@ -7,13 +7,14 @@ #include "MantidAPI/FrameworkManager.h" #include "MantidAPI/IMDIterator.h" #include "MantidAPI/IPeaksWorkspace.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidAPI/IMDHistoWorkspace.h" #include "MantidAPI/TableRow.h" #include "MantidCrystal/PeakClusterProjection.h" using namespace Mantid::Kernel; +using namespace Mantid::Geometry; using namespace Mantid::API; namespace { @@ -48,7 +49,7 @@ createOptionalLabelFilter(size_t dimensionality, int emptyLabelId, PeakClusterProjection projection(clusterImage); for (int i = 0; i < filterWorkspace->getNumberPeaks(); ++i) { - IPeak &peak = filterWorkspace->getPeak(i); + Mantid::Geometry::IPeak &peak = filterWorkspace->getPeak(i); const int labelIdAtPeakCenter = static_cast(projection.signalAtPeakCenter(peak)); if (labelIdAtPeakCenter > emptyLabelId) { diff --git a/Code/Mantid/Framework/Crystal/src/FindSXPeaks.cpp b/Code/Mantid/Framework/Crystal/src/FindSXPeaks.cpp index b1674def6eed..7bf1ddc63c0a 100644 --- a/Code/Mantid/Framework/Crystal/src/FindSXPeaks.cpp +++ b/Code/Mantid/Framework/Crystal/src/FindSXPeaks.cpp @@ -224,7 +224,7 @@ void FindSXPeaks::reducePeakList(const peakvector &pcv) { for (std::size_t i = 0; i < finalv.size(); i++) { finalv[i].reduce(); try { - IPeak *peak = m_peaks->createPeak(finalv[i].getQ()); + Geometry::IPeak *peak = m_peaks->createPeak(finalv[i].getQ()); if (peak) { peak->setIntensity(finalv[i].getIntensity()); peak->setDetectorID(finalv[i].getDetectorId()); diff --git a/Code/Mantid/Framework/Crystal/src/IndexSXPeaks.cpp b/Code/Mantid/Framework/Crystal/src/IndexSXPeaks.cpp index d89eef963dce..00cb0dd4f10e 100644 --- a/Code/Mantid/Framework/Crystal/src/IndexSXPeaks.cpp +++ b/Code/Mantid/Framework/Crystal/src/IndexSXPeaks.cpp @@ -5,7 +5,7 @@ #include "MantidAPI/WorkspaceValidators.h" #include "MantidKernel/VectorHelper.h" #include "MantidKernel/ArrayProperty.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidKernel/BoundedValidator.h" @@ -15,8 +15,9 @@ namespace Crystal { // Register the class into the algorithm factory DECLARE_ALGORITHM(IndexSXPeaks) -using namespace Kernel; +using namespace Geometry; using namespace API; +using namespace Kernel; /** Initialisation method. * diff --git a/Code/Mantid/Framework/Crystal/src/IntegratePeakTimeSlices.cpp b/Code/Mantid/Framework/Crystal/src/IntegratePeakTimeSlices.cpp index 5d8b881d25a0..8b1fe58be8eb 100644 --- a/Code/Mantid/Framework/Crystal/src/IntegratePeakTimeSlices.cpp +++ b/Code/Mantid/Framework/Crystal/src/IntegratePeakTimeSlices.cpp @@ -758,7 +758,7 @@ bool IntegratePeakTimeSlices::updateNeighbors( * NOTE: differentials of Q =mv*sin(scatAng/2)/2 were used to calculate this * Also s=r*theta was used to transfer d ScatAng to distance on a bank. */ -double IntegratePeakTimeSlices::CalculatePositionSpan(API::IPeak const &peak, +double IntegratePeakTimeSlices::CalculatePositionSpan(Geometry::IPeak const &peak, const double dQ) { try { @@ -802,7 +802,7 @@ double IntegratePeakTimeSlices::CalculatePositionSpan(API::IPeak const &peak, * @return The number of time channels around Centerchan to use */ int IntegratePeakTimeSlices::CalculateTimeChannelSpan( - API::IPeak const &peak, const double dQ, Mantid::MantidVec const &X, + Geometry::IPeak const &peak, const double dQ, Mantid::MantidVec const &X, const int specNum, int &Centerchan) { UNUSED_ARG(specNum); double Q = peak.getQLabFrame().norm(); // getQ( peak)/2/M_PI; @@ -845,7 +845,7 @@ void IntegratePeakTimeSlices::FindPlane(V3D ¢er, V3D &xvec, V3D &yvec, double &ROW, double &COL, int &NROWS, int &NCOLS, double &pixWidthx, double &pixHeighty, - API::IPeak const &peak) const { + Geometry::IPeak const &peak) const { NROWS = NCOLS = -1; IDetector_const_sptr det = peak.getDetector(); diff --git a/Code/Mantid/Framework/Crystal/src/IntegratePeaksHybrid.cpp b/Code/Mantid/Framework/Crystal/src/IntegratePeaksHybrid.cpp index c307d1088138..a90fe00a40f3 100644 --- a/Code/Mantid/Framework/Crystal/src/IntegratePeaksHybrid.cpp +++ b/Code/Mantid/Framework/Crystal/src/IntegratePeaksHybrid.cpp @@ -186,7 +186,7 @@ void IntegratePeaksHybrid::exec() { for (int i = 0; i < peakWS->getNumberPeaks(); ++i) { PARALLEL_START_INTERUPT_REGION - IPeak &peak = peakWS->getPeak(i); + Geometry::IPeak &peak = peakWS->getPeak(i); const V3D center = projection.peakCenter(peak); auto binMDAlg = this->createChildAlgorithm("BinMD"); diff --git a/Code/Mantid/Framework/Crystal/src/IntegratePeaksUsingClusters.cpp b/Code/Mantid/Framework/Crystal/src/IntegratePeaksUsingClusters.cpp index 726d1b39e20a..fd9bd4d2d833 100644 --- a/Code/Mantid/Framework/Crystal/src/IntegratePeaksUsingClusters.cpp +++ b/Code/Mantid/Framework/Crystal/src/IntegratePeaksUsingClusters.cpp @@ -162,7 +162,7 @@ void IntegratePeaksUsingClusters::exec() { PARALLEL_FOR1(peakWS) for (int i = 0; i < peakWS->getNumberPeaks(); ++i) { PARALLEL_START_INTERUPT_REGION - IPeak &peak = peakWS->getPeak(i); + Geometry::IPeak &peak = peakWS->getPeak(i); const Mantid::signal_t signalValue = projection.signalAtPeakCenter( peak); // No normalization when extracting label ids! if (boost::math::isnan(signalValue)) { diff --git a/Code/Mantid/Framework/Crystal/src/LatticeErrors.cpp b/Code/Mantid/Framework/Crystal/src/LatticeErrors.cpp index 04084ed43096..a0a5306a38b2 100644 --- a/Code/Mantid/Framework/Crystal/src/LatticeErrors.cpp +++ b/Code/Mantid/Framework/Crystal/src/LatticeErrors.cpp @@ -6,7 +6,7 @@ #include "MantidAPI/FunctionFactory.h" #include "MantidAPI/IConstraint.h" #include "MantidAPI/IFunction1D.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidAPI/ParamFunction.h" #include "MantidCrystal/LatticeErrors.h" #include "MantidCrystal/SCDPanelErrors.h" @@ -15,6 +15,7 @@ using namespace Mantid::DataObjects; using namespace Mantid::API; using namespace Mantid::Kernel; +using namespace Mantid::Geometry; using Mantid::Geometry::CompAssembly; using Mantid::Geometry::IObjComponent_const_sptr; diff --git a/Code/Mantid/Framework/Crystal/src/OptimizeCrystalPlacement.cpp b/Code/Mantid/Framework/Crystal/src/OptimizeCrystalPlacement.cpp index 6bb40d44dea8..759fafc0b8c7 100644 --- a/Code/Mantid/Framework/Crystal/src/OptimizeCrystalPlacement.cpp +++ b/Code/Mantid/Framework/Crystal/src/OptimizeCrystalPlacement.cpp @@ -1,18 +1,22 @@ /* + * * OptimizeCrystalPlacement.cpp * * Created on: Jan 26, 2013 * Author: ruth */ -#include "MantidAPI/IPeak.h" +#include "MantidCrystal/OptimizeCrystalPlacement.h" + +#include "MantidKernel/ArrayProperty.h" +#include "MantidKernel/EnabledWhenProperty.h" +#include "MantidGeometry/Crystal/IPeak.h" +#include "MantidGeometry/Crystal/IndexingUtils.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/WorkspaceProperty.h" -#include "MantidCrystal/OptimizeCrystalPlacement.h" #include "MantidCrystal/PeakHKLErrors.h" #include "MantidCrystal/SCDCalibratePanels.h" -#include "MantidGeometry/Crystal/IndexingUtils.h" -#include "MantidKernel/ArrayProperty.h" -#include "MantidKernel/EnabledWhenProperty.h" + + #include using namespace Mantid::API; @@ -22,6 +26,7 @@ using Mantid::Geometry::IndexingUtils; using Mantid::Geometry::Instrument; using Mantid::Geometry::Instrument_const_sptr; using Mantid::Geometry::ParameterMap; +using namespace Mantid::Geometry; namespace Mantid { diff --git a/Code/Mantid/Framework/Crystal/src/PeakBackground.cpp b/Code/Mantid/Framework/Crystal/src/PeakBackground.cpp index 4d0e576afb79..1f3364fb9f42 100644 --- a/Code/Mantid/Framework/Crystal/src/PeakBackground.cpp +++ b/Code/Mantid/Framework/Crystal/src/PeakBackground.cpp @@ -1,9 +1,9 @@ #include "MantidCrystal/PeakBackground.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" using namespace Mantid::API; using namespace Mantid::Kernel; -using Mantid::API::IPeak; +using Mantid::Geometry::IPeak; namespace Mantid { namespace Crystal { @@ -80,4 +80,4 @@ bool PeakBackground::isBackground(Mantid::API::IMDIterator *iterator) const { void PeakBackground::configureIterator(Mantid::API::IMDIterator *const) const {} } // namespace Crystal -} // namespace Mantid \ No newline at end of file +} // namespace Mantid diff --git a/Code/Mantid/Framework/Crystal/src/PeakClusterProjection.cpp b/Code/Mantid/Framework/Crystal/src/PeakClusterProjection.cpp index f08ec0edcffe..a7a3d387b9cc 100644 --- a/Code/Mantid/Framework/Crystal/src/PeakClusterProjection.cpp +++ b/Code/Mantid/Framework/Crystal/src/PeakClusterProjection.cpp @@ -1,14 +1,16 @@ #include "MantidCrystal/PeakClusterProjection.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" +#include "MantidGeometry/Crystal//PeakTransformHKL.h" +#include "MantidGeometry/Crystal//PeakTransformQLab.h" +#include "MantidGeometry/Crystal//PeakTransformQSample.h" #include "MantidAPI/IMDHistoWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" -#include "MantidAPI/PeakTransformHKL.h" -#include "MantidAPI/PeakTransformQLab.h" -#include "MantidAPI/PeakTransformQSample.h" + using namespace Mantid::Kernel; using namespace Mantid::API; +using namespace Mantid::Geometry; namespace { /** diff --git a/Code/Mantid/Framework/Crystal/src/PeakHKLErrors.cpp b/Code/Mantid/Framework/Crystal/src/PeakHKLErrors.cpp index 1c4cd59e318e..c194ea96931c 100644 --- a/Code/Mantid/Framework/Crystal/src/PeakHKLErrors.cpp +++ b/Code/Mantid/Framework/Crystal/src/PeakHKLErrors.cpp @@ -7,7 +7,7 @@ #include "MantidAPI/FunctionFactory.h" #include "MantidAPI/IConstraint.h" #include "MantidAPI/IFunction1D.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidAPI/ParamFunction.h" #include "MantidCrystal/PeakHKLErrors.h" #include "MantidCrystal/SCDPanelErrors.h" @@ -18,6 +18,7 @@ using namespace Mantid::Kernel; using Mantid::Geometry::CompAssembly; using Mantid::Geometry::IObjComponent_const_sptr; using Mantid::Geometry::IComponent_const_sptr; +using Mantid::Geometry::IPeak; namespace Mantid { @@ -246,7 +247,7 @@ void PeakHKLErrors::getRun2MatMap( std::map> &Res) const { for (int i = 0; i < Peaks->getNumberPeaks(); ++i) { - IPeak &peak_old = Peaks->getPeak((int)i); + Geometry::IPeak &peak_old = Peaks->getPeak((int)i); int runNum = peak_old.getRunNumber(); std::string runNumStr = boost::lexical_cast(runNum); diff --git a/Code/Mantid/Framework/Crystal/src/PeakIntegration.cpp b/Code/Mantid/Framework/Crystal/src/PeakIntegration.cpp index 58fab037884f..76534a235dbd 100644 --- a/Code/Mantid/Framework/Crystal/src/PeakIntegration.cpp +++ b/Code/Mantid/Framework/Crystal/src/PeakIntegration.cpp @@ -308,7 +308,7 @@ int PeakIntegration::fitneighbours(int ipeak, std::string det_name, int x0, UNUSED_ARG(det_name); UNUSED_ARG(x0); UNUSED_ARG(y0); - API::IPeak &peak = Peaks->getPeak(ipeak); + Geometry::IPeak &peak = Peaks->getPeak(ipeak); // Number of slices int TOFmax = 0; diff --git a/Code/Mantid/Framework/Crystal/src/PeakIntensityVsRadius.cpp b/Code/Mantid/Framework/Crystal/src/PeakIntensityVsRadius.cpp index 4087e8020335..041cedeffcc0 100644 --- a/Code/Mantid/Framework/Crystal/src/PeakIntensityVsRadius.cpp +++ b/Code/Mantid/Framework/Crystal/src/PeakIntensityVsRadius.cpp @@ -199,7 +199,7 @@ void PeakIntensityVsRadius::exec() { PeaksWorkspace_sptr outPeaks = alg->getProperty("OutputWorkspace"); for (int i = 0; i < outPeaks->getNumberPeaks(); i++) { size_t wi = size_t(i); // workspace index in output - IPeak &p = outPeaks->getPeak(i); + Geometry::IPeak &p = outPeaks->getPeak(i); outWS->dataX(wi)[step] = radius; outWS->dataY(wi)[step] = p.getIntensity(); outWS->dataE(wi)[step] = p.getSigmaIntensity(); diff --git a/Code/Mantid/Framework/Crystal/src/PeaksIntersection.cpp b/Code/Mantid/Framework/Crystal/src/PeaksIntersection.cpp index 70319ee6efe8..3212b3a8e4ee 100644 --- a/Code/Mantid/Framework/Crystal/src/PeaksIntersection.cpp +++ b/Code/Mantid/Framework/Crystal/src/PeaksIntersection.cpp @@ -1,6 +1,6 @@ #include "MantidKernel/ListValidator.h" #include "MantidAPI/IPeaksWorkspace.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidAPI/TableRow.h" #include "MantidCrystal/PeaksIntersection.h" #include "MantidDataObjects/TableWorkspace.h" @@ -166,4 +166,4 @@ void PeaksIntersection::executePeaksIntersection(const bool checkPeakExtents) { } } // namespace Crystal -} // namespace Mantid \ No newline at end of file +} // namespace Mantid diff --git a/Code/Mantid/Framework/Crystal/src/SCDCalibratePanels.cpp b/Code/Mantid/Framework/Crystal/src/SCDCalibratePanels.cpp index f332fd11dd62..cb8114fced89 100644 --- a/Code/Mantid/Framework/Crystal/src/SCDCalibratePanels.cpp +++ b/Code/Mantid/Framework/Crystal/src/SCDCalibratePanels.cpp @@ -122,7 +122,7 @@ SCDCalibratePanels::calcWorkspace(DataObjects::PeaksWorkspace_sptr &pwks, for (size_t k = 0; k < bankNames.size(); ++k) { 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()) != bankNames.end()) if (IndexingUtils::ValidIndex(peak.getHKL(), tolerance)) { @@ -978,7 +978,7 @@ void SCDCalibratePanels::exec() { int BankNumDef = 200; for (size_t q = 0; q < nData; q += 3) { int pk = (int)xVals[q]; - const API::IPeak &peak = peaksWs->getPeak(pk); + const Geometry::IPeak &peak = peaksWs->getPeak(pk); string bankName = peak.getBankName(); size_t pos = bankName.find_last_not_of("0123456789"); diff --git a/Code/Mantid/Framework/Crystal/src/SCDPanelErrors.cpp b/Code/Mantid/Framework/Crystal/src/SCDPanelErrors.cpp index 7993ba922c1a..cfb409c6c4fe 100644 --- a/Code/Mantid/Framework/Crystal/src/SCDPanelErrors.cpp +++ b/Code/Mantid/Framework/Crystal/src/SCDPanelErrors.cpp @@ -281,7 +281,7 @@ void SCDPanelErrors::Check(DataObjects::PeaksWorkspace_sptr &pkwsp, } } -Instrument_sptr SCDPanelErrors::getNewInstrument(const API::IPeak &peak) const { +Instrument_sptr SCDPanelErrors::getNewInstrument(const Geometry::IPeak &peak) const { Geometry::Instrument_const_sptr instSave = peak.getInstrument(); boost::shared_ptr pmap(new ParameterMap()); @@ -351,7 +351,7 @@ Instrument_sptr SCDPanelErrors::getNewInstrument(const API::IPeak &peak) const { return instChange; } -Peak SCDPanelErrors::createNewPeak(const API::IPeak &peak_old, +Peak SCDPanelErrors::createNewPeak(const Geometry::IPeak &peak_old, Geometry::Instrument_sptr instrNew, double T0, double L0) { Geometry::Instrument_const_sptr inst = peak_old.getInstrument(); @@ -1208,7 +1208,7 @@ SCDPanelErrors::calcWorkspace(DataObjects::PeaksWorkspace_sptr &pwks, for (size_t k = 0; k < bankNames.size(); ++k) 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.getH() != 0 || peak.getK() != 0 || peak.getL() != 0) if (peak.getH() - floor(peak.getH()) < tolerance || diff --git a/Code/Mantid/Framework/Crystal/test/AddPeakHKLTest.h b/Code/Mantid/Framework/Crystal/test/AddPeakHKLTest.h index 0c842e3da845..858d3955ce4f 100644 --- a/Code/Mantid/Framework/Crystal/test/AddPeakHKLTest.h +++ b/Code/Mantid/Framework/Crystal/test/AddPeakHKLTest.h @@ -10,6 +10,7 @@ #include "MantidTestHelpers/ComponentCreationHelper.h" using Mantid::Crystal::AddPeakHKL; +using Mantid::Geometry::IPeak; using namespace Mantid::Kernel; using namespace Mantid::API; using namespace Mantid::DataObjects; diff --git a/Code/Mantid/Framework/Crystal/test/FindSXPeaksTest.h b/Code/Mantid/Framework/Crystal/test/FindSXPeaksTest.h index 079a5cac90ba..f9564680bf83 100644 --- a/Code/Mantid/Framework/Crystal/test/FindSXPeaksTest.h +++ b/Code/Mantid/Framework/Crystal/test/FindSXPeaksTest.h @@ -4,7 +4,7 @@ #include #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include "MantidCrystal/FindSXPeaks.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" using namespace Mantid::API; using namespace Mantid::Crystal; diff --git a/Code/Mantid/Framework/Crystal/test/IndexSXPeaksTest.h b/Code/Mantid/Framework/Crystal/test/IndexSXPeaksTest.h index a69316a8dc7d..58764857035a 100644 --- a/Code/Mantid/Framework/Crystal/test/IndexSXPeaksTest.h +++ b/Code/Mantid/Framework/Crystal/test/IndexSXPeaksTest.h @@ -8,10 +8,11 @@ #include "MantidCrystal/IndexSXPeaks.h" #include "MantidCrystal/LoadIsawPeaks.h" #include "MantidCrystal/LoadIsawUB.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include using namespace Mantid::API; +using namespace Mantid::Geometry; using namespace Mantid::Crystal; using namespace Mantid::DataObjects; diff --git a/Code/Mantid/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h b/Code/Mantid/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h index b925ff3d7439..b7f84c708e4a 100644 --- a/Code/Mantid/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h +++ b/Code/Mantid/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h @@ -35,7 +35,7 @@ #include "MantidAPI/FrameworkManager.h" #include "MantidAPI/AnalysisDataService.h" #include "MantidKernel/Unit.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include #include diff --git a/Code/Mantid/Framework/Crystal/test/OptimizeCrystalPlacementTest.h b/Code/Mantid/Framework/Crystal/test/OptimizeCrystalPlacementTest.h index 8d8e8b67c110..46053253523b 100644 --- a/Code/Mantid/Framework/Crystal/test/OptimizeCrystalPlacementTest.h +++ b/Code/Mantid/Framework/Crystal/test/OptimizeCrystalPlacementTest.h @@ -101,7 +101,7 @@ class OptimizeCrystalPlacementTest: public CxxTest::TestSuite for (int i = 0; i < peaks1->getNumberPeaks(); ++i) if (peaks1->getPeak(i).getRunNumber() == 5638) { - API::IPeak& peak = peaks1->getPeak(i); + Geometry::IPeak& peak = peaks1->getPeak(i); if (Gon == ZMat) { origGon5638 = peak.getGoniometerMatrix(); @@ -160,7 +160,7 @@ class OptimizeCrystalPlacementTest: public CxxTest::TestSuite for (int i = 0; i < peaks1->getNumberPeaks(); ++i) { - API::IPeak & peak = peaks1->getPeak(i); + Geometry::IPeak & peak = peaks1->getPeak(i); int RunNum = peak.getRunNumber(); Kernel::Matrix GG; @@ -234,7 +234,7 @@ class OptimizeCrystalPlacementTest: public CxxTest::TestSuite void test_SamplePosition() { init(); - API::IPeak & peak = peaks1->getPeak(0); + Geometry::IPeak & peak = peaks1->getPeak(0); boost::shared_ptr Inst = peak.getInstrument(); Kernel::V3D SampPos(.0003, -.00025, .00015); diff --git a/Code/Mantid/Framework/Crystal/test/PeakClusterProjectionTest.h b/Code/Mantid/Framework/Crystal/test/PeakClusterProjectionTest.h index 1225e3b14693..e3b350feaa6b 100644 --- a/Code/Mantid/Framework/Crystal/test/PeakClusterProjectionTest.h +++ b/Code/Mantid/Framework/Crystal/test/PeakClusterProjectionTest.h @@ -8,7 +8,7 @@ #include "MantidAPI/FrameworkManager.h" #include "MantidAPI/IMDHistoWorkspace.h" #include "MantidAPI/IPeaksWorkspace.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidTestHelpers/MDEventsTestHelper.h" diff --git a/Code/Mantid/Framework/Crystal/test/SCDPanelErrorsTest.h b/Code/Mantid/Framework/Crystal/test/SCDPanelErrorsTest.h index 545f2e7f9880..e6c2978be1cc 100644 --- a/Code/Mantid/Framework/Crystal/test/SCDPanelErrorsTest.h +++ b/Code/Mantid/Framework/Crystal/test/SCDPanelErrorsTest.h @@ -13,7 +13,7 @@ #include "MantidCrystal/SCDPanelErrors.h" #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidDataObjects/Workspace2D.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidGeometry/Instrument/RectangularDetector.h" #include "MantidCrystal/SCDPanelErrors.h" #include "MantidGeometry/Instrument.h" diff --git a/Code/Mantid/Framework/CurveFitting/src/LatticeDomainCreator.cpp b/Code/Mantid/Framework/CurveFitting/src/LatticeDomainCreator.cpp index e8a6895f00b4..9c0d014e9a12 100644 --- a/Code/Mantid/Framework/CurveFitting/src/LatticeDomainCreator.cpp +++ b/Code/Mantid/Framework/CurveFitting/src/LatticeDomainCreator.cpp @@ -1,7 +1,8 @@ #include "MantidCurveFitting/LatticeDomainCreator.h" +#include "MantidGeometry/Crystal/IPeak.h" + #include "MantidAPI/ILatticeFunction.h" -#include "MantidAPI/IPeak.h" #include "MantidAPI/LatticeDomain.h" #include "MantidAPI/TableRow.h" #include "MantidAPI/WorkspaceFactory.h" @@ -183,7 +184,7 @@ void LatticeDomainCreator::createDomainFromPeaksWorkspace( dSpacings.reserve(peakCount); for (size_t i = 0; i < peakCount; ++i) { - IPeak *currentPeak = workspace->getPeakPtr(static_cast(i)); + Geometry::IPeak *currentPeak = workspace->getPeakPtr(static_cast(i)); V3D hkl = currentPeak->getHKL(); if (hkl != V3D(0, 0, 0)) { diff --git a/Code/Mantid/Framework/CurveFitting/src/ProcessBackground.cpp b/Code/Mantid/Framework/CurveFitting/src/ProcessBackground.cpp index 67073197d3a7..d6bd7e43f1a3 100644 --- a/Code/Mantid/Framework/CurveFitting/src/ProcessBackground.cpp +++ b/Code/Mantid/Framework/CurveFitting/src/ProcessBackground.cpp @@ -9,7 +9,7 @@ #include "MantidCurveFitting/Polynomial.h" #include "MantidCurveFitting/Chebyshev.h" #include "MantidDataObjects/TableWorkspace.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidAPI/TableRow.h" #include diff --git a/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp b/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp index 59d6ac822dc7..aadb3df166a1 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp @@ -1066,7 +1066,7 @@ API::Workspace_sptr LoadNexusProcessed::loadPeaksEntry(NXEntry &entry) { for (int r = 0; r < numberPeaks; r++) { Kernel::V3D v3d; v3d[2] = 1.0; - API::IPeak *p; + Geometry::IPeak *p; p = peakWS->createPeak(v3d); peakWS->addPeak(*p); } diff --git a/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/Peak.h b/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/Peak.h index c6126d29376d..c323d05ecdfe 100644 --- a/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/Peak.h +++ b/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/Peak.h @@ -1,7 +1,7 @@ #ifndef MANTID_DATAOBJECTS_PEAK_H_ #define MANTID_DATAOBJECTS_PEAK_H_ -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidGeometry/Instrument.h" #include "MantidKernel/Logger.h" #include "MantidKernel/Matrix.h" @@ -21,7 +21,7 @@ namespace DataObjects { * @author Janik Zikovsky * @date 2011-04-15 13:24:07.963491 */ -class DLLExport Peak : public API::IPeak { +class DLLExport Peak : public Geometry::IPeak { public: /// Allow PeakColumn class to directly access members. friend class PeakColumn; @@ -47,7 +47,7 @@ class DLLExport Peak : public API::IPeak { // Construct a peak from a reference to the interface - explicit Peak(const API::IPeak &ipeak); + explicit Peak(const Geometry::IPeak &ipeak); virtual ~Peak(); void setDetectorID(int id); diff --git a/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/PeaksWorkspace.h b/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/PeaksWorkspace.h index 4a4d217689ee..3714a44838e9 100644 --- a/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/PeaksWorkspace.h +++ b/Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/PeaksWorkspace.h @@ -104,11 +104,11 @@ class DLLExport PeaksWorkspace : public Mantid::API::IPeaksWorkspace { int getNumberPeaks() const; void removePeak(int peakNum); - void addPeak(const API::IPeak &ipeak); + void addPeak(const Geometry::IPeak &ipeak); Peak &getPeak(int peakNum); const Peak &getPeak(int peakNum) const; - API::IPeak *createPeak(Kernel::V3D QFrame, + Geometry::IPeak *createPeak(Kernel::V3D QFrame, boost::optional detectorDistance = boost::optional()) const; std::vector> diff --git a/Code/Mantid/Framework/DataObjects/src/Peak.cpp b/Code/Mantid/Framework/DataObjects/src/Peak.cpp index 8a10f6c9546a..fd53ea8ae8e0 100644 --- a/Code/Mantid/Framework/DataObjects/src/Peak.cpp +++ b/Code/Mantid/Framework/DataObjects/src/Peak.cpp @@ -188,7 +188,7 @@ Peak::Peak(const Peak &other) * @param ipeak :: const reference to an IPeak object * @return */ -Peak::Peak(const API::IPeak &ipeak) +Peak::Peak(const Geometry::IPeak &ipeak) : IPeak(ipeak), m_H(ipeak.getH()), m_K(ipeak.getK()), m_L(ipeak.getL()), m_intensity(ipeak.getIntensity()), m_sigmaIntensity(ipeak.getSigmaIntensity()), diff --git a/Code/Mantid/Framework/DataObjects/src/PeaksWorkspace.cpp b/Code/Mantid/Framework/DataObjects/src/PeaksWorkspace.cpp index 890e3e1e447e..99cc51356700 100644 --- a/Code/Mantid/Framework/DataObjects/src/PeaksWorkspace.cpp +++ b/Code/Mantid/Framework/DataObjects/src/PeaksWorkspace.cpp @@ -164,7 +164,7 @@ void PeaksWorkspace::removePeak(const int peakNum) { /** Add a peak to the list * @param ipeak :: Peak object to add (copy) into this. */ -void PeaksWorkspace::addPeak(const API::IPeak &ipeak) { +void PeaksWorkspace::addPeak(const Geometry::IPeak &ipeak) { if (dynamic_cast(&ipeak)) { peaks.push_back((const Peak &)ipeak); } else { @@ -205,7 +205,7 @@ const Peak &PeaksWorkspace::getPeak(const int peakNum) const { * detector. You do NOT need to explicitly provide this distance. * @return a pointer to a new Peak object. */ -API::IPeak * +Geometry::IPeak * PeaksWorkspace::createPeak(Kernel::V3D QLabFrame, boost::optional detectorDistance) const { return new Peak(this->getInstrument(), QLabFrame, detectorDistance); @@ -304,7 +304,7 @@ PeaksWorkspace::peakInfo(Kernel::V3D qFrame, bool labCoords) const { try { - API::IPeak *peak = createPeak(Qlab); + Geometry::IPeak *peak = createPeak(Qlab); if (sample().hasOrientedLattice()) { diff --git a/Code/Mantid/Framework/DataObjects/test/PeakTest.h b/Code/Mantid/Framework/DataObjects/test/PeakTest.h index 317d54c3e840..0dc4c7c5a6c9 100644 --- a/Code/Mantid/Framework/DataObjects/test/PeakTest.h +++ b/Code/Mantid/Framework/DataObjects/test/PeakTest.h @@ -99,7 +99,7 @@ class PeakTest : public CxxTest::TestSuite p.setRunNumber(1234); p.addContributingDetID(10103); - const Mantid::API::IPeak & ipeak = p; + const Mantid::Geometry::IPeak & ipeak = p; Peak p2(ipeak); TS_ASSERT_EQUALS(p.getRow(), p2.getRow()); TS_ASSERT_EQUALS(p.getCol(), p2.getCol()); diff --git a/Code/Mantid/Framework/DataObjects/test/PeaksWorkspaceTest.h b/Code/Mantid/Framework/DataObjects/test/PeaksWorkspaceTest.h index ccd427854760..e3a6d2fe3eed 100644 --- a/Code/Mantid/Framework/DataObjects/test/PeaksWorkspaceTest.h +++ b/Code/Mantid/Framework/DataObjects/test/PeaksWorkspaceTest.h @@ -272,7 +272,7 @@ class PeaksWorkspaceTest : public CxxTest::TestSuite { auto pw = buildPW(); // 1 peaks each with single detector // Add a detector to the peak - Mantid::API::IPeak & ipeak = pw->getPeak(0); + Mantid::Geometry::IPeak & ipeak = pw->getPeak(0); auto & peak = static_cast(ipeak); peak.addContributingDetID(2); peak.addContributingDetID(3); @@ -299,10 +299,10 @@ class PeaksWorkspaceTest : public CxxTest::TestSuite auto pw = createSaveTestPeaksWorkspace(); // 5 peaks each with single detector // Add some detectors - Mantid::API::IPeak & ipeak3 = pw->getPeak(2); + Mantid::Geometry::IPeak & ipeak3 = pw->getPeak(2); auto & peak3 = static_cast(ipeak3); peak3.addContributingDetID(11); - Mantid::API::IPeak & ipeak5 = pw->getPeak(4); + Mantid::Geometry::IPeak & ipeak5 = pw->getPeak(4); auto & peak5 = static_cast(ipeak5); peak5.addContributingDetID(51); peak5.addContributingDetID(52); diff --git a/Code/Mantid/Framework/Geometry/CMakeLists.txt b/Code/Mantid/Framework/Geometry/CMakeLists.txt index 19042d132a22..1cf4c6c0f83f 100644 --- a/Code/Mantid/Framework/Geometry/CMakeLists.txt +++ b/Code/Mantid/Framework/Geometry/CMakeLists.txt @@ -9,10 +9,16 @@ set ( SRC_FILES src/Crystal/CrystalStructure.cpp src/Crystal/CyclicGroup.cpp src/Crystal/Group.cpp + src/Crystal/IPeak.cpp src/Crystal/IndexingUtils.cpp src/Crystal/IsotropicAtomBraggScatterer.cpp src/Crystal/NiggliCell.cpp src/Crystal/OrientedLattice.cpp + src/Crystal/PeakTransform.cpp + src/Crystal/PeakTransformHKL.cpp + src/Crystal/PeakTransformQLab.cpp + src/Crystal/PeakTransformQSample.cpp + src/Crystal/PeakTransformSelector.cpp src/Crystal/PointGroup.cpp src/Crystal/PointGroupFactory.cpp src/Crystal/ProductOfCyclicGroups.cpp @@ -123,16 +129,24 @@ set ( INC_FILES inc/MantidGeometry/Crystal/BraggScattererInCrystalStructure.h inc/MantidGeometry/Crystal/CenteringGroup.h inc/MantidGeometry/Crystal/CompositeBraggScatterer.h + inc/MantidGeometry/Crystal/ConcretePeakTransformFactory.h inc/MantidGeometry/Crystal/ConventionalCell.h inc/MantidGeometry/Crystal/CrystalStructure.h inc/MantidGeometry/Crystal/CyclicGroup.h inc/MantidGeometry/Crystal/Group.h + inc/MantidGeometry/Crystal/IPeak.h inc/MantidGeometry/Crystal/IndexingUtils.h inc/MantidGeometry/Crystal/IsotropicAtomBraggScatterer.h inc/MantidGeometry/Crystal/NiggliCell.h inc/MantidGeometry/Crystal/OrientedLattice.h inc/MantidGeometry/Crystal/PeakShape.h - inc/MantidGeometry/Crystal/PointGroup.h + inc/MantidGeometry/Crystal/PeakTransform.h + inc/MantidGeometry/Crystal/PeakTransformFactory.h + inc/MantidGeometry/Crystal/PeakTransformHKL.h + inc/MantidGeometry/Crystal/PeakTransformQLab.h + inc/MantidGeometry/Crystal/PeakTransformQSample.h + inc/MantidGeometry/Crystal/PeakTransformSelector.h + inc/MantidGeometry/Crystal/PointGroup.h inc/MantidGeometry/Crystal/PointGroupFactory.h inc/MantidGeometry/Crystal/ProductOfCyclicGroups.h inc/MantidGeometry/Crystal/ReducedCell.h @@ -291,7 +305,11 @@ set ( TEST_FILES ParObjComponentTest.h ParameterMapTest.h ParametrizedComponentTest.h - PlaneTest.h + PeakTransformHKLTest.h + PeakTransformQLabTest.h + PeakTransformQSampleTest.h + PeakTransformSelectorTest.h + PlaneTest.h PointGroupFactoryTest.h PointGroupTest.h PolygonEdgeTest.h diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/ConcretePeakTransformFactory.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/ConcretePeakTransformFactory.h similarity index 83% rename from Code/Mantid/Framework/API/inc/MantidAPI/ConcretePeakTransformFactory.h rename to Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/ConcretePeakTransformFactory.h index 135ec0e5f47d..bc19f069997c 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/ConcretePeakTransformFactory.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/ConcretePeakTransformFactory.h @@ -1,11 +1,11 @@ -#ifndef MANTID_API_CONCRETEPEAKTRANSFORMFACTORY_H_ -#define MANTID_API_CONCRETEPEAKTRANSFORMFACTORY_H_ +#ifndef MANTID_GEOMETRY_CONCRETEPEAKTRANSFORMFACTORY_H_ +#define MANTID_GEOMETRY_CONCRETEPEAKTRANSFORMFACTORY_H_ -#include "MantidAPI/PeakTransformFactory.h" +#include "MantidGeometry/Crystal/PeakTransformFactory.h" #include namespace Mantid { -namespace API { +namespace Geometry { /** @class ConcretePeakTransformFactory Concrete PeakTransformFactory producing PeakTransforms of type provided by type diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/IPeak.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/IPeak.h similarity index 97% rename from Code/Mantid/Framework/API/inc/MantidAPI/IPeak.h rename to Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/IPeak.h index e85e6be9140d..24c0ff64af8c 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/IPeak.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/IPeak.h @@ -1,7 +1,7 @@ #ifndef MANTID_API_IPEAK_H_ #define MANTID_API_IPEAK_H_ -#include "MantidAPI/DllConfig.h" +#include "MantidGeometry/DllConfig.h" #include "MantidGeometry/Instrument.h" #include "MantidGeometry/Crystal/PeakShape.h" #include "MantidKernel/Matrix.h" @@ -10,14 +10,14 @@ #include namespace Mantid { -namespace API { +namespace Geometry { /** Structure describing a single-crystal peak * * @author Janik Zikovsky * @date 2011-04-15 13:24:07.963491 */ -class MANTID_API_DLL IPeak { +class MANTID_GEOMETRY_DLL IPeak { public: virtual ~IPeak(); diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransform.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransform.h similarity index 89% rename from Code/Mantid/Framework/API/inc/MantidAPI/PeakTransform.h rename to Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransform.h index 2866ddabcc9f..841af1750062 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransform.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransform.h @@ -1,14 +1,14 @@ -#ifndef MANTID_API_PEAKTRANSFORM_H_ -#define MANTID_API_PEAKTRANSFORM_H_ +#ifndef MANTID_GEOMETRY_PEAKTRANSFORM_H_ +#define MANTID_GEOMETRY_PEAKTRANSFORM_H_ #include "MantidKernel/V3D.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include #include #include "MantidKernel/SpecialCoordinateSystem.h" namespace Mantid { -namespace API { +namespace Geometry { /** @class PeakTransform Used to remap coordinates into a form consistent with an axis reordering. @@ -24,7 +24,7 @@ class DLLExport PeakTransform { transform(const Mantid::Kernel::V3D &original) const; /// Perform Transform virtual Mantid::Kernel::V3D - transformPeak(const Mantid::API::IPeak &peak) const = 0; + transformPeak(const Mantid::Geometry::IPeak &peak) const = 0; /// Perform reverse transform. Mantid::Kernel::V3D transformBack(const Mantid::Kernel::V3D &transformed) const; @@ -69,4 +69,4 @@ class PeakTransformException : public std::exception { } } -#endif /* MANTID_API_CONCRETEPEAKSPRESENTER_H_ */ +#endif /* MANTID_GEOMETRY_PEAKTRANSFORM_H_ */ diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformFactory.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformFactory.h similarity index 74% rename from Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformFactory.h rename to Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformFactory.h index cf774211c0f9..9beba3336555 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformFactory.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformFactory.h @@ -1,11 +1,12 @@ -#ifndef MANTID_API_PEAKTRANSFORMFACTORY_H_ -#define MANTID_API_PEAKTRANSFORMFACTORY_H_ +#ifndef MANTID_GEOMETRY_PEAKTRANSFORMFACTORY_H_ +#define MANTID_GEOMETRY_PEAKTRANSFORMFACTORY_H_ -#include "MantidAPI/PeakTransform.h" +#include "MantidKernel/System.h" +#include "MantidGeometry/Crystal/PeakTransform.h" #include namespace Mantid { -namespace API { +namespace Geometry { /** @class PeakTransformFactory Abstract type defining Factory Method interface for generating PeakTransforms diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformHKL.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformHKL.h similarity index 74% rename from Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformHKL.h rename to Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformHKL.h index 0b68e71e446e..5159c6611b80 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformHKL.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformHKL.h @@ -1,11 +1,12 @@ -#ifndef MANTID_API_PEAKTRANSFORMHKL_H_ -#define MANTID_API_PEAKTRANSFORMHKL_H_ +#ifndef MANTID_GEOMETRY_PEAKTRANSFORMHKL_H_ +#define MANTID_GEOMETRY_PEAKTRANSFORMHKL_H_ -#include "MantidAPI/PeakTransform.h" -#include "MantidAPI/ConcretePeakTransformFactory.h" +#include "MantidKernel/System.h" +#include "MantidGeometry/Crystal/PeakTransform.h" +#include "MantidGeometry/Crystal/ConcretePeakTransformFactory.h" namespace Mantid { -namespace API { +namespace Geometry { /** @class PeakTransformHKL Used to remap coordinates into a form consistent with an axis reordering. @@ -27,7 +28,7 @@ class DLLExport PeakTransformHKL : public PeakTransform { /// Virtual constructor PeakTransform_sptr clone() const; /// Transform peak. - Mantid::Kernel::V3D transformPeak(const Mantid::API::IPeak &peak) const; + Mantid::Kernel::V3D transformPeak(const Mantid::Geometry::IPeak &peak) const; /// Getter for a friendly name to describe the transform type. virtual std::string getFriendlyName() const { return name(); } /// Getter for the special coordinate representation of this transform type. @@ -39,4 +40,4 @@ typedef ConcretePeakTransformFactory PeakTransformHKLFactory; } } -#endif /* MANTID_API_CONCRETEPEAKSPRESENTERHKL_H_ */ +#endif /* MANTID_GEOMETRY_PEAKTRANSFORMHKL_H_ */ diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformQLab.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQLab.h similarity index 73% rename from Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformQLab.h rename to Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQLab.h index fd72890a93ef..21a9787635c9 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformQLab.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQLab.h @@ -1,11 +1,12 @@ -#ifndef MANTID_API_PeakTransformQLab_H_ -#define MANTID_API_PeakTransformQLab_H_ +#ifndef MANTID_GEOMETRY_PEAKTRANSFORMQLab_H_ +#define MANTID_GEOMETRY_PEAKTRANSFORMQLab_H_ -#include "MantidAPI/PeakTransform.h" -#include "MantidAPI/ConcretePeakTransformFactory.h" +#include "MantidKernel/System.h" +#include "MantidGeometry/Crystal/PeakTransform.h" +#include "MantidGeometry/Crystal/ConcretePeakTransformFactory.h" namespace Mantid { -namespace API { +namespace Geometry { /** @class PeakTransformQLab Used to remap coordinates into a form consistent with an axis reordering. @@ -27,7 +28,7 @@ class DLLExport PeakTransformQLab : public PeakTransform { /// Virtual constructor PeakTransform_sptr clone() const; /// Transform peak. - Mantid::Kernel::V3D transformPeak(const Mantid::API::IPeak &peak) const; + Mantid::Kernel::V3D transformPeak(const Mantid::Geometry::IPeak &peak) const; /// Get the transform friendly name. virtual std::string getFriendlyName() const { return name(); } /// Getter for the special coordinate representation of this transform type. @@ -40,4 +41,4 @@ typedef ConcretePeakTransformFactory } } -#endif /* MANTID_API_PeakTransformQLab_H_ */ +#endif /* MANTID_GEOMETRY_PEAKTRANSFORMQLab_H_ */ diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformQSample.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQSample.h similarity index 74% rename from Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformQSample.h rename to Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQSample.h index ecc0d581d6be..cba38af82249 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformQSample.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformQSample.h @@ -1,11 +1,12 @@ -#ifndef MANTID_API_PEAKTRANSFORMQSAMPLE_H_ -#define MANTID_API_PEAKTRANSFORMQSAMPLE_H_ +#ifndef MANTID_GEOMETRY_PEAKTRANSFORMQSAMPLE_H_ +#define MANTID_GEOMETRY_PEAKTRANSFORMQSAMPLE_H_ -#include "MantidAPI/PeakTransform.h" -#include "MantidAPI/ConcretePeakTransformFactory.h" +#include "MantidKernel/System.h" +#include "MantidGeometry/Crystal/PeakTransform.h" +#include "MantidGeometry/Crystal/ConcretePeakTransformFactory.h" namespace Mantid { -namespace API { +namespace Geometry { /** @class PeakTransformQSample Used to remap coordinates into a form consistent with an axis reordering. @@ -28,7 +29,7 @@ class DLLExport PeakTransformQSample : public PeakTransform { /// Virtual constructor PeakTransform_sptr clone() const; /// Transform peak. - Mantid::Kernel::V3D transformPeak(const Mantid::API::IPeak &peak) const; + Mantid::Kernel::V3D transformPeak(const Mantid::Geometry::IPeak &peak) const; /// Getter for the transform name. virtual std::string getFriendlyName() const { return name(); } /// Getter for the special coordinate representation of this transform type. @@ -41,4 +42,4 @@ typedef ConcretePeakTransformFactory } } -#endif /* MANTID_API_PEAKTRANSFORMQSAMPLE_H_ */ +#endif /* MANTID_GEOMETRY_PEAKTRANSFORMQSAMPLE_H_ */ diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformSelector.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformSelector.h similarity index 85% rename from Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformSelector.h rename to Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformSelector.h index d7828048e6c3..682fa1cecfea 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/PeakTransformSelector.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PeakTransformSelector.h @@ -1,11 +1,12 @@ -#ifndef MANTID_API_PEAKTRANSFORMSELECTOR_H_ -#define MANTID_API_PEAKTRANSFORMSELECTOR_H_ +#ifndef MANTID_GEOMETRY_PEAKTRANSFORMSELECTOR_H_ +#define MANTID_GEOMETRY_PEAKTRANSFORMSELECTOR_H_ -#include "MantidAPI/PeakTransformFactory.h" +#include "MantidKernel/System.h" +#include "MantidGeometry/Crystal/PeakTransformFactory.h" #include namespace Mantid { -namespace API { +namespace Geometry { /** @class PeakTransformSelector Used to choose an appropriate PeakTransformFactory diff --git a/Code/Mantid/Framework/API/src/IPeak.cpp b/Code/Mantid/Framework/Geometry/src/Crystal/IPeak.cpp similarity index 80% rename from Code/Mantid/Framework/API/src/IPeak.cpp rename to Code/Mantid/Framework/Geometry/src/Crystal/IPeak.cpp index 6a895b76393d..2bd4ee932619 100644 --- a/Code/Mantid/Framework/API/src/IPeak.cpp +++ b/Code/Mantid/Framework/Geometry/src/Crystal/IPeak.cpp @@ -1,10 +1,10 @@ //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" namespace Mantid { -namespace API { +namespace Geometry { using namespace Kernel; diff --git a/Code/Mantid/Framework/API/src/PeakTransform.cpp b/Code/Mantid/Framework/Geometry/src/Crystal/PeakTransform.cpp similarity index 97% rename from Code/Mantid/Framework/API/src/PeakTransform.cpp rename to Code/Mantid/Framework/Geometry/src/Crystal/PeakTransform.cpp index 0b6f805672a3..e5c9f82304e1 100644 --- a/Code/Mantid/Framework/API/src/PeakTransform.cpp +++ b/Code/Mantid/Framework/Geometry/src/Crystal/PeakTransform.cpp @@ -1,7 +1,7 @@ -#include "MantidAPI/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransform.h" namespace Mantid { -namespace API { +namespace Geometry { PeakTransform::PeakTransform(const std::string &xPlotLabel, const std::string &yPlotLabel, const boost::regex ®exOne, @@ -19,7 +19,6 @@ PeakTransform::PeakTransform(const std::string &xPlotLabel, const int SecondIndex = 1; const int ThirdIndex = 2; - Mantid::Kernel::V3D positionInCoordinateSystem; if (boost::regex_match(xLabel, m_FirstRegex) && boost::regex_match(yLabel, m_SecondRegex)) // HKL { diff --git a/Code/Mantid/Framework/API/src/PeakTransformHKL.cpp b/Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformHKL.cpp similarity index 92% rename from Code/Mantid/Framework/API/src/PeakTransformHKL.cpp rename to Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformHKL.cpp index 969de08b0b57..8b4b1b7c1ccf 100644 --- a/Code/Mantid/Framework/API/src/PeakTransformHKL.cpp +++ b/Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformHKL.cpp @@ -1,10 +1,10 @@ -#include "MantidAPI/PeakTransformHKL.h" +#include "MantidGeometry/Crystal/PeakTransformHKL.h" #include using boost::regex; namespace Mantid { -namespace API { +namespace Geometry { PeakTransformHKL::PeakTransformHKL() : PeakTransform("H", "K", regex("^(H.*)|(\\[H,0,0\\].*)$"), @@ -48,7 +48,7 @@ PeakTransform_sptr PeakTransformHKL::clone() const { @return re-mapped coordinates. */ Mantid::Kernel::V3D -PeakTransformHKL::transformPeak(const Mantid::API::IPeak &peak) const { +PeakTransformHKL::transformPeak(const Mantid::Geometry::IPeak &peak) const { return PeakTransform::transform(peak.getHKL()); } diff --git a/Code/Mantid/Framework/API/src/PeakTransformQLab.cpp b/Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformQLab.cpp similarity index 91% rename from Code/Mantid/Framework/API/src/PeakTransformQLab.cpp rename to Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformQLab.cpp index 7bd49d640b5e..7221f9ca2566 100644 --- a/Code/Mantid/Framework/API/src/PeakTransformQLab.cpp +++ b/Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformQLab.cpp @@ -1,10 +1,10 @@ -#include "MantidAPI/PeakTransformQLab.h" +#include "MantidGeometry/Crystal/PeakTransformQLab.h" #include using boost::regex; namespace Mantid { -namespace API { +namespace Geometry { PeakTransformQLab::PeakTransformQLab() : PeakTransform("Q_lab_x", "Q_lab_y", regex("^Q_lab_x.*$"), @@ -47,7 +47,7 @@ PeakTransform_sptr PeakTransformQLab::clone() const { @return re-mapped coordinates. */ Mantid::Kernel::V3D -PeakTransformQLab::transformPeak(const Mantid::API::IPeak &peak) const { +PeakTransformQLab::transformPeak(const Mantid::Geometry::IPeak &peak) const { return PeakTransform::transform(peak.getQLabFrame()); } diff --git a/Code/Mantid/Framework/API/src/PeakTransformQSample.cpp b/Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformQSample.cpp similarity index 91% rename from Code/Mantid/Framework/API/src/PeakTransformQSample.cpp rename to Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformQSample.cpp index 6173aff47bc2..1f8afba7d6ee 100644 --- a/Code/Mantid/Framework/API/src/PeakTransformQSample.cpp +++ b/Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformQSample.cpp @@ -1,10 +1,10 @@ -#include "MantidAPI/PeakTransformQSample.h" +#include "MantidGeometry/Crystal/PeakTransformQSample.h" #include using boost::regex; namespace Mantid { -namespace API { +namespace Geometry { PeakTransformQSample::PeakTransformQSample() : PeakTransform("Q_sample_x", "Q_sample_y", regex("^Q_sample_x.*$"), @@ -47,7 +47,7 @@ PeakTransform_sptr PeakTransformQSample::clone() const { @return re-mapped coordinates. */ Mantid::Kernel::V3D -PeakTransformQSample::transformPeak(const Mantid::API::IPeak &peak) const { +PeakTransformQSample::transformPeak(const Mantid::Geometry::IPeak &peak) const { return PeakTransform::transform(peak.getQSampleFrame()); } diff --git a/Code/Mantid/Framework/API/src/PeakTransformSelector.cpp b/Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformSelector.cpp similarity index 97% rename from Code/Mantid/Framework/API/src/PeakTransformSelector.cpp rename to Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformSelector.cpp index 4f974ba29c88..a483b7c5a442 100644 --- a/Code/Mantid/Framework/API/src/PeakTransformSelector.cpp +++ b/Code/Mantid/Framework/Geometry/src/Crystal/PeakTransformSelector.cpp @@ -1,8 +1,8 @@ -#include "MantidAPI/PeakTransformSelector.h" +#include "MantidGeometry/Crystal/PeakTransformSelector.h" #include namespace Mantid { -namespace API { +namespace Geometry { /// Constructor PeakTransformSelector::PeakTransformSelector() {} diff --git a/Code/Mantid/Framework/API/test/MockObjects.h b/Code/Mantid/Framework/Geometry/test/MockObjects.h similarity index 92% rename from Code/Mantid/Framework/API/test/MockObjects.h rename to Code/Mantid/Framework/Geometry/test/MockObjects.h index d05dfc5746f2..d93e9c70c24e 100644 --- a/Code/Mantid/Framework/API/test/MockObjects.h +++ b/Code/Mantid/Framework/Geometry/test/MockObjects.h @@ -5,17 +5,17 @@ * Author: spu92482 */ -#ifndef MANTIDAPITEST_MOCKOBJECTS_H_ -#define MANTIDAPITEST_MOCKOBJECTS_H_ +#ifndef MANTIDGEOMETRYTEST_MOCKOBJECTS_H_ +#define MANTIDGEOMETRYTEST_MOCKOBJECTS_H_ -#include "MantidAPI/PeakTransform.h" -#include "MantidAPI/PeakTransformFactory.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransformFactory.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidKernel/SpecialCoordinateSystem.h" #include #include -using namespace Mantid::API; +using namespace Mantid::Geometry; using namespace Mantid; using boost::regex; @@ -37,7 +37,7 @@ namespace } MOCK_CONST_METHOD0(clone, PeakTransform_sptr()); MOCK_CONST_METHOD1(transform, Mantid::Kernel::V3D(const Mantid::Kernel::V3D&)); - MOCK_CONST_METHOD1(transformPeak, Mantid::Kernel::V3D(const Mantid::API::IPeak&)); + MOCK_CONST_METHOD1(transformPeak, Mantid::Kernel::V3D(const Mantid::Geometry::IPeak&)); MOCK_CONST_METHOD0(getFriendlyName, std::string()); MOCK_CONST_METHOD0(getCoordinateSystem, Mantid::Kernel::SpecialCoordinateSystem()); }; @@ -57,7 +57,7 @@ namespace /*------------------------------------------------------------ Mock IPeak ------------------------------------------------------------*/ - class MockIPeak : public Mantid::API::IPeak + class MockIPeak : public Mantid::Geometry::IPeak { public: MOCK_METHOD1(setInstrument, @@ -161,4 +161,4 @@ namespace } -#endif /* MANTIDAPITEST_MOCKOBJECTS_H_ */ +#endif /* MANTIDGEOMETRYTEST_MOCKOBJECTS_H_ */ diff --git a/Code/Mantid/Framework/API/test/PeakTransformHKLTest.h b/Code/Mantid/Framework/Geometry/test/PeakTransformHKLTest.h similarity index 97% rename from Code/Mantid/Framework/API/test/PeakTransformHKLTest.h rename to Code/Mantid/Framework/Geometry/test/PeakTransformHKLTest.h index 20a99d8feac7..96917ff11e42 100644 --- a/Code/Mantid/Framework/API/test/PeakTransformHKLTest.h +++ b/Code/Mantid/Framework/Geometry/test/PeakTransformHKLTest.h @@ -1,12 +1,12 @@ -#ifndef SLICE_VIEWER_PEAKTRANSFORMHKL_TEST_H_ -#define SLICE_VIEWER_PEAKTRANSFORMHKL_TEST_H_ +#ifndef MANTIDGEOMETRY_PEAKTRANSFORMHKL_TEST_H_ +#define MANTIDGEOMETRY_PEAKTRANSFORMHKL_TEST_H_ #include -#include "MantidAPI/PeakTransformHKL.h" +#include "MantidGeometry/Crystal/PeakTransformHKL.h" #include "MockObjects.h" #include -using namespace Mantid::API; +using namespace Mantid::Geometry; using Mantid::Kernel::V3D; using namespace testing; @@ -288,5 +288,3 @@ void test_getCoordinateSystem() }; #endif - -//end SLICE_VIEWER_PEAKTRANSFORMHKL_TEST_H_ diff --git a/Code/Mantid/Framework/API/test/PeakTransformQLabTest.h b/Code/Mantid/Framework/Geometry/test/PeakTransformQLabTest.h similarity index 96% rename from Code/Mantid/Framework/API/test/PeakTransformQLabTest.h rename to Code/Mantid/Framework/Geometry/test/PeakTransformQLabTest.h index 849824ad26cc..693cd0b8cf82 100644 --- a/Code/Mantid/Framework/API/test/PeakTransformQLabTest.h +++ b/Code/Mantid/Framework/Geometry/test/PeakTransformQLabTest.h @@ -1,12 +1,12 @@ -#ifndef MANTIDAPI_PEAKTRANSFORMQLAB_TEST_H_ -#define MANTIDAPI_PEAKTRANSFORMQLAB_TEST_H_ +#ifndef MANTIDGEOMETRY_PEAKTRANSFORMQLAB_TEST_H_ +#define MANTIDGEOMETRY_PEAKTRANSFORMQLAB_TEST_H_ #include -#include "MantidAPI/PeakTransformQLab.h" +#include "MantidGeometry/Crystal/PeakTransformQLab.h" #include "MockObjects.h" #include -using namespace Mantid::API; +using namespace Mantid::Geometry; using namespace Mantid; using Mantid::Kernel::V3D; using namespace testing; @@ -224,4 +224,4 @@ void test_getCoordinateSystem() }; #endif -//end MANTIDAPI_PEAKTRANSFORMQLAB_TEST_H_ +//end MANTIDGEOMETRY_PEAKTRANSFORMQLAB_TEST_H_ diff --git a/Code/Mantid/Framework/API/test/PeakTransformQSampleTest.h b/Code/Mantid/Framework/Geometry/test/PeakTransformQSampleTest.h similarity index 97% rename from Code/Mantid/Framework/API/test/PeakTransformQSampleTest.h rename to Code/Mantid/Framework/Geometry/test/PeakTransformQSampleTest.h index 9e970ba1b51a..07726382fb58 100644 --- a/Code/Mantid/Framework/API/test/PeakTransformQSampleTest.h +++ b/Code/Mantid/Framework/Geometry/test/PeakTransformQSampleTest.h @@ -1,12 +1,12 @@ -#ifndef MANTIDAPI_PEAKTRANSFORMQSAMPLE_TEST_H_ -#define MANTIDAPI_PEAKTRANSFORMQSAMPLE_TEST_H_ +#ifndef MANTIDGEOMETRY_PEAKTRANSFORMQSAMPLE_TEST_H_ +#define MANTIDGEOMETRY_PEAKTRANSFORMQSAMPLE_TEST_H_ #include -#include "MantidAPI/PeakTransformQSample.h" +#include "MantidGeometry/Crystal/PeakTransformQSample.h" #include "MockObjects.h" #include -using namespace Mantid::API; +using namespace Mantid::Geometry; using namespace Mantid; using Mantid::Kernel::V3D; using namespace testing; diff --git a/Code/Mantid/Framework/API/test/PeakTransformSelectorTest.h b/Code/Mantid/Framework/Geometry/test/PeakTransformSelectorTest.h similarity index 98% rename from Code/Mantid/Framework/API/test/PeakTransformSelectorTest.h rename to Code/Mantid/Framework/Geometry/test/PeakTransformSelectorTest.h index 78b8df764591..a136bab4d245 100644 --- a/Code/Mantid/Framework/API/test/PeakTransformSelectorTest.h +++ b/Code/Mantid/Framework/Geometry/test/PeakTransformSelectorTest.h @@ -2,11 +2,11 @@ #define MANTIDAPI_PEAKTRANSFORMSELECTOR_TEST_H_ #include -#include "MantidAPI/PeakTransform.h" -#include "MantidAPI/PeakTransformSelector.h" +#include "MantidGeometry/Crystal/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransformSelector.h" #include "MockObjects.h" -using namespace Mantid::API; +using namespace Mantid::Geometry; using namespace Mantid; using namespace testing; using boost::regex; diff --git a/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp b/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp index 223e88b9fced..8116325b7307 100644 --- a/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp +++ b/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp @@ -1,8 +1,8 @@ -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include #include -using Mantid::API::IPeak; +using Mantid::Geometry::IPeak; using namespace boost::python; namespace { diff --git a/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspace.cpp b/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspace.cpp index 9ea3e721fbc8..a83ccd5ea8b2 100644 --- a/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspace.cpp +++ b/Code/Mantid/Framework/PythonInterface/mantid/api/src/Exports/IPeaksWorkspace.cpp @@ -1,5 +1,5 @@ #include "MantidAPI/IPeaksWorkspace.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidPythonInterface/kernel/Registry/DataItemInterface.h" #include "MantidPythonInterface/kernel/Converters/PyObjectToV3D.h" #include @@ -7,6 +7,7 @@ #include #include +using namespace Mantid::Geometry; using namespace Mantid::API; using Mantid::PythonInterface::Registry::DataItemInterface; using namespace boost::python; diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakMarker2D.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakMarker2D.cpp index e799850fd983..e7c5915aea59 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakMarker2D.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakMarker2D.cpp @@ -126,7 +126,7 @@ void PeakMarker2D::drawSquare(QPainter& painter)const /** * 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_k = peak.getK(); @@ -139,7 +139,7 @@ void PeakMarker2D::setPeak(const Mantid::API::IPeak& peak, int row) /** * 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); } diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakMarker2D.h b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakMarker2D.h index c83cc142d974..097e0699ec4e 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakMarker2D.h +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakMarker2D.h @@ -2,7 +2,7 @@ #define MANTIDPLOT_PEAKMARKER2D_H_ #include "Shape2D.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" class PeakOverlay; @@ -38,8 +38,8 @@ class PeakMarker2D: public Shape2D Symbol getSymbol()const{return m_symbol;} void setSymbol(Symbol s){m_symbol=s;} Style getStyle() const; - void setPeak(const Mantid::API::IPeak& peak, int row = -1); - const Mantid::API::IPeak& getPeak() const; + void setPeak(const Mantid::Geometry::IPeak& peak, int row = -1); + const Mantid::Geometry::IPeak& getPeak() const; double getH()const{return m_h;} double getK()const{return m_k;} double getL()const{return m_l;} diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakOverlay.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakOverlay.cpp index 26c8180f2e32..1c926ffcc872 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakOverlay.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakOverlay.cpp @@ -192,7 +192,7 @@ void PeakOverlay::createMarkers(const PeakMarker2D::Style& style) this->clear(); 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(); // Project the peak (detector) position onto u,v coords double u,v, uscale, vscale; @@ -288,7 +288,7 @@ int PeakOverlay::getNumberPeaks()const * @param i :: Peak index. * @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); } @@ -345,7 +345,7 @@ void PeakOverlay::setPeakVisibility(double xmin, double xmax, QString units) { PeakMarker2D* marker = dynamic_cast(shape); if (!marker) continue; - Mantid::API::IPeak& peak = getPeak(marker->getRow()); + Mantid::Geometry::IPeak& peak = getPeak(marker->getRow()); double x = 0.0; switch (xUnits) { diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakOverlay.h b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakOverlay.h index 116c16cf8740..871d8f6a4de1 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakOverlay.h +++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakOverlay.h @@ -65,7 +65,7 @@ class PeakOverlay: public Shape2DCollection, public MantidQt::API::WorkspaceObse void addMarker(PeakMarker2D* m); QList getMarkersWithID(int detID)const; int getNumberPeaks()const; - Mantid::API::IPeak& getPeak(int); + Mantid::Geometry::IPeak& getPeak(int); /// Return PeaksWorkspace associated with this overlay. boost::shared_ptr getPeaksWorkspace() {return m_peaksWorkspace;} /// set HKL precision diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/MantidEVWorker.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/MantidEVWorker.cpp index 42a997c3af48..f4377e76fdcf 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/MantidEVWorker.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/MantidEVWorker.cpp @@ -8,7 +8,7 @@ #include "MantidAPI/IEventWorkspace.h" #include "MantidAPI/IMDWorkspace.h" #include "MantidAPI/IPeaksWorkspace.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidGeometry/Crystal/OrientedLattice.h" #include "MantidKernel/EmptyValues.h" #include "MantidKernel/Logger.h" @@ -20,6 +20,7 @@ namespace CustomInterfaces { using namespace Mantid::Kernel; +using namespace Mantid::Geometry; using namespace Mantid::API; namespace @@ -306,7 +307,7 @@ bool MantidEVWorker::findPeaks( const std::string & ev_ws_name, IPeaksWorkspace_sptr peaks_ws = ADS.retrieveWS(peaks_ws_name); 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) peak.setMonitorCount( monitor_count ); else diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ConcretePeaksPresenter.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ConcretePeaksPresenter.h index bea7b3cc90fc..8abe438eaec1 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ConcretePeaksPresenter.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/ConcretePeaksPresenter.h @@ -1,7 +1,7 @@ #ifndef MANTID_SLICEVIEWER_CONCRETEPEAKSPRESENTER_H_ #define MANTID_SLICEVIEWER_CONCRETEPEAKSPRESENTER_H_ -#include "MantidAPI/PeakTransform.h" -#include "MantidAPI/PeakTransformFactory.h" +#include "MantidGeometry/Crystal/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransformFactory.h" #include "MantidQtSliceViewer/PeaksPresenter.h" #include "MantidQtSliceViewer/PeakOverlayViewFactory.h" #include "MantidAPI/MDGeometry.h" @@ -31,7 +31,7 @@ class DLLExport ConcretePeaksPresenter : public PeaksPresenter { PeakOverlayViewFactory_sptr viewFactory, Mantid::API::IPeaksWorkspace_sptr peaksWS, boost::shared_ptr mdWS, - Mantid::API::PeakTransformFactory_sptr transformFactory); + Mantid::Geometry::PeakTransformFactory_sptr transformFactory); void reInitialize(Mantid::API::IPeaksWorkspace_sptr peaksWS); virtual ~ConcretePeaksPresenter(); virtual void update(); @@ -66,9 +66,9 @@ class DLLExport ConcretePeaksPresenter : public PeaksPresenter { /// Peaks workspace. boost::shared_ptr m_peaksWS; /// Transform factory - boost::shared_ptr m_transformFactory; + boost::shared_ptr m_transformFactory; /// Peak transformer - Mantid::API::PeakTransform_sptr m_transform; + Mantid::Geometry::PeakTransform_sptr m_transform; /// current slicing point. PeakBoundingBox m_slicePoint; /// Viewable Peaks diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakBoundingBox.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakBoundingBox.h index 14e3cd190976..bea7d2307cec 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakBoundingBox.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakBoundingBox.h @@ -4,7 +4,7 @@ #include "MantidKernel/System.h" #include #include -#include "MantidAPI/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransform.h" namespace MantidQt { @@ -117,7 +117,7 @@ namespace MantidQt /// Serialize as set of comma separated values std::string toExtentsString() const; /// Transform the box. - void transformBox(Mantid::API::PeakTransform_sptr transform); + void transformBox(Mantid::Geometry::PeakTransform_sptr transform); /// Make a new box based on the slice PeakBoundingBox makeSliceBox(const double& sliceDelta) const; }; diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCross.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCross.h index feec3e8434e8..b04d06f85958 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCross.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCross.h @@ -61,7 +61,7 @@ namespace SliceViewer /// Update the view. virtual void updateView(); /// Move the position of the peak, by using a different configuration of the existing origin indexes. - void movePosition(Mantid::API::PeakTransform_sptr peakTransform); + void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform); /// Change foreground colour virtual void changeForegroundColour(const QColor); /// Change background colour diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCrossFactory.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCrossFactory.h index 32df65b974a2..6beade764bf1 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCrossFactory.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiCrossFactory.h @@ -38,9 +38,9 @@ namespace MantidQt class DLLExport PeakOverlayMultiCrossFactory : public PeakOverlayViewFactoryBase { public: - PeakOverlayMultiCrossFactory(boost::shared_ptr mdWS, Mantid::API::PeakTransform_const_sptr transform, Mantid::API::IPeaksWorkspace_sptr peaksWS, QwtPlot * plot, QWidget * parent, const size_t colourNumber=0); + PeakOverlayMultiCrossFactory(boost::shared_ptr mdWS, Mantid::Geometry::PeakTransform_const_sptr transform, Mantid::API::IPeaksWorkspace_sptr peaksWS, QwtPlot * plot, QWidget * parent, const size_t colourNumber=0); virtual ~PeakOverlayMultiCrossFactory(); - virtual boost::shared_ptr createView(Mantid::API::PeakTransform_const_sptr transform) const; + virtual boost::shared_ptr createView(Mantid::Geometry::PeakTransform_const_sptr transform) const; virtual int FOM() const; virtual void swapPeaksWorkspace(boost::shared_ptr& peaksWS); private: diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphere.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphere.h index 070c71889383..34d9a8175dbb 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphere.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphere.h @@ -61,7 +61,7 @@ namespace SliceViewer /// Update the view. virtual void updateView(); /// Move the position of the peak, by using a different configuration of the existing origin indexes. - void movePosition(Mantid::API::PeakTransform_sptr peakTransform); + void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform); /// Change foreground colour virtual void changeForegroundColour(const QColor); /// Change background colour diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphereFactory.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphereFactory.h index 153af5f5ab83..38cb3c3c3a91 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphereFactory.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayMultiSphereFactory.h @@ -44,7 +44,7 @@ namespace MantidQt public: PeakOverlayMultiSphereFactory(Mantid::API::IPeaksWorkspace_sptr peaksWS, QwtPlot * plot, QWidget * parent, const size_t colourNumber=0); virtual ~PeakOverlayMultiSphereFactory(); - virtual boost::shared_ptr createView(Mantid::API::PeakTransform_const_sptr transform) const; + virtual boost::shared_ptr createView(Mantid::Geometry::PeakTransform_const_sptr transform) const; virtual int FOM() const; virtual void swapPeaksWorkspace(boost::shared_ptr& peaksWS); }; diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayView.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayView.h index a8203306cae8..78170a4a40a6 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayView.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayView.h @@ -3,7 +3,7 @@ #include "MantidKernel/System.h" #include "MantidKernel/V2D.h" -#include "MantidAPI/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransform.h" #include "MantidQtSliceViewer/PeakPalette.h" #include "MantidQtSliceViewer/PeakBoundingBox.h" #include @@ -49,7 +49,7 @@ namespace MantidQt /// Show the view. virtual void showView() = 0; /// Move the peak overlay to a new position. - virtual void movePosition(Mantid::API::PeakTransform_sptr peakTransform) = 0; + virtual void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform) = 0; /// Change foreground colour virtual void changeForegroundColour(const QColor) = 0; /// Change background colour diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayViewFactory.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayViewFactory.h index 59d21552980e..aba79e76f54e 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayViewFactory.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayViewFactory.h @@ -3,16 +3,18 @@ #include "MantidKernel/System.h" #include "MantidKernel/V3D.h" -#include "MantidAPI/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransform.h" #include "MantidQtSliceViewer/PeakOverlayView.h" #include namespace Mantid { - namespace API - { + namespace Geometry { // Forward dec. class IPeak; + } + namespace API { + // Forward dec. class IPeaksWorkspace; } } @@ -49,7 +51,7 @@ namespace MantidQt { public: /// Create a peak view from the index of a peak in the peaks workspace - virtual boost::shared_ptr createView(Mantid::API::PeakTransform_const_sptr transform) const = 0; + virtual boost::shared_ptr createView(Mantid::Geometry::PeakTransform_const_sptr transform) const = 0; /// Destructor virtual ~PeakOverlayViewFactory() { diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeaksPresenter.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeaksPresenter.h index 6ed44ab69b60..d312d812824f 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeaksPresenter.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeaksPresenter.h @@ -10,12 +10,15 @@ namespace Mantid { - namespace API - { + namespace Geometry { // Forward dec. - class IPeaksWorkspace; class PeakTransform; } + namespace API{ + // Forward dec. + class IPeaksWorkspace; + + } } namespace MantidQt diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PhysicalCrossPeak.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PhysicalCrossPeak.h index 3c51d1d60bde..602733cdbebf 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PhysicalCrossPeak.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PhysicalCrossPeak.h @@ -4,7 +4,7 @@ #include "MantidKernel/System.h" #include "MantidKernel/V3D.h" #include "MantidKernel/ClassMacros.h" -#include "MantidAPI/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransform.h" #include "MantidQtSliceViewer/PeakOverlayView.h" namespace MantidQt @@ -37,7 +37,7 @@ namespace MantidQt /// Setter for the slice point. void setSlicePoint(const double&); /// Transform the coordinates. - void movePosition(Mantid::API::PeakTransform_sptr peakTransform); + void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform); /// Draw CrossPeakPrimitives draw(const double& windowHeight, const double& windowWidth) const; /// Get the bounding box. diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PhysicalSphericalPeak.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PhysicalSphericalPeak.h index 403038e4cd23..4c3e76bccad2 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PhysicalSphericalPeak.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PhysicalSphericalPeak.h @@ -4,7 +4,7 @@ #include "MantidKernel/System.h" #include "MantidKernel/V3D.h" #include "MantidKernel/ClassMacros.h" -#include "MantidAPI/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransform.h" #include "MantidQtSliceViewer/PeakOverlayView.h" #include @@ -44,7 +44,7 @@ namespace MantidQt /// Setter for the slice point. void setSlicePoint(const double&); /// Transform the coordinates. - void movePosition(Mantid::API::PeakTransform_sptr peakTransform); + void movePosition(Mantid::Geometry::PeakTransform_sptr peakTransform); /// Draw SphericalPeakPrimitives draw(const double& windowHeight, const double& windowWidth, const double& viewWidth, const double& viewHeight) const; diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QPeaksTableModel.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QPeaksTableModel.h index 775f269a859e..7101c45844a5 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QPeaksTableModel.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/QPeaksTableModel.h @@ -10,11 +10,13 @@ // Forward declarations namespace Mantid { - namespace API - { - class IPeaksWorkspace; + namespace Geometry { class IPeak; } + + namespace API { + class IPeaksWorkspace; + } } namespace MantidQt @@ -164,7 +166,7 @@ namespace MantidQt mutable int m_dataCachePeakIndex; QString findColumnName(const int colIndex) const; - void updateDataCache(const Mantid::API::IPeak& peak, const int row) const; + void updateDataCache(const Mantid::Geometry::IPeak& peak, const int row) const; /// Collection of data for viewing. boost::shared_ptr m_peaksWS; diff --git a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/SliceViewer.h b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/SliceViewer.h index 471dde7ae279..ba72ee0a81f4 100644 --- a/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/SliceViewer.h +++ b/Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/SliceViewer.h @@ -6,7 +6,7 @@ #include "DllOption.h" #include "MantidAPI/IMDIterator.h" #include "MantidAPI/IMDWorkspace.h" -#include "MantidAPI/PeakTransformSelector.h" +#include "MantidGeometry/Crystal/PeakTransformSelector.h" #include "MantidGeometry/MDGeometry/MDHistoDimension.h" #include "MantidKernel/Logger.h" #include "MantidKernel/VMD.h" @@ -353,7 +353,7 @@ public slots: DimensionSliceWidget* m_peaksSliderWidget; /// Object for choosing a PeakTransformFactory based on the workspace type. - Mantid::API::PeakTransformSelector m_peakTransformSelector; + Mantid::Geometry::PeakTransformSelector m_peakTransformSelector; static const QString NoNormalizationKey; static const QString VolumeNormalizationKey; diff --git a/Code/Mantid/MantidQt/SliceViewer/src/CompositePeaksPresenter.cpp b/Code/Mantid/MantidQt/SliceViewer/src/CompositePeaksPresenter.cpp index a9f4103aa9b0..81aac5895fa4 100644 --- a/Code/Mantid/MantidQt/SliceViewer/src/CompositePeaksPresenter.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/CompositePeaksPresenter.cpp @@ -2,7 +2,7 @@ #include "MantidAPI/IPeaksWorkspace.h" #include -using Mantid::API::PeakTransform_sptr; +using Mantid::Geometry::PeakTransform_sptr; namespace MantidQt { namespace SliceViewer { diff --git a/Code/Mantid/MantidQt/SliceViewer/src/ConcretePeaksPresenter.cpp b/Code/Mantid/MantidQt/SliceViewer/src/ConcretePeaksPresenter.cpp index 0eebd21b630b..7077aa13bddf 100644 --- a/Code/Mantid/MantidQt/SliceViewer/src/ConcretePeaksPresenter.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/ConcretePeaksPresenter.cpp @@ -2,7 +2,7 @@ #include "MantidQtSliceViewer/UpdateableOnDemand.h" #include "MantidQtSliceViewer/ZoomableOnDemand.h" #include "MantidAPI/IPeaksWorkspace.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidAPI/IMDWorkspace.h" #include "MantidAPI/AlgorithmManager.h" #include "MantidAPI/IAlgorithm.h" @@ -114,7 +114,7 @@ void ConcretePeaksPresenter::checkWorkspaceCompatibilities( ConcretePeaksPresenter::ConcretePeaksPresenter( PeakOverlayViewFactory_sptr viewFactory, IPeaksWorkspace_sptr peaksWS, boost::shared_ptr mdWS, - Mantid::API::PeakTransformFactory_sptr transformFactory) + Mantid::Geometry::PeakTransformFactory_sptr transformFactory) : m_viewFactory(viewFactory), m_peaksWS(peaksWS), m_transformFactory(transformFactory), m_transform(transformFactory->createDefaultTransform()), m_slicePoint(), @@ -263,7 +263,7 @@ bool ConcretePeaksPresenter::configureMappingTransform() { m_transform = temp; showAll(); transformSucceeded = true; - } catch (PeakTransformException &) { + } catch (Mantid::Geometry::PeakTransformException &) { hideAll(); } return transformSucceeded; diff --git a/Code/Mantid/MantidQt/SliceViewer/src/PeakBoundingBox.cpp b/Code/Mantid/MantidQt/SliceViewer/src/PeakBoundingBox.cpp index 0aca701a6957..8e4778843251 100644 --- a/Code/Mantid/MantidQt/SliceViewer/src/PeakBoundingBox.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/PeakBoundingBox.cpp @@ -233,7 +233,7 @@ namespace MantidQt * Transform the box. Permanent change the box left, right, top, bottom, front and back according to the transform. * @param transform : Transform to use. */ - void PeakBoundingBox::transformBox(Mantid::API::PeakTransform_sptr transform) + void PeakBoundingBox::transformBox(Mantid::Geometry::PeakTransform_sptr transform) { using Mantid::Kernel::V3D; // Front bottom left diff --git a/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiCross.cpp b/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiCross.cpp index 6388c6a68bb9..f51ab66e58eb 100644 --- a/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiCross.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiCross.cpp @@ -7,7 +7,7 @@ #include using namespace Mantid::Kernel; -using namespace Mantid::API; +using namespace Mantid::Geometry; namespace MantidQt diff --git a/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiCrossFactory.cpp b/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiCrossFactory.cpp index cf1a7312eec9..5f929bdd157a 100644 --- a/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiCrossFactory.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiCrossFactory.cpp @@ -2,7 +2,7 @@ #include "MantidQtSliceViewer/PeakOverlayMultiCross.h" #include "MantidQtSliceViewer/PhysicalCrossPeak.h" #include "MantidKernel/V3D.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidAPI/IMDWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/IMDHistoWorkspace.h" diff --git a/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiSphere.cpp b/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiSphere.cpp index 1de2e4c34d57..33fa5129d2d1 100644 --- a/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiSphere.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiSphere.cpp @@ -7,7 +7,7 @@ #include using namespace Mantid::Kernel; -using namespace Mantid::API; +using namespace Mantid::Geometry; namespace MantidQt { diff --git a/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiSphereFactory.cpp b/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiSphereFactory.cpp index f449aaec538a..05cd9cd8a8f6 100644 --- a/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiSphereFactory.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayMultiSphereFactory.cpp @@ -46,13 +46,13 @@ namespace MantidQt } } - boost::shared_ptr PeakOverlayMultiSphereFactory::createView(Mantid::API::PeakTransform_const_sptr transform) const + boost::shared_ptr PeakOverlayMultiSphereFactory::createView(Mantid::Geometry::PeakTransform_const_sptr transform) const { // Construct all physical peaks VecPhysicalSphericalPeak physicalPeaks(m_peaksWS->rowCount()); for(size_t i = 0; i < physicalPeaks.size(); ++i) { - const IPeak& peak = m_peaksWS->getPeak(static_cast(i)); + const Mantid::Geometry::IPeak& peak = m_peaksWS->getPeak(static_cast(i)); auto position = transform->transformPeak(peak); physicalPeaks[i] = boost::make_shared(position, m_peakRadius[i], m_backgroundInnerRadius[i], m_backgroundOuterRadius[i]); } diff --git a/Code/Mantid/MantidQt/SliceViewer/src/PhysicalCrossPeak.cpp b/Code/Mantid/MantidQt/SliceViewer/src/PhysicalCrossPeak.cpp index 000827b5f2bc..f78e9ac6e73d 100644 --- a/Code/Mantid/MantidQt/SliceViewer/src/PhysicalCrossPeak.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/PhysicalCrossPeak.cpp @@ -1,6 +1,6 @@ #include "MantidQtSliceViewer/PhysicalCrossPeak.h" -using namespace Mantid::API; +using namespace Mantid::Geometry; namespace MantidQt { diff --git a/Code/Mantid/MantidQt/SliceViewer/src/PhysicalSphericalPeak.cpp b/Code/Mantid/MantidQt/SliceViewer/src/PhysicalSphericalPeak.cpp index 7e49bcd38d70..b434a7d26b59 100644 --- a/Code/Mantid/MantidQt/SliceViewer/src/PhysicalSphericalPeak.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/PhysicalSphericalPeak.cpp @@ -1,6 +1,6 @@ #include "MantidQtSliceViewer/PhysicalSphericalPeak.h" -using namespace Mantid::API; +using namespace Mantid::Geometry; namespace MantidQt { diff --git a/Code/Mantid/MantidQt/SliceViewer/src/QPeaksTableModel.cpp b/Code/Mantid/MantidQt/SliceViewer/src/QPeaksTableModel.cpp index 9d046497f9ac..49369f62f9d9 100644 --- a/Code/Mantid/MantidQt/SliceViewer/src/QPeaksTableModel.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/QPeaksTableModel.cpp @@ -1,6 +1,6 @@ #include "MantidQtSliceViewer/QPeaksTableModel.h" #include "MantidAPI/IPeaksWorkspace.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidGeometry/IComponent.h" #include "MantidKernel/ConfigService.h" #include "MantidKernel/FacilityInfo.h" @@ -8,6 +8,7 @@ #include using namespace Mantid::API; +using namespace Mantid::Geometry; using namespace boost; namespace MantidQt @@ -56,7 +57,7 @@ namespace MantidQt const int QPeaksTableModel::COL_QLAB(18); const int QPeaksTableModel::COL_QSAMPLE(19); - void QPeaksTableModel::updateDataCache(const Mantid::API::IPeak& peak, const int row) const + void QPeaksTableModel::updateDataCache(const Mantid::Geometry::IPeak& peak, const int row) const { // if the index is what is already cached just return if (row == m_dataCachePeakIndex) diff --git a/Code/Mantid/MantidQt/SliceViewer/src/SliceViewer.cpp b/Code/Mantid/MantidQt/SliceViewer/src/SliceViewer.cpp index b50630fe1e15..bc6309fb090d 100644 --- a/Code/Mantid/MantidQt/SliceViewer/src/SliceViewer.cpp +++ b/Code/Mantid/MantidQt/SliceViewer/src/SliceViewer.cpp @@ -10,9 +10,9 @@ #include "MantidAPI/CoordTransform.h" #include "MantidAPI/IMDIterator.h" #include "MantidAPI/MatrixWorkspace.h" -#include "MantidAPI/PeakTransformHKL.h" -#include "MantidAPI/PeakTransformQSample.h" -#include "MantidAPI/PeakTransformQLab.h" +#include "MantidGeometry/Crystal/PeakTransformHKL.h" +#include "MantidGeometry/Crystal/PeakTransformQSample.h" +#include "MantidGeometry/Crystal/PeakTransformQLab.h" #include "MantidAPI/IPeaksWorkspace.h" #include "MantidAPI/IMDHistoWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Code/Mantid/MantidQt/SliceViewer/test/ConcretePeaksPresenterTest.h b/Code/Mantid/MantidQt/SliceViewer/test/ConcretePeaksPresenterTest.h index 1ae0b2ebc7bc..3bdfc87bc841 100644 --- a/Code/Mantid/MantidQt/SliceViewer/test/ConcretePeaksPresenterTest.h +++ b/Code/Mantid/MantidQt/SliceViewer/test/ConcretePeaksPresenterTest.h @@ -3,10 +3,10 @@ #include #include "MantidAPI/ExperimentInfo.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidAPI/FrameworkManager.h" #include "MantidKernel/SpecialCoordinateSystem.h" -#include "MantidAPI/PeakTransformFactory.h" +#include "MantidGeometry/Crystal/PeakTransformFactory.h" #include "MantidQtSliceViewer/ConcretePeaksPresenter.h" #include "MantidQtSliceViewer/PeakOverlayViewFactory.h" #include "MantidDataObjects/PeaksWorkspace.h" diff --git a/Code/Mantid/MantidQt/SliceViewer/test/MockObjects.h b/Code/Mantid/MantidQt/SliceViewer/test/MockObjects.h index 2d6b3ddc3f1e..8161be0cdb5b 100644 --- a/Code/Mantid/MantidQt/SliceViewer/test/MockObjects.h +++ b/Code/Mantid/MantidQt/SliceViewer/test/MockObjects.h @@ -3,14 +3,14 @@ #include "MantidAPI/IMDWorkspace.h" #include "MantidAPI/IPeaksWorkspace.h" -#include "MantidAPI/PeakTransform.h" -#include "MantidAPI/PeakTransformFactory.h" +#include "MantidGeometry/Crystal/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransformFactory.h" #include "MantidQtSliceViewer/PeaksPresenter.h" #include "MantidQtSliceViewer/PeakOverlayView.h" #include "MantidQtSliceViewer/PeakOverlayViewFactory.h" #include "MantidQtSliceViewer/ZoomablePeaksView.h" #include "MantidQtSliceViewer/UpdateableOnDemand.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidKernel/UnitLabel.h" #include #include @@ -18,6 +18,7 @@ using namespace MantidQt::SliceViewer; using namespace Mantid::API; +using namespace Mantid::Geometry; using namespace Mantid; using boost::regex; @@ -81,7 +82,7 @@ namespace /*------------------------------------------------------------ Mock Peak Transform ------------------------------------------------------------*/ - class MockPeakTransform : public PeakTransform + class MockPeakTransform : public Geometry::PeakTransform { public: MockPeakTransform() @@ -93,7 +94,7 @@ namespace } MOCK_CONST_METHOD0(clone, PeakTransform_sptr()); MOCK_CONST_METHOD1(transform, Mantid::Kernel::V3D(const Mantid::Kernel::V3D&)); - MOCK_CONST_METHOD1(transformPeak, Mantid::Kernel::V3D(const Mantid::API::IPeak&)); + MOCK_CONST_METHOD1(transformPeak, Mantid::Kernel::V3D(const Mantid::Geometry::IPeak&)); MOCK_CONST_METHOD0(getFriendlyName, std::string()); MOCK_CONST_METHOD0(getCoordinateSystem, Mantid::Kernel::SpecialCoordinateSystem()); }; @@ -101,7 +102,7 @@ namespace /*------------------------------------------------------------ Mock Peak Transform Factory ------------------------------------------------------------*/ -class MockPeakTransformFactory : public PeakTransformFactory +class MockPeakTransformFactory : public Geometry::PeakTransformFactory { public: MOCK_CONST_METHOD0(createDefaultTransform, PeakTransform_sptr()); @@ -154,7 +155,7 @@ class MockPeakTransformFactory : public PeakTransformFactory /*------------------------------------------------------------ Mock IPeak ------------------------------------------------------------*/ - class MockIPeak : public Mantid::API::IPeak + class MockIPeak : public Mantid::Geometry::IPeak { public: MOCK_METHOD1(setInstrument, diff --git a/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/CompositePeaksPresenterVsi.h b/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/CompositePeaksPresenterVsi.h index 21bf69a64049..f00c463bb4c4 100644 --- a/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/CompositePeaksPresenterVsi.h +++ b/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/CompositePeaksPresenterVsi.h @@ -3,7 +3,7 @@ #include "MantidKernel/System.h" #include "MantidVatesAPI/PeaksPresenterVsi.h" -#include "MantidAPI/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransform.h" #include "MantidAPI/IPeaksWorkspace.h" #include "MantidVatesAPI/ViewFrustum.h" #include "MantidGeometry/Crystal/PeakShape.h" diff --git a/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/ConcretePeaksPresenterVsi.h b/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/ConcretePeaksPresenterVsi.h index a3d72ca061f9..ef08ef5844b3 100644 --- a/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/ConcretePeaksPresenterVsi.h +++ b/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/ConcretePeaksPresenterVsi.h @@ -3,7 +3,7 @@ #include "MantidKernel/System.h" #include "MantidVatesAPI/PeaksPresenterVsi.h" -#include "MantidAPI/PeakTransform.h" +#include "MantidGeometry/Crystal/PeakTransform.h" #include "MantidAPI/IPeaksWorkspace.h" #include "MantidVatesAPI/ViewFrustum.h" #include "MantidGeometry/Crystal/PeakShape.h" diff --git a/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/vtkDataSetToPeaksFilteredDataSet.h b/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/vtkDataSetToPeaksFilteredDataSet.h index e59d30815622..0c32a274f5e5 100644 --- a/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/vtkDataSetToPeaksFilteredDataSet.h +++ b/Code/Mantid/Vates/VatesAPI/inc/MantidVatesAPI/vtkDataSetToPeaksFilteredDataSet.h @@ -56,7 +56,7 @@ namespace VATES private: vtkDataSetToPeaksFilteredDataSet& operator=(const vtkDataSetToPeaksFilteredDataSet& other); std::vector> getPeaksInfo(std::vector peaksWorkspaces); - void addSinglePeak(Mantid::API::IPeak* peak, const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem, std::vector>& peaksInfo); + void addSinglePeak(Mantid::Geometry::IPeak* peak, const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem, std::vector>& peaksInfo); vtkUnstructuredGrid *m_inputData; ///< Data to peak filter vtkUnstructuredGrid *m_outputData; ///< Peak filtered data std::vector m_peaksWorkspaces; ///< A list of peaks workspace names. diff --git a/Code/Mantid/Vates/VatesAPI/src/ConcretePeaksPresenterVsi.cpp b/Code/Mantid/Vates/VatesAPI/src/ConcretePeaksPresenterVsi.cpp index c5a1a259e69e..21601ec2ce68 100644 --- a/Code/Mantid/Vates/VatesAPI/src/ConcretePeaksPresenterVsi.cpp +++ b/Code/Mantid/Vates/VatesAPI/src/ConcretePeaksPresenterVsi.cpp @@ -6,7 +6,7 @@ #include "MantidDataObjects/PeakShapeSpherical.h" #include "MantidDataObjects/PeakShapeEllipsoid.h" #include "MantidKernel/SpecialCoordinateSystem.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidGeometry/Crystal/PeakShape.h" namespace Mantid { namespace VATES { diff --git a/Code/Mantid/Vates/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp b/Code/Mantid/Vates/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp index 98f3afb4d182..faa0fc5c470a 100644 --- a/Code/Mantid/Vates/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp +++ b/Code/Mantid/Vates/VatesAPI/src/vtkDataSetToPeaksFilteredDataSet.cpp @@ -1,5 +1,5 @@ #include "MantidVatesAPI/vtkDataSetToPeaksFilteredDataSet.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidAPI/IPeaksWorkspace.h" #include "MantidDataObjects/NoShape.h" #include "MantidDataObjects/PeakShapeEllipsoid.h" @@ -193,7 +193,7 @@ namespace VATES // Iterate over all peaks for the workspace for (int i = 0; i < numPeaks ; i++) { - Mantid::API::IPeak* peak = (*it)->getPeakPtr(i); + Mantid::Geometry::IPeak* peak = (*it)->getPeakPtr(i); addSinglePeak(peak, coordinateSystem, peaksInfo); } @@ -208,7 +208,7 @@ GCC_DIAG_OFF(strict-aliasing) * @param coordinateSystem The coordinate system in which the peaks position should be retrieved. * @param peaksInfo A reference to the vector containing peak information. */ - void vtkDataSetToPeaksFilteredDataSet::addSinglePeak(Mantid::API::IPeak* peak, const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem, std::vector>& peaksInfo) + void vtkDataSetToPeaksFilteredDataSet::addSinglePeak(Mantid::Geometry::IPeak* peak, const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem, std::vector>& peaksInfo) { double radius = m_defaultRadius; const Mantid::Geometry::PeakShape& shape = peak->getPeakShape(); diff --git a/Code/Mantid/Vates/VatesAPI/src/vtkPeakMarkerFactory.cpp b/Code/Mantid/Vates/VatesAPI/src/vtkPeakMarkerFactory.cpp index b2f7c9056cd9..5e73b80030f8 100644 --- a/Code/Mantid/Vates/VatesAPI/src/vtkPeakMarkerFactory.cpp +++ b/Code/Mantid/Vates/VatesAPI/src/vtkPeakMarkerFactory.cpp @@ -4,7 +4,7 @@ #include #include "MantidAPI/Workspace.h" #include "MantidAPI/IPeaksWorkspace.h" -#include "MantidAPI/IPeak.h" +#include "MantidGeometry/Crystal/IPeak.h" #include "MantidGeometry/Crystal/PeakShape.h" #include "MantidDataObjects/PeakShapeSpherical.h" #include "MantidDataObjects/PeakShapeEllipsoid.h" @@ -32,7 +32,7 @@ #include using Mantid::API::IPeaksWorkspace; -using Mantid::API::IPeak; +using Mantid::Geometry::IPeak; using Mantid::Kernel::V3D; namespace Mantid diff --git a/Code/Mantid/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h b/Code/Mantid/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h index f71d3cd86a48..908fbb4fe291 100644 --- a/Code/Mantid/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h +++ b/Code/Mantid/Vates/VatesAPI/test/vtkPeakMarkerFactoryTest.h @@ -15,6 +15,7 @@ using namespace Mantid; using namespace Mantid::Kernel; using namespace Mantid::API; +using namespace Mantid::Geometry; using namespace Mantid::DataObjects; using namespace ::testing; using namespace Mantid::VATES; @@ -32,7 +33,6 @@ class MockPeaksWorkspace : public PeaksWorkspace { public: MOCK_METHOD1(setInstrument, void (Mantid::Geometry::Instrument_const_sptr inst)); - //MOCK_METHOD0(getInstrument, Mantid::Geometry::Instrument_const_sptr ()); MOCK_CONST_METHOD0(clone, Mantid::DataObjects::PeaksWorkspace*()); MOCK_CONST_METHOD0(getNumberPeaks, int()); MOCK_METHOD1(removePeak, void (int peakNum) ); diff --git a/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTableControllerVsi.h b/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTableControllerVsi.h index 063c54093e1e..ead42062bbc3 100644 --- a/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTableControllerVsi.h +++ b/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/PeaksTableControllerVsi.h @@ -5,7 +5,7 @@ #include "MantidVatesSimpleGuiViewWidgets/CameraManager.h" #include "MantidVatesSimpleGuiViewWidgets/PeaksTabWidget.h" #include "MantidVatesAPI/CompositePeaksPresenterVsi.h" -#include "MantidAPI/PeakTransformSelector.h" +#include "MantidGeometry/Crystal/PeakTransformSelector.h" #include "MantidGeometry/Crystal/PeakShape.h" #include "MantidQtSliceViewer/PeakPalette.h" #include "MantidKernel/SpecialCoordinateSystem.h" @@ -67,7 +67,7 @@ public slots: boost::shared_ptr m_cameraManager; boost::shared_ptr m_presenter; /// Object for choosing a PeakTransformFactory based on the workspace type. - Mantid::API::PeakTransformSelector m_peakTransformSelector; + Mantid::Geometry::PeakTransformSelector m_peakTransformSelector; PeaksTabWidget *m_peaksTabWidget; pqPipelineSource *m_peakMarker; Mantid::Kernel::SpecialCoordinateSystem m_coordinateSystem; diff --git a/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/PeaksTableControllerVsi.cpp b/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/PeaksTableControllerVsi.cpp index e5414a9c4c9c..8f99c9e0d6ce 100644 --- a/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/PeaksTableControllerVsi.cpp +++ b/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/PeaksTableControllerVsi.cpp @@ -5,9 +5,9 @@ #include "MantidAPI/IPeaksWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/AnalysisDataService.h" -#include "MantidAPI/PeakTransformHKL.h" -#include "MantidAPI/PeakTransformQSample.h" -#include "MantidAPI/PeakTransformQLab.h" +#include "MantidGeometry/Crystal/PeakTransformHKL.h" +#include "MantidGeometry/Crystal/PeakTransformQSample.h" +#include "MantidGeometry/Crystal/PeakTransformQLab.h" #include "MantidKernel/V3D.h" #include "MantidKernel/SpecialCoordinateSystem.h" #include "MantidKernel/Logger.h" @@ -75,11 +75,11 @@ PeaksTableControllerVsi::PeaksTableControllerVsi( m_presenter(new Mantid::VATES::CompositePeaksPresenterVsi()), m_peaksTabWidget(NULL), m_peakMarker(NULL), m_coordinateSystem(Mantid::Kernel::SpecialCoordinateSystem::QLab) { m_peakTransformSelector.registerCandidate( - boost::make_shared()); + boost::make_shared()); m_peakTransformSelector.registerCandidate( - boost::make_shared()); + boost::make_shared()); m_peakTransformSelector.registerCandidate( - boost::make_shared()); + boost::make_shared()); } PeaksTableControllerVsi::~PeaksTableControllerVsi() { @@ -148,9 +148,9 @@ void PeaksTableControllerVsi::addWorkspace( Mantid::API::AnalysisDataService::Instance() .retrieveWS(wsName); - Mantid::API::PeakTransformFactory_sptr transformFactory = + Mantid::Geometry::PeakTransformFactory_sptr transformFactory = m_peakTransformSelector.makeChoice(dimInfo[0], dimInfo[1]); - Mantid::API::PeakTransform_sptr transform = + Mantid::Geometry::PeakTransform_sptr transform = transformFactory->createTransform(dimInfo[0], dimInfo[1]); std::string frame = transform->getFriendlyName();