From ff80215352e4ce125d371842dba1ee2d0a902f1c Mon Sep 17 00:00:00 2001
From: Janik Zikovsky <zikovskyjl@ornl.gov>
Date: Tue, 4 Oct 2011 14:56:54 +0000
Subject: [PATCH] Fixes #3902: Algorithm Renamed.

---
 .../Framework/Algorithms/CMakeLists.txt       |  7 ++-----
 .../Framework/DataHandling/CMakeLists.txt     |  3 +++
 .../inc/MantidDataHandling/LoadIsawDetCal.h}  | 20 +++++++++----------
 .../src/LoadIsawDetCal.cpp}                   | 20 +++++++++----------
 .../test/LoadIsawDetCalTest.h}                |  7 +++----
 .../SNSSingleCrystalReduction.py              |  2 +-
 6 files changed, 29 insertions(+), 30 deletions(-)
 rename Code/Mantid/Framework/{Algorithms/inc/MantidAlgorithms/DiffractionEventReadDetCal.h => DataHandling/inc/MantidDataHandling/LoadIsawDetCal.h} (83%)
 rename Code/Mantid/Framework/{Algorithms/src/DiffractionEventReadDetCal.cpp => DataHandling/src/LoadIsawDetCal.cpp} (93%)
 rename Code/Mantid/Framework/{Algorithms/test/DiffractionEventReadDetCalTest.h => DataHandling/test/LoadIsawDetCalTest.h} (93%)

