From e6c0b83f5980f9ee8323be4df78865b2ac79d394 Mon Sep 17 00:00:00 2001
From: Stuart Campbell <campbellsi@ornl.gov>
Date: Fri, 10 Jun 2011 19:23:44 +0000
Subject: [PATCH] Moved LoadEventNexus (and LoadSNSEventNexus) from Nexus to
 DataHandling. refs #2822

---
 .../Framework/Algorithms/test/MemoryLeakTest.h       |  2 +-
 .../Framework/Algorithms/test/SumNeighboursTest.h    |  2 +-
 Code/Mantid/Framework/DataHandling/CMakeLists.txt    |  6 ++++++
 .../inc/MantidDataHandling}/LoadEventNexus.h         | 10 +++++-----
 .../inc/MantidDataHandling}/LoadSNSEventNexus.h      | 12 ++++++------
 .../{Nexus => DataHandling}/src/LoadEventNexus.cpp   |  6 +++---
 .../src/LoadSNSEventNexus.cpp                        |  6 +++---
 .../test/LoadEventNexusTest.h                        |  3 ++-
 .../test/LoadSNSEventNexusTest.h                     |  3 ++-
 Code/Mantid/Framework/Nexus/CMakeLists.txt           |  6 ------
 .../Framework/Nexus/test/SaveNexusProcessedTest.h    |  4 ++--
 11 files changed, 31 insertions(+), 29 deletions(-)
 rename Code/Mantid/Framework/{Nexus/inc/MantidNexus => DataHandling/inc/MantidDataHandling}/LoadEventNexus.h (95%)
 rename Code/Mantid/Framework/{Nexus/inc/MantidNexus => DataHandling/inc/MantidDataHandling}/LoadSNSEventNexus.h (89%)
 rename Code/Mantid/Framework/{Nexus => DataHandling}/src/LoadEventNexus.cpp (99%)
 rename Code/Mantid/Framework/{Nexus => DataHandling}/src/LoadSNSEventNexus.cpp (90%)
 rename Code/Mantid/Framework/{Nexus => DataHandling}/test/LoadEventNexusTest.h (99%)
 rename Code/Mantid/Framework/{Nexus => DataHandling}/test/LoadSNSEventNexusTest.h (94%)

diff --git a/Code/Mantid/Framework/Algorithms/test/MemoryLeakTest.h b/Code/Mantid/Framework/Algorithms/test/MemoryLeakTest.h
index ad14876d8d9..02cfae93907 100644
--- a/Code/Mantid/Framework/Algorithms/test/MemoryLeakTest.h
+++ b/Code/Mantid/Framework/Algorithms/test/MemoryLeakTest.h
@@ -5,7 +5,7 @@
 #include "MantidAPI/WorkspaceGroup.h"
 #include <iostream>
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"
-#include "MantidNexus/LoadSNSEventNexus.h"
+#include "MantidDataHandling/LoadSNSEventNexus.h"
 #include "MantidAPI/AnalysisDataService.h"
 #include "MantidAPI/AlgorithmManager.h"
 #include "MantidAPI/MatrixWorkspace.h"
diff --git a/Code/Mantid/Framework/Algorithms/test/SumNeighboursTest.h b/Code/Mantid/Framework/Algorithms/test/SumNeighboursTest.h
index be2900c1776..1f6e1f68a4d 100644
--- a/Code/Mantid/Framework/Algorithms/test/SumNeighboursTest.h
+++ b/Code/Mantid/Framework/Algorithms/test/SumNeighboursTest.h
@@ -8,7 +8,7 @@
 #include "MantidAPI/WorkspaceFactory.h"
 #include "MantidAPI/SpectraDetectorMap.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidNexus/LoadSNSEventNexus.h"
+#include "MantidDataHandling/LoadSNSEventNexus.h"
 
 using namespace Mantid::API;
 using namespace Mantid::Geometry;
