From 41a4640ff5dc1709f52c27fbf647289c54a6fb81 Mon Sep 17 00:00:00 2001 From: Vickie Lynch <lynchve@ornl.gov> Date: Tue, 17 Jul 2012 10:31:18 -0400 Subject: [PATCH] Refs #5549 move to WorkflowAlgorithms --- .../Framework/Algorithms/CMakeLists.txt | 2 -- .../WorkflowAlgorithms/CMakeLists.txt | 2 ++ .../AlignAndFocusPowder.h | 27 ++++++------------- .../src/AlignAndFocusPowder.cpp | 12 +++------ 4 files changed, 13 insertions(+), 30 deletions(-) rename Code/Mantid/Framework/{Algorithms/inc/MantidAlgorithms => WorkflowAlgorithms/inc/MantidWorkflowAlgorithms}/AlignAndFocusPowder.h (78%) rename Code/Mantid/Framework/{Algorithms => WorkflowAlgorithms}/src/AlignAndFocusPowder.cpp (97%) diff --git a/Code/Mantid/Framework/Algorithms/CMakeLists.txt b/Code/Mantid/Framework/Algorithms/CMakeLists.txt index dede0b55c11..4dc0b759740 100644 --- a/Code/Mantid/Framework/Algorithms/CMakeLists.txt +++ b/Code/Mantid/Framework/Algorithms/CMakeLists.txt @@ -3,7 +3,6 @@ set ( SRC_FILES src/AbsorptionCorrection.cpp src/AddLogDerivative.cpp src/AddSampleLog.cpp - src/AlignAndFocusPowder.cpp src/AlignDetectors.cpp src/AlphaCalc.cpp src/AnyShapeAbsorption.cpp @@ -199,7 +198,6 @@ set ( INC_FILES inc/MantidAlgorithms/AbsorptionCorrection.h inc/MantidAlgorithms/AddLogDerivative.h inc/MantidAlgorithms/AddSampleLog.h - inc/MantidAlgorithms/AlignAndFocusPowder.h inc/MantidAlgorithms/AlignDetectors.h inc/MantidAlgorithms/AlphaCalc.h inc/MantidAlgorithms/AnyShapeAbsorption.h diff --git a/Code/Mantid/Framework/WorkflowAlgorithms/CMakeLists.txt b/Code/Mantid/Framework/WorkflowAlgorithms/CMakeLists.txt index d3b80449829..495b38e400c 100644 --- a/Code/Mantid/Framework/WorkflowAlgorithms/CMakeLists.txt +++ b/Code/Mantid/Framework/WorkflowAlgorithms/CMakeLists.txt @@ -1,4 +1,5 @@ set ( SRC_FILES + src/AlignAndFocusPowder.cpp src/ComputeSensitivity.cpp src/DgsConvertToEnergyTransfer.cpp src/DgsReduction.cpp @@ -24,6 +25,7 @@ set ( SRC_UNITY_IGNORE_FILES ) set ( INC_FILES + inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h inc/MantidWorkflowAlgorithms/ComputeSensitivity.h inc/MantidWorkflowAlgorithms/DgsConvertToEnergyTransfer.h inc/MantidWorkflowAlgorithms/DgsReduction.h diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/AlignAndFocusPowder.h b/Code/Mantid/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h similarity index 78% rename from Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/AlignAndFocusPowder.h rename to Code/Mantid/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h index dca1142daf8..400fc1c2b6f 100644 --- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/AlignAndFocusPowder.h +++ b/Code/Mantid/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/AlignAndFocusPowder.h @@ -5,14 +5,12 @@ // Includes //---------------------------------------------------------------------- #include "MantidAPI/Algorithm.h" -#include "MantidAPI/DeprecatedAlgorithm.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidDataObjects/EventWorkspace.h" -#include <Poco/NObserver.h> namespace Mantid { - namespace Algorithms + namespace WorkflowAlgorithms { /** This is a parent algorithm that uses several different child algorithms to perform it's task. @@ -20,24 +18,15 @@ namespace Mantid The input workspace is 1) Converted to d-spacing units - 2) Rebinnned to a common set of bins + 2) Rebinned to a common set of bins 3) The spectra are grouped according to the grouping file. Required Properties: <UL> <LI> InputWorkspace - The name of the 2D Workspace to take as input </LI> - <LI> GroupingFileName - The path to a grouping file</LI> <LI> OutputWorkspace - The name of the 2D workspace in which to store the result </LI> </UL> - The structure of the grouping file is as follows: - # Format: number UDET offset select group - 0 611 0.0000000 1 0 - 1 612 0.0000000 1 0 - 2 601 0.0000000 0 0 - 3 602 0.0000000 0 0 - 4 621 0.0000000 1 0 - @author Vickie Lynch, SNS @date 07/16/2012 @@ -62,19 +51,19 @@ namespace Mantid File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ - class DLLExport AlignAndFocusPowder : public API::Algorithm, public API::DeprecatedAlgorithm + class DLLExport AlignAndFocusPowder : public API::Algorithm { public: - /// Constructor - AlignAndFocusPowder(); + /// Empty Constructor + AlignAndFocusPowder() : API::Algorithm() {} /// Destructor - virtual ~AlignAndFocusPowder() {}; + virtual ~AlignAndFocusPowder() {} /// Algorithm's name for identification overriding a virtual method virtual const std::string name() const { return "AlignAndFocusPowder";} /// Algorithm's version for identification overriding a virtual method virtual int version() const { return 1;} /// Algorithm's category for identification overriding a virtual method - virtual const std::string category() const { return "Diffraction";} + virtual const std::string category() const { return "Workflow\\Diffraction";} private: /// Sets documentation strings for this algorithm @@ -89,7 +78,7 @@ namespace Mantid }; - } // namespace Algorithm + } // namespace WorkflowAlgorithm } // namespace Mantid #endif /*MANTID_ALGORITHM_AlignAndFocusPowder_H_*/ diff --git a/Code/Mantid/Framework/Algorithms/src/AlignAndFocusPowder.cpp b/Code/Mantid/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp similarity index 97% rename from Code/Mantid/Framework/Algorithms/src/AlignAndFocusPowder.cpp rename to Code/Mantid/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp index 4888a9b4fd1..f0236289703 100644 --- a/Code/Mantid/Framework/Algorithms/src/AlignAndFocusPowder.cpp +++ b/Code/Mantid/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp @@ -4,7 +4,7 @@ //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- -#include "MantidAlgorithms/AlignAndFocusPowder.h" +#include "MantidWorkflowAlgorithms/AlignAndFocusPowder.h" #include "MantidAPI/FileProperty.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidDataObjects/GroupingWorkspace.h" @@ -20,18 +20,12 @@ using namespace Mantid::DataObjects; namespace Mantid { -namespace Algorithms +namespace WorkflowAlgorithms { // Register the class into the algorithm factory DECLARE_ALGORITHM(AlignAndFocusPowder) -/// Constructor -AlignAndFocusPowder::AlignAndFocusPowder() : API::Algorithm(), API::DeprecatedAlgorithm() -{ - this->useAlgorithm("AlignAndFocusPowder version 2"); -} - /// Sets documentation strings for this algorithm void AlignAndFocusPowder::initDocs() { @@ -269,5 +263,5 @@ void AlignAndFocusPowder::execEvent() } -} // namespace Algorithm +} // namespace WorkflowAlgorithm } // namespace Mantid -- GitLab