From b25197527eb9ff2fc3c62cb4980029172ee61ab7 Mon Sep 17 00:00:00 2001 From: Martyn Gigg <martyn.gigg@gmail.com> Date: Sun, 8 Mar 2015 21:47:03 +0000 Subject: [PATCH] Move the algorithms from MDEvents to MDAlgorithms. Refs #11209 --- Code/Mantid/Framework/CMakeLists.txt | 1 - .../Framework/MDAlgorithms/CMakeLists.txt | 60 +++ .../inc/MantidMDAlgorithms/AndMD.h | 4 +- .../inc/MantidMDAlgorithms/BinMD.h | 22 +- .../MantidMDAlgorithms/BinaryOperationMD.h | 21 +- .../BooleanBinaryOperationMD.h | 6 +- .../BoxControllerSettingsAlgorithm.h | 10 +- .../MantidMDAlgorithms/CalculateCoverageDGS.h | 4 +- .../CalculateReflectometryQBase.h | 6 +- .../inc/MantidMDAlgorithms/CentroidPeaksMD.h | 8 +- .../inc/MantidMDAlgorithms/CentroidPeaksMD2.h | 8 +- .../inc/MantidMDAlgorithms/CloneMDWorkspace.h | 12 +- .../MantidMDAlgorithms/CompareMDWorkspaces.h | 10 +- .../inc/MantidMDAlgorithms}/ConvToMDBase.h | 75 ++- .../MantidMDAlgorithms}/ConvToMDEventsWS.h | 24 +- .../inc/MantidMDAlgorithms}/ConvToMDHistoWS.h | 18 +- .../MantidMDAlgorithms}/ConvToMDSelector.h | 11 +- .../ConvertToDetectorFaceMD.h | 11 +- .../ConvertToDiffractionMDWorkspace.h | 18 +- .../ConvertToDiffractionMDWorkspace2.h | 32 +- .../inc/MantidMDAlgorithms/ConvertToMD.h | 49 +- .../ConvertToMDMinMaxLocal.h | 4 +- .../MantidMDAlgorithms/ConvertToMDParent.h | 17 +- .../ConvertToReflectometryQ.h | 8 +- .../CreateMDHistoWorkspace.h | 15 +- .../MantidMDAlgorithms/CreateMDWorkspace.h | 23 +- .../inc/MantidMDAlgorithms/DivideMD.h | 8 +- .../inc/MantidMDAlgorithms/EqualToMD.h | 6 +- .../inc/MantidMDAlgorithms/ExponentialMD.h | 2 +- .../inc/MantidMDAlgorithms/FakeMDEventData.h | 82 ++-- .../inc/MantidMDAlgorithms/FindPeaksMD.h | 12 +- .../inc/MantidMDAlgorithms}/FitMD.h | 10 +- .../inc/MantidMDAlgorithms/GreaterThanMD.h | 6 +- .../ImportMDEventWorkspace.h | 20 +- .../ImportMDHistoWorkspace.h | 13 +- .../ImportMDHistoWorkspaceBase.h | 14 +- .../MantidMDAlgorithms}/Integrate3DEvents.h | 4 +- .../MantidMDAlgorithms}/IntegrateEllipsoids.h | 12 +- .../inc/MantidMDAlgorithms/IntegratePeaksMD.h | 6 +- .../MantidMDAlgorithms/IntegratePeaksMD2.h | 6 +- .../inc/MantidMDAlgorithms/LessThanMD.h | 6 +- .../inc/MantidMDAlgorithms/LoadMD.h | 14 +- .../inc/MantidMDAlgorithms/LoadSQW.h | 16 +- .../inc/MantidMDAlgorithms/LogarithmMD.h | 2 +- .../MantidMDAlgorithms}/MDEventWSWrapper.h | 18 +- .../inc/MantidMDAlgorithms/MDNormDirectSC.h | 6 +- .../inc/MantidMDAlgorithms/MDNormSCD.h | 6 +- .../MantidMDAlgorithms}/MDTransfAxisNames.h | 10 +- .../inc/MantidMDAlgorithms/MDTransfDEHelper.h | 4 +- .../inc/MantidMDAlgorithms}/MDTransfFactory.h | 32 +- .../MantidMDAlgorithms}/MDTransfInterface.h | 16 +- .../inc/MantidMDAlgorithms}/MDTransfModQ.h | 10 +- .../inc/MantidMDAlgorithms}/MDTransfNoQ.h | 12 +- .../inc/MantidMDAlgorithms}/MDTransfQ3D.h | 13 +- .../inc/MantidMDAlgorithms}/MDWSDescription.h | 24 +- .../inc/MantidMDAlgorithms}/MDWSTransform.h | 26 +- .../inc/MantidMDAlgorithms/MergeMD.h | 9 +- .../inc/MantidMDAlgorithms/MergeMDFiles.h | 8 +- .../inc/MantidMDAlgorithms/MinusMD.h | 8 +- .../inc/MantidMDAlgorithms/MultiplyMD.h | 10 +- .../inc/MantidMDAlgorithms/NotMD.h | 2 +- .../inc/MantidMDAlgorithms}/OneStepMDEW.h | 10 +- .../inc/MantidMDAlgorithms/OrMD.h | 4 +- .../inc/MantidMDAlgorithms/PlusMD.h | 10 +- .../inc/MantidMDAlgorithms/PowerMD.h | 2 +- .../PreprocessDetectorsToMD.h | 2 +- .../SimulateResolutionConvolvedModel.h | 2 +- .../MantidMDAlgorithms}/QueryMDWorkspace.h | 12 +- .../ReflectometryTransform.h | 20 +- .../ReflectometryTransformKiKf.h | 17 +- .../ReflectometryTransformP.h | 12 +- .../ReflectometryTransformQxQz.h | 14 +- .../inc/MantidMDAlgorithms}/SaveIsawQvector.h | 12 +- .../inc/MantidMDAlgorithms/SaveMD.h | 14 +- .../inc/MantidMDAlgorithms/SliceMD.h | 14 +- .../inc/MantidMDAlgorithms/SlicingAlgorithm.h | 22 +- .../inc/MantidMDAlgorithms/TransformMD.h | 4 +- .../inc/MantidMDAlgorithms/UnaryOperationMD.h | 6 +- .../UnitsConversionHelper.h | 12 +- .../inc/MantidMDAlgorithms}/UserFunctionMD.h | 10 +- .../inc/MantidMDAlgorithms/WeightedMeanMD.h | 8 +- .../inc/MantidMDAlgorithms/XorMD.h | 4 +- .../Framework/MDAlgorithms/src/AndMD.cpp | 9 +- .../Framework/MDAlgorithms/src/BinMD.cpp | 24 +- .../MDAlgorithms/src/BinaryOperationMD.cpp | 6 +- .../src/BooleanBinaryOperationMD.cpp | 2 +- .../src/BoxControllerSettingsAlgorithm.cpp | 6 +- .../MDAlgorithms/src/CalculateCoverageDGS.cpp | 4 +- .../src/CalculateReflectometryQBase.cpp | 4 +- .../MDAlgorithms/src/CentroidPeaksMD.cpp | 8 +- .../MDAlgorithms/src/CentroidPeaksMD2.cpp | 8 +- .../MDAlgorithms/src/CloneMDWorkspace.cpp | 8 +- .../MDAlgorithms/src/CompareMDWorkspaces.cpp | 10 +- .../src/ConvToMDBase.cpp | 8 +- .../src/ConvToMDEventsWS.cpp | 20 +- .../src/ConvToMDHistoWS.cpp | 14 +- .../src/ConvToMDSelector.cpp | 12 +- .../src/ConvertToDetectorFaceMD.cpp | 8 +- .../src/ConvertToDiffractionMDWorkspace.cpp | 18 +- .../src/ConvertToDiffractionMDWorkspace2.cpp | 33 +- .../MDAlgorithms/src/ConvertToMD.cpp | 50 +- .../src/ConvertToMDMinMaxGlobal.cpp | 19 +- .../src/ConvertToMDMinMaxLocal.cpp | 20 +- .../MDAlgorithms/src/ConvertToMDParent.cpp | 12 +- .../src/ConvertToReflectometryQ.cpp | 30 +- .../src/CreateMDHistoWorkspace.cpp | 4 +- .../MDAlgorithms/src/CreateMDWorkspace.cpp | 6 +- .../Framework/MDAlgorithms/src/DivideMD.cpp | 16 +- .../Framework/MDAlgorithms/src/EqualToMD.cpp | 6 +- .../MDAlgorithms/src/ExponentialMD.cpp | 2 +- .../MDAlgorithms/src/FakeMDEventData.cpp | 429 +----------------- .../MDAlgorithms/src/FindPeaksMD.cpp | 14 +- .../{MDEvents => MDAlgorithms}/src/FitMD.cpp | 15 +- .../MDAlgorithms/src/GreaterThanMD.cpp | 6 +- .../src/ImportMDEventWorkspace.cpp | 44 +- .../src/ImportMDHistoWorkspace.cpp | 20 +- .../src/ImportMDHistoWorkspaceBase.cpp | 8 +- .../src/Integrate3DEvents.cpp | 6 +- .../src/IntegrateEllipsoids.cpp | 12 +- .../MDAlgorithms/src/IntegratePeaksMD.cpp | 8 +- .../MDAlgorithms/src/IntegratePeaksMD2.cpp | 8 +- .../Framework/MDAlgorithms/src/LessThanMD.cpp | 6 +- .../Framework/MDAlgorithms/src/LoadMD.cpp | 18 +- .../Framework/MDAlgorithms/src/LoadSQW.cpp | 14 +- .../MDAlgorithms/src/LogarithmMD.cpp | 2 +- .../src/MDEventWSWrapper.cpp | 36 +- .../MDAlgorithms/src/MDNormDirectSC.cpp | 6 +- .../Framework/MDAlgorithms/src/MDNormSCD.cpp | 6 +- .../src/MDTransfAxisNames.cpp | 6 +- .../MDAlgorithms/src/MDTransfDEHelper.cpp | 6 +- .../src/MDTransfFactory.cpp | 6 +- .../src/MDTransfModQ.cpp | 4 +- .../src/MDTransfNoQ.cpp | 4 +- .../src/MDTransfQ3D.cpp | 4 +- .../src/MDWSDescription.cpp | 19 +- .../src/MDWSTransform.cpp | 26 +- .../Framework/MDAlgorithms/src/MergeMD.cpp | 6 +- .../MDAlgorithms/src/MergeMDFiles.cpp | 10 +- .../Framework/MDAlgorithms/src/MinusMD.cpp | 16 +- .../Framework/MDAlgorithms/src/MultiplyMD.cpp | 16 +- .../Framework/MDAlgorithms/src/NotMD.cpp | 2 +- .../src/OneStepMDEW.cpp | 8 +- .../Framework/MDAlgorithms/src/OrMD.cpp | 4 +- .../Framework/MDAlgorithms/src/PlusMD.cpp | 14 +- .../Framework/MDAlgorithms/src/PowerMD.cpp | 2 +- .../src/QueryMDWorkspace.cpp | 12 +- .../src/ReflectometryTransform.cpp | 4 +- .../src/ReflectometryTransformKiKf.cpp | 11 +- .../src/ReflectometryTransformP.cpp | 8 +- .../src/ReflectometryTransformQxQz.cpp | 8 +- .../src/SaveIsawQvector.cpp | 10 +- .../Framework/MDAlgorithms/src/SaveMD.cpp | 22 +- .../Framework/MDAlgorithms/src/SaveZODS.cpp | 4 +- .../MDAlgorithms/src/SetMDUsingMask.cpp | 4 +- .../Framework/MDAlgorithms/src/SliceMD.cpp | 6 +- .../MDAlgorithms/src/SlicingAlgorithm.cpp | 34 +- .../MDAlgorithms/src/ThresholdMD.cpp | 4 +- .../MDAlgorithms/src/TransformMD.cpp | 12 +- .../MDAlgorithms/src/UnaryOperationMD.cpp | 4 +- .../src/UnitsConversionHelper.cpp | 6 +- .../src/UserFunctionMD.cpp | 6 +- .../MDAlgorithms/src/WeightedMeanMD.cpp | 10 +- .../Framework/MDAlgorithms/src/XorMD.cpp | 4 +- .../test/BoxControllerSettingsAlgorithmTest.h | 2 +- .../test/ConvToMDBaseTest.h | 2 +- .../test/ConvertToReflectometryQTest.h | 2 +- .../test/FitMDTest.h | 0 .../test/ImportMDEventWorkspaceTest.h | 2 +- .../test/ImportMDHistoWorkspaceTest.h | 2 +- .../test/Integrate3DEventsTest.h | 2 +- .../test/MDEventWSWrapperTest.h | 2 +- .../test/MDTransfAxisNamesTest.h | 2 +- .../test/MDTransfFactoryTest.h | 2 +- .../test/MDTransfModQTest.h | 0 .../test/MDTransfQ3DTest.h | 6 +- .../test/MDWSDescriptionTest.h | 2 +- .../test/OneStepMDEWTest.h | 2 +- .../test/QueryMDWorkspaceTest.h | 2 +- .../test/ReflectometryTransformKiKfTest.h | 2 +- .../test/ReflectometryTransformPTest.h | 2 +- .../test/ReflectometryTransformQxQzTest.h | 2 +- .../test/SaveIsawQvectorTest.h | 2 +- .../test/UnitsConversionHelperTest.h | 2 +- Code/Mantid/Framework/MDEvents/CMakeLists.txt | 59 --- 184 files changed, 1078 insertions(+), 1509 deletions(-) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/BoxControllerSettingsAlgorithm.h (90%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/CalculateReflectometryQBase.h (71%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ConvToMDBase.h (64%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ConvToMDEventsWS.h (78%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ConvToMDHistoWS.h (83%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ConvToMDSelector.h (90%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ConvertToReflectometryQ.h (89%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/FitMD.h (96%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ImportMDEventWorkspace.h (87%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ImportMDHistoWorkspace.h (84%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ImportMDHistoWorkspaceBase.h (84%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/Integrate3DEvents.h (98%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/IntegrateEllipsoids.h (72%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/MDEventWSWrapper.h (93%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/MDTransfAxisNames.h (93%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/MDTransfFactory.h (86%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/MDTransfInterface.h (98%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/MDTransfModQ.h (96%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/MDTransfNoQ.h (94%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/MDTransfQ3D.h (94%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/MDWSDescription.h (96%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/MDWSTransform.h (88%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/OneStepMDEW.h (84%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/QueryMDWorkspace.h (87%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ReflectometryTransform.h (86%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ReflectometryTransformKiKf.h (90%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ReflectometryTransformP.h (92%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/ReflectometryTransformQxQz.h (93%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/SaveIsawQvector.h (86%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/UnitsConversionHelper.h (94%) rename Code/Mantid/Framework/{MDEvents/inc/MantidMDEvents => MDAlgorithms/inc/MantidMDAlgorithms}/UserFunctionMD.h (93%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/BoxControllerSettingsAlgorithm.cpp (98%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/CalculateReflectometryQBase.cpp (70%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ConvToMDBase.cpp (95%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ConvToMDEventsWS.cpp (93%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ConvToMDHistoWS.cpp (96%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ConvToMDSelector.cpp (84%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ConvertToReflectometryQ.cpp (96%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/FitMD.cpp (98%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ImportMDEventWorkspace.cpp (93%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ImportMDHistoWorkspace.cpp (93%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ImportMDHistoWorkspaceBase.cpp (96%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/Integrate3DEvents.cpp (99%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/IntegrateEllipsoids.cpp (98%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/MDEventWSWrapper.cpp (89%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/MDTransfAxisNames.cpp (96%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/MDTransfFactory.cpp (92%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/MDTransfModQ.cpp (99%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/MDTransfNoQ.cpp (98%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/MDTransfQ3D.cpp (99%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/MDWSDescription.cpp (98%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/MDWSTransform.cpp (95%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/OneStepMDEW.cpp (94%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/QueryMDWorkspace.cpp (97%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ReflectometryTransform.cpp (97%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ReflectometryTransformKiKf.cpp (96%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ReflectometryTransformP.cpp (97%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/ReflectometryTransformQxQz.cpp (97%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/SaveIsawQvector.cpp (97%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/UnitsConversionHelper.cpp (99%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/src/UserFunctionMD.cpp (97%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/BoxControllerSettingsAlgorithmTest.h (99%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/ConvToMDBaseTest.h (98%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/ConvertToReflectometryQTest.h (99%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/FitMDTest.h (100%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/ImportMDEventWorkspaceTest.h (99%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/ImportMDHistoWorkspaceTest.h (99%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/Integrate3DEventsTest.h (98%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/MDEventWSWrapperTest.h (98%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/MDTransfAxisNamesTest.h (96%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/MDTransfFactoryTest.h (97%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/MDTransfModQTest.h (100%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/MDTransfQ3DTest.h (97%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/MDWSDescriptionTest.h (99%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/OneStepMDEWTest.h (96%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/QueryMDWorkspaceTest.h (99%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/ReflectometryTransformKiKfTest.h (98%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/ReflectometryTransformPTest.h (98%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/ReflectometryTransformQxQzTest.h (98%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/SaveIsawQvectorTest.h (97%) rename Code/Mantid/Framework/{MDEvents => MDAlgorithms}/test/UnitsConversionHelperTest.h (99%) diff --git a/Code/Mantid/Framework/CMakeLists.txt b/Code/Mantid/Framework/CMakeLists.txt index aa04d1bd087..8b362d1fe70 100644 --- a/Code/Mantid/Framework/CMakeLists.txt +++ b/Code/Mantid/Framework/CMakeLists.txt @@ -125,7 +125,6 @@ if ( CXXTEST_FOUND ) endif () add_subdirectory (MDAlgorithms) -add_subdirectory (MDEvents) add_subdirectory (Doxygen) add_subdirectory (ScriptRepository) add_subdirectory (ISISLiveData) diff --git a/Code/Mantid/Framework/MDAlgorithms/CMakeLists.txt b/Code/Mantid/Framework/MDAlgorithms/CMakeLists.txt index f6324902d9e..be05567d300 100644 --- a/Code/Mantid/Framework/MDAlgorithms/CMakeLists.txt +++ b/Code/Mantid/Framework/MDAlgorithms/CMakeLists.txt @@ -7,11 +7,13 @@ set ( SRC_FILES src/BinMD.cpp src/BinaryOperationMD.cpp src/BooleanBinaryOperationMD.cpp + src/BoxControllerSettingsAlgorithm.cpp src/CalculateCoverageDGS.cpp src/CentroidPeaksMD.cpp src/CentroidPeaksMD2.cpp src/CloneMDWorkspace.cpp src/CompareMDWorkspaces.cpp + src/ConvToMDBase.cpp src/ConvertSpiceDataToRealSpace.cpp src/ConvertToDetectorFaceMD.cpp src/ConvertToDiffractionMDWorkspace.cpp @@ -20,6 +22,7 @@ set ( SRC_FILES src/ConvertToMDMinMaxGlobal.cpp src/ConvertToMDMinMaxLocal.cpp src/ConvertToMDParent.cpp + src/ConvertToReflectometryQ.cpp src/CreateMDHistoWorkspace.cpp src/CreateMDWorkspace.cpp src/DivideMD.cpp @@ -28,8 +31,12 @@ set ( SRC_FILES src/ExponentialMD.cpp src/FakeMDEventData.cpp src/FindPeaksMD.cpp + src/FitMD.cpp src/GreaterThanMD.cpp src/IDynamicRebinning.cpp + src/ImportMDEventWorkspace.cpp + src/ImportMDHistoWorkspace.cpp + src/Integrate3DEvents.cpp src/IntegrateFlux.cpp src/IntegratePeaksMD.cpp src/IntegratePeaksMD2.cpp @@ -41,14 +48,21 @@ set ( SRC_FILES src/LoadMD.cpp src/LoadSQW.cpp src/LogarithmMD.cpp + src/MDEventWSWrapper.cpp src/MDNormDirectSC.cpp src/MDNormSCD.cpp + src/MDTransfAxisNames.cpp + src/MDTransfFactory.cpp + src/MDTransfModQ.cpp + src/MDTransfQ3D.cpp + src/MDWSDescription.cpp src/MaskMD.cpp src/MergeMD.cpp src/MergeMDFiles.cpp src/MinusMD.cpp src/MultiplyMD.cpp src/NotMD.cpp + src/OneStepMDEW.cpp src/OrMD.cpp src/PlusMD.cpp src/PowerMD.cpp @@ -68,6 +82,11 @@ set ( SRC_FILES src/Quantification/Resolution/TobyFitYVector.cpp src/Quantification/ResolutionConvolvedCrossSection.cpp src/Quantification/SimulateResolutionConvolvedModel.cpp + src/QueryMDWorkspace.cpp + src/ReflectometryTransformKiKf.cpp + src/ReflectometryTransformP.cpp + src/ReflectometryTransformQxQz.cpp + src/SaveIsawQvector.cpp src/SaveMD.cpp src/SaveZODS.cpp src/SetMDUsingMask.cpp @@ -76,6 +95,7 @@ set ( SRC_FILES src/ThresholdMD.cpp src/TransformMD.cpp src/UnaryOperationMD.cpp + src/UnitsConversionHelper.cpp src/Vector3DParameterParser.cpp src/WeightedMeanMD.cpp src/XorMD.cpp @@ -90,11 +110,13 @@ set ( INC_FILES inc/MantidMDAlgorithms/BinMD.h inc/MantidMDAlgorithms/BinaryOperationMD.h inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h + inc/MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h inc/MantidMDAlgorithms/CalculateCoverageDGS.h inc/MantidMDAlgorithms/CentroidPeaksMD.h inc/MantidMDAlgorithms/CentroidPeaksMD2.h inc/MantidMDAlgorithms/CloneMDWorkspace.h inc/MantidMDAlgorithms/CompareMDWorkspaces.h + inc/MantidMDAlgorithms/ConvToMDBase.h inc/MantidMDAlgorithms/ConvertSpiceDataToRealSpace.h inc/MantidMDAlgorithms/ConvertToDetectorFaceMD.h inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h @@ -103,6 +125,7 @@ set ( INC_FILES inc/MantidMDAlgorithms/ConvertToMDMinMaxGlobal.h inc/MantidMDAlgorithms/ConvertToMDMinMaxLocal.h inc/MantidMDAlgorithms/ConvertToMDParent.h + inc/MantidMDAlgorithms/ConvertToReflectometryQ.h inc/MantidMDAlgorithms/CreateMDHistoWorkspace.h inc/MantidMDAlgorithms/CreateMDWorkspace.h inc/MantidMDAlgorithms/DivideMD.h @@ -112,9 +135,13 @@ set ( INC_FILES inc/MantidMDAlgorithms/ExponentialMD.h inc/MantidMDAlgorithms/FakeMDEventData.h inc/MantidMDAlgorithms/FindPeaksMD.h + inc/MantidMDAlgorithms/FitMD.h inc/MantidMDAlgorithms/GSLFunctions.h inc/MantidMDAlgorithms/GreaterThanMD.h inc/MantidMDAlgorithms/IDynamicRebinning.h + inc/MantidMDAlgorithms/ImportMDEventWorkspace.h + inc/MantidMDAlgorithms/ImportMDHistoWorkspace.h + inc/MantidMDAlgorithms/Integrate3DEvents.h inc/MantidMDAlgorithms/IntegrateFlux.h inc/MantidMDAlgorithms/IntegratePeaksMD.h inc/MantidMDAlgorithms/IntegratePeaksMD2.h @@ -126,14 +153,21 @@ set ( INC_FILES inc/MantidMDAlgorithms/LoadMD.h inc/MantidMDAlgorithms/LoadSQW.h inc/MantidMDAlgorithms/LogarithmMD.h + inc/MantidMDAlgorithms/MDEventWSWrapper.h inc/MantidMDAlgorithms/MDNormDirectSC.h inc/MantidMDAlgorithms/MDNormSCD.h + inc/MantidMDAlgorithms/MDTransfAxisNames.h + inc/MantidMDAlgorithms/MDTransfFactory.h + inc/MantidMDAlgorithms/MDTransfModQ.h + inc/MantidMDAlgorithms/MDTransfQ3D.h + inc/MantidMDAlgorithms/MDWSDescription.h inc/MantidMDAlgorithms/MaskMD.h inc/MantidMDAlgorithms/MergeMD.h inc/MantidMDAlgorithms/MergeMDFiles.h inc/MantidMDAlgorithms/MinusMD.h inc/MantidMDAlgorithms/MultiplyMD.h inc/MantidMDAlgorithms/NotMD.h + inc/MantidMDAlgorithms/OneStepMDEW.h inc/MantidMDAlgorithms/OrMD.h inc/MantidMDAlgorithms/PlusMD.h inc/MantidMDAlgorithms/PowerMD.h @@ -153,6 +187,11 @@ set ( INC_FILES inc/MantidMDAlgorithms/Quantification/Resolution/TobyFitYVector.h inc/MantidMDAlgorithms/Quantification/ResolutionConvolvedCrossSection.h inc/MantidMDAlgorithms/Quantification/SimulateResolutionConvolvedModel.h + inc/MantidMDAlgorithms/QueryMDWorkspace.h + inc/MantidMDAlgorithms/ReflectometryTransformKiKf.h + inc/MantidMDAlgorithms/ReflectometryTransformP.h + inc/MantidMDAlgorithms/ReflectometryTransformQxQz.h + inc/MantidMDAlgorithms/SaveIsawQvector.h inc/MantidMDAlgorithms/SaveMD.h inc/MantidMDAlgorithms/SaveZODS.h inc/MantidMDAlgorithms/SetMDUsingMask.h @@ -161,6 +200,7 @@ set ( INC_FILES inc/MantidMDAlgorithms/ThresholdMD.h inc/MantidMDAlgorithms/TransformMD.h inc/MantidMDAlgorithms/UnaryOperationMD.h + inc/MantidMDAlgorithms/UnitsConversionHelper.h inc/MantidMDAlgorithms/Vector3DParameter.h inc/MantidMDAlgorithms/Vector3DParameterParser.h inc/MantidMDAlgorithms/WeightedMeanMD.h @@ -174,12 +214,14 @@ set ( TEST_FILES #CreateMDFitWorkspaceTest.h AndMDTest.h BooleanBinaryOperationMDTest.h + BoxControllerSettingsAlgorithmTest.h CachedExperimentInfoTest.h CalculateCoverageDGSTest.h CentroidPeaksMD2Test.h CentroidPeaksMDTest.h CloneMDWorkspaceTest.h CompareMDWorkspacesTest.h + ConvToMDBaseTest.h ConvertEventsToMDTest.h ConvertSpiceDataToRealSpaceTest.h ConvertToDetectorFaceMDTest.h @@ -190,6 +232,7 @@ set ( TEST_FILES ConvertToMDMinMaxLocalTest.h ConvertToMDTest.h ConvertToQ3DdETest.h + ConvertToReflectometryQTest.h CreateMDHistoWorkspaceTest.h CreateMDWorkspaceTest.h DivideMDTest.h @@ -198,9 +241,13 @@ set ( TEST_FILES ExponentialMDTest.h FakeMDEventDataTest.h FindPeaksMDTest.h + FitMDTest.h FitResolutionConvolvedModelTest.h ForegroundModelTest.h GreaterThanMDTest.h + ImportMDEventWorkspaceTest.h + ImportMDHistoWorkspaceTest.h + Integrate3DEventsTest.h IntegrateFluxTest.h IntegratePeaksMD2Test.h IntegratePeaksMDTest.h @@ -210,9 +257,15 @@ set ( TEST_FILES LoadMDTest.h LoadSQWTest.h LogarithmMDTest.h + MDEventWSWrapperTest.h MDNormDirectSCTest.h MDNormSCDTest.h MDResolutionConvolutionFactoryTest.h + MDTransfAxisNamesTest.h + MDTransfFactoryTest.h + MDTransfModQTest.h + MDTransfQ3DTest.h + MDWSDescriptionTest.h MaskMDTest.h MergeMDFilesTest.h MergeMDTest.h @@ -221,11 +274,17 @@ set ( TEST_FILES MullerAnsatzTest.h MultiplyMDTest.h NotMDTest.h + OneStepMDEWTest.h OrMDTest.h PlusMDTest.h PowerMDTest.h PreprocessDetectorsToMDTest.h + QueryMDWorkspaceTest.h + ReflectometryTransformKiKfTest.h + ReflectometryTransformPTest.h + ReflectometryTransformQxQzTest.h ResolutionConvolvedCrossSectionTest.h + SaveIsawQvectorTest.h SaveMDTest.h SaveZODSTest.h SetMDUsingMaskTest.h @@ -239,6 +298,7 @@ set ( TEST_FILES TobyFitYVectorTest.h TransformMDTest.h UnaryOperationMDTest.h + UnitsConversionHelperTest.h WeightedMeanMDTest.h XorMDTest.h ) diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AndMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AndMD.h index 7fbde45cf0f..d15a1c5a50b 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AndMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AndMD.h @@ -43,8 +43,8 @@ public: virtual int version() const; private: - void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); + void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand); }; } // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinMD.h index 59764a15667..74d7c1809a9 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinMD.h @@ -1,5 +1,5 @@ -#ifndef MANTID_MDEVENTS_BINMD_H_ -#define MANTID_MDEVENTS_BINMD_H_ +#ifndef MANTID_MDALGORITHMS_BINMD_H_ +#define MANTID_MDALGORITHMS_BINMD_H_ #include "MantidAPI/Algorithm.h" #include "MantidAPI/CoordTransform.h" @@ -8,10 +8,10 @@ #include "MantidGeometry/MDGeometry/MDImplicitFunction.h" #include "MantidKernel/System.h" #include "MantidKernel/VMD.h" -#include "MantidMDEvents/MDBox.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDBox.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidMDAlgorithms/SlicingAlgorithm.h" namespace Mantid { @@ -60,15 +60,15 @@ private: /// Helper method template <typename MDE, size_t nd> - void binByIterating(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void binByIterating(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Method to bin a single MDBox template <typename MDE, size_t nd> - void binMDBox(MDEvents::MDBox<MDE, nd> *box, const size_t *const chunkMin, + void binMDBox(DataObjects::MDBox<MDE, nd> *box, const size_t *const chunkMin, const size_t *const chunkMax); /// The output MDHistoWorkspace - Mantid::MDEvents::MDHistoWorkspace_sptr outWS; + Mantid::DataObjects::MDHistoWorkspace_sptr outWS; /// Progress reporting Mantid::API::Progress *prog; /// ImplicitFunction used @@ -82,6 +82,6 @@ private: }; } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects -#endif /* MANTID_MDEVENTS_BINMD_H_ */ +#endif /* MANTID_MDALGORITHMS_BINMD_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinaryOperationMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinaryOperationMD.h index 27f58fe2e1d..574408c9b7f 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinaryOperationMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BinaryOperationMD.h @@ -1,12 +1,11 @@ #ifndef MANTID_MDALGORITHMS_BINARYOPERATIONMD_H_ #define MANTID_MDALGORITHMS_BINARYOPERATIONMD_H_ -#include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" -#include "MantidAPI/IMDWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDHistoWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" +#include "MantidAPI/IMDWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidDataObjects/WorkspaceSingleValue.h" namespace Mantid { @@ -69,12 +68,12 @@ protected: /// Run the algorithm with a MDHisotWorkspace as output and operand virtual void - execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) = 0; + execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) = 0; /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand virtual void execHistoScalar( - Mantid::MDEvents::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar) = 0; /// The name of the first input workspace property @@ -98,8 +97,8 @@ protected: /// For checkInputs Mantid::API::IMDEventWorkspace_sptr m_lhs_event; Mantid::API::IMDEventWorkspace_sptr m_rhs_event; - Mantid::MDEvents::MDHistoWorkspace_sptr m_lhs_histo; - Mantid::MDEvents::MDHistoWorkspace_sptr m_rhs_histo; + Mantid::DataObjects::MDHistoWorkspace_sptr m_lhs_histo; + Mantid::DataObjects::MDHistoWorkspace_sptr m_rhs_histo; Mantid::DataObjects::WorkspaceSingleValue_sptr m_lhs_scalar; Mantid::DataObjects::WorkspaceSingleValue_sptr m_rhs_scalar; @@ -109,9 +108,9 @@ protected: Mantid::API::IMDEventWorkspace_sptr m_out_event; /// Operand MDHistoWorkspace - Mantid::MDEvents::MDHistoWorkspace_sptr m_operand_histo; + Mantid::DataObjects::MDHistoWorkspace_sptr m_operand_histo; /// Output MDHistoWorkspace - Mantid::MDEvents::MDHistoWorkspace_sptr m_out_histo; + Mantid::DataObjects::MDHistoWorkspace_sptr m_out_histo; /// Operand WorkspaceSingleValue Mantid::DataObjects::WorkspaceSingleValue_sptr m_operand_scalar; diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h index 3f542aa98ae..028f5cf745d 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h @@ -52,13 +52,13 @@ protected: void checkInputs(); void execEvent(); virtual void - execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, + execHistoScalar(Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); /// Run the algorithm with a MDHisotWorkspace as output and operand virtual void - execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) = 0; + execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) = 0; }; } // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/BoxControllerSettingsAlgorithm.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h similarity index 90% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/BoxControllerSettingsAlgorithm.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h index 3e561c626ae..aab8d17553b 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/BoxControllerSettingsAlgorithm.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h @@ -1,5 +1,5 @@ -#ifndef MANTID_MDEVENTS_BOXCONTROLLERSETTINGSALGORITHM_H_ -#define MANTID_MDEVENTS_BOXCONTROLLERSETTINGSALGORITHM_H_ +#ifndef MANTID_MDALGORITHMS_BOXCONTROLLERSETTINGSALGORITHM_H_ +#define MANTID_MDALGORITHMS_BOXCONTROLLERSETTINGSALGORITHM_H_ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" @@ -7,7 +7,7 @@ #include "MantidGeometry/Instrument.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** An abstract algorithm sub-class for algorithms that * define properties for BoxController settings. @@ -65,7 +65,7 @@ protected: private: }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /* MANTID_MDEVENTS_BOXCONTROLLERSETTINGSALGORITHM_H_ */ +#endif /* MANTID_MDALGORITHMS_BOXCONTROLLERSETTINGSALGORITHM_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CalculateCoverageDGS.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CalculateCoverageDGS.h index decf5ad7399..c27d40674a8 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CalculateCoverageDGS.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CalculateCoverageDGS.h @@ -4,7 +4,7 @@ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" #include "MantidKernel/Matrix.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" namespace Mantid { namespace MDAlgorithms { @@ -60,7 +60,7 @@ private: Mantid::Kernel::DblMatrix m_rubw; /// Normalization workspace (this is the coverage workspace) - Mantid::MDEvents::MDHistoWorkspace_sptr m_normWS; + Mantid::DataObjects::MDHistoWorkspace_sptr m_normWS; std::vector<Kernel::VMD> calculateIntersections(const double theta, const double phi); diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/CalculateReflectometryQBase.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CalculateReflectometryQBase.h similarity index 71% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/CalculateReflectometryQBase.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CalculateReflectometryQBase.h index 21bc50d8f93..88e876b73da 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/CalculateReflectometryQBase.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CalculateReflectometryQBase.h @@ -1,5 +1,5 @@ -#ifndef MANTID_MDEVENTS_CALCULATE_REFLECTOMETRYQ_BASE_H_ -#define MANTID_MDEVENTS_CALCULATE_REFLECTOMETRYQ_BASE_H_ +#ifndef MANTID_MDALGORITHMS_CALCULATE_REFLECTOMETRYQ_BASE_H_ +#define MANTID_MDALGORITHMS_CALCULATE_REFLECTOMETRYQ_BASE_H_ #include "MantidKernel/System.h" @@ -10,7 +10,7 @@ class IMDDimension; } } -namespace MDEvents { +namespace MDAlgorithms { /** Base class for reflectometry Q transformations */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD.h index a57881d5625..fa73a024705 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD.h @@ -5,7 +5,7 @@ #include "MantidAPI/Algorithm.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidDataObjects/PeaksWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" namespace Mantid { namespace MDAlgorithms { @@ -41,13 +41,13 @@ private: void exec(); template <typename MDE, size_t nd> - void integrate(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void integrate(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Input MDEventWorkspace Mantid::API::IMDEventWorkspace_sptr inWS; }; } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects -#endif /* MANTID_MDEVENTS_CENTROIDPEAKSMD_H_ */ +#endif /* MANTID_MDALGORITHMS_CENTROIDPEAKSMD_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD2.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD2.h index 24fe9438e5d..c5fbb8920fa 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD2.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CentroidPeaksMD2.h @@ -5,7 +5,7 @@ #include "MantidAPI/Algorithm.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidDataObjects/PeaksWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" namespace Mantid { namespace MDAlgorithms { @@ -41,13 +41,13 @@ private: void exec(); template <typename MDE, size_t nd> - void integrate(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void integrate(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Input MDEventWorkspace Mantid::API::IMDEventWorkspace_sptr inWS; }; } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects -#endif /* MANTID_MDEVENTS_CENTROIDPEAKSMD2_H_ */ +#endif /* MANTID_MDALGORITHMS_CENTROIDPEAKSMD2_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CloneMDWorkspace.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CloneMDWorkspace.h index dbc361454e3..07a7a5718ec 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CloneMDWorkspace.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CloneMDWorkspace.h @@ -1,9 +1,9 @@ -#ifndef MANTID_MDEVENTS_CLONEMDWORKSPACE_H_ -#define MANTID_MDEVENTS_CLONEMDWORKSPACE_H_ +#ifndef MANTID_MDALGORITHMS_CLONEMDWORKSPACE_H_ +#define MANTID_MDALGORITHMS_CLONEMDWORKSPACE_H_ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" namespace Mantid { namespace MDAlgorithms { @@ -60,10 +60,10 @@ private: void exec(); template <typename MDE, size_t nd> - void doClone(const typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void doClone(const typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); }; -} // namespace MDEvents +} // namespace DataObjects } // namespace Mantid -#endif /* MANTID_MDEVENTS_CLONEMDWORKSPACE_H_ */ +#endif /* MANTID_MDALGORITHMS_CLONEMDWORKSPACE_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompareMDWorkspaces.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompareMDWorkspaces.h index 13010053ff5..d51d54dd9f3 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompareMDWorkspaces.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CompareMDWorkspaces.h @@ -4,8 +4,8 @@ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" #include "MantidAPI/IMDWorkspace.h" -#include "MantidMDEvents/MDHistoWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" namespace Mantid { namespace MDAlgorithms { @@ -55,12 +55,12 @@ private: void doComparison(); void compareMDGeometry(Mantid::API::IMDWorkspace_sptr ws1, Mantid::API::IMDWorkspace_sptr ws2); - void compareMDHistoWorkspaces(Mantid::MDEvents::MDHistoWorkspace_sptr ws1, - Mantid::MDEvents::MDHistoWorkspace_sptr ws2); + void compareMDHistoWorkspaces(Mantid::DataObjects::MDHistoWorkspace_sptr ws1, + Mantid::DataObjects::MDHistoWorkspace_sptr ws2); template <typename MDE, size_t nd> void compareMDWorkspaces( - typename Mantid::MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); template <typename T> void compare(T a, T b, const std::string &message); diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDBase.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDBase.h similarity index 64% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDBase.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDBase.h index eb8328a5f53..b9d2dff43b2 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDBase.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDBase.h @@ -1,56 +1,51 @@ -#ifndef MANTID_MDEVENTS_CONVERTMD_BASE_H -#define MANTID_MDEVENTS_CONVERTMD_BASE_H - -#include "MantidKernel/Logger.h" +#ifndef MANTID_MDALGORITHMS_CONVERTMD_BASE_H +#define MANTID_MDALGORITHMS_CONVERTMD_BASE_H +#include "MantidAPI/ExperimentInfo.h" +#include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/NumericAxis.h" #include "MantidAPI/Progress.h" -#include "MantidAPI/ExperimentInfo.h" +#include "MantidKernel/Logger.h" -#include "MantidAPI/MatrixWorkspace.h" +#include "MantidMDAlgorithms/MDWSDescription.h" +#include "MantidMDAlgorithms/MDEventWSWrapper.h" +#include "MantidMDAlgorithms/MDTransfInterface.h" +#include "MantidMDAlgorithms/MDTransfFactory.h" +#include "MantidMDAlgorithms/UnitsConversionHelper.h" -#include "MantidMDEvents/MDWSDescription.h" -#include "MantidMDEvents/MDEventWSWrapper.h" +namespace Mantid { +namespace MDAlgorithms { +/** Class describes the interface to the methods, which perform conversion from + usual workspaces to MDEventWorkspace -#include "MantidMDEvents/MDTransfInterface.h" -#include "MantidMDEvents/MDTransfFactory.h" + See http://www.mantidproject.org/Writing_custom_ConvertTo_MD_transformation + for detailed description of this + class place in the algorithms hierarchy. -// units conversion -#include "MantidMDEvents/UnitsConversionHelper.h" -namespace Mantid { -namespace MDEvents { -/** class describes the interface to the methods, which perform conversion from - usual workspaces to MDEventWorkspace - * - * See http://www.mantidproject.org/Writing_custom_ConvertTo_MD_transformation - for detailed description of this - * class place in the algorithms hierarchy. - * - * - * @date 07-01-2012 + @date 07-01-2012 Copyright © 2010 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge - National Laboratory & European Spallation Source + National Laboratory & European Spallation Source - This file is part of Mantid. + This file is part of Mantid. - Mantid is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + Mantid is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. - Mantid is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + Mantid is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. - File/ change history is stored at: - <https://github.com/mantidproject/mantid> - Code Documentation is available at: <http://doxygen.mantidproject.org> + File/ change history is stored at: + <https://github.com/mantidproject/mantid> + Code Documentation is available at: <http://doxygen.mantidproject.org> */ class DLLExport ConvToMDBase { @@ -65,7 +60,7 @@ public: /// method which starts the conversion procedure virtual void runConversion(API::Progress *) = 0; /// virtual destructor - virtual ~ConvToMDBase(){}; + virtual ~ConvToMDBase(){} /** method returns unit conversion helper, used to convert input workspace units to the units, used by appropriate MD transformation @@ -77,7 +72,7 @@ protected: API::MatrixWorkspace_const_sptr m_InWS2D; // pointer to the class, which keeps target workspace and provides functions // adding additional MD events to it. - boost::shared_ptr<MDEvents::MDEventWSWrapper> m_OutWSWrapper; + boost::shared_ptr<MDEventWSWrapper> m_OutWSWrapper; // shared pointer to the converter, which converts WS coordinates to MD // coordinates MDTransf_sptr m_QConverter; diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDEventsWS.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDEventsWS.h similarity index 78% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDEventsWS.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDEventsWS.h index 4db1de68b9c..cba52fe6f87 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDEventsWS.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDEventsWS.h @@ -1,5 +1,5 @@ -#ifndef MANTID_MDEVENTS_CONV_TOMD_EVENTSWS_H -#define MANTID_MDEVENTS_CONV_TOMD_EVENTSWS_H +#ifndef MANTID_MDALGORITHMS_CONV_TOMD_EVENTSWS_H +#define MANTID_MDALGORITHMS_CONV_TOMD_EVENTSWS_H // #include "MantidKernel/System.h" #include "MantidKernel/Exception.h" @@ -12,16 +12,16 @@ #include "MantidAPI/Progress.h" #include "MantidKernel/PhysicalConstants.h" -#include "MantidMDEvents/MDEventWSWrapper.h" -#include "MantidMDEvents/MDEvent.h" +#include "MantidDataObjects/MDEventWSWrapper.h" +#include "MantidDataObjects/MDEvent.h" -#include "MantidMDEvents/ConvToMDBase.h" +#include "MantidDataObjects/ConvToMDBase.h" // coordinate transformation -#include "MantidMDEvents/MDTransfFactory.h" +#include "MantidDataObjects/MDTransfFactory.h" namespace Mantid { -namespace MDEvents { -/** The class specializes ConvToMDEventsBase for the case when the conversion +namespace MDAlgorithms { +/** The class specializes ConvToDataObjectsBase for the case when the conversion occurs from Events WS to the MD events WS * * @@ -56,10 +56,10 @@ namespace MDEvents { // Class to process event workspace by direct conversion: -class ConvToMDEventsWS : public ConvToMDBase { +class ConvToDataObjectsWS : public ConvToMDBase { public: - size_t initialize(const MDEvents::MDWSDescription &WSD, - boost::shared_ptr<MDEvents::MDEventWSWrapper> inWSWrapper, + size_t initialize(const DataObjects::MDWSDescription &WSD, + boost::shared_ptr<DataObjects::MDEventWSWrapper> inWSWrapper, bool ignoreZeros); void runConversion(API::Progress *pProgress); @@ -75,7 +75,7 @@ private: template <class T> size_t convertEventList(size_t workspaceIndex); }; -} // endNamespace MDEvents +} // endNamespace DataObjects } // endNamespace Mantid #endif diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDHistoWS.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDHistoWS.h similarity index 83% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDHistoWS.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDHistoWS.h index 8c72f670b8c..67feb9be3c2 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDHistoWS.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDHistoWS.h @@ -1,20 +1,20 @@ -#ifndef MANTID_MDEVENTS_CONV_TOMD_HISTOWS_H -#define MANTID_MDEVENTS_CONV_TOMD_HISTOWS_H +#ifndef MANTID_MDALGORITHMS_CONV_TOMD_HISTOWS_H +#define MANTID_MDALGORITHMS_CONV_TOMD_HISTOWS_H #include "MantidDataObjects/Workspace2D.h" #include "MantidAPI/NumericAxis.h" #include "MantidAPI/Progress.h" -#include "MantidMDEvents/MDEventWSWrapper.h" -#include "MantidMDEvents/MDEvent.h" +#include "MantidDataObjects/MDEventWSWrapper.h" +#include "MantidDataObjects/MDEvent.h" -#include "MantidMDEvents/ConvToMDBase.h" +#include "MantidDataObjects/ConvToMDBase.h" // coordinate transformation -#include "MantidMDEvents/MDTransfInterface.h" +#include "MantidDataObjects/MDTransfInterface.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** The class to transform matrix workspace into MDEvent workspace when matrix workspace is ragged 2D workspace * @@ -52,8 +52,8 @@ namespace MDEvents { class ConvToMDHistoWS : public ConvToMDBase { public: - size_t initialize(const MDEvents::MDWSDescription &WSD, - boost::shared_ptr<MDEvents::MDEventWSWrapper> inWSWrapper, + size_t initialize(const DataObjects::MDWSDescription &WSD, + boost::shared_ptr<DataObjects::MDEventWSWrapper> inWSWrapper, bool ignoreZeros); void runConversion(API::Progress *pProgress); diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDSelector.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDSelector.h similarity index 90% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDSelector.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDSelector.h index b3c6ceecdc1..f80c4b80e38 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvToMDSelector.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvToMDSelector.h @@ -1,11 +1,10 @@ -#ifndef MANTID_MDEVENTS_WS_SELECTOR_H -#define MANTID_MDEVENTS_WS_SELECTOR_H +#ifndef MANTID_MDALGORITHMS_WS_SELECTOR_H +#define MANTID_MDALGORITHMS_WS_SELECTOR_H -#include "MantidMDEvents/ConvToMDEventsWS.h" -#include "MantidMDEvents/ConvToMDHistoWS.h" +#include "MantidMDAlgorithms/ConvToMDBase.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** small class to select proper solver as function of the workspace kind and (possibly, in a future) other workspace parameters. * may be replaced by usual mantid factory in a future; @@ -51,4 +50,4 @@ public: } // end MDAlgorithms Namespace } // end Mantid Namespace -#endif \ No newline at end of file +#endif diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDetectorFaceMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDetectorFaceMD.h index d9f3158b018..951ffc6ae81 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDetectorFaceMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDetectorFaceMD.h @@ -1,13 +1,12 @@ #ifndef MANTID_MDALGORITHMS_CONVERTTODETECTORFACEMD_H_ #define MANTID_MDALGORITHMS_CONVERTTODETECTORFACEMD_H_ -#include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" #include "MantidDataObjects/EventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDLeanEvent.h" #include "MantidGeometry/Instrument/RectangularDetector.h" -#include "MantidMDEvents/BoxControllerSettingsAlgorithm.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDLeanEvent.h" +#include "MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h" namespace Mantid { namespace MDAlgorithms { @@ -39,7 +38,7 @@ namespace MDAlgorithms { Code Documentation is available at: <http://doxygen.mantidproject.org> */ class DLLExport ConvertToDetectorFaceMD - : public Mantid::MDEvents::BoxControllerSettingsAlgorithm { + : public MDAlgorithms::BoxControllerSettingsAlgorithm { public: ConvertToDetectorFaceMD(); virtual ~ConvertToDetectorFaceMD(); @@ -62,7 +61,7 @@ private: template <class T, class MDE, size_t nd> void convertEventList( - boost::shared_ptr<Mantid::MDEvents::MDEventWorkspace<MDE, nd>> outWS, + boost::shared_ptr<Mantid::DataObjects::MDEventWorkspace<MDE, nd>> outWS, size_t workspaceIndex, coord_t x, coord_t y, coord_t bankNum, uint16_t runIndex, int32_t detectorID); diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h index 6c172747241..922fc593810 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h @@ -1,5 +1,5 @@ -#ifndef MANTID_MDEVENTS_CONVERTTODIFFRACTIONMDWORKSPACE_H_ -#define MANTID_MDEVENTS_CONVERTTODIFFRACTIONMDWORKSPACE_H_ +#ifndef MANTID_MDALGORITHMS_CONVERTTODIFFRACTIONMDWORKSPACE_H_ +#define MANTID_MDALGORITHMS_CONVERTTODIFFRACTIONMDWORKSPACE_H_ #include "MantidAPI/Algorithm.h" #include "MantidAPI/IMDEventWorkspace.h" @@ -10,9 +10,9 @@ #include "MantidKernel/ProgressText.h" #include "MantidKernel/System.h" #include "MantidKernel/V3D.h" -#include "MantidMDEvents/BoxControllerSettingsAlgorithm.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/BoxControllerSettingsAlgorithm.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" namespace Mantid { namespace MDAlgorithms { @@ -25,7 +25,7 @@ namespace MDAlgorithms { * @date 2011-03-01 13:14:48.236513 */ class DLLExport ConvertToDiffractionMDWorkspace - : public MDEvents::BoxControllerSettingsAlgorithm { + : public DataObjects::BoxControllerSettingsAlgorithm { public: ConvertToDiffractionMDWorkspace(); ~ConvertToDiffractionMDWorkspace(){}; @@ -61,7 +61,7 @@ private: DataObjects::EventWorkspace_sptr m_inEventWS; /// The output MDEventWorkspace<3> - MDEvents::MDEventWorkspace3Lean::sptr ws; + DataObjects::MDEventWorkspace3Lean::sptr ws; /// Do we clear events on the input during loading? bool ClearInputWorkspace; /// Use the histogram representation with one event per bin @@ -97,6 +97,6 @@ private: }; } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects -#endif /* MANTID_MDEVENTS_CONVERTTODIFFRACTIONMDWORKSPACE_H_ */ +#endif /* MANTID_MDALGORITHMS_CONVERTTODIFFRACTIONMDWORKSPACE_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace2.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace2.h index c00fc0e75db..8c29dcb92e7 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace2.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToDiffractionMDWorkspace2.h @@ -1,19 +1,7 @@ -#ifndef MANTID_MDEVENTS_CONVERTTODIFFRACTIONMDWORKSPACE2_H_ -#define MANTID_MDEVENTS_CONVERTTODIFFRACTIONMDWORKSPACE2_H_ +#ifndef MANTID_MDALGORITHMS_CONVERTTODIFFRACTIONMDWORKSPACE2_H_ +#define MANTID_MDALGORITHMS_CONVERTTODIFFRACTIONMDWORKSPACE2_H_ -#include "MantidAPI/Algorithm.h" -#include "MantidAPI/IMDEventWorkspace.h" -#include "MantidAPI/Progress.h" -#include "MantidDataObjects/EventWorkspace.h" -#include "MantidKernel/PhysicalConstants.h" -#include "MantidKernel/ProgressBase.h" -#include "MantidKernel/ProgressText.h" -#include "MantidKernel/System.h" -#include "MantidKernel/V3D.h" -#include "MantidMDEvents/BoxControllerSettingsAlgorithm.h" -#include "MantidMDAlgorithms/ConvertToMD.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h" namespace Mantid { namespace MDAlgorithms { @@ -29,17 +17,17 @@ namespace MDAlgorithms { * @date 2013-05-20 */ class DLLExport ConvertToDiffractionMDWorkspace2 - : public MDEvents::BoxControllerSettingsAlgorithm { + : public MDAlgorithms::BoxControllerSettingsAlgorithm { public: /** Constructor */ - ConvertToDiffractionMDWorkspace2(){}; + ConvertToDiffractionMDWorkspace2(){} /** Destructor */ - virtual ~ConvertToDiffractionMDWorkspace2(){}; + virtual ~ConvertToDiffractionMDWorkspace2(){} /// Algorithm's name for identification virtual const std::string name() const { return "ConvertToDiffractionMDWorkspace"; - }; + } /// Summary of algorithms purpose virtual const std::string summary() const { return "Create a MDEventWorkspace with events in reciprocal space (Qx, Qy, " @@ -47,7 +35,7 @@ public: } /// Algorithm's version for identification - virtual int version() const { return 2; }; + virtual int version() const { return 2; } /// Algorithm's category for identification virtual const std::string category() const { return "MDAlgorithms"; } @@ -75,6 +63,6 @@ protected: // for testing }; } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects -#endif /* MANTID_MDEVENTS_CONVERTTODIFFRACTIONMDWORKSPACE_H_ */ +#endif /* MANTID_MDALGORITHMS_CONVERTTODIFFRACTIONMDWORKSPACE_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMD.h index 68a74d62f7f..60633ffaef9 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMD.h @@ -1,12 +1,11 @@ -#ifndef MANTID_MDALGORITHMS_CONVERT_TO_MDEVENTS_H_ -#define MANTID_MDALGORITHMS_CONVERT_TO_MDEVENTS_H_ +#ifndef MANTID_MDALGORITHMS_CONVERT_TO_MDALGORITHMS_H_ +#define MANTID_MDALGORITHMS_CONVERT_TO_MDALGORITHMS_H_ -#include "MantidMDEvents/MDWSDescription.h" -#include "MantidMDEvents/BoxControllerSettingsAlgorithm.h" -#include "MantidMDEvents/ConvToMDBase.h" +#include "MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h" +#include "MantidMDAlgorithms/ConvertToMDParent.h" +#include "MantidMDAlgorithms/MDWSDescription.h" #include "MantidKernel/DeltaEMode.h" -#include "MantidMDAlgorithms/ConvertToMDParent.h" namespace Mantid { namespace MDAlgorithms { @@ -28,24 +27,24 @@ namespace MDAlgorithms { Copyright © 2010 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge National Laboratory & European Spallation Source - This file is part of Mantid. + This file is part of Mantid. - Mantid is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + Mantid is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. - Mantid is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + Mantid is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. - File change history is stored at: - <https://github.com/mantidproject/mantid> - Code Documentation is available at: <http://doxygen.mantidproject.org> + File change history is stored at: +<https://github.com/mantidproject/mantid> + Code Documentation is available at: <http://doxygen.mantidproject.org> */ /// Convert to MD Events class itself: @@ -80,7 +79,7 @@ protected: // for testing, otherwise private: Mantid::API::MatrixWorkspace_sptr m_InWS2D; // TODO: This will eventually go. ///The pointer to class which keeps output // MD workspace and is responsible for adding data to N-dimensional workspace; - boost::shared_ptr<MDEvents::MDEventWSWrapper> m_OutWSWrapper; + boost::shared_ptr<MDAlgorithms::MDEventWSWrapper> m_OutWSWrapper; // Workflow helpers: /**Check if target workspace new or existing one and we need to create new @@ -88,7 +87,7 @@ protected: // for testing, otherwise private: bool doWeNeedNewTargetWorkspace(API::IMDEventWorkspace_sptr spws); /**Create new MD workspace using existing parameters for algorithm */ API::IMDEventWorkspace_sptr - createNewMDWorkspace(const MDEvents::MDWSDescription &NewMDWSDescription); + createNewMDWorkspace(const MDAlgorithms::MDWSDescription &NewMDWSDescription); bool buildTargetWSDescription(API::IMDEventWorkspace_sptr spws, const std::string &Q_mod_req, @@ -98,12 +97,12 @@ protected: // for testing, otherwise private: std::vector<double> &dimMax, const std::string &QFrame, const std::string &convertTo_, - MDEvents::MDWSDescription &targWSDescr); + MDAlgorithms::MDWSDescription &targWSDescr); /// par of store metadata routine which generate metadata necessary for /// initializing ConvertToMD plugin void addExperimentInfo(API::IMDEventWorkspace_sptr &mdEventWS, - MDEvents::MDWSDescription &targWSDescr) const; + MDAlgorithms::MDWSDescription &targWSDescr) const; /// Store metadata and set some metadata, needed for plugin to run on the /// target workspace description @@ -119,4 +118,4 @@ protected: // for testing, otherwise private: } // namespace Mantid } // namespace MDAlgorithms -#endif /* MANTID_MDEVENTS_MAKEDIFFRACTIONMDEVENTWORKSPACE_H_ */ +#endif /* MANTID_MDALGORITHMS_MAKEDIFFRACTIONMDEVENTWORKSPACE_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxLocal.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxLocal.h index 5c390e6dff9..48695fd9780 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxLocal.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDMinMaxLocal.h @@ -46,8 +46,8 @@ public: virtual int version() const { return 1; } protected: // for testing - void findMinMaxValues(MDEvents::MDWSDescription &targWSDescr, - MDEvents::MDTransfInterface *const qTransf, + void findMinMaxValues(DataObjects::MDWSDescription &targWSDescr, + DataObjects::MDTransfInterface *const qTransf, Kernel::DeltaEMode::Type dEMode, std::vector<double> &MinValues, std::vector<double> &MaxValues); diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDParent.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDParent.h index 5becbffc356..ce3bce5662a 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDParent.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToMDParent.h @@ -1,9 +1,9 @@ #ifndef MANTID_MDALGORITHMS_CONVERT_TO_MD_PARENT_H_ #define MANTID_MDALGORITHMS_CONVERT_TO_MD_PARENT_H_ -#include "MantidMDEvents/MDWSDescription.h" -#include "MantidMDEvents/BoxControllerSettingsAlgorithm.h" -#include "MantidMDEvents/ConvToMDBase.h" +#include "MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h" +#include "MantidMDAlgorithms/ConvToMDBase.h" +#include "MantidMDAlgorithms/MDWSDescription.h" #include "MantidKernel/DeltaEMode.h" @@ -45,11 +45,10 @@ namespace MDAlgorithms { */ /// Convert to MD Events class itself: -class DLLExport ConvertToMDParent - : public MDEvents::BoxControllerSettingsAlgorithm { +class DLLExport ConvertToMDParent : public BoxControllerSettingsAlgorithm { public: - ConvertToMDParent(){}; - ~ConvertToMDParent(){}; + ConvertToMDParent() {} + ~ConvertToMDParent() {} /// Algorithm's name for identification virtual const std::string name() const = 0; @@ -74,7 +73,7 @@ protected: static Mantid::Kernel::Logger &g_Log; /// pointer to the class, which does the particular conversion - boost::shared_ptr<MDEvents::ConvToMDBase> m_Convertor; + boost::shared_ptr<MDAlgorithms::ConvToMDBase> m_Convertor; /// Template to check if a variable equal to NaN template <class T> inline bool isNaN(T val) { @@ -86,4 +85,4 @@ protected: } // namespace Mantid } // namespace MDAlgorithms -#endif /* MANTID_MDEVENTS_MAKEDIFFRACTIONMDEVENTWORKSPACE_H_ */ +#endif /* MANTID_MDALGORITHMS_MAKEDIFFRACTIONMDEVENTWORKSPACE_H_ */ diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvertToReflectometryQ.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToReflectometryQ.h similarity index 89% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvertToReflectometryQ.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToReflectometryQ.h index 7fca9daf26a..4137496a802 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ConvertToReflectometryQ.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertToReflectometryQ.h @@ -1,10 +1,10 @@ -#ifndef MANTID_MDEVENTS_CONVERTTOREFLECTOMETRYQ_H_ -#define MANTID_MDEVENTS_CONVERTTOREFLECTOMETRYQ_H_ +#ifndef MANTID_MDALGORITHMS_CONVERTTOREFLECTOMETRYQ_H_ +#define MANTID_MDALGORITHMS_CONVERTTOREFLECTOMETRYQ_H_ -#include "MantidMDEvents/BoxControllerSettingsAlgorithm.h" +#include "MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** ConvertToReflectometryQ : Creates a 2D MD Histogram workspace with two axis qz and qx. diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDHistoWorkspace.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDHistoWorkspace.h index 14704f57a42..15fb2f2c0a7 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDHistoWorkspace.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDHistoWorkspace.h @@ -1,13 +1,12 @@ -#ifndef MANTID_MDEVENTS_CREATEMDHISTOWORKSPACE_H_ -#define MANTID_MDEVENTS_CREATEMDHISTOWORKSPACE_H_ +#ifndef MANTID_MDALGORITHMS_CREATEMDHISTOWORKSPACE_H_ +#define MANTID_MDALGORITHMS_CREATEMDHISTOWORKSPACE_H_ -#include "MantidKernel/System.h" -#include "MantidMDEvents/ImportMDHistoWorkspaceBase.h" +#include "MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h" namespace Mantid { namespace MDAlgorithms { -/** CreateMDHistoWorkspace : TODO: DESCRIPTION +/** CreateMDHistoWorkspace @date 2012-06-21 @@ -33,7 +32,7 @@ namespace MDAlgorithms { Code Documentation is available at: <http://doxygen.mantidproject.org> */ class DLLExport CreateMDHistoWorkspace - : public MDEvents::ImportMDHistoWorkspaceBase { + : public MDAlgorithms::ImportMDHistoWorkspaceBase { public: CreateMDHistoWorkspace(); virtual ~CreateMDHistoWorkspace(); @@ -53,7 +52,7 @@ private: void exec(); }; -} // namespace MDEvents +} // namespace DataObjects } // namespace Mantid -#endif /* MANTID_MDEVENTS_CREATEMDHISTOWORKSPACE_H_ */ \ No newline at end of file +#endif /* MANTID_MDALGORITHMS_CREATEMDHISTOWORKSPACE_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDWorkspace.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDWorkspace.h index 989d9deba4a..d5790370522 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDWorkspace.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/CreateMDWorkspace.h @@ -1,11 +1,10 @@ -#ifndef MANTID_MDEVENTS_CREATEMDWORKSPACE_H_ -#define MANTID_MDEVENTS_CREATEMDWORKSPACE_H_ +#ifndef MANTID_MDALGORITHMS_CREATEMDWORKSPACE_H_ +#define MANTID_MDALGORITHMS_CREATEMDWORKSPACE_H_ #include "MantidAPI/Algorithm.h" -#include "MantidKernel/System.h" -#include "MantidMDEvents/BoxControllerSettingsAlgorithm.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" namespace Mantid { namespace MDAlgorithms { @@ -20,13 +19,13 @@ namespace MDAlgorithms { * @date 2011-02-25 11:54:52.003137 */ class DLLExport CreateMDWorkspace - : public MDEvents::BoxControllerSettingsAlgorithm { + : public MDAlgorithms::BoxControllerSettingsAlgorithm { public: CreateMDWorkspace(); ~CreateMDWorkspace(); /// Algorithm's name for identification - virtual const std::string name() const { return "CreateMDWorkspace"; }; + virtual const std::string name() const { return "CreateMDWorkspace"; } /// Summary of algorithms purpose virtual const std::string summary() const { return "Creates an empty MDEventWorkspace with a given number of " @@ -34,7 +33,7 @@ public: } /// Algorithm's version for identification - virtual int version() const { return 1; }; + virtual int version() const { return 1; } /// Algorithm's category for identification virtual const std::string category() const { return "MDAlgorithms"; } @@ -43,10 +42,10 @@ private: void exec(); template <typename MDE, size_t nd> - void finish(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void finish(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); }; } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects -#endif /* MANTID_MDEVENTS_CREATEMDWORKSPACE_H_ */ +#endif /* MANTID_MDALGORITHMS_CREATEMDWORKSPACE_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DivideMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DivideMD.h index ec3c98a49fe..3103ceb10eb 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DivideMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DivideMD.h @@ -57,17 +57,17 @@ private: void execEvent(); /// Run the algorithm with a MDHisotWorkspace as output and operand - void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); + void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand); /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand void - execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, + execHistoScalar(Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); template <typename MDE, size_t nd> void execEventScalar( - typename Mantid::MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); }; } // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EqualToMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EqualToMD.h index 4b1ea4e7703..543dbc0d2fe 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EqualToMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EqualToMD.h @@ -44,10 +44,10 @@ public: private: void initExtraProperties(); bool acceptScalar() const { return true; } - void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); + void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand); void - execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, + execHistoScalar(Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); }; diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ExponentialMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ExponentialMD.h index 9624a9a9e3a..0d7abded670 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ExponentialMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ExponentialMD.h @@ -54,7 +54,7 @@ private: void execEvent(Mantid::API::IMDEventWorkspace_sptr out); /// Run the algorithm with a MDHistoWorkspace - void execHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out); + void execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out); }; } // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FakeMDEventData.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FakeMDEventData.h index 4c16a032a72..0150766cbb4 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FakeMDEventData.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FakeMDEventData.h @@ -1,42 +1,49 @@ -#ifndef MANTID_MDEVENTS_FAKEMDEVENTDATA_H_ -#define MANTID_MDEVENTS_FAKEMDEVENTDATA_H_ +#ifndef MANTID_MDALGORITHMS_FAKEMDEVENTDATA_H_ +#define MANTID_MDALGORITHMS_FAKEMDEVENTDATA_H_ -#include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidKernel/System.h" -#include "MantidKernel/ArrayProperty.h" - -#include <boost/random/mersenne_twister.hpp> -#include <boost/random/uniform_int.hpp> -#include <boost/random/variate_generator.hpp> +#include "MantidMDAlgorithms/DllConfig.h" namespace Mantid { namespace MDAlgorithms { /** FakeMDEventData : Algorithm to create fake multi-dimensional event - * data that gets added to MDEventWorkspace, for use in testing. + data that gets added to MDEventWorkspace, for use in testing. + + Copyright © 2015 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge + National Laboratory & European Spallation Source + + This file is part of Mantid. + + Mantid is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + Mantid is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + File change history is stored at: <https://github.com/mantidproject/mantid> + Code Documentation is available at: <http://doxygen.mantidproject.org> * - * @author Janik Zikovsky - * @date 2011-03-30 13:13:10.349627 */ -class DLLExport FakeMDEventData : public API::Algorithm { +class MANTID_MDALGORITHMS_DLL FakeMDEventData : public API::Algorithm { public: - FakeMDEventData(); - ~FakeMDEventData(); - /// Algorithm's name for identification - virtual const std::string name() const { return "FakeMDEventData"; }; + virtual const std::string name() const { return "FakeMDEventData"; } /// Summary of algorithms purpose virtual const std::string summary() const { return "Adds fake multi-dimensional event data to an existing " "MDEventWorkspace, for use in testing.\nYou can create a blank " "MDEventWorkspace with CreateMDWorkspace."; } - - /// Algorithm's version for identification - virtual int version() const { return 1; }; + /// Algorithm's verion for identification + virtual int version() const { return 1; } /// Algorithm's category for identification virtual const std::string category() const { return "MDAlgorithms"; } @@ -45,36 +52,9 @@ private: void init(); /// Run the algorithm void exec(); - - /// Setup a detector cache for randomly picking IDs from the given workspace's - /// instrument - void setupDetectorCache(const API::IMDEventWorkspace &ws); - /// Pick a detector ID for a particular event - detid_t pickDetectorID(); - - template <typename MDE, size_t nd> - void addFakePeak(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); - template <typename MDE, size_t nd> - void - addFakeUniformData(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); - - template <typename MDE, size_t nd> - void addFakeRandomData(const std::vector<double> ¶ms, - typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); - template <typename MDE, size_t nd> - void - addFakeRegularData(const std::vector<double> ¶ms, - typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); - - /// All detector IDs for this instrument - std::vector<detid_t> m_detIDs; - /// Random number generator - boost::mt19937 m_randGen; - /// Uniform distribution - boost::uniform_int<size_t> m_uniformDist; }; } // namespace Mantid -} // namespace MDEvents +} // namespace MDAlgorithms -#endif /* MANTID_MDEVENTS_FAKEMDEVENTDATA_H_ */ +#endif /* MANTID_MDALGORITHMS_FAKEMDEVENTDATA_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FindPeaksMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FindPeaksMD.h index f1b135530ee..c834de29471 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FindPeaksMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FindPeaksMD.h @@ -7,8 +7,8 @@ #include "MantidAPI/Progress.h" #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidKernel/Matrix.h" #include "MantidKernel/V3D.h" @@ -59,9 +59,9 @@ private: /// Run find peaks on an MDEventWorkspace template <typename MDE, size_t nd> - void findPeaks(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void findPeaks(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Run find peaks on a histo workspace - void findPeaksHisto(Mantid::MDEvents::MDHistoWorkspace_sptr ws); + void findPeaksHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws); /// Output PeaksWorkspace Mantid::DataObjects::PeaksWorkspace_sptr peakWS; @@ -99,6 +99,6 @@ private: }; } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects -#endif /* MANTID_MDEVENTS_FINDPEAKSMD_H_ */ +#endif /* MANTID_MDALGORITHMS_FINDPEAKSMD_H_ */ diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/FitMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FitMD.h similarity index 96% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/FitMD.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FitMD.h index 195c7be5ef0..1d13172f5f3 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/FitMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/FitMD.h @@ -1,5 +1,5 @@ -#ifndef MANTID_MDEVENTS_FITMD_H_ -#define MANTID_MDEVENTS_FITMD_H_ +#ifndef MANTID_MDALGORITHMS_FITMD_H_ +#define MANTID_MDALGORITHMS_FITMD_H_ //---------------------------------------------------------------------- // Includes @@ -16,7 +16,7 @@ class IMDEventWorkspace; class IMDHistoWorkspace; } -namespace MDEvents { +namespace MDAlgorithms { /** Creates FunctionDomainMD from an IMDWorkspace. Does not create any properties. @@ -115,7 +115,7 @@ protected: size_t m_count; }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /*MANTID_MDEVENTS_FITMD_H_*/ +#endif /*MANTID_MDALGORITHMS_FITMD_H_*/ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GreaterThanMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GreaterThanMD.h index d0a7510f42c..86f7214e712 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GreaterThanMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GreaterThanMD.h @@ -51,10 +51,10 @@ private: bool acceptScalar() const { return true; } bool commutative() const { return false; } - void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); + void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand); void - execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, + execHistoScalar(Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); }; diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDEventWorkspace.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDEventWorkspace.h similarity index 87% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDEventWorkspace.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDEventWorkspace.h index 6ad8db85aaa..0143a82abfc 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDEventWorkspace.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDEventWorkspace.h @@ -1,14 +1,12 @@ -#ifndef MANTID_MDEVENTS_IMPORTMDEVENTWORKSPACE_H_ -#define MANTID_MDEVENTS_IMPORTMDEVENTWORKSPACE_H_ +#ifndef MANTID_MDALGORITHMS_IMPORTMDEVENTWORKSPACE_H_ +#define MANTID_MDALGORITHMS_IMPORTMDEVENTWORKSPACE_H_ -#include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include <deque> namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** ImportMDEventWorkspace : Loads a file containing dimensionality and data for an MDEventWorkspace. Handles either full mdevents for mdleanevents as input @@ -71,14 +69,14 @@ private: /// Possible Event Types enum MDEventType { Lean, Full, NotSpecified }; /// Flag indicating whether full md events for lean events will be generated. - bool m_IsFullMDEvents; + bool m_IsFullDataObjects; /// Actual number of dimensions specified size_t m_nDimensions; /// Actual number of md events provided. - size_t m_nMDEvents; + size_t m_nDataObjects; /// call back to add event data template <typename MDE, size_t nd> - void addEventsData(typename MDEventWorkspace<MDE, nd>::sptr ws); + void addEventsData(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Quick check of the structure, so we can abort if passed junk. void quickFileCheck(); /// Check that the a flag exists in the file. @@ -88,7 +86,7 @@ private: void exec(); }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /* MANTID_MDEVENTS_IMPORTMDEVENTWORKSPACE_H_ */ +#endif /* MANTID_MDALGORITHMS_IMPORTMDEVENTWORKSPACE_H_ */ diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDHistoWorkspace.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspace.h similarity index 84% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDHistoWorkspace.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspace.h index dad7ae8d20a..be699d5f8a8 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDHistoWorkspace.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspace.h @@ -1,11 +1,10 @@ -#ifndef MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACE_H_ -#define MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACE_H_ +#ifndef MANTID_MDALGORITHMS_IMPORTMDHISTOWORKSPACE_H_ +#define MANTID_MDALGORITHMS_IMPORTMDHISTOWORKSPACE_H_ -#include "MantidKernel/System.h" -#include "MantidMDEvents/ImportMDHistoWorkspaceBase.h" +#include "MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** ImportMDHistoWorkspace : Takes a text file containing structured signal and error information and imports it @@ -53,7 +52,7 @@ private: void exec(); }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /* MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACE_H_ */ +#endif /* MANTID_MDALGORITHMS_IMPORTMDHISTOWORKSPACE_H_ */ diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDHistoWorkspaceBase.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h similarity index 84% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDHistoWorkspaceBase.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h index 2328cede330..81e9ec99362 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDHistoWorkspaceBase.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h @@ -1,13 +1,13 @@ -#ifndef MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACEBASE_H_ -#define MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACEBASE_H_ +#ifndef MANTID_MDALGORITHMS_IMPORTMDHISTOWORKSPACEBASE_H_ +#define MANTID_MDALGORITHMS_IMPORTMDHISTOWORKSPACEBASE_H_ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include <vector> namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** ImportMDHistoWorkspaceBase : Base class for algorithms Importing data as MDHistoWorkspaces. @@ -44,7 +44,7 @@ protected: /// Vector containing the number of bins in each dimension. std::vector<int> nbins; /// Creates an empty md histo workspace (with dimensions) - MDHistoWorkspace_sptr createEmptyOutputWorkspace(); + DataObjects::MDHistoWorkspace_sptr createEmptyOutputWorkspace(); /// Initialise the properties associated with the generic import (those to do /// with dimensionality). void initGenericImportProps(); @@ -56,7 +56,7 @@ private: size_t m_bin_product; }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /* MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACEBASE_H_ */ \ No newline at end of file +#endif /* MANTID_MDALGORITHMS_IMPORTMDHISTOWORKSPACEBASE_H_ */ diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/Integrate3DEvents.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Integrate3DEvents.h similarity index 98% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/Integrate3DEvents.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Integrate3DEvents.h index 70e48549ae8..1f46d776e94 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/Integrate3DEvents.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Integrate3DEvents.h @@ -15,7 +15,7 @@ namespace DataObjects { class PeakShapeEllipsoid; } -namespace MDEvents { +namespace MDAlgorithms { /** @class Integrate3DEvents @@ -118,7 +118,7 @@ private: double radius; // size of sphere to use for events around a peak }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/IntegrateEllipsoids.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateEllipsoids.h similarity index 72% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/IntegrateEllipsoids.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateEllipsoids.h index 1e7d332d87b..45d5c47aa1c 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/IntegrateEllipsoids.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegrateEllipsoids.h @@ -1,12 +1,12 @@ -#ifndef MANTID_MDEVENTS_INTEGRATE_ELLIPSOIDS_H_ -#define MANTID_MDEVENTS_INTEGRATE_ELLIPSOIDS_H_ +#ifndef MANTID_MDALGORITHMS_INTEGRATE_ELLIPSOIDS_H_ +#define MANTID_MDALGORITHMS_INTEGRATE_ELLIPSOIDS_H_ #include "MantidAPI/Algorithm.h" #include "MantidDataObjects/EventWorkspace.h" -#include "MantidMDEvents/MDWSDescription.h" +#include "MantidDataObjects/MDWSDescription.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { class DLLExport IntegrateEllipsoids : public API::Algorithm { public: @@ -32,7 +32,7 @@ private: void initTargetWSDescr(DataObjects::EventWorkspace_sptr wksp); }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /* MANTID_MDEVENTS_INTEGRATE_ELLIPSOIDS_H_ */ +#endif /* MANTID_MDALGORITHMS_INTEGRATE_ELLIPSOIDS_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD.h index d0209e6bd02..f7b8c249fc7 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD.h @@ -5,7 +5,7 @@ #include "MantidAPI/IMDEventWorkspace.h" #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include "MantidAPI/CompositeFunction.h" namespace Mantid { @@ -41,7 +41,7 @@ private: void exec(); template <typename MDE, size_t nd> - void integrate(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void integrate(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Input MDEventWorkspace Mantid::API::IMDEventWorkspace_sptr inWS; @@ -54,6 +54,6 @@ private: }; } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects #endif /* MANTID_MDALGORITHMS_INTEGRATEPEAKSMD_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD2.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD2.h index 016900ec146..67b3dc0c260 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD2.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD2.h @@ -5,7 +5,7 @@ #include "MantidAPI/IMDEventWorkspace.h" #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include "MantidAPI/CompositeFunction.h" namespace Mantid { @@ -41,7 +41,7 @@ private: void exec(); template <typename MDE, size_t nd> - void integrate(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void integrate(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Input MDEventWorkspace Mantid::API::IMDEventWorkspace_sptr inWS; @@ -60,6 +60,6 @@ private: }; } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects #endif /* MANTID_MDALGORITHMS_INTEGRATEPEAKSMD_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LessThanMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LessThanMD.h index 11f030c68b1..96997e8fff5 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LessThanMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LessThanMD.h @@ -45,10 +45,10 @@ private: bool acceptScalar() const { return true; } bool commutative() const { return false; } - void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); + void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand); void - execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, + execHistoScalar(Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); }; diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h index dbf60ce1b9d..fec7ee2400c 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h @@ -1,10 +1,10 @@ -#ifndef MANTID_MDEVENTS_LOADMD_H_ -#define MANTID_MDEVENTS_LOADMD_H_ +#ifndef MANTID_MDALGORITHMS_LOADMD_H_ +#define MANTID_MDALGORITHMS_LOADMD_H_ #include "MantidAPI/IFileLoader.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include <boost/scoped_ptr.hpp> namespace Mantid { @@ -64,13 +64,13 @@ private: /// Helper method template <typename MDE, size_t nd> - void doLoad(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void doLoad(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); void loadExperimentInfos( boost::shared_ptr<Mantid::API::MultipleExperimentInfos> ws); void loadSlab(std::string name, void *data, - MDEvents::MDHistoWorkspace_sptr ws, NeXus::NXnumtype dataType); + DataObjects::MDHistoWorkspace_sptr ws, NeXus::NXnumtype dataType); void loadHisto(); void loadDimensions(); @@ -95,7 +95,7 @@ private: bool m_BoxStructureAndMethadata; }; -} // namespace MDEvents +} // namespace DataObjects } // namespace Mantid -#endif /* MANTID_MDEVENTS_LOADMD_H_ */ +#endif /* MANTID_MDALGORITHMS_LOADMD_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW.h index cb73d53631b..f85faefcfff 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadSQW.h @@ -1,10 +1,10 @@ -#ifndef MANTID_MDEVENTS_LOAD_SQW_H_ -#define MANTID_MDEVENTS_LOAD_SQW_H_ +#ifndef MANTID_MDALGORITHMS_LOAD_SQW_H_ +#define MANTID_MDALGORITHMS_LOAD_SQW_H_ #include "MantidAPI/IFileLoader.h" #include "MantidKernel/FileDescriptor.h" #include "MantidAPI/Progress.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventFactory.h" #include "MantidGeometry/MDGeometry/MDHistoDimensionBuilder.h" #include <fstream> #include <string> @@ -109,7 +109,7 @@ private: protected: // for testing /// Read events onto the workspace. virtual void readEvents( - Mantid::MDEvents::MDEventWorkspace<MDEvents::MDEvent<4>, 4> *ws); + Mantid::DataObjects::MDEventWorkspace<DataObjects::MDEvent<4>, 4> *ws); /// Read DND dimensions. void readDNDDimensions( @@ -121,7 +121,7 @@ protected: // for testing /// Extract lattice information virtual void addLattice( - Mantid::MDEvents::MDEventWorkspace<MDEvents::MDEvent<4>, 4> *ws); + Mantid::DataObjects::MDEventWorkspace<DataObjects::MDEvent<4>, 4> *ws); /// Parse metadata from file. void parseMetadata(const std::string &fileName); // New controlling function @@ -131,7 +131,7 @@ protected: // for testing std::vector<Mantid::Geometry::MDHistoDimensionBuilder> &DimVector); /// add range of dimensions to the workspace; void addDimsToWs( - Mantid::MDEvents::MDEventWorkspace<MDEvents::MDEvent<4>, 4> *ws, + Mantid::DataObjects::MDEventWorkspace<DataObjects::MDEvent<4>, 4> *ws, std::vector<Mantid::Geometry::MDHistoDimensionBuilder> &DimVector); /// read real box sizes for all Horace Boxes; @@ -166,6 +166,6 @@ protected: // for testing }; } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects -#endif /* MANTID_MDEVENTS_MAKEDIFFRACTIONMDEVENTWORKSPACE_H_ */ +#endif /* MANTID_MDALGORITHMS_MAKEDIFFRACTIONMDEVENTWORKSPACE_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LogarithmMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LogarithmMD.h index 645ecbde92a..8aa4743d51a 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LogarithmMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LogarithmMD.h @@ -56,7 +56,7 @@ private: void execEvent(Mantid::API::IMDEventWorkspace_sptr out); /// Run the algorithm with a MDHistoWorkspace - void execHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out); + void execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out); }; } // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDEventWSWrapper.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDEventWSWrapper.h similarity index 93% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDEventWSWrapper.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDEventWSWrapper.h index f890d996da7..c16730dfa17 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDEventWSWrapper.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDEventWSWrapper.h @@ -1,18 +1,18 @@ -#ifndef MANTID_MDEVENTS_MDEVENT_WS_WRAPPER_H -#define MANTID_MDEVENTS_MDEVENT_WS_WRAPPER_H +#ifndef MANTID_MDALGORITHMS_MDEVENT_WS_WRAPPER_H +#define MANTID_MDALGORITHMS_MDEVENT_WS_WRAPPER_H -#include "MantidMDEvents/MDEvent.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDWSDescription.h" +#include "MantidDataObjects/MDEvent.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidMDAlgorithms/MDWSDescription.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** The class which wraps MD Events factory and allow to work with a N-dimensional templated MDEvent workspace like usuall class with n-dimension as a parameter * * Introduced to decrease code bloat and increase efficiency of methods and -algorithms, which use MDEvents write interface and run-time defined number of +algorithms, which use DataObjects write interface and run-time defined number of dimensions @date 2011-28-12 @@ -83,7 +83,7 @@ public: void releaseWorkspace(); /// get access to the internal workspace API::IMDEventWorkspace_sptr pWorkspace() { return m_Workspace; } - // should it be moved to the IMDEvents? + // should it be moved to the IDataObjects? // void refreshCentroid(){ (this->*(mdCalCentroid[m_NDimensions]))(); }; /** initiate the class with pointer to existing MD workspace */ void setMDWS(API::IMDEventWorkspace_sptr spWS); @@ -150,7 +150,7 @@ private: mutable bool m_needSplitting; }; -} // endnamespace MDEvents +} // endnamespace MDAlgorithms } // endnamespace Mantid #endif diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormDirectSC.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormDirectSC.h index 4f4cb22d5e9..375dea55781 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormDirectSC.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormDirectSC.h @@ -49,8 +49,8 @@ private: void cacheInputs(); std::string inputEnergyMode() const; - MDEvents::MDHistoWorkspace_sptr binInputWS(); - void createNormalizationWS(const MDEvents::MDHistoWorkspace &dataWS); + DataObjects::MDHistoWorkspace_sptr binInputWS(); + void createNormalizationWS(const DataObjects::MDHistoWorkspace &dataWS); std::vector<coord_t> getValuesFromOtherDimensions(bool &skipNormalization) const; Kernel::Matrix<coord_t> @@ -69,7 +69,7 @@ private: const double phi); /// Normalization workspace - MDEvents::MDHistoWorkspace_sptr m_normWS; + DataObjects::MDHistoWorkspace_sptr m_normWS; /// Input workspace API::IMDEventWorkspace_sptr m_inputWS; /// limits for h,k,l, dE dimensions diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormSCD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormSCD.h index 7e9e2c10f7d..a0c1a0ed9d6 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormSCD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDNormSCD.h @@ -49,8 +49,8 @@ private: void cacheInputs(); std::string inputEnergyMode() const; - MDEvents::MDHistoWorkspace_sptr binInputWS(); - void createNormalizationWS(const MDEvents::MDHistoWorkspace &dataWS); + DataObjects::MDHistoWorkspace_sptr binInputWS(); + void createNormalizationWS(const DataObjects::MDHistoWorkspace &dataWS); std::vector<coord_t> getValuesFromOtherDimensions(bool &skipNormalization) const; Kernel::Matrix<coord_t> @@ -72,7 +72,7 @@ private: const double phi); /// Normalization workspace - MDEvents::MDHistoWorkspace_sptr m_normWS; + DataObjects::MDHistoWorkspace_sptr m_normWS; /// Input workspace API::IMDEventWorkspace_sptr m_inputWS; /// limits for h,k,l dimensions diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfAxisNames.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfAxisNames.h similarity index 93% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfAxisNames.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfAxisNames.h index 7713db08ccc..b32fbb4f7b3 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfAxisNames.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfAxisNames.h @@ -1,11 +1,11 @@ -#ifndef MANTID_MDEVENTS_MDTRANSF_AXIS_NAMES_H -#define MANTID_MDEVENTS_MDTRANSF_AXIS_NAMES_H -//#include "MantidMDEvents/MDTransfDEHelper.h" +#ifndef MANTID_MDALGORITHMS_MDTRANSF_AXIS_NAMES_H +#define MANTID_MDALGORITHMS_MDTRANSF_AXIS_NAMES_H +//#include "MantidDataObjects/MDTransfDEHelper.h" #include "MantidKernel/DeltaEMode.h" #include "MantidKernel/V3D.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** The class defines default axis names/dimension ID-s for MD workspace which can be obtained/used * in the MD transformations converting matrix workspace to Q or Q-dE space @@ -75,7 +75,7 @@ std::string DLLExport makeAxisName(const Kernel::V3D &vector, /**creates string representation of the number with accuracy, cpecified by eps*/ std::string DLLExport sprintfd(const double data, const double eps); -} // endnamespace MDEvents +} // endnamespace MDAlgorithms } // endnamespace Mantid #endif \ No newline at end of file diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfDEHelper.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfDEHelper.h index 67cc13991b4..57d184a11f9 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfDEHelper.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfDEHelper.h @@ -2,7 +2,7 @@ #define H_MDTRANSF_DE_HELPER namespace Mantid { -namespace MDEvents { +namespace DataObjects { /** The class is here do define common operations/interfaces involved in dE (energy transfer) for the MD transformations, * which actually do energy transfer analyzis @@ -67,7 +67,7 @@ private: const std::vector<std::string> EmodesList; }; -} // endnamespace MDEvents +} // endnamespace DataObjects } // endnamespace Mantid #endif \ No newline at end of file diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfFactory.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfFactory.h similarity index 86% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfFactory.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfFactory.h index 2948bb1f31b..9ef9d39451a 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfFactory.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfFactory.h @@ -1,5 +1,5 @@ -#ifndef MANTID_MDEVENTS_MD_TRANSFORMATION_FACTORYIMPL_H -#define MANTID_MDEVENTS_MD_TRANSFORMATION_FACTORYIMPL_H +#ifndef MANTID_MDALGORITHMS_MD_TRANSFORMATION_FACTORYIMPL_H +#define MANTID_MDALGORITHMS_MD_TRANSFORMATION_FACTORYIMPL_H /* Used to register unit classes into the factory. creates a global object in an * anonymous namespace. The object itself does nothing, but the comma operator @@ -18,35 +18,37 @@ #define DECLARE_MD_TRANSF(classname) \ namespace { \ Mantid::Kernel::RegistrationHelper \ - register_alg_##classname(((Mantid::MDEvents::MDTransfFactory::Instance() \ + register_alg_##classname(((Mantid::MDAlgorithms::MDTransfFactory::Instance() \ .subscribe<classname>(#classname)), \ 0)); \ } \ - const std::string Mantid::MDEvents::classname::transfID() const { \ + const std::string Mantid::MDAlgorithms::classname::transfID() const { \ return #classname; \ } #define DECLARE_MD_TRANSFID(classname, regID) \ namespace { \ Mantid::Kernel::RegistrationHelper \ - register_alg_##classname(((Mantid::MDEvents::MDTransfFactory::Instance() \ + register_alg_##classname(((Mantid::MDAlgorithms::MDTransfFactory::Instance() \ .subscribe<classname>(#regID)), \ 0)); \ } \ - const std::string Mantid::MDEvents::classname::transfID() const { \ + const std::string Mantid::MDAlgorithms::classname::transfID() const { \ return #regID; \ } //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- -#include "MantidKernel/DllConfig.h" +#include "MantidMDAlgorithms/DllConfig.h" + #include "MantidKernel/DynamicFactory.h" #include "MantidKernel/SingletonHolder.h" -#include "MantidMDEvents/MDTransfInterface.h" + +#include "MantidMDAlgorithms/MDTransfInterface.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** Creates instances of concrete transformations into multidimensional (MD) coordinates. @@ -88,13 +90,7 @@ namespace MDEvents { File change history is stored at: <https://github.com/mantidproject/mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ -#ifdef IN_MANTID_MDEVENT -#define MANTID_MDEVENTS_DLL DLLExport -#else -#define MANTID_MDEVENTS_DLL DLLImport -#endif /* IN_MANTID_MDEVENT*/ - -class MANTID_MDEVENTS_DLL MDTransfFactoryImpl +class MANTID_MDALGORITHMS_DLL MDTransfFactoryImpl : public Kernel::DynamicFactory<MDTransfInterface> { public: virtual boost::shared_ptr<MDTransfInterface> @@ -122,14 +118,14 @@ private: /// AlgorithmFactoryImpl (needed for dllexport/dllimport) . #ifdef _WIN32 // this breaks new namespace declaration rules; need to find a better fix -template class MANTID_MDEVENTS_DLL +template class MANTID_MDALGORITHMS_DLL Mantid::Kernel::SingletonHolder<MDTransfFactoryImpl>; #endif /* _WIN32 */ /// The specialization of the SingletonHolder class that holds the /// MDTransformations Factory typedef Kernel::SingletonHolder<MDTransfFactoryImpl> MDTransfFactory; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid #endif diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfInterface.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfInterface.h similarity index 98% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfInterface.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfInterface.h index 7aa6cf336b6..624caad868d 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfInterface.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfInterface.h @@ -1,13 +1,17 @@ -#ifndef MANTID_MDEVENTS_IMD_TRANSFORMATION_H -#define MANTID_MDEVENTS_IMD_TRANSFORMATION_H +#ifndef MANTID_MDALGORITHMS_IMD_TRANSFORMATION_H +#define MANTID_MDALGORITHMS_IMD_TRANSFORMATION_H + +#include "MantidAPI/MatrixWorkspace.h" + #include "MantidGeometry/MDGeometry/MDTypes.h" + #include "MantidKernel/cow_ptr.h" #include "MantidKernel/DeltaEMode.h" -#include "MantidMDEvents/MDWSDescription.h" -#include "MantidAPI/MatrixWorkspace.h" + +#include "MantidMDAlgorithms/MDWSDescription.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** Interface to set of sub-classes used by ConvertToMD algorithm and responsible for conversion of input workspace * data into MD events. @@ -227,4 +231,4 @@ typedef boost::shared_ptr<const MDTransfInterface> MDTransf_const_sptr; } // End MDAlgorighms namespace } // End Mantid namespace -#endif \ No newline at end of file +#endif diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfModQ.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfModQ.h similarity index 96% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfModQ.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfModQ.h index 48cd90a9c3f..773dc554553 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfModQ.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfModQ.h @@ -1,11 +1,11 @@ -#ifndef MANTID_MDEVENTS_MODQ_TRANSF_H -#define MANTID_MDEVENTS_MODQ_TRANSF_H +#ifndef MANTID_MDALGORITHMS_MODQ_TRANSF_H +#define MANTID_MDALGORITHMS_MODQ_TRANSF_H // -#include "MantidMDEvents/MDTransfInterface.h" -#include "MantidMDEvents/MDTransfFactory.h" +#include "MantidMDAlgorithms/MDTransfInterface.h" +#include "MantidMDAlgorithms/MDTransfFactory.h" // namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** Class responsible for conversion of input workspace * data into proper number of output dimensions for ModQ case diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfNoQ.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfNoQ.h similarity index 94% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfNoQ.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfNoQ.h index bf668b5720b..c4adfc1ee73 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfNoQ.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfNoQ.h @@ -1,14 +1,14 @@ -#ifndef MANTID_MDEVENTS_NOQ_TRANSF_H -#define MANTID_MDEVENTS_NOQ_TRANSF_H +#ifndef MANTID_MDALGORITHMS_NOQ_TRANSF_H +#define MANTID_MDALGORITHMS_NOQ_TRANSF_H // -#include "MantidMDEvents/MDTransfInterface.h" -//#include "MantidMDEvents/ConvToMDBase.h" -#include "MantidMDEvents/MDTransfFactory.h" +#include "MantidDataObjects/MDTransfInterface.h" +//#include "MantidDataObjects/ConvToMDBase.h" +#include "MantidDataObjects/MDTransfFactory.h" #include "MantidAPI/NumericAxis.h" // namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** Class responsible for conversion of input workspace * data into proper number of output dimensions in NoQ case, when the data from diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfQ3D.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfQ3D.h similarity index 94% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfQ3D.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfQ3D.h index 0b80f881e4c..1db019647c7 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfQ3D.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDTransfQ3D.h @@ -1,13 +1,12 @@ -#ifndef MANTID_MDEVENTS_Q3D_TRANSF_H -#define MANTID_MDEVENTS_Q3D_TRANSF_H +#ifndef MANTID_MDALGORITHMS_Q3D_TRANSF_H +#define MANTID_MDALGORITHMS_Q3D_TRANSF_H // -#include "MantidMDEvents/MDTransfInterface.h" -#include "MantidMDEvents/MDTransfFactory.h" -//#include "MantidMDEvents/MDTransfDEHelper.h" -#include "MantidMDEvents/MDTransfModQ.h" +#include "MantidMDAlgorithms/MDTransfInterface.h" +#include "MantidMDAlgorithms/MDTransfFactory.h" +#include "MantidMDAlgorithms/MDTransfModQ.h" // namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** Class responsible for conversion of input workspace * data into proper number of output dimensions for Q3D case diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDWSDescription.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSDescription.h similarity index 96% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDWSDescription.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSDescription.h index 5487c91648c..884b90cb844 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDWSDescription.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSDescription.h @@ -1,25 +1,27 @@ -#ifndef MANTID_MDEVENTS_WS_DESCRIPTION_H -#define MANTID_MDEVENTS_WS_DESCRIPTION_H +#ifndef MANTID_MDALGORITHMS_WS_DESCRIPTION_H +#define MANTID_MDALGORITHMS_WS_DESCRIPTION_H -#include "MantidKernel/PropertyManager.h" +#include "MantidAPI/LogManager.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/MatrixWorkspace.h" + +#include "MantidGeometry/Crystal/OrientedLattice.h" + #include "MantidKernel/Logger.h" #include "MantidKernel/PhysicalConstants.h" -#include "MantidGeometry/Crystal/OrientedLattice.h" +#include "MantidKernel/PropertyManager.h" -#include "MantidMDEvents/MDEvent.h" +#include "MantidDataObjects/MDEvent.h" #include "MantidDataObjects/TableWorkspace.h" -#include "MantidAPI/LogManager.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /*** Class wrapping together all parameters, related to conversion from a workspace to MDEventoWorkspace * * used to provide common interface for subclasses, dealing with creation of MD workspace and conversion of - * ws data into MDEvents + * ws data into DataObjects * * It also defines some auxiliary functions, used for convenient description of MD workspace @@ -114,7 +116,7 @@ public: // for the time being /// copy some parameters from the input workspace, as target md WS do not have /// all information about the algorithm. void setUpMissingParameters( - const MDEvents::MDWSDescription &SourceMatrixWorkspace); + const MDWSDescription &SourceMatrixWorkspace); /// method builds MD Event ws description from a matrix workspace and the /// transformations, requested to be performed on the workspace @@ -124,7 +126,7 @@ public: // for the time being std::vector<std::string>()); /// compare two descriptions and select the complimentary result. - void checkWSCorresponsMDWorkspace(MDEvents::MDWSDescription &NewMDWorkspace); + void checkWSCorresponsMDWorkspace(MDWSDescription &NewMDWorkspace); void setMinMax(const std::vector<double> &minVal, const std::vector<double> &maxVal); @@ -195,4 +197,4 @@ private: }; } } -#endif \ No newline at end of file +#endif diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDWSTransform.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSTransform.h similarity index 88% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDWSTransform.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSTransform.h index d61ba9c6cc7..b44faaade34 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDWSTransform.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MDWSTransform.h @@ -1,11 +1,11 @@ -#ifndef MANTID_MDEVENTS_MDWS_TRANSFORMATION_H -#define MANTID_MDEVENTS_MDWS_TRANSFORMATION_H +#ifndef MANTID_MDALGORITHMS_MDWS_TRANSFORMATION_H +#define MANTID_MDALGORITHMS_MDWS_TRANSFORMATION_H -#include "MantidMDEvents/MDTransfAxisNames.h" -#include "MantidMDEvents/MDWSDescription.h" +#include "MantidMDAlgorithms/MDTransfAxisNames.h" +#include "MantidMDAlgorithms//MDWSDescription.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /*** The class responsible for building Momentums Transformation Matrix for CnvrtToMD algorithm * from the input parameters of the algorithm and parameters, retrieved from @@ -84,20 +84,18 @@ public: const std::vector<double> &wt); std::vector<double> - getTransfMatrix(MDEvents::MDWSDescription &TargWSDescription, + getTransfMatrix(MDAlgorithms::MDWSDescription &TargWSDescription, const std::string &FrameRequested, const std::string &QScaleRequested) const; /// construct meaningful dimension names for Q3D case and different /// transformation types defined by the class - // void setQ3DDimensionsNames(MDEvents::MDWSDescription - // &TargWSDescription,const std::string &QScaleRequested)const; - void setQ3DDimensionsNames(MDEvents::MDWSDescription &TargWSDescription, + void setQ3DDimensionsNames(MDAlgorithms::MDWSDescription &TargWSDescription, CnvrtToMD::TargetFrame FrameID, CnvrtToMD::CoordScaling scaling) const; /// construct meaningful dimension names for ModQ case and different /// transformation types defined by the class; - void setModQDimensionsNames(MDEvents::MDWSDescription &TargWSDescription, + void setModQDimensionsNames(MDAlgorithms::MDWSDescription &TargWSDescription, const std::string &QScaleRequested) const; /// return the list of possible scalings for momentums std::vector<std::string> getQScalings() const { return m_QScalingID; } @@ -128,7 +126,7 @@ private: protected: // for testing /// function generates "Kind of" W transformation matrix for different /// Q-conversion modes; - Kernel::DblMatrix buildQTrahsf(MDEvents::MDWSDescription &TargWSDescription, + Kernel::DblMatrix buildQTrahsf(MDAlgorithms::MDWSDescription &TargWSDescription, CnvrtToMD::CoordScaling scaling, bool UnitUB = false) const; /// build orthogonal coordinate around two input vecotors u and v expressed in @@ -137,15 +135,15 @@ protected: // for testing // Kernel::V3D &u, const Kernel::V3D &v)const; std::vector<double> - getTransfMatrix(MDEvents::MDWSDescription &TargWSDescription, + getTransfMatrix(MDAlgorithms::MDWSDescription &TargWSDescription, CnvrtToMD::TargetFrame FrameID, CnvrtToMD::CoordScaling &scaling) const; CnvrtToMD::TargetFrame - findTargetFrame(MDEvents::MDWSDescription &TargWSDescription) const; + findTargetFrame(MDAlgorithms::MDWSDescription &TargWSDescription) const; // helper function which verifies, if the input information availble on the // workspace consistent with the frame requiested - void checkTargetFrame(const MDEvents::MDWSDescription &TargWSDescription, + void checkTargetFrame(const MDAlgorithms::MDWSDescription &TargWSDescription, const CnvrtToMD::TargetFrame CoordFrameID) const; }; } diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMD.h index 91cdb6c2b1a..07818057fa8 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMD.h @@ -1,11 +1,10 @@ #ifndef MANTID_MDALGORITHMS_MERGEMD_H_ #define MANTID_MDALGORITHMS_MERGEMD_H_ -#include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" -#include "MantidMDEvents/BoxControllerSettingsAlgorithm.h" #include "MantidAPI/IMDEventWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h" namespace Mantid { namespace MDAlgorithms { @@ -36,7 +35,7 @@ namespace MDAlgorithms { Code Documentation is available at: <http://doxygen.mantidproject.org> */ class DLLExport MergeMD - : public Mantid::MDEvents::BoxControllerSettingsAlgorithm { + : public BoxControllerSettingsAlgorithm { public: MergeMD(); virtual ~MergeMD(); @@ -56,7 +55,7 @@ private: void createOutputWorkspace(std::vector<std::string> &inputs); template <typename MDE, size_t nd> - void doPlus(typename Mantid::MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void doPlus(typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Vector of input MDWorkspaces std::vector<Mantid::API::IMDEventWorkspace_sptr> m_workspaces; diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMDFiles.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMDFiles.h index a1811bb8852..e168b755478 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMDFiles.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MergeMDFiles.h @@ -4,8 +4,8 @@ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" #include "MantidAPI/IMDEventWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDBoxFlatTree.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDBoxFlatTree.h" #include <nexus/NeXusFile.hpp> namespace Mantid { @@ -72,9 +72,9 @@ private: uint64_t loadEventsFromSubBoxes(API::IMDNode *TargetBox); // the class which flatten the box structure and deal with it - MDEvents::MDBoxFlatTree m_BoxStruct; + DataObjects::MDBoxFlatTree m_BoxStruct; // the vector of box structures for contributing files components - std::vector<MDEvents::MDBoxFlatTree> m_fileComponentsStructure; + std::vector<DataObjects::MDBoxFlatTree> m_fileComponentsStructure; protected: /// number of workspace dimensions diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MinusMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MinusMD.h index 276e942a027..180e47fe8ff 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MinusMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MinusMD.h @@ -54,18 +54,18 @@ private: void checkInputs(); template <typename MDE, size_t nd> - void doMinus(typename Mantid::MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void doMinus(typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Run the algorithm with an MDEventWorkspace as output void execEvent(); /// Run the algorithm with a MDHisotWorkspace as output and operand - void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); + void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand); /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand void - execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, + execHistoScalar(Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); }; diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MultiplyMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MultiplyMD.h index 8ddeab66220..5378bf80364 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MultiplyMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MultiplyMD.h @@ -4,7 +4,7 @@ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" #include "MantidMDAlgorithms/BinaryOperationMD.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" namespace Mantid { namespace MDAlgorithms { @@ -58,17 +58,17 @@ private: void execEvent(); /// Run the algorithm with a MDHisotWorkspace as output and operand - void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); + void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand); /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand void - execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, + execHistoScalar(Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); template <typename MDE, size_t nd> void execEventScalar( - typename Mantid::MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); }; } // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/NotMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/NotMD.h index 542d8e27a0c..a023353bcf4 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/NotMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/NotMD.h @@ -54,7 +54,7 @@ private: void execEvent(Mantid::API::IMDEventWorkspace_sptr out); /// Run the algorithm with a MDHistoWorkspace - void execHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out); + void execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out); }; } // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/OneStepMDEW.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OneStepMDEW.h similarity index 84% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/OneStepMDEW.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OneStepMDEW.h index cd93dea6be1..4916397e4ac 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/OneStepMDEW.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OneStepMDEW.h @@ -1,11 +1,11 @@ -#ifndef MANTID_MDEVENTS_ONESTEPMDEW_H_ -#define MANTID_MDEVENTS_ONESTEPMDEW_H_ +#ifndef MANTID_MDALGORITHMS_ONESTEPMDEW_H_ +#define MANTID_MDALGORITHMS_ONESTEPMDEW_H_ #include "MantidKernel/System.h" #include "MantidAPI/DeprecatedAlgorithm.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** OneStepMDEW : Assumes elastic diffration. Load Event data and immediately *converts to MDEvent with Lorentz correction applied. @@ -39,6 +39,6 @@ private: }; } // namespace Mantid -} // namespace MDEvents +} // namespace MDAlgorithms -#endif /* MANTID_MDEVENTS_ONESTEPMDEW_H_ */ +#endif /* MANTID_MDALGORITHMS_ONESTEPMDEW_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OrMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OrMD.h index e845b347716..3cc11b1e834 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OrMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/OrMD.h @@ -42,8 +42,8 @@ public: virtual int version() const; private: - void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); + void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand); }; } // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PlusMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PlusMD.h index 0f885c058e2..bd4207f2396 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PlusMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PlusMD.h @@ -4,7 +4,7 @@ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" #include "MantidAPI/IMDEventWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include "MantidMDAlgorithms/BinaryOperationMD.h" namespace Mantid { @@ -62,16 +62,16 @@ private: void execEvent(); /// Run the algorithm with a MDHisotWorkspace as output and operand - void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); + void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand); /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand void - execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, + execHistoScalar(Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); template <typename MDE, size_t nd> - void doPlus(typename Mantid::MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void doPlus(typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Workspace into which stuff will get added Mantid::API::IMDEventWorkspace_sptr iws1; diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PowerMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PowerMD.h index bb4b63d36c6..1ecb4cf7151 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PowerMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PowerMD.h @@ -56,7 +56,7 @@ private: void execEvent(Mantid::API::IMDEventWorkspace_sptr out); /// Run the algorithm with a MDHistoWorkspace - void execHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out); + void execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out); }; } // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PreprocessDetectorsToMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PreprocessDetectorsToMD.h index 146d4153056..7464a55bd76 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PreprocessDetectorsToMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/PreprocessDetectorsToMD.h @@ -86,6 +86,6 @@ protected: // for testing double getEi(const API::MatrixWorkspace_const_sptr &inputWS) const; }; -} // MDEvents +} // DataObjects } // Mantid #endif \ No newline at end of file diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Quantification/SimulateResolutionConvolvedModel.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Quantification/SimulateResolutionConvolvedModel.h index 7572149ab69..165f10ce786 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Quantification/SimulateResolutionConvolvedModel.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/Quantification/SimulateResolutionConvolvedModel.h @@ -2,7 +2,7 @@ #define MANTID_MDALGORITHMS_SIMULATERESOLUTIONCONVOLVEDMODEL_H_ #include "MantidMDAlgorithms/Quantification/FitResolutionConvolvedModel.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventFactory.h" namespace Mantid { namespace API { diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/QueryMDWorkspace.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/QueryMDWorkspace.h similarity index 87% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/QueryMDWorkspace.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/QueryMDWorkspace.h index e9ad55e0b2a..47adceff337 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/QueryMDWorkspace.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/QueryMDWorkspace.h @@ -1,12 +1,12 @@ -#ifndef MANTID_MDEVENTS_QUERYMDWORKSPACE_H_ -#define MANTID_MDEVENTS_QUERYMDWORKSPACE_H_ +#ifndef MANTID_MDALGORITHMS_QUERYMDWORKSPACE_H_ +#define MANTID_MDALGORITHMS_QUERYMDWORKSPACE_H_ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" #include "MDEventWorkspace.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** QueryMDWorkspace : Query an MDWorkspace in order to extract overview information as a table workspace. Signal and Error squared values as well as @@ -60,10 +60,10 @@ private: template <typename MDE, size_t nd> void - getBoxData(typename Mantid::MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + getBoxData(typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /* MANTID_MDEVENTS_QUERYMDWORKSPACE_H_ */ +#endif /* MANTID_MDALGORITHMS_QUERYMDWORKSPACE_H_ */ diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransform.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransform.h similarity index 86% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransform.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransform.h index a48f0b25940..e2a46f13001 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransform.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransform.h @@ -1,17 +1,17 @@ -#ifndef MANTID_MDEVENTS_REFLECTOMETRYMDTRANFORM_H_ -#define MANTID_MDEVENTS_REFLECTOMETRYMDTRANFORM_H_ +#ifndef MANTID_MDALGORITHMS_REFLECTOMETRYMDTRANFORM_H_ +#define MANTID_MDALGORITHMS_REFLECTOMETRYMDTRANFORM_H_ -#include "MantidKernel/System.h" +#include "MantidAPI/BoxController.h" #include "MantidAPI/IEventWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidAPI/BoxController.h" + +#include "MantidDataObjects/MDEventFactory.h" namespace Mantid { namespace API { class MatrixWorkspace; } -namespace MDEvents { +namespace MDAlgorithms { /** ReflectometryMDTransform : Abstract type for reflectometry transforms to MDWorkspaces. This is a Strategy Design Pattern. @@ -45,10 +45,10 @@ protected: const size_t m_nbinsx; const size_t m_nbinsz; - boost::shared_ptr<MDEventWorkspace2Lean> - createMDWorkspace(Mantid::Geometry::IMDDimension_sptr, - Mantid::Geometry::IMDDimension_sptr, - Mantid::API::BoxController_sptr boxController) const; + boost::shared_ptr<DataObjects::MDEventWorkspace2Lean> + createMDWorkspace(Geometry::IMDDimension_sptr, + Geometry::IMDDimension_sptr, + API::BoxController_sptr boxController) const; public: // Execute the strategy to produce a transformed, output MDWorkspace diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransformKiKf.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformKiKf.h similarity index 90% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransformKiKf.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformKiKf.h index d33861ca56a..7377059cb39 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransformKiKf.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformKiKf.h @@ -1,16 +1,17 @@ -#ifndef MANTID_MDEVENTS_REFLECTOMETRYTRANSFORMKIKF_H_ -#define MANTID_MDEVENTS_REFLECTOMETRYTRANSFORMKIKF_H_ +#ifndef MANTID_MDALGORITHMS_REFLECTOMETRYTRANSFORMKIKF_H_ +#define MANTID_MDALGORITHMS_REFLECTOMETRYTRANSFORMKIKF_H_ #include <cmath> -#include "MantidKernel/System.h" #include "MantidKernel/ClassMacros.h" -#include "MantidAPI/MatrixWorkspace.h" + #include "MantidAPI/IMDEventWorkspace.h" -#include "MantidMDEvents/ReflectometryTransform.h" +#include "MantidAPI/MatrixWorkspace.h" + +#include "MantidMDAlgorithms/ReflectometryTransform.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** class CalculateReflectometryK: Calculation type for converting to ki or kf given a theta value (in degrees) and a wavelength @@ -85,7 +86,7 @@ private: DISABLE_COPY_AND_ASSIGN(ReflectometryTransformKiKf) }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /* MANTID_MDEVENTS_REFLECTOMETRYTRANSFORMKIKF_H_ */ +#endif /* MANTID_MDALGORITHMS_REFLECTOMETRYTRANSFORMKIKF_H_ */ diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransformP.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformP.h similarity index 92% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransformP.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformP.h index 237b88e25d4..0ff633ccd04 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransformP.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformP.h @@ -1,13 +1,13 @@ -#ifndef MANTID_MDEVENTS_REFLECTOMETRYTRANSFORMP_H_ -#define MANTID_MDEVENTS_REFLECTOMETRYTRANSFORMP_H_ +#ifndef MANTID_MDALGORITHMS_REFLECTOMETRYTRANSFORMP_H_ +#define MANTID_MDALGORITHMS_REFLECTOMETRYTRANSFORMP_H_ #include <cmath> #include "MantidKernel/System.h" -#include "MantidMDEvents/ReflectometryTransform.h" +#include "MantidDataObjects/ReflectometryTransform.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** class CalculateReflectometryPBase: Base class for p-type transforms. @@ -110,7 +110,7 @@ public: execute(Mantid::API::MatrixWorkspace_const_sptr inputWs) const; }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /* MANTID_MDEVENTS_REFLECTOMETRYTRANSFORMP_H_ */ +#endif /* MANTID_MDALGORITHMS_REFLECTOMETRYTRANSFORMP_H_ */ diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransformQxQz.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformQxQz.h similarity index 93% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransformQxQz.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformQxQz.h index 2d7f86bd2ec..d2ee6488787 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ReflectometryTransformQxQz.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ReflectometryTransformQxQz.h @@ -1,14 +1,14 @@ -#ifndef MANTID_MDEVENTS_REFLECTOMETRYTRANFORMQXQZ_H_ -#define MANTID_MDEVENTS_REFLECTOMETRYTRANFORMQXQZ_H_ +#ifndef MANTID_MDALGORITHMS_REFLECTOMETRYTRANFORMQXQZ_H_ +#define MANTID_MDALGORITHMS_REFLECTOMETRYTRANFORMQXQZ_H_ #include "MantidKernel/System.h" #include "MantidKernel/ClassMacros.h" -#include "MantidMDEvents/ReflectometryTransform.h" -#include "MantidMDEvents/CalculateReflectometryQBase.h" +#include "MantidDataObjects/ReflectometryTransform.h" +#include "MantidDataObjects/CalculateReflectometryQBase.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** Converts from inputs of wavelength, incident theta and final theta to Qx for @@ -140,7 +140,7 @@ private: DISABLE_COPY_AND_ASSIGN(ReflectometryTransformQxQz) }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /* MANTID_MDEVENTS_REFLECTOMETRYTRANFORMQXQZ_H_ */ +#endif /* MANTID_MDALGORITHMS_REFLECTOMETRYTRANFORMQXQZ_H_ */ diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/SaveIsawQvector.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveIsawQvector.h similarity index 86% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/SaveIsawQvector.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveIsawQvector.h index 4e53fb7c0b8..7a1549d9a84 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/SaveIsawQvector.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveIsawQvector.h @@ -1,12 +1,12 @@ -#ifndef MANTID_MDEVENTS_SAVEISAWQVECTOR_H_ -#define MANTID_MDEVENTS_SAVEISAWQVECTOR_H_ +#ifndef MANTID_MDALGORITHMS_SAVEISAWQVECTOR_H_ +#define MANTID_MDALGORITHMS_SAVEISAWQVECTOR_H_ #include "MantidAPI/Algorithm.h" #include "MantidDataObjects/EventWorkspace.h" -#include "MantidMDEvents/MDWSDescription.h" +#include "MantidDataObjects/MDWSDescription.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** SaveIsawQvector : TODO: DESCRIPTION @@ -54,7 +54,7 @@ private: void initTargetWSDescr(DataObjects::EventWorkspace_sptr wksp); }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /* MANTID_MDEVENTS_SAVEISAWQVECTOR_H_ */ +#endif /* MANTID_MDALGORITHMS_SAVEISAWQVECTOR_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD.h index df204ed4556..dbc944730f4 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SaveMD.h @@ -1,9 +1,9 @@ -#ifndef MANTID_MDEVENTS_SAVEMD_H_ -#define MANTID_MDEVENTS_SAVEMD_H_ +#ifndef MANTID_MDALGORITHMS_SAVEMD_H_ +#define MANTID_MDALGORITHMS_SAVEMD_H_ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" namespace Mantid { @@ -60,10 +60,10 @@ private: /// Helper method template <typename MDE, size_t nd> - void doSaveEvents(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void doSaveEvents(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Save the MDHistoWorkspace. - void doSaveHisto(Mantid::MDEvents::MDHistoWorkspace_sptr ws); + void doSaveHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws); /// Save all the affine matricies void saveAffineTransformMatricies(::NeXus::File *const file, @@ -79,7 +79,7 @@ private: std::string tag = ""); }; -} // namespace MDEvents +} // namespace DataObjects } // namespace Mantid -#endif /* MANTID_MDEVENTS_SAVEMD_H_ */ +#endif /* MANTID_MDALGORITHMS_SAVEMD_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SliceMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SliceMD.h index c53a24e7ae1..d7683aa7093 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SliceMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SliceMD.h @@ -1,9 +1,9 @@ -#ifndef MANTID_MDEVENTS_SLICEMD_H_ -#define MANTID_MDEVENTS_SLICEMD_H_ +#ifndef MANTID_MDALGORITHMS_SLICEMD_H_ +#define MANTID_MDALGORITHMS_SLICEMD_H_ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include "MantidMDAlgorithms/SlicingAlgorithm.h" namespace Mantid { @@ -71,11 +71,11 @@ private: /// Helper method template <typename MDE, size_t nd> - void doExec(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void doExec(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); /// Method to actually do the slice template <typename MDE, size_t nd, typename OMDE, size_t ond> - void slice(typename MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + void slice(typename DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); protected: // for testing /* /// Method to slice box's events if the box itself belongs to the slice @@ -87,7 +87,7 @@ protected: // for testing chunkMax);*/ }; -} // namespace MDEvents +} // namespace DataObjects } // namespace Mantid -#endif /* MANTID_MDEVENTS_SLICEMD_H_ */ +#endif /* MANTID_MDALGORITHMS_SLICEMD_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SlicingAlgorithm.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SlicingAlgorithm.h index eec87bcf180..dbcb8fd542d 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SlicingAlgorithm.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/SlicingAlgorithm.h @@ -1,5 +1,5 @@ -#ifndef MANTID_MDEVENTS_SLICINGALGORITHM_H_ -#define MANTID_MDEVENTS_SLICINGALGORITHM_H_ +#ifndef MANTID_MDALGORITHMS_SLICINGALGORITHM_H_ +#define MANTID_MDALGORITHMS_SLICINGALGORITHM_H_ #include "MantidAPI/Algorithm.h" #include "MantidAPI/CoordTransform.h" @@ -9,11 +9,11 @@ #include "MantidGeometry/MDGeometry/MDImplicitFunction.h" #include "MantidKernel/System.h" #include "MantidKernel/VMD.h" -#include "MantidMDEvents/MDBox.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDHistoWorkspace.h" -#include "MantidMDEvents/CoordTransformAffine.h" +#include "MantidDataObjects/MDBox.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" +#include "MantidDataObjects/CoordTransformAffine.h" namespace Mantid { namespace MDAlgorithms { @@ -107,9 +107,9 @@ protected: Mantid::API::IMDWorkspace_sptr m_intermediateWS; /// Coordinate transformation to save in the output WS, from the intermediate /// WS - Mantid::MDEvents::CoordTransformAffine *m_transformFromIntermediate; + Mantid::DataObjects::CoordTransformAffine *m_transformFromIntermediate; /// Coordinate transformation to save in the intermediate WS - Mantid::MDEvents::CoordTransformAffine *m_transformToIntermediate; + Mantid::DataObjects::CoordTransformAffine *m_transformToIntermediate; /// Set to true if the cut is aligned with the axes bool m_axisAligned; @@ -152,7 +152,7 @@ protected: bool m_NormalizeBasisVectors; }; -} // namespace MDEvents +} // namespace DataObjects } // namespace Mantid -#endif /* MANTID_MDEVENTS_SLICINGALGORITHM_H_ */ +#endif /* MANTID_MDALGORITHMS_SLICINGALGORITHM_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransformMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransformMD.h index 2efc994e8f0..33cc64046fa 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransformMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/TransformMD.h @@ -3,7 +3,7 @@ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" namespace Mantid { namespace MDAlgorithms { @@ -53,7 +53,7 @@ private: template <typename MDE, size_t nd> void - doTransform(typename Mantid::MDEvents::MDEventWorkspace<MDE, nd>::sptr ws); + doTransform(typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws); std::vector<double> m_scaling; std::vector<double> m_offset; diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnaryOperationMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnaryOperationMD.h index b699c82e00e..4ccb41c67d4 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnaryOperationMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnaryOperationMD.h @@ -5,7 +5,7 @@ #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/IMDWorkspace.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" namespace Mantid { namespace MDAlgorithms { @@ -63,7 +63,7 @@ protected: virtual void execEvent(Mantid::API::IMDEventWorkspace_sptr out) = 0; /// Run the algorithm with a MDHistoWorkspace - virtual void execHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out) = 0; + virtual void execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out) = 0; /// Input workspace Mantid::API::IMDWorkspace_sptr m_in; @@ -72,7 +72,7 @@ protected: Mantid::API::IMDEventWorkspace_sptr m_in_event; /// Input workspace (MDHisto) - Mantid::MDEvents::MDHistoWorkspace_sptr m_in_histo; + Mantid::DataObjects::MDHistoWorkspace_sptr m_in_histo; /// Output workspace Mantid::API::IMDWorkspace_sptr m_out; diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UnitsConversionHelper.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnitsConversionHelper.h similarity index 94% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UnitsConversionHelper.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnitsConversionHelper.h index 74c471a3c7e..aa2e48093ff 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UnitsConversionHelper.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UnitsConversionHelper.h @@ -1,15 +1,15 @@ -#ifndef MANTID_MDEVENTS_UNIT_CONVERSION_HELPER_H -#define MANTID_MDEVENTS_UNIT_CONVERSION_HELPER_H +#ifndef MANTID_MDALGORITHMS_UNIT_CONVERSION_HELPER_H +#define MANTID_MDALGORITHMS_UNIT_CONVERSION_HELPER_H //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- #include "MantidKernel/Unit.h" #include "MantidAPI/MatrixWorkspace.h" -#include "MantidMDEvents/MDWSDescription.h" +#include "MantidMDAlgorithms/MDWSDescription.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** The class helps to organize unit conversion when running transformation from a matrix(event) workspace into MD event workspace @@ -94,7 +94,7 @@ protected: // for testing bool forceViaTOF = false); }; -} // endNamespace MDEvents +} // endNamespace DataObjects } // endNamespace Mantid -#endif \ No newline at end of file +#endif diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UserFunctionMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UserFunctionMD.h similarity index 93% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UserFunctionMD.h rename to Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UserFunctionMD.h index d7af8f269ae..92cd440ae81 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UserFunctionMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/UserFunctionMD.h @@ -1,5 +1,5 @@ -#ifndef MANTID_MDEVENTS_USERFUNCTIONMD_H_ -#define MANTID_MDEVENTS_USERFUNCTIONMD_H_ +#ifndef MANTID_MDALGORITHMS_USERFUNCTIONMD_H_ +#define MANTID_MDALGORITHMS_USERFUNCTIONMD_H_ //---------------------------------------------------------------------- // Includes @@ -9,7 +9,7 @@ #include "MantidGeometry/muParser_Silent.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** A user defined function. @@ -81,7 +81,7 @@ private: std::string m_formula; }; -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid -#endif /*MANTID_MDEVENTS_USERFUNCTIONMD_H_*/ +#endif /*MANTID_MDALGORITHMS_USERFUNCTIONMD_H_*/ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/WeightedMeanMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/WeightedMeanMD.h index 03416b95ac8..8fd1965ef6e 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/WeightedMeanMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/WeightedMeanMD.h @@ -2,7 +2,7 @@ #define MANTID_MDALGORITHMS_WEIGHTEDMEANMD_H_ #include "MantidAPI/IMDEventWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include "MantidMDAlgorithms/BinaryOperationMD.h" namespace Mantid { @@ -59,12 +59,12 @@ private: void execEvent(); /// Run the algorithm with a MDHisotWorkspace as output and operand - void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); + void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand); /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand void - execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, + execHistoScalar(Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); }; diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/XorMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/XorMD.h index 0d1b2e0feec..4e2d46a08bd 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/XorMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/XorMD.h @@ -42,8 +42,8 @@ public: virtual int version() const; private: - void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); + void execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand); }; } // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDAlgorithms/src/AndMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/AndMD.cpp index 613414e8bec..596f64c9b03 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/AndMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/AndMD.cpp @@ -1,5 +1,4 @@ #include "MantidMDAlgorithms/AndMD.h" -#include "MantidKernel/System.h" using namespace Mantid::Kernel; using namespace Mantid::API; @@ -22,16 +21,16 @@ AndMD::~AndMD() {} //---------------------------------------------------------------------------------------------- /// Algorithm's name for identification. @see Algorithm::name -const std::string AndMD::name() const { return "AndMD"; }; +const std::string AndMD::name() const { return "AndMD"; } /// Algorithm's version for identification. @see Algorithm::version -int AndMD::version() const { return 1; }; +int AndMD::version() const { return 1; } //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and operand void -AndMD::execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) { +AndMD::execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) { out->operator&=(*operand); } diff --git a/Code/Mantid/Framework/MDAlgorithms/src/BinMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/BinMD.cpp index ee3fe19deec..c6f873ba7bd 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/BinMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/BinMD.cpp @@ -5,17 +5,17 @@ #include "MantidKernel/Strings.h" #include "MantidKernel/System.h" #include "MantidKernel/Utils.h" -#include "MantidMDEvents/CoordTransformAffineParser.h" -#include "MantidMDEvents/CoordTransformAligned.h" -#include "MantidMDEvents/MDBoxBase.h" -#include "MantidMDEvents/MDBox.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/CoordTransformAffineParser.h" +#include "MantidDataObjects/CoordTransformAligned.h" +#include "MantidDataObjects/MDBoxBase.h" +#include "MantidDataObjects/MDBox.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidMDAlgorithms/BinMD.h" #include <boost/algorithm/string.hpp> #include "MantidKernel/EnabledWhenProperty.h" -#include "MantidMDEvents/CoordTransformAffine.h" +#include "MantidDataObjects/CoordTransformAffine.h" using Mantid::Kernel::CPUTimer; using Mantid::Kernel::EnabledWhenProperty; @@ -29,7 +29,7 @@ DECLARE_ALGORITHM(BinMD) using namespace Mantid::Kernel; using namespace Mantid::API; using namespace Mantid::Geometry; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; //---------------------------------------------------------------------------------------------- /** Constructor @@ -163,7 +163,7 @@ inline void BinMD::binMDBox(MDBox<MDE, nd> *box, const size_t *const chunkMin, // Add the CACHED signal from the entire box signals[lastLinearIndex] += box->getSignal(); errors[lastLinearIndex] += box->getErrorSquared(); - // TODO: If MDEvents get a weight, this would need to get the summed + // TODO: If DataObjects get a weight, this would need to get the summed // weight. numEvents[lastLinearIndex] += static_cast<signal_t>(box->getNPoints()); @@ -213,7 +213,7 @@ inline void BinMD::binMDBox(MDBox<MDE, nd> *box, const size_t *const chunkMin, // Sum the signals as doubles to preserve precision signals[linearIndex] += static_cast<signal_t>(it->getSignal()); errors[linearIndex] += static_cast<signal_t>(it->getErrorSquared()); - // TODO: If MDEvents get a weight, this would need to get the summed + // TODO: If DataObjects get a weight, this would need to get the summed // weight. numEvents[linearIndex] += 1.0; } @@ -422,4 +422,4 @@ void BinMD::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/BinaryOperationMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/BinaryOperationMD.cpp index 5868cf52579..25df96e70db 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/BinaryOperationMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/BinaryOperationMD.cpp @@ -2,8 +2,8 @@ #include "MantidKernel/System.h" #include "MantidAPI/IMDWorkspace.h" #include "MantidDataObjects/WorkspaceSingleValue.h" -#include "MantidMDEvents/MDHistoWorkspace.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDHistoWorkspace.h" +#include "MantidDataObjects/MDEventFactory.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/WorkspaceProperty.h" @@ -11,7 +11,7 @@ using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; using namespace Mantid::DataObjects; using Mantid::Geometry::IMDDimension_const_sptr; diff --git a/Code/Mantid/Framework/MDAlgorithms/src/BooleanBinaryOperationMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/BooleanBinaryOperationMD.cpp index 3c000629af7..0b78b3f013d 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/BooleanBinaryOperationMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/BooleanBinaryOperationMD.cpp @@ -63,7 +63,7 @@ void BooleanBinaryOperationMD::execEvent() { //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand void BooleanBinaryOperationMD::execHistoScalar( - Mantid::MDEvents::MDHistoWorkspace_sptr /*out*/, + Mantid::DataObjects::MDHistoWorkspace_sptr /*out*/, Mantid::DataObjects::WorkspaceSingleValue_const_sptr /*scalar*/) { throw std::runtime_error("Cannot perform the " + this->name() + " operation on a WorkspaceSingleValue."); diff --git a/Code/Mantid/Framework/MDEvents/src/BoxControllerSettingsAlgorithm.cpp b/Code/Mantid/Framework/MDAlgorithms/src/BoxControllerSettingsAlgorithm.cpp similarity index 98% rename from Code/Mantid/Framework/MDEvents/src/BoxControllerSettingsAlgorithm.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/BoxControllerSettingsAlgorithm.cpp index 3faab863271..9f2fd500fc2 100644 --- a/Code/Mantid/Framework/MDEvents/src/BoxControllerSettingsAlgorithm.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/BoxControllerSettingsAlgorithm.cpp @@ -1,4 +1,4 @@ -#include "MantidMDEvents/BoxControllerSettingsAlgorithm.h" +#include "MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h" #include "MantidKernel/System.h" #include "MantidKernel/Strings.h" #include "MantidKernel/ArrayProperty.h" @@ -8,7 +8,7 @@ using namespace Mantid::Kernel; using namespace Mantid::API; namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { //---------------------------------------------------------------------------------------------- /** Constructor @@ -160,4 +160,4 @@ void BoxControllerSettingsAlgorithm::setBoxController(BoxController_sptr bc) { } } // namespace Mantid -} // namespace MDEvents +} // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDAlgorithms/src/CalculateCoverageDGS.cpp b/Code/Mantid/Framework/MDAlgorithms/src/CalculateCoverageDGS.cpp index 82b7e4dabb1..5f724195c20 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/CalculateCoverageDGS.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/CalculateCoverageDGS.cpp @@ -1,6 +1,6 @@ #include "MantidMDAlgorithms/CalculateCoverageDGS.h" #include "MantidAPI/WorkspaceValidators.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidKernel/ArrayProperty.h" #include "MantidKernel/ArrayLengthValidator.h" #include "MantidKernel/BoundedValidator.h" @@ -15,7 +15,7 @@ namespace MDAlgorithms { using namespace Mantid::Kernel; using Mantid::API::WorkspaceProperty; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; using namespace Mantid::Geometry; namespace { diff --git a/Code/Mantid/Framework/MDEvents/src/CalculateReflectometryQBase.cpp b/Code/Mantid/Framework/MDAlgorithms/src/CalculateReflectometryQBase.cpp similarity index 70% rename from Code/Mantid/Framework/MDEvents/src/CalculateReflectometryQBase.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/CalculateReflectometryQBase.cpp index a77644d8358..260802305ab 100644 --- a/Code/Mantid/Framework/MDEvents/src/CalculateReflectometryQBase.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/CalculateReflectometryQBase.cpp @@ -1,8 +1,8 @@ -#include "MantidMDEvents/CalculateReflectometryQBase.h" +#include "MantidMDAlgorithms/CalculateReflectometryQBase.h" #include <cmath> namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { CalculateReflectometryQBase::CalculateReflectometryQBase() : to_radians_factor(M_PI / 180) {} diff --git a/Code/Mantid/Framework/MDAlgorithms/src/CentroidPeaksMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/CentroidPeaksMD.cpp index 43e8c56db03..ebca0a474b7 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/CentroidPeaksMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/CentroidPeaksMD.cpp @@ -2,8 +2,8 @@ #include "MantidKernel/ListValidator.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidDataObjects/PeaksWorkspace.h" -#include "MantidMDEvents/CoordTransformDistance.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/CoordTransformDistance.h" +#include "MantidDataObjects/MDEventFactory.h" #include "MantidMDAlgorithms/IntegratePeaksMD.h" #include "MantidMDAlgorithms/CentroidPeaksMD.h" @@ -19,7 +19,7 @@ using namespace Mantid::API; using namespace Mantid::DataObjects; using namespace Mantid::Geometry; using namespace Mantid::Kernel; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; //---------------------------------------------------------------------------------------------- /** Constructor @@ -184,4 +184,4 @@ void CentroidPeaksMD::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp b/Code/Mantid/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp index 84c33588c17..f152fd9c55a 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp @@ -2,8 +2,8 @@ #include "MantidKernel/ListValidator.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidDataObjects/PeaksWorkspace.h" -#include "MantidMDEvents/CoordTransformDistance.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/CoordTransformDistance.h" +#include "MantidDataObjects/MDEventFactory.h" #include "MantidMDAlgorithms/IntegratePeaksMD.h" #include "MantidMDAlgorithms/CentroidPeaksMD2.h" @@ -19,7 +19,7 @@ using namespace Mantid::API; using namespace Mantid::DataObjects; using namespace Mantid::Geometry; using namespace Mantid::Kernel; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; //---------------------------------------------------------------------------------------------- /** Constructor @@ -174,4 +174,4 @@ void CentroidPeaksMD2::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/CloneMDWorkspace.cpp b/Code/Mantid/Framework/MDAlgorithms/src/CloneMDWorkspace.cpp index 0ebe5d5d940..31f8607da61 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/CloneMDWorkspace.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/CloneMDWorkspace.cpp @@ -1,15 +1,15 @@ #include "MantidAPI/IMDEventWorkspace.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventFactory.h" #include <Poco/File.h> #include <Poco/Path.h> #include "MantidAPI/FileProperty.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidMDAlgorithms/CloneMDWorkspace.h" using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -142,4 +142,4 @@ void CloneMDWorkspace::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp b/Code/Mantid/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp index e7959d9c9fb..e261dc45a87 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp @@ -3,13 +3,13 @@ #include "MantidKernel/Strings.h" #include "MantidKernel/System.h" #include "MantidMDAlgorithms/CompareMDWorkspaces.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidGeometry/MDGeometry/IMDDimension.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventFactory.h" using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; using namespace Mantid::Geometry; //============================================================================= @@ -158,8 +158,8 @@ CompareMDWorkspaces::compareMDGeometry(Mantid::API::IMDWorkspace_sptr ws1, /** Compare the dimensions etc. of two MDWorkspaces */ void CompareMDWorkspaces::compareMDHistoWorkspaces( - Mantid::MDEvents::MDHistoWorkspace_sptr ws1, - Mantid::MDEvents::MDHistoWorkspace_sptr ws2) { + Mantid::DataObjects::MDHistoWorkspace_sptr ws1, + Mantid::DataObjects::MDHistoWorkspace_sptr ws2) { compare(ws1->getNumDims(), ws2->getNumDims(), "Workspaces have a different number of dimensions"); compare(ws1->getNPoints(), ws2->getNPoints(), diff --git a/Code/Mantid/Framework/MDEvents/src/ConvToMDBase.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvToMDBase.cpp similarity index 95% rename from Code/Mantid/Framework/MDEvents/src/ConvToMDBase.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ConvToMDBase.cpp index 2bb6898f1a0..249d6c6dd20 100644 --- a/Code/Mantid/Framework/MDEvents/src/ConvToMDBase.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvToMDBase.cpp @@ -1,7 +1,7 @@ -#include "MantidMDEvents/ConvToMDBase.h" +#include "MantidMDAlgorithms/ConvToMDBase.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { // logger for conversion Kernel::Logger ConvToMDBase::g_Log("MD-Algorithms"); @@ -18,8 +18,8 @@ Kernel::Logger ConvToMDBase::g_Log("MD-Algorithms"); * events into resulting MD workspace. By false(default), they do. */ size_t ConvToMDBase::initialize( - const MDEvents::MDWSDescription &WSD, - boost::shared_ptr<MDEvents::MDEventWSWrapper> inWSWrapper, + const MDAlgorithms::MDWSDescription &WSD, + boost::shared_ptr<MDAlgorithms::MDEventWSWrapper> inWSWrapper, bool ignoreZeros) { m_ignoreZeros = ignoreZeros; diff --git a/Code/Mantid/Framework/MDEvents/src/ConvToMDEventsWS.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvToMDEventsWS.cpp similarity index 93% rename from Code/Mantid/Framework/MDEvents/src/ConvToMDEventsWS.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ConvToMDEventsWS.cpp index 3015cc6ff6f..a2f87941e2e 100644 --- a/Code/Mantid/Framework/MDEvents/src/ConvToMDEventsWS.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvToMDEventsWS.cpp @@ -1,12 +1,12 @@ -#include "MantidMDEvents/ConvToMDEventsWS.h" -#include "MantidMDEvents/UnitsConversionHelper.h" +#include "MantidMDAlgorithms/ConvToDataObjectsWS.h" +#include "MantidDataObjects/UnitsConversionHelper.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /**function converts particular list of events of type T into MD workspace and * adds these events to the workspace itself */ template <class T> -size_t ConvToMDEventsWS::convertEventList(size_t workspaceIndex) { +size_t ConvToDataObjectsWS::convertEventList(size_t workspaceIndex) { const Mantid::DataObjects::EventList &el = m_EventWS->getEventList(workspaceIndex); @@ -73,7 +73,7 @@ size_t ConvToMDEventsWS::convertEventList(size_t workspaceIndex) { /** The method runs conversion for a single event list, corresponding to a * particular workspace index */ -size_t ConvToMDEventsWS::conversionChunk(size_t workspaceIndex) { +size_t ConvToDataObjectsWS::conversionChunk(size_t workspaceIndex) { switch (m_EventWS->getEventList(workspaceIndex).getEventType()) { case Mantid::API::TOF: @@ -98,9 +98,9 @@ workspaces @param inWSWrapper -- the class wrapping the target MD workspace @param ignoreZeros -- if zero value signals should be rejected */ -size_t ConvToMDEventsWS::initialize( - const MDEvents::MDWSDescription &WSD, - boost::shared_ptr<MDEvents::MDEventWSWrapper> inWSWrapper, +size_t ConvToDataObjectsWS::initialize( + const DataObjects::MDWSDescription &WSD, + boost::shared_ptr<DataObjects::MDEventWSWrapper> inWSWrapper, bool ignoreZeros) { size_t numSpec = ConvToMDBase::initialize(WSD, inWSWrapper, ignoreZeros); @@ -115,7 +115,7 @@ size_t ConvToMDEventsWS::initialize( return numSpec; } -void ConvToMDEventsWS::runConversion(API::Progress *pProgress) { +void ConvToDataObjectsWS::runConversion(API::Progress *pProgress) { // Get the box controller Mantid::API::BoxController_sptr bc = @@ -202,5 +202,5 @@ void ConvToMDEventsWS::runConversion(API::Progress *pProgress) { m_OutWSWrapper->pWorkspace()->setCoordinateSystem(m_coordinateSystem); } -} // endNamespace MDEvents +} // endNamespace DataObjects } // endNamespace Mantid diff --git a/Code/Mantid/Framework/MDEvents/src/ConvToMDHistoWS.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvToMDHistoWS.cpp similarity index 96% rename from Code/Mantid/Framework/MDEvents/src/ConvToMDHistoWS.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ConvToMDHistoWS.cpp index 1210c81ea4e..1c3a202d232 100644 --- a/Code/Mantid/Framework/MDEvents/src/ConvToMDHistoWS.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvToMDHistoWS.cpp @@ -1,7 +1,7 @@ -#include "MantidMDEvents/ConvToMDHistoWS.h" +#include "MantidMDAlgorithms/ConvToMDHistoWS.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { // service variable used for efficient filling of the MD event WS -> should be // moved to configuration? #define DATA_BUFFER_SIZE 8192 @@ -20,8 +20,8 @@ workspaces @param ignoreZeros -- if zero value signals should be rejected */ size_t ConvToMDHistoWS::initialize( - const MDEvents::MDWSDescription &WSD, - boost::shared_ptr<MDEvents::MDEventWSWrapper> inWSWrapper, + const DataObjects::MDWSDescription &WSD, + boost::shared_ptr<DataObjects::MDEventWSWrapper> inWSWrapper, bool ignoreZeros) { size_t numSpec = ConvToMDBase::initialize(WSD, inWSWrapper, ignoreZeros); @@ -31,7 +31,7 @@ size_t ConvToMDHistoWS::initialize( boost::dynamic_pointer_cast<const DataObjects::Workspace2D>(m_InWS2D); if (!pWS2D) throw(std::logic_error( - "ConvToMDEventsHisto should work with defined histrogram workspace")); + "ConvToDataObjectsHisto should work with defined histrogram workspace")); return numSpec; } @@ -258,7 +258,7 @@ void ConvToMDHistoWS::runConversion(API::Progress *pProgress) { m_OutWSWrapper->pWorkspace()->setCoordinateSystem(m_coordinateSystem); } /**function calculates the size of temporary memory used to keep convertTo MD -* data before these data should be added to MDEvents +* data before these data should be added to DataObjects * @param nThreads -- number of threads used to process data * @param specSize -- the size of single spectra in matrix workspace; * @param nPointsToProcess -- total number of data points in the workspace @@ -278,5 +278,5 @@ void ConvToMDHistoWS::estimateThreadWork(size_t nThreads, size_t specSize, m_spectraChunk = std::max(nSpectras / nThreads, static_cast<size_t>(1)); } -} // endNamespace MDEvents +} // endNamespace DataObjects } // endNamespace Mantid diff --git a/Code/Mantid/Framework/MDEvents/src/ConvToMDSelector.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvToMDSelector.cpp similarity index 84% rename from Code/Mantid/Framework/MDEvents/src/ConvToMDSelector.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ConvToMDSelector.cpp index 12fd075a015..9c461107461 100644 --- a/Code/Mantid/Framework/MDEvents/src/ConvToMDSelector.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvToMDSelector.cpp @@ -1,7 +1,7 @@ -#include "MantidMDEvents/ConvToMDSelector.h" +#include "MantidMDAlgorithms/ConvToMDSelector.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { // workspaces which currently can be converted to md workspaces: enum wsType { Matrix2DWS, //< Workspace2D @@ -27,7 +27,7 @@ boost::shared_ptr<ConvToMDBase> ConvToMDSelector::convSelector( inputWSType = Matrix2DWS; if (inputWSType == Undefined) - throw(std::invalid_argument("ConvToMDEventsSelector::got a workspace which " + throw(std::invalid_argument("ConvToDataObjectsSelector::got a workspace which " "is neither matrix nor event workspace; Can " "not deal with it")); @@ -35,7 +35,7 @@ boost::shared_ptr<ConvToMDBase> ConvToMDSelector::convSelector( wsType existingWsConvType(Undefined); ConvToMDBase *pSolver = currentSolver.get(); if (pSolver) { - if (dynamic_cast<ConvToMDEventsWS *>(pSolver)) + if (dynamic_cast<ConvToDataObjectsWS *>(pSolver)) existingWsConvType = EventWS; if (dynamic_cast<ConvToMDHistoWS *>(pSolver)) existingWsConvType = Matrix2DWS; @@ -46,12 +46,12 @@ boost::shared_ptr<ConvToMDBase> ConvToMDSelector::convSelector( (existingWsConvType != inputWSType)) { switch (inputWSType) { case (EventWS): - return boost::shared_ptr<ConvToMDBase>(new ConvToMDEventsWS()); + return boost::shared_ptr<ConvToMDBase>(new ConvToDataObjectsWS()); case (Matrix2DWS): return boost::shared_ptr<ConvToMDBase>(new ConvToMDHistoWS()); default: throw(std::logic_error( - "ConvToMDEventsSelector: requested converter for unknown ws type")); + "ConvToDataObjectsSelector: requested converter for unknown ws type")); } } else { // existing converter is suitable for the workspace diff --git a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDetectorFaceMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDetectorFaceMD.cpp index 414eb440975..c713c7e2ef5 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDetectorFaceMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDetectorFaceMD.cpp @@ -8,12 +8,12 @@ #include "MantidGeometry/Instrument/RectangularDetector.h" #include "MantidKernel/ArrayProperty.h" #include "MantidGeometry/MDGeometry/MDHistoDimension.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventFactory.h" using namespace Mantid::Kernel; using namespace Mantid::API; using namespace Mantid::DataObjects; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; using namespace Mantid::Geometry; namespace Mantid { @@ -82,12 +82,12 @@ void ConvertToDetectorFaceMD::init() { */ template <class T, class MDE, size_t nd> void ConvertToDetectorFaceMD::convertEventList( - boost::shared_ptr<Mantid::MDEvents::MDEventWorkspace<MDE, nd>> outWS, + boost::shared_ptr<Mantid::DataObjects::MDEventWorkspace<MDE, nd>> outWS, size_t workspaceIndex, coord_t x, coord_t y, coord_t bankNum, uint16_t runIndex, int32_t detectorID) { EventList &el = in_ws->getEventList(workspaceIndex); - // The 3/4D MDEvents that will be added into the MDEventWorkspce + // The 3/4D DataObjects that will be added into the MDEventWorkspce std::vector<MDE> out_events; out_events.reserve(el.getNumberEvents()); diff --git a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp index 20fafa6debf..bc07e2d1294 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace.cpp @@ -13,8 +13,8 @@ #include "MantidKernel/System.h" #include "MantidKernel/Timer.h" #include "MantidMDAlgorithms/ConvertToDiffractionMDWorkspace.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include "MantidAPI/MemoryManager.h" #include "MantidKernel/ListValidator.h" @@ -122,10 +122,10 @@ void ConvertToDiffractionMDWorkspace::init() { } /// Our MDLeanEvent dimension -typedef MDEvents::MDLeanEvent<3> MDE; +typedef DataObjects::MDLeanEvent<3> MDE; //---------------------------------------------------------------------------------------------- -/** Convert one spectrum to MDEvents. +/** Convert one spectrum to DataObjects. * Depending on options, it uses the histogram view or the * pure event view. * Then another method converts to 3D q-space and adds it to the @@ -184,7 +184,7 @@ template <class T> void ConvertToDiffractionMDWorkspace::convertEventList(int workspaceIndex, EventList &el) { size_t numEvents = el.getNumberEvents(); - MDEvents::MDBoxBase<MDEvents::MDLeanEvent<3>, 3> *box = ws->getBox(); + DataObjects::MDBoxBase<DataObjects::MDLeanEvent<3>, 3> *box = ws->getBox(); // Get the position of the detector there. const std::set<detid_t> &detectors = el.getDetectorIDs(); @@ -354,7 +354,7 @@ void ConvertToDiffractionMDWorkspace::exec() { // Try to get the output workspace IMDEventWorkspace_sptr i_out = getProperty("OutputWorkspace"); ws = boost::dynamic_pointer_cast< - MDEvents::MDEventWorkspace<MDEvents::MDLeanEvent<3>, 3>>(i_out); + DataObjects::MDEventWorkspace<DataObjects::MDLeanEvent<3>, 3>>(i_out); // Initalize the matrix to 3x3 identity mat = Kernel::Matrix<double>(3, 3, true); @@ -411,8 +411,8 @@ void ConvertToDiffractionMDWorkspace::exec() { if (!ws || !Append) { // Create an output workspace with 3 dimensions. size_t nd = 3; - i_out = MDEvents::MDEventFactory::CreateMDWorkspace(nd, "MDLeanEvent"); - ws = boost::dynamic_pointer_cast<MDEvents::MDEventWorkspace3Lean>(i_out); + i_out = DataObjects::MDEventFactory::CreateMDWorkspace(nd, "MDLeanEvent"); + ws = boost::dynamic_pointer_cast<DataObjects::MDEventWorkspace3Lean>(i_out); // ---------------- Get the extents ------------- std::vector<double> extents = getProperty("Extents"); @@ -619,4 +619,4 @@ void ConvertToDiffractionMDWorkspace::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace2.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace2.cpp index be93f447218..16323cba301 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace2.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToDiffractionMDWorkspace2.cpp @@ -1,23 +1,22 @@ #include "MantidMDAlgorithms/ConvertToDiffractionMDWorkspace2.h" -#include "MantidAPI/Algorithm.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/Progress.h" #include "MantidAPI/WorkspaceValidators.h" + #include "MantidDataObjects/EventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include "MantidDataObjects/Workspace2D.h" + #include "MantidKernel/ArrayProperty.h" -#include "MantidKernel/CPUTimer.h" -#include "MantidKernel/ProgressText.h" #include "MantidKernel/EnabledWhenProperty.h" -#include "MantidMDEvents/MDEventWorkspace.h" #include "MantidKernel/ListValidator.h" -#include "MantidMDEvents/MDWSTransform.h" +#include "MantidMDAlgorithms/MDTransfFactory.h" +#include "MantidMDAlgorithms/MDWSTransform.h" -using namespace Mantid; -using namespace Mantid::Kernel; using namespace Mantid::API; +using namespace Mantid::Kernel; using namespace Mantid::DataObjects; using namespace Mantid::Geometry; @@ -30,7 +29,7 @@ DECLARE_ALGORITHM(ConvertToDiffractionMDWorkspace2) /**Small class to diable propery on interface */ class DisabledProperty : public EnabledWhenProperty { public: - DisabledProperty() : EnabledWhenProperty("NonExistingProperty", IS_DEFAULT){}; + DisabledProperty() : EnabledWhenProperty("NonExistingProperty", IS_DEFAULT){} virtual bool fulfillsCriterion(const IPropertyManager * /*algo*/) const { return false; } @@ -128,24 +127,24 @@ void ConvertToDiffractionMDWorkspace2::convertFramePropertyNames( // ----------------- Handle the type of output // ------------------------------------- - MDEvents::MDWSTransform QSclAndFrames; + MDAlgorithms::MDWSTransform QSclAndFrames; if (TargFrame == frameOptions[0]) // "Q (sample frame)" { TargFrameName = - QSclAndFrames.getTargetFrame(MDEvents::CnvrtToMD::SampleFrame); + QSclAndFrames.getTargetFrame(MDAlgorithms::CnvrtToMD::SampleFrame); ScalingName = QSclAndFrames.getQScaling( - MDEvents::CnvrtToMD::NoScaling); //< momentums in A^-1 + MDAlgorithms::CnvrtToMD::NoScaling); //< momentums in A^-1 } else if (TargFrame == frameOptions[1]) // "Q (lab frame)" { - TargFrameName = QSclAndFrames.getTargetFrame(MDEvents::CnvrtToMD::LabFrame); + TargFrameName = QSclAndFrames.getTargetFrame(MDAlgorithms::CnvrtToMD::LabFrame); ScalingName = QSclAndFrames.getQScaling( - MDEvents::CnvrtToMD::NoScaling); //< momentums in A^-1 + MDAlgorithms::CnvrtToMD::NoScaling); //< momentums in A^-1 } else if (TargFrame == frameOptions[2]) // "HKL" { - TargFrameName = QSclAndFrames.getTargetFrame(MDEvents::CnvrtToMD::HKLFrame); + TargFrameName = QSclAndFrames.getTargetFrame(MDAlgorithms::CnvrtToMD::HKLFrame); ScalingName = QSclAndFrames.getQScaling( - MDEvents::CnvrtToMD::HKLScale); //< momentums in A^-1 + MDAlgorithms::CnvrtToMD::HKLScale); //< momentums in A^-1 } else { throw std::invalid_argument( "ConvertToDiffractionMDWorkspace2::Unknown target frame: " + TargFrame); @@ -198,7 +197,7 @@ void ConvertToDiffractionMDWorkspace2::exec() { this->getPropertyValue("OutputWorkspace")); Convert->setProperty("OverwriteExisting", !this->getProperty("Append")); - if (!MDEvents::MDTransfFactory::Instance().exists("Q3D")) { + if (!MDTransfFactory::Instance().exists("Q3D")) { throw std::runtime_error(" ConvertToMD Q3D plugin used to transform into " "DiffractionWorkspaced has not been registered " "with the MDTransformation factory"); @@ -248,4 +247,4 @@ void ConvertToDiffractionMDWorkspace2::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMD.cpp index b6998b8e8a1..ab8d09a0db9 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMD.cpp @@ -1,33 +1,30 @@ #include "MantidMDAlgorithms/ConvertToMD.h" -#include "MantidKernel/PhysicalConstants.h" -#include "MantidKernel/ProgressText.h" -#include "MantidKernel/IPropertyManager.h" -#include "MantidKernel/ArrayProperty.h" -#include "MantidKernel/IPropertySettings.h" -#include "MantidKernel/ArrayLengthValidator.h" -#include "MantidKernel/VisibleWhenProperty.h" -// +#include <algorithm> + #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/Progress.h" #include "MantidAPI/WorkspaceValidators.h" -#include "MantidMDEvents/MDWSTransform.h" -// -#include "MantidDataObjects/Workspace2D.h" -#include <algorithm> +#include "MantidKernel/ArrayProperty.h" +#include "MantidKernel/ArrayLengthValidator.h" #include "MantidKernel/BoundedValidator.h" +#include "MantidKernel/IPropertyManager.h" +#include "MantidKernel/IPropertySettings.h" #include "MantidKernel/ListValidator.h" -#include "MantidMDEvents/ConvToMDSelector.h" +#include "MantidKernel/PhysicalConstants.h" +#include "MantidKernel/VisibleWhenProperty.h" + +#include "MantidDataObjects/EventWorkspace.h" #include "MantidDataObjects/TableWorkspace.h" +#include "MantidDataObjects/Workspace2D.h" + +#include "MantidMDAlgorithms/ConvToMDSelector.h" +#include "MantidMDAlgorithms/MDWSTransform.h" -using namespace Mantid; -using namespace Mantid::Kernel; using namespace Mantid::API; +using namespace Mantid::Kernel; using namespace Mantid::DataObjects; -using namespace Mantid::Geometry; -using namespace Mantid::MDEvents; -using namespace Mantid::MDEvents::CnvrtToMD; namespace Mantid { namespace MDAlgorithms { @@ -35,6 +32,7 @@ namespace MDAlgorithms { // // Register the algorithm into the AlgorithmFactory DECLARE_ALGORITHM(ConvertToMD) + void ConvertToMD::init() { ConvertToMDParent::init(); declareProperty(new WorkspaceProperty<IMDEventWorkspace>( @@ -137,8 +135,8 @@ void ConvertToMD::exec() { // initiate class which would deal with any dimension workspaces requested by // algorithm parameters if (!m_OutWSWrapper) - m_OutWSWrapper = boost::shared_ptr<MDEvents::MDEventWSWrapper>( - new MDEvents::MDEventWSWrapper()); + m_OutWSWrapper = boost::shared_ptr<MDEventWSWrapper>( + new MDEventWSWrapper()); // -------- get Input workspace m_InWS2D = getProperty("InputWorkspace"); @@ -167,7 +165,7 @@ void ConvertToMD::exec() { // Build the target ws description as function of the input & output ws and // the parameters, supplied to the algorithm - MDEvents::MDWSDescription targWSDescr; + MDWSDescription targWSDescr; // get workspace parameters and build target workspace description, report if // there is need to build new target MD workspace bool createNewTargetWs = @@ -232,7 +230,7 @@ void ConvertToMD::exec() { */ void ConvertToMD::addExperimentInfo(API::IMDEventWorkspace_sptr &mdEventWS, - MDEvents::MDWSDescription &targWSDescr) const { + MDWSDescription &targWSDescr) const { // Copy ExperimentInfo (instrument, run, sample) to the output WS API::ExperimentInfo_sptr ei(m_InWS2D->cloneExperimentInfo()); @@ -356,7 +354,7 @@ bool ConvertToMD::buildTargetWSDescription( const std::string &dEModReq, const std::vector<std::string> &otherDimNames, std::vector<double> &dimMin, std::vector<double> &dimMax, const std::string &QFrame, const std::string &convertTo_, - MDEvents::MDWSDescription &targWSDescr) { + MDAlgorithms::MDWSDescription &targWSDescr) { // ------- Is there need to create new output workspace? bool createNewTargetWs = doWeNeedNewTargetWorkspace(spws); std::vector<int> split_into; @@ -395,7 +393,7 @@ bool ConvertToMD::buildTargetWSDescription( targWSDescr.setLorentsCorr(LorentzCorrections); // instantiate class, responsible for defining Mslice-type projection - MDEvents::MDWSTransform MsliceProj; + MDAlgorithms::MDWSTransform MsliceProj; // identify if u,v are present among input parameters and use defaults if not std::vector<double> ut = getProperty("UProj"); std::vector<double> vt = getProperty("VProj"); @@ -420,7 +418,7 @@ bool ConvertToMD::buildTargetWSDescription( { // dimensions are already build, so build MDWS description from existing // workspace - MDEvents::MDWSDescription oldWSDescr; + MDAlgorithms::MDWSDescription oldWSDescr; oldWSDescr.buildFromMDWS(spws); // some conversion parameters can not be defined by the target workspace. @@ -447,7 +445,7 @@ bool ConvertToMD::buildTargetWSDescription( * @return */ API::IMDEventWorkspace_sptr ConvertToMD::createNewMDWorkspace( - const MDEvents::MDWSDescription &targWSDescr) { + const MDWSDescription &targWSDescr) { // create new md workspace and set internal shared pointer of m_OutWSWrapper // to this workspace API::IMDEventWorkspace_sptr spws = diff --git a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxGlobal.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxGlobal.cpp index b4ccc704bb3..95e20b6fc4a 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxGlobal.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxGlobal.cpp @@ -1,18 +1,19 @@ #include "MantidMDAlgorithms/ConvertToMDMinMaxGlobal.h" + #include "MantidAPI/WorkspaceValidators.h" -#include "MantidKernel/ListValidator.h" -#include "MantidMDEvents/ConvToMDSelector.h" -#include "MantidMDEvents/MDWSTransform.h" #include "MantidKernel/ArrayProperty.h" -#include "MantidKernel/VisibleWhenProperty.h" +#include "MantidKernel/ListValidator.h" #include "MantidKernel/TimeSeriesProperty.h" -#include "MantidGeometry/Crystal/OrientedLattice.h" +#include "MantidKernel/VisibleWhenProperty.h" #include "MantidDataObjects/EventWorkspace.h" +#include "MantidGeometry/Crystal/OrientedLattice.h" +#include "MantidMDAlgorithms/ConvToMDSelector.h" +#include "MantidMDAlgorithms/MDWSTransform.h" using namespace Mantid; using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -34,10 +35,10 @@ ConvertToMDMinMaxGlobal::~ConvertToMDMinMaxGlobal() {} /// Algorithm's name for identification. @see Algorithm::name const std::string ConvertToMDMinMaxGlobal::name() const { return "ConvertToMDMinMaxGlobal"; -}; +} /// Algorithm's version for identification. @see Algorithm::version -int ConvertToMDMinMaxGlobal::version() const { return 1; }; +int ConvertToMDMinMaxGlobal::version() const { return 1; } /// Algorithm's category for identification. @see Algorithm::category const std::string ConvertToMDMinMaxGlobal::category() const { @@ -63,7 +64,7 @@ void ConvertToMDMinMaxGlobal::init() { "An input Matrix Workspace (Workspace2D or Event workspace) "); std::vector<std::string> Q_modes = - MDEvents::MDTransfFactory::Instance().getKeys(); + MDAlgorithms::MDTransfFactory::Instance().getKeys(); // something to do with different moments of time when algorithm or test loads // library. To avoid empty factory always do this. if (Q_modes.empty()) diff --git a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp index 7011353f348..ed8c0ef604b 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxLocal.cpp @@ -4,9 +4,9 @@ #include "MantidGeometry/Objects/ShapeFactory.h" #include "MantidGeometry/Instrument/RectangularDetector.h" #include "MantidAPI/IMDNode.h" -#include "MantidMDEvents/MDWSTransform.h" -#include "MantidMDEvents/ConvToMDSelector.h" -#include "MantidMDEvents/UnitsConversionHelper.h" +#include "MantidDataObjects/MDWSTransform.h" +#include "MantidDataObjects/ConvToMDSelector.h" +#include "MantidDataObjects/UnitsConversionHelper.h" #include "MantidKernel/UnitFactory.h" #include "MantidKernel/MultiThreaded.h" @@ -73,12 +73,12 @@ void ConvertToMDMinMaxLocal::exec() { // Build the target ws description as function of the input & output ws and // the parameters, supplied to the algorithm - MDEvents::MDWSDescription targWSDescr; + DataObjects::MDWSDescription targWSDescr; // get raw pointer to Q-transformation (do not delete this pointer, it's held // by MDTransfFactory!) - MDEvents::MDTransfInterface *pQtransf = - MDEvents::MDTransfFactory::Instance().create(QModReq).get(); + DataObjects::MDTransfInterface *pQtransf = + DataObjects::MDTransfFactory::Instance().create(QModReq).get(); // get number of dimensions this Q transformation generates from the // workspace. auto iEmode = Kernel::DeltaEMode().fromString(dEModReq); @@ -99,7 +99,7 @@ void ConvertToMDMinMaxLocal::exec() { targWSDescr.addProperty("RUN_INDEX", uint16_t(0), true); // instantiate class, responsible for defining Mslice-type projection - MDEvents::MDWSTransform MsliceProj; + DataObjects::MDWSTransform MsliceProj; // identify if u,v are present among input parameters and use defaults if not std::vector<double> ut = getProperty("UProj"); std::vector<double> vt = getProperty("VProj"); @@ -130,12 +130,12 @@ void ConvertToMDMinMaxLocal::exec() { } void ConvertToMDMinMaxLocal::findMinMaxValues( - MDEvents::MDWSDescription &WSDescription, - MDEvents::MDTransfInterface *const pQtransf, + DataObjects::MDWSDescription &WSDescription, + DataObjects::MDTransfInterface *const pQtransf, Kernel::DeltaEMode::Type iEMode, std::vector<double> &MinValues, std::vector<double> &MaxValues) { - MDEvents::UnitsConversionHelper unitsConverter; + DataObjects::UnitsConversionHelper unitsConverter; double signal(1), errorSq(1); // size_t nDims = MinValues.size(); diff --git a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDParent.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDParent.cpp index eb018d831dd..c3bc71b9a20 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDParent.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDParent.cpp @@ -13,15 +13,15 @@ #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/WorkspaceValidators.h" -#include "MantidMDEvents/MDWSTransform.h" +#include "MantidDataObjects/MDWSTransform.h" // -#include "MantidMDEvents/ConvToMDSelector.h" +#include "MantidDataObjects/ConvToMDSelector.h" using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; -using namespace Mantid::MDEvents::CnvrtToMD; +using namespace Mantid::DataObjects; +using namespace Mantid::DataObjects::CnvrtToMD; namespace Mantid { namespace MDAlgorithms { @@ -44,7 +44,7 @@ void ConvertToMDParent::init() { "An input Matrix Workspace (2DMatrix or Event workspace) "); std::vector<std::string> Q_modes = - MDEvents::MDTransfFactory::Instance().getKeys(); + DataObjects::MDTransfFactory::Instance().getKeys(); // something to do with different moments of time when algorithm or test loads // library. To avoid empty factory always do this. if (Q_modes.empty()) @@ -71,7 +71,7 @@ void ConvertToMDParent::init() { "*MD Transformation factory* for further details.", Direction::InOut); - MDEvents::MDWSTransform QSclAndFrames; + DataObjects::MDWSTransform QSclAndFrames; std::vector<std::string> TargFrames = QSclAndFrames.getTargetFrames(); declareProperty( "Q3DFrames", TargFrames[CnvrtToMD::AutoSelect], diff --git a/Code/Mantid/Framework/MDEvents/src/ConvertToReflectometryQ.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToReflectometryQ.cpp similarity index 96% rename from Code/Mantid/Framework/MDEvents/src/ConvertToReflectometryQ.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ConvertToReflectometryQ.cpp index c8785b26cb2..927ea3b7661 100644 --- a/Code/Mantid/Framework/MDEvents/src/ConvertToReflectometryQ.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ConvertToReflectometryQ.cpp @@ -1,25 +1,29 @@ +#include "MantidMDAlgorithms/ConvertToReflectometryQ.h" + +#include "MantidAPI/IEventWorkspace.h" #include "MantidAPI/WorkspaceValidators.h" -#include "MantidMDEvents/ConvertToReflectometryQ.h" + #include "MantidDataObjects/EventWorkspace.h" #include "MantidDataObjects/Workspace2D.h" -#include "MantidKernel/EnabledWhenProperty.h" -#include "MantidKernel/TimeSeriesProperty.h" + #include "MantidKernel/ArrayProperty.h" -#include "MantidKernel/ListValidator.h" #include "MantidKernel/EnabledWhenProperty.h" -#include "MantidAPI/FrameworkManager.h" -#include "MantidAPI/IEventWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/ReflectometryTransformQxQz.h" -#include "MantidMDEvents/ReflectometryTransformKiKf.h" -#include "MantidMDEvents/ReflectometryTransformP.h" +#include "MantidKernel/ListValidator.h" +#include "MantidKernel/TimeSeriesProperty.h" + +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventFactory.h" + +#include "MantidMDAlgorithms/ReflectometryTransformKiKf.h" +#include "MantidMDAlgorithms/ReflectometryTransformQxQz.h" +#include "MantidMDAlgorithms/ReflectometryTransformP.h" + #include <boost/shared_ptr.hpp> #include <boost/make_shared.hpp> +using namespace Mantid::API; using namespace Mantid::Kernel; using namespace Mantid::Geometry; -using namespace Mantid::API; using namespace Mantid::DataObjects; /*Non member helpers*/ @@ -117,7 +121,7 @@ void checkOutputDimensionalityChoice(const std::string &outputDimensions) { } namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { // Register the algorithm into the AlgorithmFactory DECLARE_ALGORITHM(ConvertToReflectometryQ) diff --git a/Code/Mantid/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp b/Code/Mantid/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp index 6684e1cac42..d0cad8d73f5 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/CreateMDHistoWorkspace.cpp @@ -4,7 +4,7 @@ using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -98,4 +98,4 @@ void CreateMDHistoWorkspace::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/CreateMDWorkspace.cpp b/Code/Mantid/Framework/MDAlgorithms/src/CreateMDWorkspace.cpp index ce32a1c004e..96204512e00 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/CreateMDWorkspace.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/CreateMDWorkspace.cpp @@ -4,7 +4,7 @@ #include "MantidKernel/ArrayProperty.h" #include "MantidKernel/System.h" #include "MantidMDAlgorithms/CreateMDWorkspace.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventFactory.h" #include "MantidKernel/Memory.h" #include <math.h> #include "MantidKernel/EnabledWhenProperty.h" @@ -15,7 +15,7 @@ namespace MDAlgorithms { using namespace Mantid::Kernel; using namespace Mantid::API; using namespace Mantid::Geometry; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; // Register the algorithm into the AlgorithmFactory DECLARE_ALGORITHM(CreateMDWorkspace) @@ -187,4 +187,4 @@ void CreateMDWorkspace::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/DivideMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/DivideMD.cpp index a471bc0c91f..47e91c82844 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/DivideMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/DivideMD.cpp @@ -1,13 +1,13 @@ #include "MantidMDAlgorithms/DivideMD.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDBoxBase.h" -#include "MantidMDEvents/MDBox.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDBoxBase.h" +#include "MantidDataObjects/MDBox.h" using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -121,15 +121,15 @@ void DivideMD::execEvent() { //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and operand void DivideMD::execHistoHisto( - Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) { + Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) { out->divide(*operand); } //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand void DivideMD::execHistoScalar( - Mantid::MDEvents::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar) { out->divide(scalar->dataY(0)[0], scalar->dataE(0)[0]); } diff --git a/Code/Mantid/Framework/MDAlgorithms/src/EqualToMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/EqualToMD.cpp index f53d3f33f7f..cc71408a78a 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/EqualToMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/EqualToMD.cpp @@ -38,8 +38,8 @@ void EqualToMD::initExtraProperties() { //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and operand void EqualToMD::execHistoHisto( - Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) { + Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) { double tolerance = getProperty("Tolerance"); out->equalTo(*operand, tolerance); } @@ -47,7 +47,7 @@ void EqualToMD::execHistoHisto( //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and a scalar on the RHS void EqualToMD::execHistoScalar( - Mantid::MDEvents::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar) { double tolerance = getProperty("Tolerance"); out->equalTo(scalar->dataY(0)[0], tolerance); diff --git a/Code/Mantid/Framework/MDAlgorithms/src/ExponentialMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ExponentialMD.cpp index 50ffffa72ea..7c85c07a7df 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/ExponentialMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ExponentialMD.cpp @@ -46,7 +46,7 @@ void ExponentialMD::execEvent(Mantid::API::IMDEventWorkspace_sptr /*out*/) { //---------------------------------------------------------------------------------------------- /// ExponentialMD::Run the algorithm with a MDHistoWorkspace -void ExponentialMD::execHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out) { +void ExponentialMD::execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out) { out->exp(); } diff --git a/Code/Mantid/Framework/MDAlgorithms/src/FakeMDEventData.cpp b/Code/Mantid/Framework/MDAlgorithms/src/FakeMDEventData.cpp index ac531d73baa..4e951bceacd 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/FakeMDEventData.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/FakeMDEventData.cpp @@ -1,54 +1,27 @@ -#include "MantidKernel/ArrayProperty.h" -#include "MantidKernel/System.h" +//---------------------------------------------------------------------------------------------- +// Includes +//---------------------------------------------------------------------------------------------- #include "MantidMDAlgorithms/FakeMDEventData.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventInserter.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include <boost/math/distributions/normal.hpp> -#include <boost/math/special_functions/fpclassify.hpp> -#include <boost/math/special_functions/pow.hpp> -#include <boost/random/linear_congruential.hpp> -#include <boost/random/mersenne_twister.hpp> -#include <boost/random/uniform_int.hpp> -#include <boost/random/uniform_real.hpp> -#include <boost/random/variate_generator.hpp> -#include <math.h> -#include "MantidKernel/ThreadScheduler.h" -#include "MantidKernel/ThreadPool.h" -#include "MantidKernel/VectorHelper.h" -#include "MantidKernel/Utils.h" -#include <cfloat> -#include <limits> + +#include "MantidKernel/ArrayProperty.h" +#include "MantidDataObjects/FakeMD.h" namespace Mantid { namespace MDAlgorithms { +using namespace API; +using namespace DataObjects; +using namespace Kernel; + // Register the algorithm into the AlgorithmFactory DECLARE_ALGORITHM(FakeMDEventData) -using namespace Mantid::Kernel; -using namespace Mantid::API; -using namespace Mantid::MDEvents; - -//---------------------------------------------------------------------------------------------- -/** Constructor - */ -FakeMDEventData::FakeMDEventData() : m_randGen(1), m_uniformDist() {} - -//---------------------------------------------------------------------------------------------- -/** Destructor - */ -FakeMDEventData::~FakeMDEventData() {} - -//---------------------------------------------------------------------------------------------- - -//---------------------------------------------------------------------------------------------- /** Initialize the algorithm's properties. */ void FakeMDEventData::init() { declareProperty(new WorkspaceProperty<IMDEventWorkspace>("InputWorkspace", "", Direction::InOut), - "An input workspace, that will get MDEvents added to it"); + "An input workspace, that will get DataObjects added to it"); declareProperty(new ArrayProperty<double>("UniformParams", ""), "Add a uniform, randomized distribution of events.\n" @@ -77,383 +50,15 @@ void FakeMDEventData::init() { "randomized around 1.0+-0.5."); } -//---------------------------------------------------------------------------------------------- -/** Function makes up a fake single-crystal peak and adds it to the workspace. - * - * @param ws - */ -template <typename MDE, size_t nd> -void FakeMDEventData::addFakePeak(typename MDEventWorkspace<MDE, nd>::sptr ws) { - std::vector<double> params = getProperty("PeakParams"); - bool RandomizeSignal = getProperty("RandomizeSignal"); - if (params.empty()) - return; - - if (params.size() != nd + 2) - throw std::invalid_argument("PeakParams needs to have ndims+2 arguments."); - if (params[0] <= 0) - throw std::invalid_argument("PeakParams: number_of_events needs to be > 0"); - size_t num = size_t(params[0]); - - Progress prog(this, 0.0, 1.0, 100); - size_t progIncrement = num / 100; - if (progIncrement == 0) - progIncrement = 1; - - // Width of the peak - double desiredRadius = params.back(); - - boost::mt19937 rng; - boost::uniform_real<coord_t> u2(0, 1.0); // Random from 0 to 1.0 - boost::variate_generator<boost::mt19937 &, boost::uniform_real<coord_t>> - genUnit(rng, u2); - int randomSeed = getProperty("RandomSeed"); - rng.seed((unsigned int)(randomSeed)); - - // Inserter to help choose the correct event type - auto eventHelper = - MDEvents::MDEventInserter<typename MDEventWorkspace<MDE, nd>::sptr>(ws); - - for (size_t i = 0; i < num; ++i) { - // Algorithm to generate points along a random n-sphere (sphere with not - // necessarily 3 dimensions) - // from http://en.wikipedia.org/wiki/N-sphere as of May 6, 2011. - - // First, points in a hyper-cube of size 1.0, centered at 0. - coord_t centers[nd]; - coord_t radiusSquared = 0; - for (size_t d = 0; d < nd; d++) { - centers[d] = genUnit() - 0.5f; // Distribute around +- the center - radiusSquared += centers[d] * centers[d]; - } - - // Make a unit vector pointing in this direction - coord_t radius = static_cast<coord_t>(sqrt(radiusSquared)); - for (size_t d = 0; d < nd; d++) - centers[d] /= radius; - - // Now place the point along this radius, scaled with ^1/n for uniformity. - coord_t radPos = genUnit(); - radPos = static_cast<coord_t>( - pow(radPos, static_cast<coord_t>(1.0 / static_cast<coord_t>(nd)))); - for (size_t d = 0; d < nd; d++) { - // Multiply by the scaling and the desired peak radius - centers[d] *= (radPos * static_cast<coord_t>(desiredRadius)); - // Also offset by the center of the peak, as taken in Params - centers[d] += static_cast<coord_t>(params[d + 1]); - } - - // Default or randomized error/signal - float signal = 1.0; - float errorSquared = 1.0; - if (RandomizeSignal) { - signal = float(0.5 + genUnit()); - errorSquared = float(0.5 + genUnit()); - } - - // Create and add the event. - eventHelper.insertMDEvent(signal, errorSquared, 1, pickDetectorID(), - centers); // 1 = run number - // Progress report - if ((i % progIncrement) == 0) - prog.report(); - } - - ws->splitBox(); - Kernel::ThreadScheduler *ts = new ThreadSchedulerFIFO(); - ThreadPool tp(ts); - ws->splitAllIfNeeded(ts); - tp.joinAll(); - ws->refreshCache(); -} - -//---------------------------------------------------------------------------------------------- -/** Function makes up a fake uniform event data and adds it to the workspace. - * - * @param ws - */ -template <typename MDE, size_t nd> -void FakeMDEventData::addFakeUniformData( - typename MDEventWorkspace<MDE, nd>::sptr ws) { - std::vector<double> params = getProperty("UniformParams"); - if (params.empty()) - return; - - bool randomEvents = true; - if (params[0] < 0) { - randomEvents = false; - params[0] = -params[0]; - } - - if (params.size() == 1) { - if (randomEvents) { - for (size_t d = 0; d < nd; ++d) { - params.push_back(ws->getDimension(d)->getMinimum()); - params.push_back(ws->getDimension(d)->getMaximum()); - } - } else // regular events - { - size_t nPoints = size_t(params[0]); - double Vol = 1; - for (size_t d = 0; d < nd; ++d) - Vol *= (ws->getDimension(d)->getMaximum() - - ws->getDimension(d)->getMinimum()); - - if (Vol == 0 || Vol > std::numeric_limits<float>::max()) - throw std::invalid_argument( - " Domain ranges are not defined properly for workspace: " + - ws->getName()); - - double dV = Vol / double(nPoints); - double delta0 = std::pow(dV, 1. / double(nd)); - for (size_t d = 0; d < nd; ++d) { - double min = ws->getDimension(d)->getMinimum(); - params.push_back(min * (1 + FLT_EPSILON) - min + FLT_EPSILON); - double extent = ws->getDimension(d)->getMaximum() - min; - size_t nStrides = size_t(extent / delta0); - if (nStrides < 1) - nStrides = 1; - params.push_back(extent / static_cast<double>(nStrides)); - } - } - } - if ((params.size() != 1 + nd * 2)) - throw std::invalid_argument( - "UniformParams: needs to have ndims*2+1 arguments "); - - if (randomEvents) - addFakeRandomData<MDE, nd>(params, ws); - else - addFakeRegularData<MDE, nd>(params, ws); - - ws->splitBox(); - Kernel::ThreadScheduler *ts = new ThreadSchedulerFIFO(); - ThreadPool tp(ts); - ws->splitAllIfNeeded(ts); - tp.joinAll(); - ws->refreshCache(); -} - -template <typename MDE, size_t nd> -void FakeMDEventData::addFakeRandomData( - const std::vector<double> ¶ms, - typename MDEventWorkspace<MDE, nd>::sptr ws) { - - bool RandomizeSignal = getProperty("RandomizeSignal"); - - size_t num = size_t(params[0]); - if (num == 0) - throw std::invalid_argument( - " number of distributed events can not be equal to 0"); - - Progress prog(this, 0.0, 1.0, 100); - size_t progIncrement = num / 100; - if (progIncrement == 0) - progIncrement = 1; - - boost::mt19937 rng; - int randomSeed = getProperty("RandomSeed"); - rng.seed((unsigned int)(randomSeed)); - - // Unit-size randomizer - boost::uniform_real<double> u2(0, 1.0); // Random from 0 to 1.0 - boost::variate_generator<boost::mt19937 &, boost::uniform_real<double>> - genUnit(rng, u2); - - // Make a random generator for each dimensions - typedef boost::variate_generator<boost::mt19937 &, - boost::uniform_real<double>> gen_t; - - // Inserter to help choose the correct event type - auto eventHelper = - MDEvents::MDEventInserter<typename MDEventWorkspace<MDE, nd>::sptr>(ws); - - gen_t *gens[nd]; - for (size_t d = 0; d < nd; ++d) { - double min = params[d * 2 + 1]; - double max = params[d * 2 + 2]; - if (max <= min) - throw std::invalid_argument( - "UniformParams: min must be < max for all dimensions."); - - boost::uniform_real<double> u(min, max); // Range - gen_t *gen = new gen_t(rng, u); - gens[d] = gen; - } - - // Create all the requested events - for (size_t i = 0; i < num; ++i) { - coord_t centers[nd]; - for (size_t d = 0; d < nd; d++) { - centers[d] = static_cast<coord_t>( - (*gens[d])()); // use a different generator for each dimension - } - - // Default or randomized error/signal - float signal = 1.0; - float errorSquared = 1.0; - if (RandomizeSignal) { - signal = float(0.5 + genUnit()); - errorSquared = float(0.5 + genUnit()); - } - - // Create and add the event. - eventHelper.insertMDEvent(signal, errorSquared, 1, pickDetectorID(), - centers); // 1 = run number - // Progress report - if ((i % progIncrement) == 0) - prog.report(); - } - - /// Clean up the generators - for (size_t d = 0; d < nd; ++d) - delete gens[d]; -} - -template <typename MDE, size_t nd> -void FakeMDEventData::addFakeRegularData( - const std::vector<double> ¶ms, - typename MDEventWorkspace<MDE, nd>::sptr ws) { - // the parameters for regular distribution of events over the box - std::vector<double> startPoint(nd), delta(nd); - std::vector<size_t> indexMax(nd); - size_t gridSize(0); - - // bool RandomizeSignal = getProperty("RandomizeSignal"); - - size_t num = size_t(params[0]); - if (num == 0) - throw std::invalid_argument( - " number of distributed events can not be equal to 0"); - - Progress prog(this, 0.0, 1.0, 100); - size_t progIncrement = num / 100; - if (progIncrement == 0) - progIncrement = 1; - - // Inserter to help choose the correct event type - auto eventHelper = - MDEvents::MDEventInserter<typename MDEventWorkspace<MDE, nd>::sptr>(ws); - - gridSize = 1; - for (size_t d = 0; d < nd; ++d) { - double min = ws->getDimension(d)->getMinimum(); - double max = ws->getDimension(d)->getMaximum(); - double shift = params[d * 2 + 1]; - double step = params[d * 2 + 2]; - if (shift < 0) - shift = 0; - if (shift >= step) - shift = step * (1 - FLT_EPSILON); - - startPoint[d] = min + shift; - if ((startPoint[d] < min) || (startPoint[d] >= max)) - throw std::invalid_argument("RegularData: starting point must be within " - "the box for all dimensions."); - - if (step <= 0) - throw(std::invalid_argument( - "Step of the regular grid is less or equal to 0")); - - indexMax[d] = size_t((max - min) / step); - if (indexMax[d] == 0) - indexMax[d] = 1; - // deal with round-off errors - while ((startPoint[d] + double(indexMax[d] - 1) * step) >= max) - step *= (1 - FLT_EPSILON); - - delta[d] = step; - - gridSize *= indexMax[d]; - } - // Create all the requested events - std::vector<size_t> indexes; - size_t cellCount(0); - for (size_t i = 0; i < num; ++i) { - coord_t centers[nd]; - - Kernel::Utils::getIndicesFromLinearIndex(cellCount, indexMax, indexes); - ++cellCount; - if (cellCount >= gridSize) - cellCount = 0; - - for (size_t d = 0; d < nd; d++) { - centers[d] = coord_t(startPoint[d] + delta[d] * double(indexes[d])); - } - - // Default or randomized error/signal - float signal = 1.0; - float errorSquared = 1.0; - // if (RandomizeSignal) - //{ - // signal = float(0.5 + genUnit()); - // errorSquared = float(0.5 + genUnit()); - //} - - // Create and add the event. - eventHelper.insertMDEvent(signal, errorSquared, 1, pickDetectorID(), - centers); // 1 = run number - // Progress report - if ((i % progIncrement) == 0) - prog.report(); - } -} - -//---------------------------------------------------------------------------------------------- -/** Execute the algorithm. - */ -void FakeMDEventData::exec() { - IMDEventWorkspace_sptr in_ws = getProperty("InputWorkspace"); - - if (getPropertyValue("UniformParams") == "" && - getPropertyValue("PeakParams") == "") - throw std::invalid_argument( - "You must specify at least one of PeakParams or UniformParams."); - - setupDetectorCache(*in_ws); - - CALL_MDEVENT_FUNCTION(this->addFakePeak, in_ws) - CALL_MDEVENT_FUNCTION(this->addFakeUniformData, in_ws) - - // Mark that events were added, so the file back end (if any) needs updating - in_ws->setFileNeedsUpdating(true); -} - /** - * Setup a detector cache for randomly picking IDs from the first - * instrument in the ExperimentInfo list. - * @param ws :: The input workspace + * Execute the algorithm. */ -void FakeMDEventData::setupDetectorCache(const API::IMDEventWorkspace &ws) { - try { - Geometry::Instrument_const_sptr inst = - ws.getExperimentInfo(0)->getInstrument(); - m_detIDs = inst->getDetectorIDs(true); // true=skip monitors - size_t max = m_detIDs.size() - 1; - m_uniformDist = boost::uniform_int<size_t>(0, max); // Includes max - } catch (std::invalid_argument &) { - g_log.information("Cannot retrieve instrument from input workspace, " - "detector information will be garbage."); - } -} +void FakeMDEventData::exec() { -/** - * Pick a detector ID for a particular event - * @returns A detector ID randomly selected from the instrument - */ -detid_t FakeMDEventData::pickDetectorID() { - if (m_detIDs.empty()) { - return -1; - } else { - /// A variate generator to combine a random number generator with a - /// distribution - typedef boost::variate_generator< - boost::mt19937 &, boost::uniform_int<size_t>> uniform_generator; - uniform_generator uniformRand(m_randGen, m_uniformDist); - const size_t randIndex = uniformRand(); - return m_detIDs[randIndex]; - } + FakeMD faker(getProperty("UniformParams"), getProperty("PeakParams"), + getProperty("RandomSeed"), getProperty("RandomizeSignal")); + faker.fill(getProperty("InputWorkspace")); } +} // namespace MDAlgorithms } // namespace Mantid -} // namespace MDEvents diff --git a/Code/Mantid/Framework/MDAlgorithms/src/FindPeaksMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/FindPeaksMD.cpp index 4dde159f784..68d4f01eba2 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/FindPeaksMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/FindPeaksMD.cpp @@ -1,8 +1,8 @@ #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidKernel/System.h" #include "MantidMDAlgorithms/FindPeaksMD.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidKernel/VMD.h" #include <boost/math/special_functions/fpclassify.hpp> @@ -14,7 +14,7 @@ using namespace Mantid::Kernel; using namespace Mantid::API; using namespace Mantid::DataObjects; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -30,7 +30,7 @@ template <typename MDE, size_t nd> struct IsFullEvent : boost::false_type {}; template <size_t nd> struct IsFullEvent<MDEvent<nd>, nd> : boost::true_type {}; /** - * Specialization if isFullEvent for MDEvents + * Specialization if isFullEvent for DataObjects * to return true */ template <typename MDE, size_t nd> @@ -39,7 +39,7 @@ bool isFullMDEvent(const boost::true_type &) { } /** - * Specialization if isFullEvent for MDEvents + * Specialization if isFullEvent for DataObjects * to return false */ template <typename MDE, size_t nd> @@ -426,7 +426,7 @@ void FindPeaksMD::findPeaks(typename MDEventWorkspace<MDE, nd>::sptr ws) { * * @param ws :: MDHistoWorkspace */ -void FindPeaksMD::findPeaksHisto(Mantid::MDEvents::MDHistoWorkspace_sptr ws) { +void FindPeaksMD::findPeaksHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws) { size_t nd = ws->getNumDims(); if (nd < 3) throw std::invalid_argument("Workspace must have at least 3 dimensions."); @@ -611,4 +611,4 @@ void FindPeaksMD::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDEvents/src/FitMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/FitMD.cpp similarity index 98% rename from Code/Mantid/Framework/MDEvents/src/FitMD.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/FitMD.cpp index e398bee8544..b25f5149634 100644 --- a/Code/Mantid/Framework/MDEvents/src/FitMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/FitMD.cpp @@ -1,20 +1,20 @@ //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- -#include "MantidMDEvents/FitMD.h" +#include "MantidMDAlgorithms/FitMD.h" -#include "MantidAPI/IMDWorkspace.h" +#include "MantidAPI/Algorithm.h" +#include "MantidAPI/AlgorithmFactory.h" #include "MantidAPI/FunctionProperty.h" #include "MantidAPI/FunctionDomainMD.h" #include "MantidAPI/FunctionValues.h" #include "MantidAPI/IFunctionMD.h" +#include "MantidAPI/IMDWorkspace.h" #include "MantidAPI/MemoryManager.h" #include "MantidAPI/WorkspaceProperty.h" -#include "MantidAPI/AlgorithmFactory.h" -#include "MantidAPI/Algorithm.h" #include "MantidGeometry/MDGeometry/MDHistoDimensionBuilder.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventFactory.h" #include "MantidKernel/BoundedValidator.h" #include "MantidKernel/PropertyWithValue.h" @@ -22,10 +22,11 @@ #include <algorithm> namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { DECLARE_DOMAINCREATOR(FitMD); using namespace API; +using namespace DataObjects; using namespace Kernel; /** @@ -189,7 +190,7 @@ boost::shared_ptr<API::Workspace> FitMD::createEventOutputWorkspace( // Add events // TODO: Generalize to ND (the current framework is a bit limiting) auto mdWS = boost::dynamic_pointer_cast< - MDEvents::MDEventWorkspace<MDEvents::MDEvent<4>, 4>>(outputWS); + DataObjects::MDEventWorkspace<DataObjects::MDEvent<4>, 4>>(outputWS); if (!mdWS) { return boost::shared_ptr<API::Workspace>(); } diff --git a/Code/Mantid/Framework/MDAlgorithms/src/GreaterThanMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/GreaterThanMD.cpp index 8818bc87c81..4f3477ff9c3 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/GreaterThanMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/GreaterThanMD.cpp @@ -30,15 +30,15 @@ int GreaterThanMD::version() const { return 1; }; //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and operand void GreaterThanMD::execHistoHisto( - Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) { + Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) { out->greaterThan(*operand); } //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and a scalar on the RHS void GreaterThanMD::execHistoScalar( - Mantid::MDEvents::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar) { out->greaterThan(scalar->dataY(0)[0]); } diff --git a/Code/Mantid/Framework/MDEvents/src/ImportMDEventWorkspace.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ImportMDEventWorkspace.cpp similarity index 93% rename from Code/Mantid/Framework/MDEvents/src/ImportMDEventWorkspace.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ImportMDEventWorkspace.cpp index 778dae5954c..bf7b920e5b8 100644 --- a/Code/Mantid/Framework/MDEvents/src/ImportMDEventWorkspace.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ImportMDEventWorkspace.cpp @@ -1,18 +1,16 @@ -#include "MantidMDEvents/ImportMDEventWorkspace.h" -#include "MantidKernel/System.h" -#include "MantidAPI/FileProperty.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventInserter.h" -#include "MantidGeometry/MDGeometry/MDHistoDimension.h" +#include "MantidMDAlgorithms/ImportMDEventWorkspace.h" + #include <iostream> #include <fstream> + +#include "MantidAPI/FileProperty.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDEventInserter.h" +#include "MantidGeometry/MDGeometry/MDHistoDimension.h" + #include <boost/algorithm/string.hpp> #include <boost/algorithm/string/split.hpp> -using namespace Mantid::Kernel; -using namespace Mantid::API; -using namespace Mantid::Geometry; - namespace { /** Helper method that takes a string and performs a cast to the specified type. @@ -34,7 +32,13 @@ template <typename T> T convert(const std::string &str) { } namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { + +using namespace API; +using namespace DataObjects; +using namespace Geometry; +using namespace Kernel; + // Register the algorithm into the AlgorithmFactory DECLARE_ALGORITHM(ImportMDEventWorkspace) @@ -109,7 +113,7 @@ void ImportMDEventWorkspace::init() { /** Extracts mdevent information from the file data and directs the creation of new -MDEvents on the workspace. +DataObjects on the workspace. @param ws: Workspace to add the events to. */ template <typename MDE, size_t nd> @@ -119,12 +123,12 @@ void ImportMDEventWorkspace::addEventsData( MDEventInserter<typename MDEventWorkspace<MDE, nd>::sptr> inserter(ws); DataCollectionType::iterator mdEventEntriesIterator = m_posMDEventStart; std::vector<Mantid::coord_t> centers(nd); - for (size_t i = 0; i < m_nMDEvents; ++i) { + for (size_t i = 0; i < m_nDataObjects; ++i) { float signal = convert<float>(*(++mdEventEntriesIterator)); float error = convert<float>(*(++mdEventEntriesIterator)); uint16_t run_no = 0; int32_t detector_no = 0; - if (m_IsFullMDEvents) { + if (m_IsFullDataObjects) { run_no = convert<uint16_t>(*(++mdEventEntriesIterator)); detector_no = convert<int32_t>(*(++mdEventEntriesIterator)); } @@ -260,17 +264,17 @@ void ImportMDEventWorkspace::exec() { static_cast<int>(std::distance(m_posMDEventStart, m_file_data.end())); const size_t columnsForFullEvents = m_nDimensions + 4; // signal, error, run_no, detector_no - m_IsFullMDEvents = (nActualColumns == columnsForFullEvents); + m_IsFullDataObjects = (nActualColumns == columnsForFullEvents); - m_nMDEvents = posDiffMDEvent / nActualColumns; + m_nDataObjects = posDiffMDEvent / nActualColumns; // Get the min and max extents in each dimension. std::vector<double> extentMins(m_nDimensions); std::vector<double> extentMaxs(m_nDimensions); DataCollectionType::iterator mdEventEntriesIterator = m_posMDEventStart; - for (size_t i = 0; i < m_nMDEvents; ++i) { + for (size_t i = 0; i < m_nDataObjects; ++i) { mdEventEntriesIterator += 2; - if (m_IsFullMDEvents) { + if (m_IsFullDataObjects) { mdEventEntriesIterator += 2; } for (size_t j = 0; j < m_nDimensions; ++j) { @@ -282,7 +286,7 @@ void ImportMDEventWorkspace::exec() { // Create a target output workspace. IMDEventWorkspace_sptr outWs = MDEventFactory::CreateMDWorkspace( - m_nDimensions, m_IsFullMDEvents ? "MDEvent" : "MDLeanEvent"); + m_nDimensions, m_IsFullDataObjects ? "MDEvent" : "MDLeanEvent"); // Extract Dimensions and add to the output workspace. DataCollectionType::iterator dimEntriesIterator = m_posDimStart; @@ -304,4 +308,4 @@ void ImportMDEventWorkspace::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ImportMDHistoWorkspace.cpp similarity index 93% rename from Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ImportMDHistoWorkspace.cpp index 3773fc18023..6ab4a246077 100644 --- a/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ImportMDHistoWorkspace.cpp @@ -1,4 +1,4 @@ -#include "MantidMDEvents/ImportMDHistoWorkspace.h" +#include "MantidMDAlgorithms/ImportMDHistoWorkspace.h" #include "MantidAPI/FileProperty.h" #include <deque> @@ -6,12 +6,14 @@ #include <fstream> #include <iterator> -using namespace Mantid::Kernel; -using namespace Mantid::API; -using namespace Mantid::Geometry; - namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { + +using namespace API; +using namespace DataObjects; +using namespace Kernel; +using namespace Geometry; + // Register the algorithm into the AlgorithmFactory DECLARE_ALGORITHM(ImportMDHistoWorkspace) @@ -31,10 +33,10 @@ ImportMDHistoWorkspace::~ImportMDHistoWorkspace() {} /// Algorithm's name for identification. @see Algorithm::name const std::string ImportMDHistoWorkspace::name() const { return "ImportMDHistoWorkspace"; -}; +} /// Algorithm's version for identification. @see Algorithm::version -int ImportMDHistoWorkspace::version() const { return 1; }; +int ImportMDHistoWorkspace::version() const { return 1; } /// Algorithm's category for identification. @see Algorithm::category const std::string ImportMDHistoWorkspace::category() const { @@ -119,4 +121,4 @@ void ImportMDHistoWorkspace::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspaceBase.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ImportMDHistoWorkspaceBase.cpp similarity index 96% rename from Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspaceBase.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ImportMDHistoWorkspaceBase.cpp index 57b619e6fca..e91282c6ea3 100644 --- a/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspaceBase.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ImportMDHistoWorkspaceBase.cpp @@ -1,5 +1,5 @@ -#include "MantidMDEvents/ImportMDHistoWorkspaceBase.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidMDAlgorithms/ImportMDHistoWorkspaceBase.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidKernel/CompositeValidator.h" #include "MantidKernel/BoundedValidator.h" #include "MantidKernel/MandatoryValidator.h" @@ -11,7 +11,7 @@ using namespace Mantid::API; using namespace Mantid::Geometry; namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** Functor to compute the product of the set. @@ -110,4 +110,4 @@ MDHistoWorkspace_sptr ImportMDHistoWorkspaceBase::createEmptyOutputWorkspace() { } } // namespace Mantid -} // namespace MDEvents +} // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDEvents/src/Integrate3DEvents.cpp b/Code/Mantid/Framework/MDAlgorithms/src/Integrate3DEvents.cpp similarity index 99% rename from Code/Mantid/Framework/MDEvents/src/Integrate3DEvents.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/Integrate3DEvents.cpp index 3fb6f21231d..8c6c73810e0 100644 --- a/Code/Mantid/Framework/MDEvents/src/Integrate3DEvents.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/Integrate3DEvents.cpp @@ -5,7 +5,7 @@ #include <boost/make_shared.hpp> #include "MantidDataObjects/NoShape.h" #include "MantidDataObjects/PeakShapeEllipsoid.h" -#include "MantidMDEvents/Integrate3DEvents.h" +#include "MantidMDAlgorithms/Integrate3DEvents.h" extern "C" { @@ -17,7 +17,7 @@ extern "C" { using namespace Mantid::DataObjects; namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { using namespace std; @@ -466,6 +466,6 @@ PeakShapeEllipsoid_const_sptr Integrate3DEvents::ellipseIntegrateEvents( return boost::make_shared<const PeakShapeEllipsoid>(directions, abcRadii, abcBackgroundInnerRadii, abcBackgroundOuterRadii, Mantid::Kernel::QLab, "IntegrateEllipsoids"); } -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid diff --git a/Code/Mantid/Framework/MDEvents/src/IntegrateEllipsoids.cpp b/Code/Mantid/Framework/MDAlgorithms/src/IntegrateEllipsoids.cpp similarity index 98% rename from Code/Mantid/Framework/MDEvents/src/IntegrateEllipsoids.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/IntegrateEllipsoids.cpp index 118e2caf101..7e7978c02ee 100644 --- a/Code/Mantid/Framework/MDEvents/src/IntegrateEllipsoids.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/IntegrateEllipsoids.cpp @@ -11,10 +11,10 @@ #include "MantidGeometry/Crystal/IndexingUtils.h" #include "MantidKernel/BoundedValidator.h" #include "MantidKernel/CompositeValidator.h" -#include "MantidMDEvents/MDTransfFactory.h" -#include "MantidMDEvents/UnitsConversionHelper.h" -#include "MantidMDEvents/Integrate3DEvents.h" -#include "MantidMDEvents/IntegrateEllipsoids.h" +#include "MantidDataObjects/MDTransfFactory.h" +#include "MantidDataObjects/UnitsConversionHelper.h" +#include "MantidDataObjects/Integrate3DEvents.h" +#include "MantidMDAlgorithms/IntegrateEllipsoids.h" #include "MantidDataObjects/Workspace2D.h" #include "MantidKernel/Statistics.h" @@ -25,7 +25,7 @@ using namespace Mantid::Geometry; using namespace Mantid::DataObjects; namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** NOTE: This has been adapted from the SaveIsawQvector algorithm. */ @@ -422,5 +422,5 @@ void IntegrateEllipsoids::initTargetWSDescr(EventWorkspace_sptr wksp) { m_targWSDescr.m_PreprDetTable = table; } -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid diff --git a/Code/Mantid/Framework/MDAlgorithms/src/IntegratePeaksMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/IntegratePeaksMD.cpp index e1980adb910..dcb8269ab13 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/IntegratePeaksMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/IntegratePeaksMD.cpp @@ -3,9 +3,9 @@ #include "MantidDataObjects/PeaksWorkspace.h" #include "MantidDataObjects/PeakShapeSpherical.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventFactory.h" #include "MantidMDAlgorithms/IntegratePeaksMD.h" -#include "MantidMDEvents/CoordTransformDistance.h" +#include "MantidDataObjects/CoordTransformDistance.h" #include "MantidKernel/ListValidator.h" #include "MantidAPI/WorkspaceFactory.h" #include "MantidDataObjects/Workspace2D.h" @@ -31,7 +31,7 @@ DECLARE_ALGORITHM(IntegratePeaksMD) using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; using namespace Mantid::DataObjects; using namespace Mantid::Geometry; @@ -689,4 +689,4 @@ double f_eval(double x, void *params) { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp b/Code/Mantid/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp index f898b9f53b6..bfab1620f06 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp @@ -4,9 +4,9 @@ #include "MantidDataObjects/Peak.h" #include "MantidDataObjects/PeakShapeSpherical.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventFactory.h" #include "MantidMDAlgorithms/IntegratePeaksMD2.h" -#include "MantidMDEvents/CoordTransformDistance.h" +#include "MantidDataObjects/CoordTransformDistance.h" #include "MantidKernel/ListValidator.h" #include "MantidAPI/WorkspaceFactory.h" #include "MantidDataObjects/Workspace2D.h" @@ -33,7 +33,7 @@ DECLARE_ALGORITHM(IntegratePeaksMD2) using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; using namespace Mantid::DataObjects; using namespace Mantid::Geometry; @@ -740,4 +740,4 @@ double f_eval2(double x, void *params) { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/LessThanMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/LessThanMD.cpp index da8b7db1879..03ac0e684f4 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/LessThanMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/LessThanMD.cpp @@ -30,15 +30,15 @@ int LessThanMD::version() const { return 1; }; //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and operand void LessThanMD::execHistoHisto( - Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) { + Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) { out->lessThan(*operand); } //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and a scalar on the RHS void LessThanMD::execHistoScalar( - Mantid::MDEvents::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar) { out->lessThan(scalar->dataY(0)[0]); } diff --git a/Code/Mantid/Framework/MDAlgorithms/src/LoadMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/LoadMD.cpp index 7855ab4054f..676ec50c588 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/LoadMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/LoadMD.cpp @@ -11,11 +11,11 @@ #include "MantidKernel/PropertyWithValue.h" #include "MantidKernel/System.h" #include "MantidMDAlgorithms/LoadMD.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDBoxFlatTree.h" -#include "MantidMDEvents/MDHistoWorkspace.h" -#include "MantidMDEvents/BoxControllerNeXusIO.h" -#include "MantidMDEvents/CoordTransformAffine.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDBoxFlatTree.h" +#include "MantidDataObjects/MDHistoWorkspace.h" +#include "MantidDataObjects/BoxControllerNeXusIO.h" +#include "MantidDataObjects/CoordTransformAffine.h" #include <nexus/NeXusException.hpp> #include <boost/algorithm/string.hpp> #include <vector> @@ -29,7 +29,7 @@ typedef std::auto_ptr<Mantid::API::IBoxControllerIO> file_holder_type; using namespace Mantid::Kernel; using namespace Mantid::API; using namespace Mantid::Geometry; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -321,7 +321,7 @@ void LoadMD::doLoad(typename MDEventWorkspace<MDE, nd>::sptr ws) { // ------------------------------------ if (fileBackEnd) { // TODO:: call to the file format factory auto loader = boost::shared_ptr<API::IBoxControllerIO>( - new MDEvents::BoxControllerNeXusIO(bc.get())); + new DataObjects::BoxControllerNeXusIO(bc.get())); loader->setDataType(sizeof(coord_t), MDE::getTypeName()); bc->setFileBacked(loader, m_filename); // boxes have been already made file-backed when restoring the boxTree; @@ -353,7 +353,7 @@ void LoadMD::doLoad(typename MDEventWorkspace<MDE, nd>::sptr ws) { // ------------------------------------ // TODO:: call to the file format factory auto loader = - file_holder_type(new MDEvents::BoxControllerNeXusIO(bc.get())); + file_holder_type(new DataObjects::BoxControllerNeXusIO(bc.get())); loader->setDataType(sizeof(coord_t), MDE::getTypeName()); loader->openFile(m_filename, "r"); @@ -453,4 +453,4 @@ CoordTransform *LoadMD::loadAffineMatrix(std::string entry_name) { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/LoadSQW.cpp b/Code/Mantid/Framework/MDAlgorithms/src/LoadSQW.cpp index 12f0e65f28d..ece91bbed1c 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/LoadSQW.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/LoadSQW.cpp @@ -15,14 +15,14 @@ #include "MantidAPI/RegisterFileLoader.h" #include <iostream> #include <cfloat> -#include "MantidMDEvents/MDBox.h" -#include "MantidMDEvents/BoxControllerNeXusIO.h" +#include "MantidDataObjects/MDBox.h" +#include "MantidDataObjects/BoxControllerNeXusIO.h" #include "MantidKernel/Memory.h" using namespace Mantid::Kernel; using namespace Mantid::API; using Mantid::Geometry::OrientedLattice; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -152,7 +152,7 @@ void LoadSQW::exec() { // set file backed boxes auto Saver = boost::shared_ptr<API::IBoxControllerIO>( - new MDEvents::BoxControllerNeXusIO(bc.get())); + new DataObjects::BoxControllerNeXusIO(bc.get())); bc->setFileBacked(Saver, m_outputFile); pWs->getBox()->setFileBacked(); bc->getFileIO()->setWriteBufferSize(1000000); @@ -203,7 +203,7 @@ void LoadSQW::exec() { /// Add events after reading pixels/datapoints from file. void - LoadSQW::readEvents(Mantid::MDEvents::MDEventWorkspace<MDEvent<4>, 4> *ws) { + LoadSQW::readEvents(Mantid::DataObjects::MDEventWorkspace<MDEvent<4>, 4> *ws) { CPUTimer tim; size_t maxNPix = ~size_t(0); @@ -375,7 +375,7 @@ lattice and add to workspace. @param ws : Workspace to modify. */ void - LoadSQW::addLattice(Mantid::MDEvents::MDEventWorkspace<MDEvent<4>, 4> *ws) { + LoadSQW::addLattice(Mantid::DataObjects::MDEventWorkspace<MDEvent<4>, 4> *ws) { std::vector<char> buf( 4 * (3 + 3)); // Where 4 = size_of(float) and 3 * 3 is size of b-matrix. this->m_fileStream.seekg(this->m_dataPositions.geom_start, std::ios::beg); @@ -621,7 +621,7 @@ void LoadSQW::readDNDDimensions( } /// add range of dimensions to the workspace; void LoadSQW::addDimsToWs( - Mantid::MDEvents::MDEventWorkspace<MDEvents::MDEvent<4>, 4> *ws, + Mantid::DataObjects::MDEventWorkspace<DataObjects::MDEvent<4>, 4> *ws, std::vector<Mantid::Geometry::MDHistoDimensionBuilder> &DimVector) { // Add dimensions to the workspace by invoking the dimension builders. for (size_t i = 0; i < 4; i++) { diff --git a/Code/Mantid/Framework/MDAlgorithms/src/LogarithmMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/LogarithmMD.cpp index e60b1f162ce..fe7f59edcae 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/LogarithmMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/LogarithmMD.cpp @@ -60,7 +60,7 @@ void LogarithmMD::execEvent(Mantid::API::IMDEventWorkspace_sptr /*out*/) { //---------------------------------------------------------------------------------------------- /// LogarithmMD::Run the algorithm with a MDHistoWorkspace -void LogarithmMD::execHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out) { +void LogarithmMD::execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out) { bool natural = getProperty("Natural"); double filler = getProperty("Filler"); if (natural) diff --git a/Code/Mantid/Framework/MDEvents/src/MDEventWSWrapper.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MDEventWSWrapper.cpp similarity index 89% rename from Code/Mantid/Framework/MDEvents/src/MDEventWSWrapper.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/MDEventWSWrapper.cpp index fd39cfb1d7a..53360318496 100644 --- a/Code/Mantid/Framework/MDEvents/src/MDEventWSWrapper.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MDEventWSWrapper.cpp @@ -1,7 +1,7 @@ -#include "MantidMDEvents/MDEventWSWrapper.h" +#include "MantidMDAlgorithms/MDEventWSWrapper.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** internal helper function to create empty MDEventWorkspace with nd dimensions and set up internal pointer to this workspace @@ -29,9 +29,9 @@ void MDEventWSWrapper::createEmptyEventWS(const Strings &targ_dim_names, const std::vector<double> &dimMax, const std::vector<size_t> &numBins) { - boost::shared_ptr<MDEvents::MDEventWorkspace<MDEvents::MDEvent<nd>, nd>> ws = - boost::shared_ptr<MDEvents::MDEventWorkspace<MDEvents::MDEvent<nd>, nd>>( - new MDEvents::MDEventWorkspace<MDEvents::MDEvent<nd>, nd>()); + boost::shared_ptr<DataObjects::MDEventWorkspace<DataObjects::MDEvent<nd>, nd>> ws = + boost::shared_ptr<DataObjects::MDEventWorkspace<DataObjects::MDEvent<nd>, nd>>( + new DataObjects::MDEventWorkspace<DataObjects::MDEvent<nd>, nd>()); size_t nBins(10); // Give all the dimensions @@ -89,19 +89,19 @@ void MDEventWSWrapper::addMDDataND(float *sigErr, uint16_t *runIndex, uint32_t *detId, coord_t *Coord, size_t dataSize) const { - MDEvents::MDEventWorkspace<MDEvents::MDEvent<nd>, nd> *const pWs = - dynamic_cast<MDEvents::MDEventWorkspace<MDEvents::MDEvent<nd>, nd> *>( + DataObjects::MDEventWorkspace<DataObjects::MDEvent<nd>, nd> *const pWs = + dynamic_cast<DataObjects::MDEventWorkspace<DataObjects::MDEvent<nd>, nd> *>( m_Workspace.get()); if (pWs) { for (size_t i = 0; i < dataSize; i++) { - pWs->addEvent(MDEvents::MDEvent<nd>( + pWs->addEvent(DataObjects::MDEvent<nd>( *(sigErr + 2 * i), *(sigErr + 2 * i + 1), *(runIndex + i), *(detId + i), (Coord + i * nd))); } } else { - MDEvents::MDEventWorkspace<MDEvents::MDLeanEvent<nd>, nd> *const pLWs = + DataObjects::MDEventWorkspace<DataObjects::MDLeanEvent<nd>, nd> *const pLWs = dynamic_cast< - MDEvents::MDEventWorkspace<MDEvents::MDLeanEvent<nd>, nd> *>( + DataObjects::MDEventWorkspace<DataObjects::MDLeanEvent<nd>, nd> *>( m_Workspace.get()); if (!pLWs) @@ -110,7 +110,7 @@ void MDEventWSWrapper::addMDDataND(float *sigErr, uint16_t *runIndex, "to add to it"); for (size_t i = 0; i < dataSize; i++) { - pLWs->addEvent(MDEvents::MDLeanEvent<nd>( + pLWs->addEvent(DataObjects::MDLeanEvent<nd>( *(sigErr + 2 * i), *(sigErr + 2 * i + 1), (Coord + i * nd))); } } @@ -128,8 +128,8 @@ void MDEventWSWrapper::addMDDataND<0>(float *, uint16_t *, uint32_t *, /***/ // void MDEventWSWrapper::splitBoxList(Kernel::ThreadScheduler * ts) template <size_t nd> void MDEventWSWrapper::splitBoxList() { - MDEvents::MDEventWorkspace<MDEvents::MDEvent<nd>, nd> *const pWs = - dynamic_cast<MDEvents::MDEventWorkspace<MDEvents::MDEvent<nd>, nd> *>( + DataObjects::MDEventWorkspace<DataObjects::MDEvent<nd>, nd> *const pWs = + dynamic_cast<DataObjects::MDEventWorkspace<DataObjects::MDEvent<nd>, nd> *>( m_Workspace.get()); if (!pWs) throw(std::bad_cast()); @@ -140,14 +140,14 @@ template <size_t nd> void MDEventWSWrapper::splitBoxList() { // for(size_t i=0;i<BoxList.size();i++) // { // bool - // rootFolderReplaced=MDEvents::MDBox<MDEvents::MDEvent<nd>,nd>::splitAllIfNeeded(BoxList[i],NULL); + // rootFolderReplaced=DataObjects::MDBox<DataObjects::MDEvent<nd>,nd>::splitAllIfNeeded(BoxList[i],NULL); // if(rootFolderReplaced) // { // RootBox = BoxList[i]; // } // } - // if(RootBox.boxPointer)pWs->setBox(reinterpret_cast<MDEvents::MDBoxBase<MDEvents::MDEvent<nd>,nd> + // if(RootBox.boxPointer)pWs->setBox(reinterpret_cast<DataObjects::MDBoxBase<DataObjects::MDEvent<nd>,nd> // *>(RootBox.boxPointer)); // BoxList.clear(); @@ -162,8 +162,8 @@ template <> void MDEventWSWrapper::splitBoxList<0>() { /// helper function to refresh centroid on MDEventWorkspace with nd dimensions template <size_t nd> void MDEventWSWrapper::calcCentroidND(void) { - MDEvents::MDEventWorkspace<MDEvents::MDEvent<nd>, nd> *const pWs = - dynamic_cast<MDEvents::MDEventWorkspace<MDEvents::MDEvent<nd>, nd> *>( + DataObjects::MDEventWorkspace<DataObjects::MDEvent<nd>, nd> *const pWs = + dynamic_cast<DataObjects::MDEventWorkspace<DataObjects::MDEvent<nd>, nd> *>( this->m_Workspace.get()); if (!pWs) throw(std::bad_cast()); @@ -296,5 +296,5 @@ MDEventWSWrapper::MDEventWSWrapper() LOOP<MAX_N_DIM>::EXEC(this); } -} // endnamespace MDEvents +} // endnamespace MDAlgorithms } // endnamespace Mantid \ No newline at end of file diff --git a/Code/Mantid/Framework/MDAlgorithms/src/MDNormDirectSC.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MDNormDirectSC.cpp index 1a433923211..f8e90b16805 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/MDNormDirectSC.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MDNormDirectSC.cpp @@ -2,8 +2,8 @@ #include "MantidAPI/WorkspaceValidators.h" #include "MantidDataObjects/EventWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidKernel/TimeSeriesProperty.h" #include "MantidKernel/VectorHelper.h" @@ -12,7 +12,7 @@ namespace MDAlgorithms { using Mantid::Kernel::Direction; using Mantid::API::WorkspaceProperty; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; using namespace Mantid::API; using namespace Mantid::Kernel; diff --git a/Code/Mantid/Framework/MDAlgorithms/src/MDNormSCD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MDNormSCD.cpp index 4043372b546..b66b3566782 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/MDNormSCD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MDNormSCD.cpp @@ -2,8 +2,8 @@ #include "MantidAPI/WorkspaceValidators.h" #include "MantidDataObjects/EventWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidKernel/TimeSeriesProperty.h" #include "MantidKernel/VectorHelper.h" @@ -12,7 +12,7 @@ namespace MDAlgorithms { using Mantid::Kernel::Direction; using Mantid::API::WorkspaceProperty; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; using namespace Mantid::API; using namespace Mantid::Kernel; diff --git a/Code/Mantid/Framework/MDEvents/src/MDTransfAxisNames.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfAxisNames.cpp similarity index 96% rename from Code/Mantid/Framework/MDEvents/src/MDTransfAxisNames.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/MDTransfAxisNames.cpp index 60d6ffcb81a..aeaf6288efb 100644 --- a/Code/Mantid/Framework/MDEvents/src/MDTransfAxisNames.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfAxisNames.cpp @@ -1,8 +1,8 @@ -#include "MantidMDEvents/MDTransfAxisNames.h" +#include "MantidMDAlgorithms/MDTransfAxisNames.h" #include <boost/format.hpp> namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { using namespace Mantid::Kernel; MDTransfAxisNames::MDTransfAxisNames() : m_DefaultDimID(CnvrtToMD::nDefaultID) { @@ -97,5 +97,5 @@ std::string DLLExport sprintfd(const double data, const double eps) { return boost::str(boost::format("%d") % dist); } -} // endnamespace MDEvents +} // endnamespace MDAlgorithms } // endnamespace Mantid diff --git a/Code/Mantid/Framework/MDAlgorithms/src/MDTransfDEHelper.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfDEHelper.cpp index adeb9822df7..0b50e4b258c 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/MDTransfDEHelper.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfDEHelper.cpp @@ -1,7 +1,7 @@ -#include "MantidMDEvents/MDTransfDEHelper.h" +#include "MantidDataObjects/MDTransfDEHelper.h" namespace Mantid { -namespace MDEvents { +namespace DataObjects { MDTransfDEHelper::MDTransfDEHelper() EmodesList(ConvertToMD::No_DE, "") { EmodesList[ConvertToMD::Elastic] = "Elastic"; @@ -12,5 +12,5 @@ ConvertToMD::Emodes getEmode(const std::string &Mode) const { return ConvertToMD::No_DE; } -} // endnamespace MDEvents +} // endnamespace DataObjects } // endnamespace Mantid diff --git a/Code/Mantid/Framework/MDEvents/src/MDTransfFactory.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfFactory.cpp similarity index 92% rename from Code/Mantid/Framework/MDEvents/src/MDTransfFactory.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/MDTransfFactory.cpp index d85a83ee64b..ae80ebc0b46 100644 --- a/Code/Mantid/Framework/MDEvents/src/MDTransfFactory.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfFactory.cpp @@ -1,7 +1,7 @@ -#include "MantidMDEvents/MDTransfFactory.h" +#include "MantidMDAlgorithms/MDTransfFactory.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { MDTransfFactoryImpl::MDTransfFactoryImpl() : Kernel::DynamicFactory<MDTransfInterface>(), m_createdTransf() {} @@ -30,5 +30,5 @@ MDTransfFactoryImpl::create(const std::string &className) const { } } -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid diff --git a/Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfModQ.cpp similarity index 99% rename from Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/MDTransfModQ.cpp index c5066f6a2b2..32be4779e41 100644 --- a/Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfModQ.cpp @@ -1,8 +1,8 @@ -#include "MantidMDEvents/MDTransfModQ.h" +#include "MantidMDAlgorithms/MDTransfModQ.h" #include "MantidKernel/RegistrationHelper.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { // register the class, whith conversion factory under ModQ name DECLARE_MD_TRANSFID(MDTransfModQ, |Q|); diff --git a/Code/Mantid/Framework/MDEvents/src/MDTransfNoQ.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfNoQ.cpp similarity index 98% rename from Code/Mantid/Framework/MDEvents/src/MDTransfNoQ.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/MDTransfNoQ.cpp index ea013bd3239..015c4316509 100644 --- a/Code/Mantid/Framework/MDEvents/src/MDTransfNoQ.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfNoQ.cpp @@ -1,7 +1,7 @@ -#include "MantidMDEvents/MDTransfNoQ.h" +#include "MantidMDAlgorithms/MDTransfNoQ.h" // namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { // register the class, whith conversion factory under NoQ name DECLARE_MD_TRANSFID(MDTransfNoQ, CopyToMD); diff --git a/Code/Mantid/Framework/MDEvents/src/MDTransfQ3D.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfQ3D.cpp similarity index 99% rename from Code/Mantid/Framework/MDEvents/src/MDTransfQ3D.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/MDTransfQ3D.cpp index aacc63c1c09..fba02a0cb4e 100644 --- a/Code/Mantid/Framework/MDEvents/src/MDTransfQ3D.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MDTransfQ3D.cpp @@ -1,8 +1,8 @@ -#include "MantidMDEvents/MDTransfQ3D.h" +#include "MantidMDAlgorithms/MDTransfQ3D.h" #include "MantidKernel/RegistrationHelper.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { // register the class, whith conversion factory under Q3D name DECLARE_MD_TRANSFID(MDTransfQ3D, Q3D); diff --git a/Code/Mantid/Framework/MDEvents/src/MDWSDescription.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MDWSDescription.cpp similarity index 98% rename from Code/Mantid/Framework/MDEvents/src/MDWSDescription.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/MDWSDescription.cpp index 10b30e0d713..ac7799c3c52 100644 --- a/Code/Mantid/Framework/MDEvents/src/MDWSDescription.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MDWSDescription.cpp @@ -1,13 +1,16 @@ -#include "MantidMDEvents/MDWSDescription.h" -#include "MantidKernel/TimeSeriesProperty.h" -#include "MantidMDEvents/MDTransfFactory.h" +#include "MantidMDAlgorithms/MDWSDescription.h" + #include "MantidAPI/NumericAxis.h" + +#include "MantidKernel/TimeSeriesProperty.h" #include "MantidKernel/Strings.h" +#include "MantidMDAlgorithms/MDTransfFactory.h" + #include <boost/lexical_cast.hpp> namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** set specific (non-default) dimension name * @param nDim -- number of dimension; @@ -180,8 +183,8 @@ MDWSDescription::buildFromMDWS(const API::IMDEventWorkspace_const_sptr &pWS) { *@param SourceMatrWS -- the MDWS description obtained from input matrix *workspace and the algorithm parameters */ -void MDWSDescription::setUpMissingParameters( - const MDEvents::MDWSDescription &SourceMatrWS) { +void +MDWSDescription::setUpMissingParameters(const MDWSDescription &SourceMatrWS) { m_InWS = SourceMatrWS.m_InWS; m_Emode = SourceMatrWS.m_Emode; m_LorentzCorr = SourceMatrWS.m_LorentzCorr; @@ -209,7 +212,7 @@ void MDWSDescription::setUpMissingParameters( * */ void MDWSDescription::checkWSCorresponsMDWorkspace( - MDEvents::MDWSDescription &NewMDWorkspaceD) { + MDWSDescription &NewMDWorkspaceD) { if (m_NDims != NewMDWorkspaceD.m_NDims) { std::string ERR = "Dimension numbers are inconsistent: this workspace has " + @@ -435,5 +438,5 @@ MDWSDescription::getCoordinateSystem() const { return m_coordinateSystem; } -} // end namespace MDEvents +} // end namespace MDAlgorithms } // end namespace Mantid diff --git a/Code/Mantid/Framework/MDEvents/src/MDWSTransform.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MDWSTransform.cpp similarity index 95% rename from Code/Mantid/Framework/MDEvents/src/MDWSTransform.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/MDWSTransform.cpp index d4c24c31db6..747044af53a 100644 --- a/Code/Mantid/Framework/MDEvents/src/MDWSTransform.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MDWSTransform.cpp @@ -1,10 +1,10 @@ -#include "MantidMDEvents/MDWSTransform.h" -#include "MantidMDEvents/MDTransfAxisNames.h" +#include "MantidMDAlgorithms/MDWSTransform.h" +#include "MantidDataObjects/MDTransfAxisNames.h" #include "MantidKernel/Strings.h" #include <float.h> namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { namespace { // logger for the algorithm workspaces Kernel::Logger g_Log("MDWSTransform"); @@ -38,7 +38,7 @@ using namespace CnvrtToMD; * coordinate system. */ std::vector<double> -MDWSTransform::getTransfMatrix(MDEvents::MDWSDescription &TargWSDescription, +MDWSTransform::getTransfMatrix(DataObjects::MDWSDescription &TargWSDescription, const std::string &FrameRequested, const std::string &QScaleRequested) const { CoordScaling ScaleID = getQScaling(QScaleRequested); @@ -61,7 +61,7 @@ MDWSTransform::getTransfMatrix(MDEvents::MDWSDescription &TargWSDescription, *Sample frame -- otherwise */ CnvrtToMD::TargetFrame MDWSTransform::findTargetFrame( - MDEvents::MDWSDescription &TargWSDescription) const { + DataObjects::MDWSDescription &TargWSDescription) const { bool hasGoniometer = TargWSDescription.hasGoniometer(); bool hasLattice = TargWSDescription.hasLattice(); @@ -85,7 +85,7 @@ CnvrtToMD::TargetFrame MDWSTransform::findTargetFrame( *insufficient to define the frame requested */ void MDWSTransform::checkTargetFrame( - const MDEvents::MDWSDescription &TargWSDescription, + const DataObjects::MDWSDescription &TargWSDescription, const CnvrtToMD::TargetFrame CoordFrameID) const { switch (CoordFrameID) { case (LabFrame): // nothing needed for lab frame @@ -111,7 +111,7 @@ void MDWSTransform::checkTargetFrame( /** The matrix to convert neutron momentums into the target coordinate system */ std::vector<double> -MDWSTransform::getTransfMatrix(MDEvents::MDWSDescription &TargWSDescription, +MDWSTransform::getTransfMatrix(DataObjects::MDWSDescription &TargWSDescription, CnvrtToMD::TargetFrame FrameID, CoordScaling &ScaleID) const { @@ -198,7 +198,7 @@ MDWSTransform::getTransfMatrix(MDEvents::MDWSDescription &TargWSDescription, W*Unit*Lattice_param depending on inputs */ Kernel::DblMatrix -MDWSTransform::buildQTrahsf(MDEvents::MDWSDescription &TargWSDescription, +MDWSTransform::buildQTrahsf(DataObjects::MDWSDescription &TargWSDescription, CnvrtToMD::CoordScaling ScaleID, bool UnitUB) const { // implements strategy @@ -293,7 +293,7 @@ MDWSTransform::buildQTrahsf(MDEvents::MDWSDescription &TargWSDescription, */ void MDWSTransform::setQ3DDimensionsNames( - MDEvents::MDWSDescription &TargWSDescription, + DataObjects::MDWSDescription &TargWSDescription, CnvrtToMD::TargetFrame FrameID, CnvrtToMD::CoordScaling ScaleID) const { std::vector<Kernel::V3D> dimDirections; @@ -358,7 +358,7 @@ void MDWSTransform::setQ3DDimensionsNames( else for (int i = 0; i < 3; i++) TargWSDescription.setDimName( - i, MDEvents::makeAxisName(dimDirections[i], dimNames)); + i, DataObjects::makeAxisName(dimDirections[i], dimNames)); if (ScaleID == NoScaling) { for (int i = 0; i < 3; i++) @@ -370,7 +370,7 @@ void MDWSTransform::setQ3DDimensionsNames( dMax = (dMax > LatPar[i]) ? (dMax) : (LatPar[i]); for (int i = 0; i < 3; i++) TargWSDescription.setDimUnit( - i, "in " + MDEvents::sprintfd(2 * M_PI / dMax, 1.e-3) + " A^-1"); + i, "in " + DataObjects::sprintfd(2 * M_PI / dMax, 1.e-3) + " A^-1"); } if ((ScaleID == OrthogonalHKLScale) || (ScaleID == HKLScale)) { // get the length along each of the axes @@ -384,12 +384,12 @@ void MDWSTransform::setQ3DDimensionsNames( len.push_back(2 * M_PI * x.norm()); for (int i = 0; i < 3; i++) TargWSDescription.setDimUnit( - i, "in " + MDEvents::sprintfd(len[i], 1.e-3) + " A^-1"); + i, "in " + DataObjects::sprintfd(len[i], 1.e-3) + " A^-1"); } } void MDWSTransform::setModQDimensionsNames( - MDEvents::MDWSDescription &TargWSDescription, + DataObjects::MDWSDescription &TargWSDescription, const std::string &QScaleRequested) const { // TODO: nothing meaningful has // been done at the moment, // should enable scaling if diff --git a/Code/Mantid/Framework/MDAlgorithms/src/MergeMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MergeMD.cpp index c21455165f3..a6b9a824061 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/MergeMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MergeMD.cpp @@ -1,17 +1,17 @@ #include "MantidMDAlgorithms/MergeMD.h" #include "MantidKernel/Strings.h" #include "MantidGeometry/MDGeometry/IMDDimension.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventFactory.h" #include "MantidGeometry/MDGeometry/MDHistoDimension.h" #include "MantidKernel/ArrayProperty.h" -#include "MantidMDEvents/MDBoxIterator.h" +#include "MantidDataObjects/MDBoxIterator.h" #include "MantidKernel/CPUTimer.h" #include "MantidKernel/MandatoryValidator.h" using namespace Mantid::Kernel; using namespace Mantid::API; using namespace Mantid::Geometry; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { diff --git a/Code/Mantid/Framework/MDAlgorithms/src/MergeMDFiles.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MergeMDFiles.cpp index d8c9419aa81..44d21fa14a4 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/MergeMDFiles.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MergeMDFiles.cpp @@ -3,9 +3,9 @@ #include "MantidKernel/CPUTimer.h" #include "MantidKernel/Strings.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDBoxBase.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/BoxControllerNeXusIO.h" +#include "MantidDataObjects/MDBoxBase.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/BoxControllerNeXusIO.h" #include "MantidMDAlgorithms/MergeMDFiles.h" #include "MantidAPI/MemoryManager.h" @@ -14,7 +14,7 @@ using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -205,7 +205,7 @@ void MergeMDFiles::doExecByCloning(Mantid::API::IMDEventWorkspace_sptr ws, bc->setMaxDepth(20); bc->setSplitThreshold(5000); auto saver = boost::shared_ptr<API::IBoxControllerIO>( - new MDEvents::BoxControllerNeXusIO(bc.get())); + new DataObjects::BoxControllerNeXusIO(bc.get())); saver->setDataType(sizeof(coord_t), m_MDEventType); if (m_fileBasedTargetWS) { bc->setFileBacked(saver, outputFile); diff --git a/Code/Mantid/Framework/MDAlgorithms/src/MinusMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MinusMD.cpp index 5b16eb8e592..1d6b0053e96 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/MinusMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MinusMD.cpp @@ -1,13 +1,13 @@ #include "MantidMDAlgorithms/MinusMD.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDBoxIterator.h" -#include "MantidMDEvents/MDBox.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDBoxIterator.h" +#include "MantidDataObjects/MDBox.h" using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -130,15 +130,15 @@ void MinusMD::execEvent() { //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and operand void -MinusMD::execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) { +MinusMD::execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) { out->subtract(*operand); } //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand void MinusMD::execHistoScalar( - Mantid::MDEvents::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar) { out->subtract(scalar->dataY(0)[0], scalar->dataE(0)[0]); } diff --git a/Code/Mantid/Framework/MDAlgorithms/src/MultiplyMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/MultiplyMD.cpp index 38dd9296568..e8f065c07a8 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/MultiplyMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/MultiplyMD.cpp @@ -1,13 +1,13 @@ #include "MantidKernel/System.h" #include "MantidMDAlgorithms/MultiplyMD.h" -#include "MantidMDEvents/MDBoxBase.h" -#include "MantidMDEvents/MDBox.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDBoxBase.h" +#include "MantidDataObjects/MDBox.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -120,15 +120,15 @@ void MultiplyMD::execEvent() { //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and operand void MultiplyMD::execHistoHisto( - Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) { + Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) { out->multiply(*operand); } //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand void MultiplyMD::execHistoScalar( - Mantid::MDEvents::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar) { out->multiply(scalar->dataY(0)[0], scalar->dataE(0)[0]); } diff --git a/Code/Mantid/Framework/MDAlgorithms/src/NotMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/NotMD.cpp index fbe2573df7e..f9f079462ef 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/NotMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/NotMD.cpp @@ -46,7 +46,7 @@ void NotMD::execEvent(Mantid::API::IMDEventWorkspace_sptr /*out*/) { //---------------------------------------------------------------------------------------------- /// NotMD::Run the algorithm with a MDHistoWorkspace -void NotMD::execHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out) { +void NotMD::execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out) { out->operatorNot(); } diff --git a/Code/Mantid/Framework/MDEvents/src/OneStepMDEW.cpp b/Code/Mantid/Framework/MDAlgorithms/src/OneStepMDEW.cpp similarity index 94% rename from Code/Mantid/Framework/MDEvents/src/OneStepMDEW.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/OneStepMDEW.cpp index 758c88c4b48..17b83b7f4df 100644 --- a/Code/Mantid/Framework/MDEvents/src/OneStepMDEW.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/OneStepMDEW.cpp @@ -1,14 +1,14 @@ -#include "MantidMDEvents/OneStepMDEW.h" +#include "MantidMDAlgorithms/OneStepMDEW.h" #include "MantidKernel/System.h" #include "MantidAPI/FileProperty.h" #include "MantidAPI/FrameworkManager.h" #include "MantidDataObjects/EventWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" //#include "MantidNexus/LoadEventNexus.h" -//#include "MantidMDEvents/ConvertToDiffractionMDWorkspace.h" +//#include "MantidDataObjects/ConvertToDiffractionMDWorkspace.h" namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { // Register the algorithm into the AlgorithmFactory DECLARE_ALGORITHM(OneStepMDEW) @@ -73,4 +73,4 @@ void OneStepMDEW::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDAlgorithms/src/OrMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/OrMD.cpp index 2dc5f30133e..4be86dd14d9 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/OrMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/OrMD.cpp @@ -30,8 +30,8 @@ int OrMD::version() const { return 1; }; //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and operand void -OrMD::execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) { +OrMD::execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) { out->operator|=(*operand); } diff --git a/Code/Mantid/Framework/MDAlgorithms/src/PlusMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/PlusMD.cpp index 769c3915219..2a18a714e36 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/PlusMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/PlusMD.cpp @@ -1,14 +1,14 @@ #include "MantidAPI/IMDEventWorkspace.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDBoxBase.h" -#include "MantidMDEvents/MDBoxIterator.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDBoxBase.h" +#include "MantidDataObjects/MDBoxIterator.h" +#include "MantidDataObjects/MDEventFactory.h" #include "MantidMDAlgorithms/PlusMD.h" #include "MantidKernel/ThreadScheduler.h" #include "MantidKernel/ThreadPool.h" using namespace Mantid::Kernel; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; using namespace Mantid::API; namespace Mantid { @@ -150,15 +150,15 @@ void PlusMD::checkInputs() { //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and operand void -PlusMD::execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) { +PlusMD::execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) { out->add(*operand); } //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand void PlusMD::execHistoScalar( - Mantid::MDEvents::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar) { out->add(scalar->dataY(0)[0], scalar->dataE(0)[0]); } diff --git a/Code/Mantid/Framework/MDAlgorithms/src/PowerMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/PowerMD.cpp index 90cdcc44f54..2162aad8901 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/PowerMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/PowerMD.cpp @@ -53,7 +53,7 @@ void PowerMD::execEvent(Mantid::API::IMDEventWorkspace_sptr /*out*/) { //---------------------------------------------------------------------------------------------- /// PowerMD::Run the algorithm with a MDHistoWorkspace -void PowerMD::execHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out) { +void PowerMD::execHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out) { double exponent = getProperty("Exponent"); out->power(exponent); } diff --git a/Code/Mantid/Framework/MDEvents/src/QueryMDWorkspace.cpp b/Code/Mantid/Framework/MDAlgorithms/src/QueryMDWorkspace.cpp similarity index 97% rename from Code/Mantid/Framework/MDEvents/src/QueryMDWorkspace.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/QueryMDWorkspace.cpp index 56817e25b25..0ee141722dc 100644 --- a/Code/Mantid/Framework/MDEvents/src/QueryMDWorkspace.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/QueryMDWorkspace.cpp @@ -1,4 +1,4 @@ -#include "MantidMDEvents/QueryMDWorkspace.h" +#include "MantidMDAlgorithms/QueryMDWorkspace.h" #include "MantidKernel/System.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/IMDIterator.h" @@ -8,14 +8,14 @@ #include "MantidKernel/EnabledWhenProperty.h" #include "MantidKernel/BoundedValidator.h" #include "MantidKernel/ListValidator.h" -#include "../inc/MantidMDEvents/MDEventWorkspace.h" -#include "../inc/MantidMDEvents/MDEventFactory.h" +#include "../inc/MantidDataObjects/MDEventWorkspace.h" +#include "../inc/MantidDataObjects/MDEventFactory.h" using namespace Mantid::Kernel; using namespace Mantid::API; namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { // Register the class into the algorithm factory DECLARE_ALGORITHM(QueryMDWorkspace) @@ -116,7 +116,7 @@ void QueryMDWorkspace::init() { */ template <typename MDE, size_t nd> void QueryMDWorkspace::getBoxData( - typename Mantid::MDEvents::MDEventWorkspace<MDE, nd>::sptr ws) { + typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws) { if (this->getPropertyValue("BoxDataTable").empty()) return; @@ -260,4 +260,4 @@ void QueryMDWorkspace::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDEvents/src/ReflectometryTransform.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransform.cpp similarity index 97% rename from Code/Mantid/Framework/MDEvents/src/ReflectometryTransform.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransform.cpp index ac89c0adbd6..02e9dbd2209 100644 --- a/Code/Mantid/Framework/MDEvents/src/ReflectometryTransform.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransform.cpp @@ -1,4 +1,4 @@ -#include "MantidMDEvents/ReflectometryTransform.h" +#include "MantidMDAlgorithms/ReflectometryTransform.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/BinEdgeAxis.h" #include "MantidKernel/UnitFactory.h" @@ -8,7 +8,7 @@ using namespace Mantid::Kernel; using namespace Mantid::API; namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { ReflectometryTransform::ReflectometryTransform(int numberOfBinsQx, int numberOfBinsQz) diff --git a/Code/Mantid/Framework/MDEvents/src/ReflectometryTransformKiKf.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransformKiKf.cpp similarity index 96% rename from Code/Mantid/Framework/MDEvents/src/ReflectometryTransformKiKf.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransformKiKf.cpp index 3488408d2e9..b69e5a91294 100644 --- a/Code/Mantid/Framework/MDEvents/src/ReflectometryTransformKiKf.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransformKiKf.cpp @@ -1,15 +1,16 @@ -#include "MantidMDEvents/ReflectometryTransformKiKf.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidMDAlgorithms/ReflectometryTransformKiKf.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include "MantidGeometry/MDGeometry/MDHistoDimension.h" #include "MantidDataObjects/Workspace2D.h" #include <stdexcept> +using namespace Mantid::API; +using namespace Mantid::DataObjects; using namespace Mantid::Kernel; using namespace Mantid::Geometry; -using namespace Mantid::API; namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /* Constructor @@ -148,4 +149,4 @@ Mantid::API::MatrixWorkspace_sptr ReflectometryTransformKiKf::execute( } } // namespace Mantid -} // namespace MDEvents +} // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDEvents/src/ReflectometryTransformP.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransformP.cpp similarity index 97% rename from Code/Mantid/Framework/MDEvents/src/ReflectometryTransformP.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransformP.cpp index 7f415f3c23a..0d39a256d02 100644 --- a/Code/Mantid/Framework/MDEvents/src/ReflectometryTransformP.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransformP.cpp @@ -1,6 +1,6 @@ -#include "MantidMDEvents/ReflectometryTransformP.h" +#include "MantidMDAlgorithms/ReflectometryTransformP.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include "MantidGeometry/MDGeometry/MDHistoDimension.h" #include "MantidDataObjects/Workspace2D.h" #include <stdexcept> @@ -10,7 +10,7 @@ using namespace Mantid::API; using namespace Mantid::Geometry; namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /* Constructor @param pSumMin: p sum min value (extent) @@ -150,4 +150,4 @@ Mantid::API::MatrixWorkspace_sptr ReflectometryTransformP::execute( } } // namespace Mantid -} // namespace MDEvents +} // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDEvents/src/ReflectometryTransformQxQz.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransformQxQz.cpp similarity index 97% rename from Code/Mantid/Framework/MDEvents/src/ReflectometryTransformQxQz.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransformQxQz.cpp index 74d4c49d0a3..d8462d60529 100644 --- a/Code/Mantid/Framework/MDEvents/src/ReflectometryTransformQxQz.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ReflectometryTransformQxQz.cpp @@ -1,5 +1,5 @@ -#include "MantidMDEvents/ReflectometryTransformQxQz.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidMDAlgorithms/ReflectometryTransformQxQz.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include "MantidGeometry/MDGeometry/MDHistoDimension.h" #include "MantidDataObjects/Workspace2D.h" #include <stdexcept> @@ -9,7 +9,7 @@ using namespace Mantid::Geometry; using namespace Mantid::API; namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { //---------------------------------------------------------------------------------------------- /** Destructor @@ -154,4 +154,4 @@ ReflectometryTransformQxQz::execute(MatrixWorkspace_const_sptr inputWs) const { } } // namespace Mantid -} // namespace MDEvents +} // namespace MDAlgorithms diff --git a/Code/Mantid/Framework/MDEvents/src/SaveIsawQvector.cpp b/Code/Mantid/Framework/MDAlgorithms/src/SaveIsawQvector.cpp similarity index 97% rename from Code/Mantid/Framework/MDEvents/src/SaveIsawQvector.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/SaveIsawQvector.cpp index 327f45325c0..d70e9a16ad2 100644 --- a/Code/Mantid/Framework/MDEvents/src/SaveIsawQvector.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/SaveIsawQvector.cpp @@ -4,16 +4,16 @@ #include "MantidAPI/WorkspaceValidators.h" #include "MantidDataObjects/EventWorkspace.h" #include "MantidKernel/CompositeValidator.h" -#include "MantidMDEvents/MDTransfFactory.h" -#include "MantidMDEvents/UnitsConversionHelper.h" -#include "MantidMDEvents/SaveIsawQvector.h" +#include "MantidDataObjects/MDTransfFactory.h" +#include "MantidDataObjects/UnitsConversionHelper.h" +#include "MantidMDAlgorithms/SaveIsawQvector.h" using namespace Mantid::API; using namespace Mantid::Kernel; using namespace Mantid::DataObjects; namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { // Register the algorithm into the AlgorithmFactory DECLARE_ALGORITHM(SaveIsawQvector) @@ -219,5 +219,5 @@ void SaveIsawQvector::initTargetWSDescr(EventWorkspace_sptr wksp) { m_targWSDescr.m_PreprDetTable = table; } -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid diff --git a/Code/Mantid/Framework/MDAlgorithms/src/SaveMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/SaveMD.cpp index 8d7503fa945..d06a16904c9 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/SaveMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/SaveMD.cpp @@ -3,17 +3,17 @@ #include "MantidAPI/IMDEventWorkspace.h" #include "MantidKernel/Matrix.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDBoxIterator.h" -#include "MantidMDEvents/MDEventFactory.h" -#include "MantidMDEvents/MDEventWorkspace.h" +#include "MantidDataObjects/MDBoxIterator.h" +#include "MantidDataObjects/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" #include "MantidMDAlgorithms/SaveMD.h" -#include "MantidMDEvents/MDBox.h" +#include "MantidDataObjects/MDBox.h" #include "MantidAPI/Progress.h" #include "MantidKernel/EnabledWhenProperty.h" #include <Poco/File.h> -#include "MantidMDEvents/MDHistoWorkspace.h" -#include "MantidMDEvents/MDBoxFlatTree.h" -#include "MantidMDEvents/BoxControllerNeXusIO.h" +#include "MantidDataObjects/MDHistoWorkspace.h" +#include "MantidDataObjects/MDBoxFlatTree.h" +#include "MantidDataObjects/BoxControllerNeXusIO.h" #if defined(__GLIBCXX__) && __GLIBCXX__ >= 20100121 // libstdc++-4.4.3 typedef std::unique_ptr< ::NeXus::File> file_holder_type; @@ -23,7 +23,7 @@ typedef std::auto_ptr< ::NeXus::File> file_holder_type; using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -150,7 +150,7 @@ void SaveMD::doSaveEvents(typename MDEventWorkspace<MDE, nd>::sptr ws) { BoxFlatStruct.initFlatStructure(ws, filename); // create saver class auto Saver = boost::shared_ptr<API::IBoxControllerIO>( - new MDEvents::BoxControllerNeXusIO(bc.get())); + new DataObjects::BoxControllerNeXusIO(bc.get())); Saver->setDataType(sizeof(coord_t), MDE::getTypeName()); if (MakeFileBacked) { // store saver with box controller @@ -220,7 +220,7 @@ void SaveMD::doSaveEvents(typename MDEventWorkspace<MDE, nd>::sptr ws) { * * @param ws :: MDHistoWorkspace to save */ -void SaveMD::doSaveHisto(Mantid::MDEvents::MDHistoWorkspace_sptr ws) { +void SaveMD::doSaveHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws) { std::string filename = getPropertyValue("Filename"); // Erase the file if it exists @@ -317,4 +317,4 @@ void SaveMD::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/SaveZODS.cpp b/Code/Mantid/Framework/MDAlgorithms/src/SaveZODS.cpp index 1b7ad75e9a5..a2b287855cf 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/SaveZODS.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/SaveZODS.cpp @@ -2,13 +2,13 @@ #include "MantidAPI/IMDHistoWorkspace.h" #include "MantidKernel/System.h" #include "MantidMDAlgorithms/SaveZODS.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidGeometry/Crystal/OrientedLattice.h" using namespace Mantid::Kernel; using namespace Mantid::API; using namespace Mantid::Geometry; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { diff --git a/Code/Mantid/Framework/MDAlgorithms/src/SetMDUsingMask.cpp b/Code/Mantid/Framework/MDAlgorithms/src/SetMDUsingMask.cpp index bb35f8b1048..e145c7857dd 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/SetMDUsingMask.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/SetMDUsingMask.cpp @@ -2,12 +2,12 @@ #include "MantidKernel/System.h" #include "MantidAPI/IMDWorkspace.h" #include "MantidAPI/IMDHistoWorkspace.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include <float.h> using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { diff --git a/Code/Mantid/Framework/MDAlgorithms/src/SliceMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/SliceMD.cpp index ac2348eadb8..c49c15eee0c 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/SliceMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/SliceMD.cpp @@ -1,6 +1,6 @@ #include "MantidAPI/IMDEventWorkspace.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventFactory.h" #include "MantidMDAlgorithms/SliceMD.h" #include "MantidGeometry/MDGeometry/MDImplicitFunction.h" #include "MantidKernel/ThreadScheduler.h" @@ -13,7 +13,7 @@ using namespace Mantid::Kernel; using namespace Mantid::API; using namespace Mantid::Geometry; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { @@ -337,4 +337,4 @@ void SliceMD::exec() { } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp b/Code/Mantid/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp index 1b43dc6b046..91dec0e9421 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp @@ -4,8 +4,8 @@ #include "MantidKernel/EnabledWhenProperty.h" #include "MantidKernel/Strings.h" #include "MantidKernel/System.h" -#include "MantidMDEvents/CoordTransformAffine.h" -#include "MantidMDEvents/CoordTransformAligned.h" +#include "MantidDataObjects/CoordTransformAffine.h" +#include "MantidDataObjects/CoordTransformAligned.h" #include "MantidKernel/ArrayProperty.h" #include "MantidKernel/VisibleWhenProperty.h" #include "MantidKernel/ArrayLengthValidator.h" @@ -390,16 +390,16 @@ void SlicingAlgorithm::createGeneralTransform() { // std::cout << m_inputMinPoint << " m_inputMinPoint " << std::endl; // Create the CoordTransformAffine for BINNING with these basis vectors - MDEvents::CoordTransformAffine *ct = - new MDEvents::CoordTransformAffine(inD, m_outD); + DataObjects::CoordTransformAffine *ct = + new DataObjects::CoordTransformAffine(inD, m_outD); // Note: the scaling makes the coordinate correspond to a bin index ct->buildOrthogonal(m_inputMinPoint, this->m_bases, VMD(this->m_binningScaling)); this->m_transform = ct; // Transformation original->binned - MDEvents::CoordTransformAffine *ctFrom = - new MDEvents::CoordTransformAffine(inD, m_outD); + DataObjects::CoordTransformAffine *ctFrom = + new DataObjects::CoordTransformAffine(inD, m_outD); ctFrom->buildOrthogonal(m_translation, this->m_bases, VMD(m_transformScaling)); m_transformFromOriginal = ctFrom; @@ -420,8 +420,8 @@ void SlicingAlgorithm::createGeneralTransform() { m_transformToOriginal = NULL; if (m_outD == inD) { // Can't reverse transform if you lost dimensions. - MDEvents::CoordTransformAffine *ctTo = - new MDEvents::CoordTransformAffine(inD, m_outD); + DataObjects::CoordTransformAffine *ctTo = + new DataObjects::CoordTransformAffine(inD, m_outD); Matrix<coord_t> fromMatrix = ctFrom->getMatrix(); Matrix<coord_t> toMatrix = fromMatrix; // Invert the affine matrix to get the reverse transformation @@ -573,13 +573,13 @@ void SlicingAlgorithm::createAlignedTransform() { } // Transform for binning - m_transform = new MDEvents::CoordTransformAligned( + m_transform = new DataObjects::CoordTransformAligned( m_inWS->getNumDims(), m_outD, m_dimensionToBinFrom, origin, scaling); // Transformation original->binned. There is no offset or scaling! std::vector<coord_t> unitScaling(m_outD, 1.0); std::vector<coord_t> zeroOrigin(m_outD, 0.0); - m_transformFromOriginal = new MDEvents::CoordTransformAligned( + m_transformFromOriginal = new DataObjects::CoordTransformAligned( inD, m_outD, m_dimensionToBinFrom, zeroOrigin, unitScaling); // Now the reverse transformation. @@ -588,8 +588,8 @@ void SlicingAlgorithm::createAlignedTransform() { // dimension index is that? Matrix<coord_t> mat = m_transformFromOriginal->makeAffineMatrix(); mat.Invert(); - MDEvents::CoordTransformAffine *tmp = - new MDEvents::CoordTransformAffine(inD, m_outD); + DataObjects::CoordTransformAffine *tmp = + new DataObjects::CoordTransformAffine(inD, m_outD); tmp->setMatrix(mat); m_transformToOriginal = tmp; } else @@ -642,8 +642,8 @@ void SlicingAlgorithm::createTransform() { m_inWS->getName() + " back to " + m_originalWS->getName() + "."); // Fail if the MDHistoWorkspace was modified by binary operation - MDEvents::MDHistoWorkspace_sptr inHisto = - boost::dynamic_pointer_cast<MDEvents::MDHistoWorkspace>(m_inWS); + DataObjects::MDHistoWorkspace_sptr inHisto = + boost::dynamic_pointer_cast<DataObjects::MDHistoWorkspace>(m_inWS); if (inHisto) { if (inHisto->getNumExperimentInfo() > 0) { const Run &run = inHisto->getExperimentInfo(0)->run(); @@ -701,12 +701,12 @@ void SlicingAlgorithm::createTransform() { Matrix<coord_t> matToIntermediate = matOriginalToIntermediate * matToOriginal; - m_transformToIntermediate = new MDEvents::CoordTransformAffine( + m_transformToIntermediate = new DataObjects::CoordTransformAffine( m_originalWS->getNumDims(), m_intermediateWS->getNumDims()); m_transformToIntermediate->setMatrix(matToIntermediate); // And now the reverse matToIntermediate.Invert(); - m_transformFromIntermediate = new MDEvents::CoordTransformAffine( + m_transformFromIntermediate = new DataObjects::CoordTransformAffine( m_intermediateWS->getNumDims(), m_originalWS->getNumDims()); m_transformFromIntermediate->setMatrix(matToIntermediate); } catch (std::runtime_error &) { @@ -995,4 +995,4 @@ SlicingAlgorithm::getImplicitFunctionForChunk(const size_t *const chunkMin, } } // namespace Mantid -} // namespace MDEvents +} // namespace DataObjects diff --git a/Code/Mantid/Framework/MDAlgorithms/src/ThresholdMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/ThresholdMD.cpp index 217943daffb..1b98ff136b4 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/ThresholdMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/ThresholdMD.cpp @@ -1,6 +1,6 @@ #include "MantidMDAlgorithms/ThresholdMD.h" #include "MantidAPI/WorkspaceProperty.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidKernel/ListValidator.h" #include "MantidKernel/EnabledWhenProperty.h" #include "MantidKernel/MultiThreaded.h" @@ -10,7 +10,7 @@ using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { diff --git a/Code/Mantid/Framework/MDAlgorithms/src/TransformMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/TransformMD.cpp index 20cd8862083..b75054a639a 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/TransformMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/TransformMD.cpp @@ -1,15 +1,15 @@ #include "MantidMDAlgorithms/TransformMD.h" #include "MantidKernel/System.h" #include "MantidKernel/ArrayProperty.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" -#include "MantidMDEvents/MDEventWorkspace.h" -#include "MantidMDEvents/MDEventFactory.h" +#include "MantidDataObjects/MDEventWorkspace.h" +#include "MantidDataObjects/MDEventFactory.h" using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; -using Mantid::MDEvents::MDHistoWorkspace_sptr; +using namespace Mantid::DataObjects; +using Mantid::DataObjects::MDHistoWorkspace_sptr; namespace Mantid { namespace MDAlgorithms { @@ -69,7 +69,7 @@ void TransformMD::init() { */ template <typename MDE, size_t nd> void TransformMD::doTransform( - typename Mantid::MDEvents::MDEventWorkspace<MDE, nd>::sptr ws) { + typename Mantid::DataObjects::MDEventWorkspace<MDE, nd>::sptr ws) { std::vector<API::IMDNode *> boxes; // Get ALL the boxes, including MDGridBoxes. ws->getBox()->getBoxes(boxes, 1000, false); diff --git a/Code/Mantid/Framework/MDAlgorithms/src/UnaryOperationMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/UnaryOperationMD.cpp index 3d6d07f994e..577698cc709 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/UnaryOperationMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/UnaryOperationMD.cpp @@ -3,12 +3,12 @@ #include "MantidAPI/IMDWorkspace.h" #include "MantidAPI/WorkspaceProperty.h" #include "MantidAPI/IMDEventWorkspace.h" -#include "MantidMDEvents/MDHistoWorkspace.h" +#include "MantidDataObjects/MDHistoWorkspace.h" #include "MantidAPI/MatrixWorkspace.h" using namespace Mantid::Kernel; using namespace Mantid::API; -using namespace Mantid::MDEvents; +using namespace Mantid::DataObjects; namespace Mantid { namespace MDAlgorithms { diff --git a/Code/Mantid/Framework/MDEvents/src/UnitsConversionHelper.cpp b/Code/Mantid/Framework/MDAlgorithms/src/UnitsConversionHelper.cpp similarity index 99% rename from Code/Mantid/Framework/MDEvents/src/UnitsConversionHelper.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/UnitsConversionHelper.cpp index 9ef8f0b06ef..8b8f777e1ab 100644 --- a/Code/Mantid/Framework/MDEvents/src/UnitsConversionHelper.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/UnitsConversionHelper.cpp @@ -1,11 +1,11 @@ -#include "MantidMDEvents/UnitsConversionHelper.h" +#include "MantidMDAlgorithms/UnitsConversionHelper.h" #include "MantidAPI/NumericAxis.h" #include "MantidKernel/UnitFactory.h" #include "MantidKernel/Strings.h" #include <boost/math/special_functions/fpclassify.hpp> namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { /** establish and initialize proper units conversion from input to output units @param UnitsFrom -- the ID of the units, which have to be converted from @@ -368,5 +368,5 @@ UnitsConversionHelper::UnitsConversionHelper() m_L1(1), m_Efix(1), m_TwoTheta(0), m_L2(1), m_pTwoThetas(NULL), m_pL2s(NULL), m_pEfixedArray(NULL){}; -} // endNamespace MDEvents +} // endNamespace DataObjects } // endNamespace Mantid diff --git a/Code/Mantid/Framework/MDEvents/src/UserFunctionMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/UserFunctionMD.cpp similarity index 97% rename from Code/Mantid/Framework/MDEvents/src/UserFunctionMD.cpp rename to Code/Mantid/Framework/MDAlgorithms/src/UserFunctionMD.cpp index 7b2eb2d1dd0..a75536b4f40 100644 --- a/Code/Mantid/Framework/MDEvents/src/UserFunctionMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/UserFunctionMD.cpp @@ -1,14 +1,14 @@ //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- -#include "MantidMDEvents/UserFunctionMD.h" +#include "MantidMDAlgorithms/UserFunctionMD.h" #include "MantidAPI/FunctionFactory.h" #include "MantidKernel/MultiThreaded.h" #include <boost/tokenizer.hpp> namespace Mantid { -namespace MDEvents { +namespace MDAlgorithms { // Subscribe the function into the factory. DECLARE_FUNCTION(UserFunctionMD); @@ -150,5 +150,5 @@ void UserFunctionMD::setFormula() { m_parser.SetExpr(m_formula); } -} // namespace MDEvents +} // namespace MDAlgorithms } // namespace Mantid diff --git a/Code/Mantid/Framework/MDAlgorithms/src/WeightedMeanMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/WeightedMeanMD.cpp index 6be27f734fa..d1d780dd4b1 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/WeightedMeanMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/WeightedMeanMD.cpp @@ -1,5 +1,5 @@ #include "MantidMDAlgorithms/WeightedMeanMD.h" -#include "MantidMDEvents/MDHistoWorkspaceIterator.h" +#include "MantidDataObjects/MDHistoWorkspaceIterator.h" #include "MantidKernel/System.h" using namespace Mantid::Kernel; @@ -37,9 +37,9 @@ void WeightedMeanMD::checkInputs() { //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and operand void WeightedMeanMD::execHistoHisto( - Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) { - using MDEvents::MDHistoWorkspaceIterator; + Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) { + using DataObjects::MDHistoWorkspaceIterator; MDHistoWorkspaceIterator *lhs_it = dynamic_cast<MDHistoWorkspaceIterator *>(out->createIterator()); MDHistoWorkspaceIterator *rhs_it = @@ -79,7 +79,7 @@ void WeightedMeanMD::execHistoHisto( //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output, scalar and operand void WeightedMeanMD::execHistoScalar( - Mantid::MDEvents::MDHistoWorkspace_sptr, + Mantid::DataObjects::MDHistoWorkspace_sptr, Mantid::DataObjects::WorkspaceSingleValue_const_sptr) { throw std::runtime_error( this->name() + " can only be run with two MDHistoWorkspaces as inputs"); diff --git a/Code/Mantid/Framework/MDAlgorithms/src/XorMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/XorMD.cpp index 2a388274f38..d503d3b23cd 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/XorMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/XorMD.cpp @@ -30,8 +30,8 @@ int XorMD::version() const { return 1; }; //---------------------------------------------------------------------------------------------- /// Run the algorithm with a MDHisotWorkspace as output and operand void -XorMD::execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, - Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) { +XorMD::execHistoHisto(Mantid::DataObjects::MDHistoWorkspace_sptr out, + Mantid::DataObjects::MDHistoWorkspace_const_sptr operand) { out->operator^=(*operand); } diff --git a/Code/Mantid/Framework/MDEvents/test/BoxControllerSettingsAlgorithmTest.h b/Code/Mantid/Framework/MDAlgorithms/test/BoxControllerSettingsAlgorithmTest.h similarity index 99% rename from Code/Mantid/Framework/MDEvents/test/BoxControllerSettingsAlgorithmTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/BoxControllerSettingsAlgorithmTest.h index b54466c963a..7e2c7648c0d 100644 --- a/Code/Mantid/Framework/MDEvents/test/BoxControllerSettingsAlgorithmTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/BoxControllerSettingsAlgorithmTest.h @@ -8,7 +8,7 @@ #include <iostream> #include <iomanip> -#include "MantidMDEvents/BoxControllerSettingsAlgorithm.h" +#include "MantidMDAlgorithms/BoxControllerSettingsAlgorithm.h" #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include "MantidDataHandling/LoadParameterFile.h" diff --git a/Code/Mantid/Framework/MDEvents/test/ConvToMDBaseTest.h b/Code/Mantid/Framework/MDAlgorithms/test/ConvToMDBaseTest.h similarity index 98% rename from Code/Mantid/Framework/MDEvents/test/ConvToMDBaseTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/ConvToMDBaseTest.h index 7338733713f..4a865829b5e 100644 --- a/Code/Mantid/Framework/MDEvents/test/ConvToMDBaseTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/ConvToMDBaseTest.h @@ -3,7 +3,7 @@ #include <cxxtest/TestSuite.h> #include "MantidTestHelpers/WorkspaceCreationHelper.h" -#include "MantidMDEvents/ConvToMDBase.h" +#include "MantidMDAlgorithms/ConvToMDBase.h" #include "MantidMDEvents/MDEventWSWrapper.h" //#include "MantidMDEvents/MDTransfDEHelper.h" diff --git a/Code/Mantid/Framework/MDEvents/test/ConvertToReflectometryQTest.h b/Code/Mantid/Framework/MDAlgorithms/test/ConvertToReflectometryQTest.h similarity index 99% rename from Code/Mantid/Framework/MDEvents/test/ConvertToReflectometryQTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/ConvertToReflectometryQTest.h index 23d5c82e284..75da7fe48b7 100644 --- a/Code/Mantid/Framework/MDEvents/test/ConvertToReflectometryQTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/ConvertToReflectometryQTest.h @@ -8,7 +8,7 @@ #include <iomanip> #include "MantidGeometry/Instrument/ReferenceFrame.h" #include "MantidTestHelpers/WorkspaceCreationHelper.h" -#include "MantidMDEvents/ConvertToReflectometryQ.h" +#include "MantidMDAlgorithms/ConvertToReflectometryQ.h" #include "MantidAPI/IMDEventWorkspace.h" #include "MantidAPI/NumericAxis.h" #include "MantidAPI/IMDWorkspace.h" diff --git a/Code/Mantid/Framework/MDEvents/test/FitMDTest.h b/Code/Mantid/Framework/MDAlgorithms/test/FitMDTest.h similarity index 100% rename from Code/Mantid/Framework/MDEvents/test/FitMDTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/FitMDTest.h diff --git a/Code/Mantid/Framework/MDEvents/test/ImportMDEventWorkspaceTest.h b/Code/Mantid/Framework/MDAlgorithms/test/ImportMDEventWorkspaceTest.h similarity index 99% rename from Code/Mantid/Framework/MDEvents/test/ImportMDEventWorkspaceTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/ImportMDEventWorkspaceTest.h index 9656a9f6cd9..ce443e8c64e 100644 --- a/Code/Mantid/Framework/MDEvents/test/ImportMDEventWorkspaceTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/ImportMDEventWorkspaceTest.h @@ -8,7 +8,7 @@ #include <iostream> #include <fstream> #include <iomanip> -#include "MantidMDEvents/ImportMDEventWorkspace.h" +#include "MantidMDAlgorithms/ImportMDEventWorkspace.h" #include "MantidKernel/ConfigService.h" #include <Poco/Path.h> diff --git a/Code/Mantid/Framework/MDEvents/test/ImportMDHistoWorkspaceTest.h b/Code/Mantid/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h similarity index 99% rename from Code/Mantid/Framework/MDEvents/test/ImportMDHistoWorkspaceTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h index 76c55f51752..1484fa5c644 100644 --- a/Code/Mantid/Framework/MDEvents/test/ImportMDHistoWorkspaceTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/ImportMDHistoWorkspaceTest.h @@ -7,7 +7,7 @@ #include <iostream> #include <iomanip> #include <fstream> -#include "MantidMDEvents/ImportMDHistoWorkspace.h" +#include "MantidMDAlgorithms/ImportMDHistoWorkspace.h" #include "MantidAPI/IMDHistoWorkspace.h" #include "MantidKernel/ConfigService.h" #include <Poco/Path.h> diff --git a/Code/Mantid/Framework/MDEvents/test/Integrate3DEventsTest.h b/Code/Mantid/Framework/MDAlgorithms/test/Integrate3DEventsTest.h similarity index 98% rename from Code/Mantid/Framework/MDEvents/test/Integrate3DEventsTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/Integrate3DEventsTest.h index be07d2a1a2c..4e8c94b1b4f 100644 --- a/Code/Mantid/Framework/MDEvents/test/Integrate3DEventsTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/Integrate3DEventsTest.h @@ -4,7 +4,7 @@ #include "MantidKernel/System.h" #include "MantidKernel/Timer.h" #include "MantidDataObjects/PeakShapeEllipsoid.h" -#include "MantidMDEvents/Integrate3DEvents.h" +#include "MantidMDAlgorithms/Integrate3DEvents.h" #include <cxxtest/TestSuite.h> #include <iomanip> #include <iostream> diff --git a/Code/Mantid/Framework/MDEvents/test/MDEventWSWrapperTest.h b/Code/Mantid/Framework/MDAlgorithms/test/MDEventWSWrapperTest.h similarity index 98% rename from Code/Mantid/Framework/MDEvents/test/MDEventWSWrapperTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/MDEventWSWrapperTest.h index 994b0e521d2..882bd3323c7 100644 --- a/Code/Mantid/Framework/MDEvents/test/MDEventWSWrapperTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/MDEventWSWrapperTest.h @@ -2,7 +2,7 @@ #define MANTID_MDEVENTS_WSWRAPPERTEST_H_ #include <cxxtest/TestSuite.h> -#include "MantidMDEvents/MDEventWSWrapper.h" +#include "MantidMDAlgorithms/MDEventWSWrapper.h" #include "MantidAPI/AnalysisDataService.h" #include "MantidGeometry/MDGeometry/MDTypes.h" diff --git a/Code/Mantid/Framework/MDEvents/test/MDTransfAxisNamesTest.h b/Code/Mantid/Framework/MDAlgorithms/test/MDTransfAxisNamesTest.h similarity index 96% rename from Code/Mantid/Framework/MDEvents/test/MDTransfAxisNamesTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/MDTransfAxisNamesTest.h index 6d28cf7b238..40888bc3ce8 100644 --- a/Code/Mantid/Framework/MDEvents/test/MDTransfAxisNamesTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/MDTransfAxisNamesTest.h @@ -2,7 +2,7 @@ #define MANTID_MDWS_DESCRIPTION_H_ #include <cxxtest/TestSuite.h> -#include "MantidMDEvents/MDTransfAxisNames.h" +#include "MantidMDAlgorithms/MDTransfAxisNames.h" using namespace Mantid::MDEvents; using namespace Mantid::Kernel; diff --git a/Code/Mantid/Framework/MDEvents/test/MDTransfFactoryTest.h b/Code/Mantid/Framework/MDAlgorithms/test/MDTransfFactoryTest.h similarity index 97% rename from Code/Mantid/Framework/MDEvents/test/MDTransfFactoryTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/MDTransfFactoryTest.h index 1324f4242ec..0637efde4c4 100644 --- a/Code/Mantid/Framework/MDEvents/test/MDTransfFactoryTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/MDTransfFactoryTest.h @@ -4,7 +4,7 @@ #include "MantidDataObjects/EventWorkspace.h" #include "MantidKernel/System.h" #include "MantidAPI/FrameworkManager.h" -#include "MantidMDEvents/MDTransfFactory.h" +#include "MantidMDAlgorithms/MDTransfFactory.h" #include <cxxtest/TestSuite.h> #include <iomanip> #include <iostream> diff --git a/Code/Mantid/Framework/MDEvents/test/MDTransfModQTest.h b/Code/Mantid/Framework/MDAlgorithms/test/MDTransfModQTest.h similarity index 100% rename from Code/Mantid/Framework/MDEvents/test/MDTransfModQTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/MDTransfModQTest.h diff --git a/Code/Mantid/Framework/MDEvents/test/MDTransfQ3DTest.h b/Code/Mantid/Framework/MDAlgorithms/test/MDTransfQ3DTest.h similarity index 97% rename from Code/Mantid/Framework/MDEvents/test/MDTransfQ3DTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/MDTransfQ3DTest.h index 37d72b98a93..73dc455aaa6 100644 --- a/Code/Mantid/Framework/MDEvents/test/MDTransfQ3DTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/MDTransfQ3DTest.h @@ -1,8 +1,8 @@ -#ifndef MANTID_MDEVENTS_MDTRANSFQ3D_H_ -#define MANTID_MDEVENTS_MDTRANSFQ3D_H_ +#ifndef MANTID_MDALGORITHMS_MDTRANSFQ3D_H_ +#define MANTID_MDALGORITHMS_MDTRANSFQ3D_H_ #include <cxxtest/TestSuite.h> -#include "MantidMDEvents/MDTransfQ3D.h" +#include "MantidMDAlgorithms/MDTransfQ3D.h" #include "MantidTestHelpers/WorkspaceCreationHelper.h" //#include "MantidMDEvents/MDTransfDEHelper.h" #include "MantidKernel/DeltaEMode.h" diff --git a/Code/Mantid/Framework/MDEvents/test/MDWSDescriptionTest.h b/Code/Mantid/Framework/MDAlgorithms/test/MDWSDescriptionTest.h similarity index 99% rename from Code/Mantid/Framework/MDEvents/test/MDWSDescriptionTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/MDWSDescriptionTest.h index 9ac56a7215b..ed29c28d96e 100644 --- a/Code/Mantid/Framework/MDEvents/test/MDWSDescriptionTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/MDWSDescriptionTest.h @@ -1,7 +1,7 @@ #ifndef MDEVENTS_MDWSDESCRIPTION_TEST_H #define MDEVENTS_MDWSDESCRIPTION_TEST_H -#include "MantidMDEvents/MDWSDescription.h" +#include "MantidMDAlgorithms/MDWSDescription.h" #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include "MantidKernel/SpecialCoordinateSystem.h" #include "MantidKernel/Exception.h" diff --git a/Code/Mantid/Framework/MDEvents/test/OneStepMDEWTest.h b/Code/Mantid/Framework/MDAlgorithms/test/OneStepMDEWTest.h similarity index 96% rename from Code/Mantid/Framework/MDEvents/test/OneStepMDEWTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/OneStepMDEWTest.h index 6f9c971be39..9c7f25acd58 100644 --- a/Code/Mantid/Framework/MDEvents/test/OneStepMDEWTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/OneStepMDEWTest.h @@ -7,7 +7,7 @@ #include <iostream> #include <iomanip> -#include "MantidMDEvents/OneStepMDEW.h" +#include "MantidMDAlgorithms/OneStepMDEW.h" #include "MantidMDEvents/MDEventWorkspace.h" #include "MantidAPI/IMDEventWorkspace.h" diff --git a/Code/Mantid/Framework/MDEvents/test/QueryMDWorkspaceTest.h b/Code/Mantid/Framework/MDAlgorithms/test/QueryMDWorkspaceTest.h similarity index 99% rename from Code/Mantid/Framework/MDEvents/test/QueryMDWorkspaceTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/QueryMDWorkspaceTest.h index e512e94cc59..cb99a5e02b1 100644 --- a/Code/Mantid/Framework/MDEvents/test/QueryMDWorkspaceTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/QueryMDWorkspaceTest.h @@ -8,7 +8,7 @@ #include <iomanip> #include <boost/shared_ptr.hpp> #include "MantidTestHelpers/MDEventsTestHelper.h" -#include "MantidMDEvents/QueryMDWorkspace.h" +#include "MantidMDAlgorithms/QueryMDWorkspace.h" #include "MantidAPI/ITableWorkspace.h" #include "MantidDataObjects/TableWorkspace.h" #include "MantidAPI/FrameworkManager.h" diff --git a/Code/Mantid/Framework/MDEvents/test/ReflectometryTransformKiKfTest.h b/Code/Mantid/Framework/MDAlgorithms/test/ReflectometryTransformKiKfTest.h similarity index 98% rename from Code/Mantid/Framework/MDEvents/test/ReflectometryTransformKiKfTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/ReflectometryTransformKiKfTest.h index 0623b8459d0..f942001e060 100644 --- a/Code/Mantid/Framework/MDEvents/test/ReflectometryTransformKiKfTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/ReflectometryTransformKiKfTest.h @@ -8,7 +8,7 @@ #include <iostream> #include <iomanip> -#include "MantidMDEvents/ReflectometryTransformKiKf.h" +#include "MantidMDAlgorithms/ReflectometryTransformKiKf.h" using namespace Mantid::MDEvents; diff --git a/Code/Mantid/Framework/MDEvents/test/ReflectometryTransformPTest.h b/Code/Mantid/Framework/MDAlgorithms/test/ReflectometryTransformPTest.h similarity index 98% rename from Code/Mantid/Framework/MDEvents/test/ReflectometryTransformPTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/ReflectometryTransformPTest.h index 16869709c7c..ae888ad608a 100644 --- a/Code/Mantid/Framework/MDEvents/test/ReflectometryTransformPTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/ReflectometryTransformPTest.h @@ -7,7 +7,7 @@ #include "MantidKernel/System.h" #include <iostream> #include <iomanip> -#include "MantidMDEvents/ReflectometryTransformP.h" +#include "MantidMDAlgorithms/ReflectometryTransformP.h" using namespace Mantid; using namespace Mantid::MDEvents; diff --git a/Code/Mantid/Framework/MDEvents/test/ReflectometryTransformQxQzTest.h b/Code/Mantid/Framework/MDAlgorithms/test/ReflectometryTransformQxQzTest.h similarity index 98% rename from Code/Mantid/Framework/MDEvents/test/ReflectometryTransformQxQzTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/ReflectometryTransformQxQzTest.h index 7447313ccae..8a756a9cb4b 100644 --- a/Code/Mantid/Framework/MDEvents/test/ReflectometryTransformQxQzTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/ReflectometryTransformQxQzTest.h @@ -8,7 +8,7 @@ #include <iostream> #include <iomanip> -#include "MantidMDEvents/ReflectometryTransformQxQz.h" +#include "MantidMDAlgorithms/ReflectometryTransformQxQz.h" using namespace Mantid; using namespace Mantid::MDEvents; diff --git a/Code/Mantid/Framework/MDEvents/test/SaveIsawQvectorTest.h b/Code/Mantid/Framework/MDAlgorithms/test/SaveIsawQvectorTest.h similarity index 97% rename from Code/Mantid/Framework/MDEvents/test/SaveIsawQvectorTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/SaveIsawQvectorTest.h index a2281c58d89..34ec2c03bb8 100644 --- a/Code/Mantid/Framework/MDEvents/test/SaveIsawQvectorTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/SaveIsawQvectorTest.h @@ -5,7 +5,7 @@ #include <Poco/File.h> #include "MantidAPI/AnalysisDataService.h" #include "MantidDataObjects/EventWorkspace.h" -#include "MantidMDEvents/SaveIsawQvector.h" +#include "MantidMDAlgorithms/SaveIsawQvector.h" #include "MantidTestHelpers/MDEventsTestHelper.h" using Mantid::API::AnalysisDataService; diff --git a/Code/Mantid/Framework/MDEvents/test/UnitsConversionHelperTest.h b/Code/Mantid/Framework/MDAlgorithms/test/UnitsConversionHelperTest.h similarity index 99% rename from Code/Mantid/Framework/MDEvents/test/UnitsConversionHelperTest.h rename to Code/Mantid/Framework/MDAlgorithms/test/UnitsConversionHelperTest.h index 24bf81fb103..efbefd1d4b7 100644 --- a/Code/Mantid/Framework/MDEvents/test/UnitsConversionHelperTest.h +++ b/Code/Mantid/Framework/MDAlgorithms/test/UnitsConversionHelperTest.h @@ -10,7 +10,7 @@ #include "MantidTestHelpers/WorkspaceCreationHelper.h" #include "MantidAPI/Progress.h" -#include "MantidMDEvents/UnitsConversionHelper.h" +#include "MantidMDAlgorithms/UnitsConversionHelper.h" #include "MantidMDEvents/MDWSDescription.h" using namespace Mantid; diff --git a/Code/Mantid/Framework/MDEvents/CMakeLists.txt b/Code/Mantid/Framework/MDEvents/CMakeLists.txt index 847388c0e78..e62fdd23280 100644 --- a/Code/Mantid/Framework/MDEvents/CMakeLists.txt +++ b/Code/Mantid/Framework/MDEvents/CMakeLists.txt @@ -1,35 +1,15 @@ # Source files set ( SRC_FILES # - src/BoxControllerSettingsAlgorithm.cpp src/CalculateReflectometryQBase.cpp - src/ConvToMDBase.cpp src/ConvToMDEventsWS.cpp src/ConvToMDHistoWS.cpp src/ConvToMDSelector.cpp - src/ConvertToReflectometryQ.cpp - src/FitMD.cpp - src/ImportMDEventWorkspace.cpp - src/ImportMDHistoWorkspace.cpp src/ImportMDHistoWorkspaceBase.cpp - src/Integrate3DEvents.cpp src/IntegrateEllipsoids.cpp - src/MDEventWSWrapper.cpp - src/MDTransfAxisNames.cpp - src/MDTransfFactory.cpp - src/MDTransfModQ.cpp src/MDTransfNoQ.cpp - src/MDTransfQ3D.cpp - src/MDWSDescription.cpp src/MDWSTransform.cpp - src/OneStepMDEW.cpp - src/QueryMDWorkspace.cpp src/ReflectometryTransform.cpp - src/ReflectometryTransformKiKf.cpp - src/ReflectometryTransformP.cpp - src/ReflectometryTransformQxQz.cpp - src/SaveIsawQvector.cpp - src/UnitsConversionHelper.cpp src/UserFunctionMD.cpp ) @@ -45,62 +25,23 @@ set ( SRC_UNITY_IGNORE_FILES # Header files set ( INC_FILES # - inc/MantidMDEvents/BoxControllerSettingsAlgorithm.h inc/MantidMDEvents/CalculateReflectometryQBase.h - inc/MantidMDEvents/ConvToMDBase.h inc/MantidMDEvents/ConvToMDEventsWS.h inc/MantidMDEvents/ConvToMDHistoWS.h inc/MantidMDEvents/ConvToMDSelector.h - inc/MantidMDEvents/ConvertToReflectometryQ.h - inc/MantidMDEvents/FitMD.h - inc/MantidMDEvents/ImportMDEventWorkspace.h - inc/MantidMDEvents/ImportMDHistoWorkspace.h inc/MantidMDEvents/ImportMDHistoWorkspaceBase.h - inc/MantidMDEvents/Integrate3DEvents.h inc/MantidMDEvents/IntegrateEllipsoids.h - inc/MantidMDEvents/MDEventWSWrapper.h - inc/MantidMDEvents/MDTransfAxisNames.h - inc/MantidMDEvents/MDTransfFactory.h inc/MantidMDEvents/MDTransfInterface.h - inc/MantidMDEvents/MDTransfModQ.h inc/MantidMDEvents/MDTransfNoQ.h - inc/MantidMDEvents/MDTransfQ3D.h - inc/MantidMDEvents/MDWSDescription.h inc/MantidMDEvents/MDWSTransform.h - inc/MantidMDEvents/OneStepMDEW.h - inc/MantidMDEvents/QueryMDWorkspace.h inc/MantidMDEvents/ReflectometryTransform.h - inc/MantidMDEvents/ReflectometryTransformKiKf.h - inc/MantidMDEvents/ReflectometryTransformP.h - inc/MantidMDEvents/ReflectometryTransformQxQz.h - inc/MantidMDEvents/SaveIsawQvector.h - inc/MantidMDEvents/UnitsConversionHelper.h inc/MantidMDEvents/UserFunctionMD.h ) # Test files. set ( TEST_FILES - BoxControllerSettingsAlgorithmTest.h - ConvertToReflectometryQTest.h - FitMDTest.h - ImportMDEventWorkspaceTest.h - ImportMDHistoWorkspaceTest.h - Integrate3DEventsTest.h - MDEventWSWrapperTest.h - MDTransfAxisNamesTest.h - MDTransfFactoryTest.h - MDTransfModQTest.h - MDTransfQ3DTest.h - MDWSDescriptionTest.h MDWSTransfTest.h - OneStepMDEWTest.h - QueryMDWorkspaceTest.h - ReflectometryTransformKiKfTest.h - ReflectometryTransformPTest.h - ReflectometryTransformQxQzTest.h - SaveIsawQvectorTest.h SkippingPolicyTest.h - UnitsConversionHelperTest.h ) -- GitLab