diff --git a/Code/Mantid/Framework/MDEvents/CMakeLists.txt b/Code/Mantid/Framework/MDEvents/CMakeLists.txt index 230661786141d887a1c18b9fbb3b85a1c2eca1ec..95eb88b8b06ede5a7e6fe855c2bd1987d58afa91 100644 --- a/Code/Mantid/Framework/MDEvents/CMakeLists.txt +++ b/Code/Mantid/Framework/MDEvents/CMakeLists.txt @@ -23,9 +23,9 @@ set ( SRC_FILES src/CreateMDWorkspace.cpp src/FakeMDEventData.cpp src/FindPeaksMD.cpp + src/ImportMDHistoWorkspace.cpp src/IntegratePeaksMD.cpp src/LoadMD.cpp - src/LoadMDHistoWorkspace.cpp src/LoadSQW.cpp src/MDBin.cpp src/MDBox.cpp @@ -91,9 +91,9 @@ set ( INC_FILES inc/MantidMDEvents/CreateMDWorkspace.h inc/MantidMDEvents/FakeMDEventData.h inc/MantidMDEvents/FindPeaksMD.h + inc/MantidMDEvents/ImportMDHistoWorkspace.h inc/MantidMDEvents/IntegratePeaksMD.h inc/MantidMDEvents/LoadMD.h - inc/MantidMDEvents/LoadMDHistoWorkspace.h inc/MantidMDEvents/LoadSQW.h inc/MantidMDEvents/MDBin.h inc/MantidMDEvents/MDBox.h @@ -153,8 +153,8 @@ set ( TEST_FILES test/CreateMDWorkspaceTest.h test/FakeMDEventDataTest.h test/FindPeaksMDTest.h + test/ImportMDHistoWorkspaceTest.h test/IntegratePeaksMDTest.h - test/LoadMDHistoWorkspaceTest.h test/LoadMDTest.h test/LoadSQWTest.h test/MDBinTest.h diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/LoadMDHistoWorkspace.h b/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDHistoWorkspace.h similarity index 75% rename from Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/LoadMDHistoWorkspace.h rename to Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDHistoWorkspace.h index bf1cdeec3eceba34c88b163b7b2fcc7b310420a0..59d03c3aebe2755fb0d1355cd371d8ffd07166f0 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/LoadMDHistoWorkspace.h +++ b/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/ImportMDHistoWorkspace.h @@ -1,5 +1,5 @@ -#ifndef MANTID_MDEVENTS_LOADMDHISTOWORKSPACE_H_ -#define MANTID_MDEVENTS_LOADMDHISTOWORKSPACE_H_ +#ifndef MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACE_H_ +#define MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACE_H_ #include "MantidKernel/System.h" #include "MantidAPI/Algorithm.h" @@ -9,7 +9,8 @@ namespace Mantid namespace MDEvents { - /** LoadMDHistoWorkspace : TODO: DESCRIPTION + /** ImportMDHistoWorkspace : Takes a text file containing structured signal and error information and imports it + as a new MDHistoWorkspace. @date 2012-06-20 @@ -33,11 +34,11 @@ namespace MDEvents 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 LoadMDHistoWorkspace : public API::Algorithm + class DLLExport ImportMDHistoWorkspace : public API::Algorithm { public: - LoadMDHistoWorkspace(); - virtual ~LoadMDHistoWorkspace(); + ImportMDHistoWorkspace(); + virtual ~ImportMDHistoWorkspace(); virtual const std::string name() const; virtual int version() const; @@ -48,11 +49,10 @@ namespace MDEvents void init(); void exec(); - }; } // namespace MDEvents } // namespace Mantid -#endif /* MANTID_MDEVENTS_LOADMDHISTOWORKSPACE_H_ */ \ No newline at end of file +#endif /* MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACE_H_ */ \ No newline at end of file diff --git a/Code/Mantid/Framework/MDEvents/src/LoadMDHistoWorkspace.cpp b/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp similarity index 93% rename from Code/Mantid/Framework/MDEvents/src/LoadMDHistoWorkspace.cpp rename to Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp index d8584bb12f2500790ea69b77c2f0a843dbc6e993..e0aef1169b395c85d7b46a6fa418c0586eacf237 100644 --- a/Code/Mantid/Framework/MDEvents/src/LoadMDHistoWorkspace.cpp +++ b/Code/Mantid/Framework/MDEvents/src/ImportMDHistoWorkspace.cpp @@ -13,7 +13,7 @@ Signal and Error inputs are read in such that, the first entries in the file wil *WIKI*/ -#include "MantidMDEvents/LoadMDHistoWorkspace.h" +#include "MantidMDEvents/ImportMDHistoWorkspace.h" #include "MantidMDEvents/MDHistoWorkspace.h" #include "MantidAPI/FileProperty.h" #include "MantidAPI/Progress.h" @@ -40,7 +40,7 @@ namespace MDEvents { // Register the algorithm into the AlgorithmFactory - DECLARE_ALGORITHM(LoadMDHistoWorkspace) + DECLARE_ALGORITHM(ImportMDHistoWorkspace) /** Functor to compute the product of the set. @@ -56,31 +56,31 @@ namespace MDEvents //---------------------------------------------------------------------------------------------- /** Constructor */ - LoadMDHistoWorkspace::LoadMDHistoWorkspace() + ImportMDHistoWorkspace::ImportMDHistoWorkspace() { } //---------------------------------------------------------------------------------------------- /** Destructor */ - LoadMDHistoWorkspace::~LoadMDHistoWorkspace() + ImportMDHistoWorkspace::~ImportMDHistoWorkspace() { } //---------------------------------------------------------------------------------------------- /// Algorithm's name for identification. @see Algorithm::name - const std::string LoadMDHistoWorkspace::name() const { return "LoadMDHistoWorkspace";}; + const std::string ImportMDHistoWorkspace::name() const { return "ImportMDHistoWorkspace";}; /// Algorithm's version for identification. @see Algorithm::version - int LoadMDHistoWorkspace::version() const { return 1;}; + int ImportMDHistoWorkspace::version() const { return 1;}; /// Algorithm's category for identification. @see Algorithm::category - const std::string LoadMDHistoWorkspace::category() const { return "General";} + const std::string ImportMDHistoWorkspace::category() const { return "General";} //---------------------------------------------------------------------------------------------- /// Sets documentation strings for this algorithm - void LoadMDHistoWorkspace::initDocs() + void ImportMDHistoWorkspace::initDocs() { this->setWikiSummary("Reads a text file and generates an MDHistoWorkspace from it."); this->setOptionalMessage("Reads a text file and generates an MDHistoWorkspace from it."); @@ -89,7 +89,7 @@ namespace MDEvents //---------------------------------------------------------------------------------------------- /** Initialize the algorithm's properties. */ - void LoadMDHistoWorkspace::init() + void ImportMDHistoWorkspace::init() { std::vector<std::string> fileExtensions(1); fileExtensions[0]=".txt"; @@ -124,7 +124,7 @@ namespace MDEvents //---------------------------------------------------------------------------------------------- /** Execute the algorithm. */ - void LoadMDHistoWorkspace::exec() + void ImportMDHistoWorkspace::exec() { // Fetch input properties const int ndims = getProperty("Dimensionality"); diff --git a/Code/Mantid/Framework/MDEvents/test/LoadMDHistoWorkspaceTest.h b/Code/Mantid/Framework/MDEvents/test/ImportMDHistoWorkspaceTest.h similarity index 92% rename from Code/Mantid/Framework/MDEvents/test/LoadMDHistoWorkspaceTest.h rename to Code/Mantid/Framework/MDEvents/test/ImportMDHistoWorkspaceTest.h index f60fb8553a7c23789c66f06302c4c555cbb99061..387dc4d81ab8c16452118c4c00a0b51c2af110d8 100644 --- a/Code/Mantid/Framework/MDEvents/test/LoadMDHistoWorkspaceTest.h +++ b/Code/Mantid/Framework/MDEvents/test/ImportMDHistoWorkspaceTest.h @@ -1,5 +1,5 @@ -#ifndef MANTID_MDEVENTS_LOADMDHISTOWORKSPACETEST_H_ -#define MANTID_MDEVENTS_LOADMDHISTOWORKSPACETEST_H_ +#ifndef MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACETEST_H_ +#define MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACETEST_H_ #include <cxxtest/TestSuite.h> #include "MantidKernel/Timer.h" @@ -7,7 +7,7 @@ #include <iostream> #include <iomanip> #include <fstream> -#include "MantidMDEvents/LoadMDHistoWorkspace.h" +#include "MantidMDEvents/ImportMDHistoWorkspace.h" #include "MantidAPI/IMDHistoWorkspace.h" using namespace Mantid; @@ -53,7 +53,7 @@ private: void *operator new[](size_t); }; -class LoadMDHistoWorkspaceTest : public CxxTest::TestSuite +class ImportMDHistoWorkspaceTest : public CxxTest::TestSuite { private: @@ -64,7 +64,7 @@ private: */ boost::shared_ptr<IAlgorithm> make_standard_algorithm(const MDFileObject& fileObject) { - IAlgorithm_sptr alg = IAlgorithm_sptr(new LoadMDHistoWorkspace()); + IAlgorithm_sptr alg = IAlgorithm_sptr(new ImportMDHistoWorkspace()); alg->initialize(); alg->setRethrows(true); alg->setPropertyValue("FileName", fileObject.getFileName()); @@ -81,12 +81,12 @@ private: public: // This pair of boilerplate methods prevent the suite being created statically // This means the constructor isn't called when running other tests - static LoadMDHistoWorkspaceTest *createSuite() { return new LoadMDHistoWorkspaceTest(); } - static void destroySuite( LoadMDHistoWorkspaceTest *suite ) { delete suite; } + static ImportMDHistoWorkspaceTest *createSuite() { return new ImportMDHistoWorkspaceTest(); } + static void destroySuite( ImportMDHistoWorkspaceTest *suite ) { delete suite; } void test_Init() { - LoadMDHistoWorkspace alg; + ImportMDHistoWorkspace alg; TS_ASSERT_THROWS_NOTHING( alg.initialize() ) TS_ASSERT( alg.isInitialized() ) } @@ -174,7 +174,7 @@ public: void test_executes_2D() { MDFileObject fileObject("test_file_for_load_md_histo_workspace_test_.txt", 2*2); - IAlgorithm_sptr alg = IAlgorithm_sptr(new LoadMDHistoWorkspace()); + IAlgorithm_sptr alg = IAlgorithm_sptr(new ImportMDHistoWorkspace()); alg->initialize(); alg->setPropertyValue("FileName", fileObject.getFileName()); alg->setProperty("Dimensionality", 2); @@ -229,7 +229,7 @@ public: void test_executes_3D() { MDFileObject fileObject("test_file_for_load_md_histo_workspace_test_.txt", 2*2*2); - IAlgorithm_sptr alg = IAlgorithm_sptr(new LoadMDHistoWorkspace()); + IAlgorithm_sptr alg = IAlgorithm_sptr(new ImportMDHistoWorkspace()); alg->initialize(); alg->setPropertyValue("FileName", fileObject.getFileName()); alg->setProperty("Dimensionality", 3); @@ -260,4 +260,4 @@ public: }; -#endif /* MANTID_MDEVENTS_LOADMDHISTOWORKSPACETEST_H_ */ \ No newline at end of file +#endif /* MANTID_MDEVENTS_IMPORTMDHISTOWORKSPACETEST_H_ */ \ No newline at end of file