diff --git a/Code/Mantid/Framework/DataHandling/CMakeLists.txt b/Code/Mantid/Framework/DataHandling/CMakeLists.txt
index ea23991024d..5915cd75b30 100644
--- a/Code/Mantid/Framework/DataHandling/CMakeLists.txt
+++ b/Code/Mantid/Framework/DataHandling/CMakeLists.txt
@@ -21,6 +21,7 @@ set ( SRC_FILES
 	src/LoadDetectorInfo.cpp
 	src/LoadDspacemap.cpp
 	src/LoadEmptyInstrument.cpp
+	src/LoadEventNexus.cpp
 	src/LoadEventPreNeXus.cpp
 	src/LoadGSS.cpp
 	src/LoadInstrument.cpp
@@ -51,6 +52,7 @@ set ( SRC_FILES
 	src/LoadSNSspec.cpp
 	src/LoadSPE.cpp
 	src/LoadSampleDetailsFromRaw.cpp
+	src/LoadSNSEventNexus.cpp
 	src/LoadSpec.cpp
 	src/LoadSpice2D.cpp
 	src/ManagedRawFileWorkspace2D.cpp
@@ -103,6 +105,7 @@ set ( INC_FILES
 	inc/MantidDataHandling/LoadDetectorInfo.h
 	inc/MantidDataHandling/LoadDspacemap.h
 	inc/MantidDataHandling/LoadEmptyInstrument.h
+	inc/MantidDataHandling/LoadEventNexus.h
 	inc/MantidDataHandling/LoadEventPreNeXus.h
 	inc/MantidDataHandling/LoadGSS.h
 	inc/MantidDataHandling/LoadInstrument.h
@@ -123,6 +126,7 @@ set ( INC_FILES
 	inc/MantidDataHandling/LoadSNSspec.h
 	inc/MantidDataHandling/LoadSPE.h
 	inc/MantidDataHandling/LoadSampleDetailsFromRaw.h
+	inc/MantidDataHandling/LoadSNSEventNexus.h
 	inc/MantidDataHandling/LoadSpec.h
 	inc/MantidDataHandling/LoadSpice2D.h
 	inc/MantidDataHandling/ManagedRawFileWorkspace2D.h
@@ -172,6 +176,7 @@ set ( TEST_FILES
 	test/LoadDetectorInfoTest.h
 	test/LoadDspacemapTest.h
 	test/LoadEmptyInstrumentTest.h
+	test/LoadEventNexusTest.h
 	test/LoadEventPreNeXusTest.h
 	test/LoadInstrumentFromRawTest.h
 	test/LoadInstrumentHelperTest.h
@@ -186,6 +191,7 @@ set ( TEST_FILES
 	test/LoadRawBin0Test.h
 	test/LoadRawSpectrum0Test.h
 	test/LoadRawTest.h
+	test/LoadSNSEventNexusTest.h
 	test/LoadSNSspecTest.h
 	test/LoadSPETest.h
 	test/LoadSaveAsciiTest.h
diff --git a/Code/Mantid/Framework/Nexus/inc/MantidNexus/LoadEventNexus.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h
similarity index 95%
rename from Code/Mantid/Framework/Nexus/inc/MantidNexus/LoadEventNexus.h
rename to Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h
index c1b263453d1..2c63a09eb70 100644
--- a/Code/Mantid/Framework/Nexus/inc/MantidNexus/LoadEventNexus.h
+++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h
@@ -1,5 +1,5 @@
-#ifndef MANTID_NEXUS_LOADEVENTNEXUS_H_
-#define MANTID_NEXUS_LOADEVENTNEXUS_H_
+#ifndef MANTID_DATAHANDLING_LOADEVENTNEXUS_H_
+#define MANTID_DATAHANDLING_LOADEVENTNEXUS_H_
 
 //----------------------------------------------------------------------
 // Includes
@@ -19,7 +19,7 @@
 namespace Mantid
 {
 
-  namespace NeXus
+  namespace DataHandling
   {
     /** @class LoadEventNexus LoadEventNexus.h Nexus/LoadEventNexus.h
 
@@ -139,8 +139,8 @@ namespace Mantid
 
     };
 
-  } // namespace NeXus
+  } // namespace DataHandling
 } // namespace Mantid
 
-#endif /*MANTID_NEXUS_LOADEVENTNEXUS_H_*/
+#endif /*MANTID_DATAHANDLING_LOADEVENTNEXUS_H_*/
 
diff --git a/Code/Mantid/Framework/Nexus/inc/MantidNexus/LoadSNSEventNexus.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSNSEventNexus.h
similarity index 89%
rename from Code/Mantid/Framework/Nexus/inc/MantidNexus/LoadSNSEventNexus.h
rename to Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSNSEventNexus.h
index 575d44028c0..10372fa8f3e 100644
--- a/Code/Mantid/Framework/Nexus/inc/MantidNexus/LoadSNSEventNexus.h
+++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSNSEventNexus.h
@@ -1,5 +1,5 @@
-#ifndef MANTID_NEXUS_LOADSNSEVENTNEXUS_H_
-#define MANTID_NEXUS_LOADSNSEVENTNEXUS_H_
+#ifndef MANTID_DATAHANDLING_LOADSNSEVENTNEXUS_H_
+#define MANTID_DATAHANDLING_LOADSNSEVENTNEXUS_H_
 
 //----------------------------------------------------------------------
 // Includes
@@ -7,7 +7,7 @@
 #include "MantidAPI/IDataFileChecker.h"
 #include "MantidAPI/DeprecatedAlgorithm.h"
 #include "MantidNexus/NexusClasses.h"
-#include "MantidNexus/LoadEventNexus.h"
+#include "MantidDataHandling/LoadEventNexus.h"
 #include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/Sample.h"
 #include "MantidDataObjects/Workspace2D.h"
@@ -17,7 +17,7 @@
 namespace Mantid
 {
 
-  namespace NeXus
+  namespace DataHandling
   {
     /** @class LoadSNSEventNexus LoadSNSEventNexus.h Nexus/LoadSNSEventNexus.h
 
@@ -71,8 +71,8 @@ namespace Mantid
 
     };
 
-  } // namespace NeXus
+  } // namespace DataHandling
 } // namespace Mantid
 
-#endif /*MANTID_NEXUS_LOADSNSEVENTNEXUS_H_*/
+#endif /*MANTID_DATAHANDLING_LOADSNSEVENTNEXUS_H_*/
 
diff --git a/Code/Mantid/Framework/Nexus/src/LoadEventNexus.cpp b/Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp
similarity index 99%
rename from Code/Mantid/Framework/Nexus/src/LoadEventNexus.cpp
rename to Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp
index aa3b661b7bc..03f7d1a0fc6 100644
--- a/Code/Mantid/Framework/Nexus/src/LoadEventNexus.cpp
+++ b/Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp
@@ -1,7 +1,7 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
-#include "MantidNexus/LoadEventNexus.h"
+#include "MantidDataHandling/LoadEventNexus.h"
 #include "MantidGeometry/IInstrument.h"
 #include "MantidGeometry/Instrument/CompAssembly.h"
 #include "MantidKernel/ConfigService.h"
@@ -33,7 +33,7 @@ using namespace Mantid::Kernel;
 
 namespace Mantid
 {
-namespace NeXus
+namespace DataHandling
 {
 
 DECLARE_ALGORITHM(LoadEventNexus)
@@ -1152,5 +1152,5 @@ Geometry::ISpectraDetectorMap * LoadEventNexus::loadSpectraMapping(const std::st
 }
 
 
-} // namespace NeXus
+} // namespace DataHandling
 } // namespace Mantid
diff --git a/Code/Mantid/Framework/Nexus/src/LoadSNSEventNexus.cpp b/Code/Mantid/Framework/DataHandling/src/LoadSNSEventNexus.cpp
similarity index 90%
rename from Code/Mantid/Framework/Nexus/src/LoadSNSEventNexus.cpp
rename to Code/Mantid/Framework/DataHandling/src/LoadSNSEventNexus.cpp
index 53357185fda..6f85d813c0b 100644
--- a/Code/Mantid/Framework/Nexus/src/LoadSNSEventNexus.cpp
+++ b/Code/Mantid/Framework/DataHandling/src/LoadSNSEventNexus.cpp
@@ -1,7 +1,7 @@
 //----------------------------------------------------------------------
 // Includes
 //----------------------------------------------------------------------
-#include "MantidNexus/LoadSNSEventNexus.h"
+#include "MantidDataHandling/LoadSNSEventNexus.h"
 #include "MantidAPI/LoadAlgorithmFactory.h" // For the DECLARE_LOADALGORITHM macro
 
 using namespace ::NeXus;
@@ -10,7 +10,7 @@ using namespace Mantid::DataObjects;
 
 namespace Mantid
 {
-namespace NeXus
+namespace DataHandling
 {
 
 DECLARE_ALGORITHM(LoadSNSEventNexus)
@@ -43,5 +43,5 @@ int LoadSNSEventNexus::fileCheck(const std::string& filePath)
   return 0;
 }
 
-} // namespace NeXus
+} // namespace DataHandling
 } // namespace Mantid
diff --git a/Code/Mantid/Framework/Nexus/test/LoadEventNexusTest.h b/Code/Mantid/Framework/DataHandling/test/LoadEventNexusTest.h
similarity index 99%
rename from Code/Mantid/Framework/Nexus/test/LoadEventNexusTest.h
rename to Code/Mantid/Framework/DataHandling/test/LoadEventNexusTest.h
index badac4d37fe..b538fd69274 100644
--- a/Code/Mantid/Framework/Nexus/test/LoadEventNexusTest.h
+++ b/Code/Mantid/Framework/DataHandling/test/LoadEventNexusTest.h
@@ -15,7 +15,7 @@
 #include "MantidKernel/Property.h"
 #include "MantidKernel/Timer.h"
 #include "MantidKernel/TimeSeriesProperty.h"
-#include "MantidNexus/LoadEventNexus.h"
+#include "MantidDataHandling/LoadEventNexus.h"
 #include "MantidNexus/LoadLogsFromSNSNexus.h"
 #include <cxxtest/TestSuite.h>
 #include <iostream>
@@ -26,6 +26,7 @@ using namespace Mantid::API;
 using namespace Mantid::DataObjects;
 using namespace Mantid::Kernel;
 using namespace Mantid::NeXus;
+using namespace Mantid::DataHandling;
 
 class LoadEventNexusTest : public CxxTest::TestSuite
 {
diff --git a/Code/Mantid/Framework/Nexus/test/LoadSNSEventNexusTest.h b/Code/Mantid/Framework/DataHandling/test/LoadSNSEventNexusTest.h
similarity index 94%
rename from Code/Mantid/Framework/Nexus/test/LoadSNSEventNexusTest.h
rename to Code/Mantid/Framework/DataHandling/test/LoadSNSEventNexusTest.h
index ccf15d48880..5547486e73e 100644
--- a/Code/Mantid/Framework/Nexus/test/LoadSNSEventNexusTest.h
+++ b/Code/Mantid/Framework/DataHandling/test/LoadSNSEventNexusTest.h
@@ -1,7 +1,7 @@
 #ifndef LOADSNSEVENTNEXUSTEST_H_
 #define LOADSNSEVENTNEXUSTEST_H_
 
-#include "MantidNexus/LoadSNSEventNexus.h"
+#include "MantidDataHandling/LoadSNSEventNexus.h"
 #include <cxxtest/TestSuite.h>
 #include <iostream>
 
@@ -11,6 +11,7 @@ using namespace Mantid::API;
 using namespace Mantid::DataObjects;
 using namespace Mantid::Kernel;
 using namespace Mantid::NeXus;
+using namespace Mantid::DataHandling;
 
 
 /* NOTE: More thorough tests are in LoadEventNexusTest */
diff --git a/Code/Mantid/Framework/Nexus/CMakeLists.txt b/Code/Mantid/Framework/Nexus/CMakeLists.txt
index 941b337bb60..bda6538c286 100644
--- a/Code/Mantid/Framework/Nexus/CMakeLists.txt
+++ b/Code/Mantid/Framework/Nexus/CMakeLists.txt
@@ -1,5 +1,4 @@
 set ( SRC_FILES
-        src/LoadEventNexus.cpp
         src/LoadISISNexus.cpp
         src/LoadISISNexus2.cpp
         src/LoadInstrumentFromNexus.cpp
@@ -16,7 +15,6 @@ set ( SRC_FILES
         src/LoadRaw/item_struct.cpp
         src/LoadRaw/vms_convert.cpp
         src/LoadNexusLogs.cpp
-        src/LoadSNSEventNexus.cpp
         src/LoadSNSNexus.cpp
         src/LoadTOFRawNeXus.cpp
         src/MuonNexusReader.cpp
@@ -35,7 +33,6 @@ set ( SRC_UNITY_IGNORE_FILES src/NeXusFile.cpp)
 
 set ( INC_FILES
         inc/MantidNexus/DllConfig.h
-        inc/MantidNexus/LoadEventNexus.h
         inc/MantidNexus/LoadISISNexus.h
         inc/MantidNexus/LoadISISNexus2.h
         inc/MantidNexus/LoadInstrumentFromNexus.h
@@ -47,7 +44,6 @@ set ( INC_FILES
         inc/MantidNexus/LoadNexusMonitors.h
         inc/MantidNexus/LoadNexusProcessed.h
         inc/MantidNexus/LoadNexusLogs.h
-        inc/MantidNexus/LoadSNSEventNexus.h
         inc/MantidNexus/LoadSNSNexus.h
         inc/MantidNexus/LoadTOFRawNeXus.h
         inc/MantidNexus/MuonNexusReader.h
@@ -61,7 +57,6 @@ set ( INC_FILES
 set ( TEST_FILES
         #test/LoadSNSNexusTest.h # TODO has no active tests in it
         #test/LoadTOFRawNeXusTest.h # TODO has no active tests in it
-        test/LoadEventNexusTest.h
         test/LoadISISNexusTest.h
         test/LoadLogsFromSNSNexusTest.h
         test/LoadMuonLogTest.h
@@ -72,7 +67,6 @@ set ( TEST_FILES
         test/LoadNexusProcessedTest.h
         test/LoadNexusLogsTest.h
         test/LoadRSaveNLoadNcspTest.h
-        test/LoadSNSEventNexusTest.h
         test/NexusAPITest.h
         test/SaveNeXusTest.h
         test/SaveNexusProcessedTest.h
diff --git a/Code/Mantid/Framework/Nexus/test/SaveNexusProcessedTest.h b/Code/Mantid/Framework/Nexus/test/SaveNexusProcessedTest.h
index e56be7184d7..84965150a3d 100644
--- a/Code/Mantid/Framework/Nexus/test/SaveNexusProcessedTest.h
+++ b/Code/Mantid/Framework/Nexus/test/SaveNexusProcessedTest.h
@@ -15,7 +15,7 @@
 #include "MantidNexus/SaveNexusProcessed.h"
 #include "MantidNexus/LoadMuonNexus.h"
 #include "MantidNexus/LoadNeXus.h"
-#include "MantidNexus/LoadSNSEventNexus.h"
+#include "MantidDataHandling/LoadSNSEventNexus.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidDataHandling/LoadRaw3.h"
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"
@@ -381,7 +381,7 @@ public:
   {
 
     //----- Now we re-load with precounting and compare memory use ----
-    LoadSNSEventNexus ld2;
+    Mantid::DataHandling::LoadSNSEventNexus ld2;
     std::string outws_name = "SaveNexusProcessed_Loaded";
     ld2.initialize();
     ld2.setPropertyValue("Filename","CNCS_7860_event.nxs");
-- 
GitLab