diff --git a/Code/Mantid/Framework/Algorithms/CMakeLists.txt b/Code/Mantid/Framework/Algorithms/CMakeLists.txt
index 257f6012056..3e323938b1f 100644
--- a/Code/Mantid/Framework/Algorithms/CMakeLists.txt
+++ b/Code/Mantid/Framework/Algorithms/CMakeLists.txt
@@ -50,7 +50,6 @@ set ( SRC_FILES
 	src/DetectorEfficiencyCor.cpp
 	src/DetectorEfficiencyVariation.cpp
 	src/DiffractionEventCalibrateDetectors.cpp
-	src/DiffractionEventReadDetCal.cpp
 	src/DiffractionFocussing.cpp
 	src/DiffractionFocussing2.cpp
 	src/Divide.cpp
@@ -120,8 +119,8 @@ set ( SRC_FILES
 	src/PowerLawCorrection.cpp
 	src/Q1D.cpp
 	src/Q1D2.cpp
-	src/Qhelper.cpp
 	src/Q1DWeighted.cpp
+	src/Qhelper.cpp
 	src/Qxy.cpp
 	src/RayTracerTester.cpp
 	src/ReadGroupsFromFile.cpp
@@ -218,7 +217,6 @@ set ( INC_FILES
 	inc/MantidAlgorithms/DetectorEfficiencyCor.h
 	inc/MantidAlgorithms/DetectorEfficiencyVariation.h
 	inc/MantidAlgorithms/DiffractionEventCalibrateDetectors.h
-	inc/MantidAlgorithms/DiffractionEventReadDetCal.h
 	inc/MantidAlgorithms/DiffractionFocussing.h
 	inc/MantidAlgorithms/DiffractionFocussing2.h
 	inc/MantidAlgorithms/Divide.h
@@ -289,8 +287,8 @@ set ( INC_FILES
 	inc/MantidAlgorithms/PowerLawCorrection.h
 	inc/MantidAlgorithms/Q1D.h
 	inc/MantidAlgorithms/Q1D2.h
-	inc/MantidAlgorithms/Qhelper.h
 	inc/MantidAlgorithms/Q1DWeighted.h
+	inc/MantidAlgorithms/Qhelper.h
 	inc/MantidAlgorithms/Qxy.h
 	inc/MantidAlgorithms/RayTracerTester.h
 	inc/MantidAlgorithms/ReadGroupsFromFile.h
@@ -384,7 +382,6 @@ set ( TEST_FILES
 	test/DetectorEfficiencyCorTest.h
 	test/DetectorEfficiencyVariationTest.h
 	test/DiffractionEventCalibrateDetectorsTest.h
-	test/DiffractionEventReadDetCalTest.h
 	test/DiffractionFocussing2Test.h
 	test/DiffractionFocussingTest.h
 	test/DivideTest.h
diff --git a/Code/Mantid/Framework/DataHandling/CMakeLists.txt b/Code/Mantid/Framework/DataHandling/CMakeLists.txt
index 87a8b92727e..ac823b7111f 100644
--- a/Code/Mantid/Framework/DataHandling/CMakeLists.txt
+++ b/Code/Mantid/Framework/DataHandling/CMakeLists.txt
@@ -30,6 +30,7 @@ set ( SRC_FILES
 	src/LoadInstrument.cpp
 	src/LoadInstrumentFromNexus.cpp
 	src/LoadInstrumentFromRaw.cpp
+	src/LoadIsawDetCal.cpp
 	src/LoadLOQDistancesFromRaw.cpp
 	src/LoadLog.cpp
 	src/LoadLogsForSNSPulsedMagnet.cpp
@@ -127,6 +128,7 @@ set ( INC_FILES
 	inc/MantidDataHandling/LoadInstrument.h
 	inc/MantidDataHandling/LoadInstrumentFromNexus.h
 	inc/MantidDataHandling/LoadInstrumentFromRaw.h
+	inc/MantidDataHandling/LoadIsawDetCal.h
 	inc/MantidDataHandling/LoadLOQDistancesFromRaw.h
 	inc/MantidDataHandling/LoadLog.h
 	inc/MantidDataHandling/LoadLogsForSNSPulsedMagnet.h
@@ -219,6 +221,7 @@ set ( TEST_FILES
 	test/LoadISISNexusTest.h
 	test/LoadInstrumentFromRawTest.h
 	test/LoadInstrumentTest.h
+	test/LoadIsawDetCalTest.h
 	test/LoadLogTest.h
 	test/LoadLogsFromSNSNexusTest.h
 	test/LoadMappingTableTest.h
diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/DiffractionEventReadDetCal.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadIsawDetCal.h
similarity index 83%
rename from Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/DiffractionEventReadDetCal.h
rename to Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadIsawDetCal.h
index 3716e42b96a..fd23e7e1e82 100644
--- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/DiffractionEventReadDetCal.h
+++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadIsawDetCal.h
@@ -1,5 +1,5 @@
-#ifndef MANTID_ALGORITHMS_DIFFRACTIONEVENTREADDETCAL_H_
-#define MANTID_ALGORITHMS_DIFFRACTIONEVENTREADDETCAL_H_
+#ifndef MANTID_DATAHANDLING_LOADISAWDETCAL_H_
+#define MANTID_DATAHANDLING_LOADISAWDETCAL_H_
 /*WIKI* 
 
 
@@ -9,10 +9,10 @@ Moves the detectors in an instrument using the origin and 2 vectors of the rotat
 
 ==Usage==
 '''Python'''
-    DiffractionEventReadDetCal("SNAP_4111","SNAP.DetCal")
+    LoadIsawDetCal("SNAP_4111","SNAP.DetCal")
 
 '''C++'''
-    IAlgorithm* alg = FrameworkManager::Instance().createAlgorithm("DiffractionEventReadDetCal");
+    IAlgorithm* alg = FrameworkManager::Instance().createAlgorithm("LoadIsawDetCal");
     alg->setPropertyValue("InputWorkspace", "SNAP_4111");
     alg->setPropertyValue("Filename", "SNAP.DetCal");
     alg->execute();
@@ -31,7 +31,7 @@ Moves the detectors in an instrument using the origin and 2 vectors of the rotat
 
 namespace Mantid
 {
-namespace Algorithms
+namespace DataHandling
 {
 /**
  Find the offsets for each detector
@@ -59,15 +59,15 @@ namespace Algorithms
  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 DiffractionEventReadDetCal: public API::Algorithm, public Kernel::Quat
+class DLLExport LoadIsawDetCal: public API::Algorithm, public Kernel::Quat
 {
 public:
   /// Default constructor
-  DiffractionEventReadDetCal();
+  LoadIsawDetCal();
   /// Destructor
-  virtual ~DiffractionEventReadDetCal();
+  virtual ~LoadIsawDetCal();
   /// Algorithm's name for identification overriding a virtual method
-  virtual const std::string name() const { return "DiffractionEventReadDetCal"; }
+  virtual const std::string name() const { return "LoadIsawDetCal"; }
   /// Algorithm's version for identification overriding a virtual method
   virtual int version() const { return 1; }
   /// Algorithm's category for identification overriding a virtual method
@@ -85,7 +85,7 @@ private:
 
 };
 
-} // namespace Algorithms
+} // namespace DataHandling
 } // namespace Mantid
 
 #endif /*MANTID_ALGORITHM_DIFFRACTIONEVENTREADDETCAL_H_*/
diff --git a/Code/Mantid/Framework/Algorithms/src/DiffractionEventReadDetCal.cpp b/Code/Mantid/Framework/DataHandling/src/LoadIsawDetCal.cpp
similarity index 93%
rename from Code/Mantid/Framework/Algorithms/src/DiffractionEventReadDetCal.cpp
rename to Code/Mantid/Framework/DataHandling/src/LoadIsawDetCal.cpp
index 928b193c92b..e507a1466b3 100644
--- a/Code/Mantid/Framework/Algorithms/src/DiffractionEventReadDetCal.cpp
+++ b/Code/Mantid/Framework/DataHandling/src/LoadIsawDetCal.cpp
@@ -1,7 +1,7 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
-#include "MantidAlgorithms/DiffractionEventReadDetCal.h"
+#include "MantidDataHandling/LoadIsawDetCal.h"
 #include "MantidAPI/FileProperty.h"
 #include "MantidAPI/TableRow.h"
 #include "MantidDataObjects/Workspace2D.h"
@@ -22,14 +22,14 @@
 
 namespace Mantid
 {
-namespace Algorithms
+namespace DataHandling
 {
 
   // Register the class into the algorithm factory
-  DECLARE_ALGORITHM(DiffractionEventReadDetCal)
+  DECLARE_ALGORITHM(LoadIsawDetCal)
   
   /// Sets documentation strings for this algorithm
-  void DiffractionEventReadDetCal::initDocs()
+  void LoadIsawDetCal::initDocs()
   {
     this->setWikiSummary("Since ISAW already has the capability to calibrate the instrument using single crystal peaks, this algorithm leverages this in mantid. It loads in a detcal file from ISAW and moves all of the detector panels accordingly. The target instruments for this feature are SNAP and TOPAZ. ");
     this->setOptionalMessage("Since ISAW already has the capability to calibrate the instrument using single crystal peaks, this algorithm leverages this in mantid. It loads in a detcal file from ISAW and moves all of the detector panels accordingly. The target instruments for this feature are SNAP and TOPAZ.");
@@ -42,12 +42,12 @@ namespace Algorithms
   using namespace DataObjects;
 
     /// Constructor
-    DiffractionEventReadDetCal::DiffractionEventReadDetCal() :
+    LoadIsawDetCal::LoadIsawDetCal() :
       API::Algorithm()
     {}
 
     /// Destructor
-    DiffractionEventReadDetCal::~DiffractionEventReadDetCal()
+    LoadIsawDetCal::~LoadIsawDetCal()
     {}
 
 
@@ -61,7 +61,7 @@ namespace Algorithms
  * @param inname :: The workspace name
  */
 
-  void DiffractionEventReadDetCal::center(double x, double y, double z, std::string detname, std::string inname)
+  void LoadIsawDetCal::center(double x, double y, double z, std::string detname, std::string inname)
   {
 
     MatrixWorkspace_sptr inputW = boost::dynamic_pointer_cast<MatrixWorkspace>
@@ -79,7 +79,7 @@ namespace Algorithms
 
   /** Initialisation method
   */
-  void DiffractionEventReadDetCal::init()
+  void LoadIsawDetCal::init()
   {
   declareProperty(
     new WorkspaceProperty<MatrixWorkspace>("InputWorkspace","",Direction::Input,new InstrumentValidator<>),
@@ -100,7 +100,7 @@ namespace Algorithms
   *
   *  @throw runtime_error Thrown if algorithm cannot execute
   */
-  void DiffractionEventReadDetCal::exec()
+  void LoadIsawDetCal::exec()
   {
 
     // Get the input workspace
@@ -174,7 +174,7 @@ namespace Algorithms
 
 
     if (detList.size() == 0)
-      throw std::runtime_error("This instrument does not have any RectangularDetector's. DiffractionEventReadDetCal cannot operate on this instrument at this time.");
+      throw std::runtime_error("This instrument does not have any RectangularDetector's. LoadIsawDetCal cannot operate on this instrument at this time.");
 
     while(std::getline(input, line)) 
     {
diff --git a/Code/Mantid/Framework/Algorithms/test/DiffractionEventReadDetCalTest.h b/Code/Mantid/Framework/DataHandling/test/LoadIsawDetCalTest.h
similarity index 93%
rename from Code/Mantid/Framework/Algorithms/test/DiffractionEventReadDetCalTest.h
rename to Code/Mantid/Framework/DataHandling/test/LoadIsawDetCalTest.h
index 09b10215450..981593e10e5 100644
--- a/Code/Mantid/Framework/Algorithms/test/DiffractionEventReadDetCalTest.h
+++ b/Code/Mantid/Framework/DataHandling/test/LoadIsawDetCalTest.h
@@ -3,7 +3,7 @@
 
 #include <cxxtest/TestSuite.h>
 
-#include "MantidAlgorithms/DiffractionEventReadDetCal.h"
+#include "MantidDataHandling/LoadIsawDetCal.h"
 #include "MantidDataHandling/LoadEmptyInstrument.h"
 #include "MantidAPI/WorkspaceFactory.h"
 #include "MantidGeometry/Instrument.h"
@@ -24,13 +24,12 @@
 #include <vector>
 
 using namespace Mantid::API;
-using namespace Mantid::Algorithms;
 using namespace Mantid::Kernel;
 using namespace Mantid::Geometry;
 using namespace Mantid::DataHandling;
 using namespace Mantid::DataObjects;
 
-class DiffractionEventReadDetCalTest : public CxxTest::TestSuite
+class LoadIsawDetCalTest : public CxxTest::TestSuite
 {
 public:
 
@@ -48,7 +47,7 @@ public:
     loaderCAL.execute();
     loaderCAL.isExecuted();
 
-    DiffractionEventReadDetCal testerCAL;
+    LoadIsawDetCal testerCAL;
 
     TS_ASSERT_THROWS_NOTHING(testerCAL.initialize());
     TS_ASSERT_THROWS_NOTHING(testerCAL.isInitialized());
diff --git a/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/SNSSingleCrystalReduction.py b/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/SNSSingleCrystalReduction.py
index 78b37bc681a..7da04f50ef5 100755
--- a/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/SNSSingleCrystalReduction.py
+++ b/Code/Mantid/Framework/PythonAPI/PythonAlgorithms/SNSSingleCrystalReduction.py
@@ -70,7 +70,7 @@ class SNSSingleCrystalReduction(PythonAlgorithm):
     def _loadNeXusData(self, filename, name, bank, extension, **kwargs):
         alg = LoadEventNexus(Filename=filename, OutputWorkspace=name, BankName=bank, SingleBankPixelsOnly=0, FilterByTofMin=self._binning[0], FilterByTofMax=self._binning[2], LoadMonitors=True, MonitorsAsEvents=True, **kwargs)
         wksp = alg['OutputWorkspace']
-        #DiffractionEventReadDetCal(InputWorkspace=wksp,Filename="TOPAZ_8Sept11.DetCal")
+        #LoadIsawDetCal(InputWorkspace=wksp,Filename="TOPAZ_8Sept11.DetCal")
         #Normalise by sum of counts in upstream monitor
         Integration(InputWorkspace=mtd[str(name)+'_monitors'], OutputWorkspace='Mon', RangeLower=self._binning[0], RangeUpper=self._binning[2], EndWorkspaceIndex=0)
         mtd.deleteWorkspace(str(name)+'_monitors')
-- 
GitLab