From 5b7039daf7e3284bc1ed52193a8d2eee4666e461 Mon Sep 17 00:00:00 2001 From: Martyn Gigg <martyn.gigg@stfc.ac.uk> Date: Wed, 17 Jul 2013 09:36:08 +0100 Subject: [PATCH] Use more specific Nexus name instead of HDF in file loaders * Rename HDFDescriptor to NexusDescriptor * Rename {HDF,NonHDF} -> {Nexus,Generic} in FileLoaderRegistry * Rename DECLARE_HDF_FILELOADER_ALGORITHM -> DECLARE_NEXUS_FILELOADER_ALGORITHM Refs #7461 --- .../API/inc/MantidAPI/FileLoaderRegistry.h | 10 +-- .../API/inc/MantidAPI/IHDFFileLoader.h | 6 +- .../API/inc/MantidAPI/RegisterFileLoader.h | 16 ++-- .../Framework/API/src/FileLoaderRegistry.cpp | 24 +++--- .../inc/MantidDataHandling/LoadEventNexus.h | 2 +- .../inc/MantidDataHandling/LoadILL.h | 2 +- .../inc/MantidDataHandling/LoadISISNexus2.h | 2 +- .../inc/MantidDataHandling/LoadLLB.h | 2 +- .../MantidDataHandling/LoadMcStasEventNexus.h | 2 +- .../inc/MantidDataHandling/LoadMcStasNexus.h | 2 +- .../inc/MantidDataHandling/LoadMuonNexus.h | 2 +- .../inc/MantidDataHandling/LoadMuonNexus1.h | 2 +- .../inc/MantidDataHandling/LoadMuonNexus2.h | 2 +- .../inc/MantidDataHandling/LoadNXSPE.h | 2 +- .../MantidDataHandling/LoadNexusProcessed.h | 2 +- .../inc/MantidDataHandling/LoadQKK.h | 2 +- .../inc/MantidDataHandling/LoadSINQ.h | 2 +- .../inc/MantidDataHandling/LoadSNSNexus.h | 2 +- .../inc/MantidDataHandling/LoadSassena.h | 2 +- .../inc/MantidDataHandling/LoadTOFRawNexus.h | 2 +- .../DataHandling/src/LoadEventNexus.cpp | 4 +- .../Framework/DataHandling/src/LoadILL.cpp | 8 +- .../DataHandling/src/LoadILLSANS.cpp | 4 +- .../DataHandling/src/LoadISISNexus2.cpp | 4 +- .../Framework/DataHandling/src/LoadLLB.cpp | 7 +- .../DataHandling/src/LoadMcStasEventNexus.cpp | 4 +- .../DataHandling/src/LoadMcStasNexus.cpp | 4 +- .../DataHandling/src/LoadMuonNexus.cpp | 2 +- .../DataHandling/src/LoadMuonNexus1.cpp | 4 +- .../DataHandling/src/LoadMuonNexus2.cpp | 6 +- .../Framework/DataHandling/src/LoadNXSPE.cpp | 4 +- .../DataHandling/src/LoadNexusProcessed.cpp | 4 +- .../Framework/DataHandling/src/LoadQKK.cpp | 4 +- .../Framework/DataHandling/src/LoadSINQ.cpp | 4 +- .../DataHandling/src/LoadSassena.cpp | 4 +- .../DataHandling/src/LoadTOFRawNexus.cpp | 4 +- .../src/UpdateInstrumentFromFile.cpp | 6 +- .../Framework/DataHandling/test/LoadQKKTest.h | 2 +- .../DataHandling/test/LoadSassenaTest.h | 2 +- .../DataHandling/test/LoadTOFRawNexusTest.h | 8 +- Code/Mantid/Framework/Kernel/CMakeLists.txt | 6 +- .../{HDFDescriptor.h => NexusDescriptor.h} | 16 ++-- ...{HDFDescriptor.cpp => NexusDescriptor.cpp} | 78 ++++++++++--------- ...DescriptorTest.h => NexusDescriptorTest.h} | 52 ++++++------- .../inc/MantidMDAlgorithms/LoadMD.h | 2 +- .../Framework/MDAlgorithms/src/LoadMD.cpp | 4 +- .../src/EventNexusFileMemento.cpp | 2 +- 47 files changed, 170 insertions(+), 167 deletions(-) rename Code/Mantid/Framework/Kernel/inc/MantidKernel/{HDFDescriptor.h => NexusDescriptor.h} (92%) rename Code/Mantid/Framework/Kernel/src/{HDFDescriptor.cpp => NexusDescriptor.cpp} (74%) rename Code/Mantid/Framework/Kernel/test/{HDFDescriptorTest.h => NexusDescriptorTest.h} (70%) diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/FileLoaderRegistry.h b/Code/Mantid/Framework/API/inc/MantidAPI/FileLoaderRegistry.h index 52b12b7a027..c982d2616f8 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/FileLoaderRegistry.h +++ b/Code/Mantid/Framework/API/inc/MantidAPI/FileLoaderRegistry.h @@ -56,7 +56,7 @@ namespace Mantid public: /// Defines types of possible file - enum LoaderFormat { NonHDF, HDF }; + enum LoaderFormat { Nexus, Generic }; public: /// @returns the number of entries in the registry @@ -103,18 +103,18 @@ namespace Mantid { switch(format) { - case HDF: + case Nexus: if(!boost::is_base_of<IHDFFileLoader,T>::value) { throw std::runtime_error(std::string("FileLoaderRegistryImpl::subscribe - Class '") + typeid(T).name() + - "' registered as HDF loader but it does not inherit from Mantid::API::IHDFFileLoader"); + "' registered as Nexus loader but it does not inherit from Mantid::API::IHDFFileLoader"); } break; - case NonHDF: + case Generic: if(!boost::is_base_of<IFileLoader,T>::value) { throw std::runtime_error(std::string("FileLoaderRegistryImpl::subscribe - Class '") + typeid(T).name() + - "' registered as Non-HDF loader but it does not inherit from Mantid::API::IFileLoader"); + "' registered as Generic loader but it does not inherit from Mantid::API::IFileLoader"); } break; default: throw std::runtime_error("Invalid LoaderFormat given"); diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/IHDFFileLoader.h b/Code/Mantid/Framework/API/inc/MantidAPI/IHDFFileLoader.h index 7d5237cc220..04fedeb3c38 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/IHDFFileLoader.h +++ b/Code/Mantid/Framework/API/inc/MantidAPI/IHDFFileLoader.h @@ -2,7 +2,7 @@ #define MANTID_API_IHDFFILELOADER_H_ #include "MantidAPI/Algorithm.h" -#include "MantidKernel/HDFDescriptor.h" +#include "MantidKernel/NexusDescriptor.h" namespace Mantid { @@ -11,7 +11,7 @@ namespace Mantid /** Defines an interface to an algorithm that loads a file stored in a hierarchical data - format. This supports anything the HDFDescriptor can wrap, currently = NeXus, HDF5 + format. This supports anything the NexusDescriptor can wrap, currently = NeXus, HDF5 Copyright © 2013 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory @@ -39,7 +39,7 @@ namespace Mantid /// Virtual destructor (required by linker on some versions of OS X/Intel compiler) virtual ~IHDFFileLoader() {} /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const = 0; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const = 0; }; } // namespace API diff --git a/Code/Mantid/Framework/API/inc/MantidAPI/RegisterFileLoader.h b/Code/Mantid/Framework/API/inc/MantidAPI/RegisterFileLoader.h index d7ebe1d5409..7ab091bc5ec 100644 --- a/Code/Mantid/Framework/API/inc/MantidAPI/RegisterFileLoader.h +++ b/Code/Mantid/Framework/API/inc/MantidAPI/RegisterFileLoader.h @@ -6,31 +6,31 @@ /** * DECLARE_FILELOADER_ALGORITHM should be used in place of the standard * DECLARE_ALGORITHM macro when writing a file loading algorithm that - * loads data from a non-hierarchical format. + * loads data from a type that is not one of the specialized types. See FileLoaderRegistryImpl::LoaderFormat * It both registers the algorithm as usual and subscribes it to the - * registry held in the FrameworkManager + * registry. */ #define DECLARE_FILELOADER_ALGORITHM(classname) \ namespace \ {\ Mantid::Kernel::RegistrationHelper \ reg_loader_##classname((Mantid::API::\ - FileLoaderRegistry::Instance().subscribe<classname>(Mantid::API::FileLoaderRegistryImpl::NonHDF), 0));\ + FileLoaderRegistry::Instance().subscribe<classname>(Mantid::API::FileLoaderRegistryImpl::Generic), 0));\ } /** - * DECLARE_HDF_FILELOADER_ALGORITHM should be used in place of the standard + * DECLARE_NEXUS_FILELOADER_ALGORITHM should be used in place of the standard * DECLARE_ALGORITHM macro when writing a file loading algorithm that - * loads data from a hierarchical format, e.g. NeXus, HDF. + * loads data using the Nexus API * It both registers the algorithm as usual and subscribes it to the - * registry held in the FrameworkManager + * registry. */ -#define DECLARE_HDF_FILELOADER_ALGORITHM(classname) \ +#define DECLARE_NEXUS_FILELOADER_ALGORITHM(classname) \ namespace \ {\ Mantid::Kernel::RegistrationHelper \ reg_hdf_loader_##classname((Mantid::API::\ - FileLoaderRegistry::Instance().subscribe<classname>(Mantid::API::FileLoaderRegistryImpl::HDF), 0)); \ + FileLoaderRegistry::Instance().subscribe<classname>(Mantid::API::FileLoaderRegistryImpl::Nexus), 0)); \ } diff --git a/Code/Mantid/Framework/API/src/FileLoaderRegistry.cpp b/Code/Mantid/Framework/API/src/FileLoaderRegistry.cpp index 159d3dbff68..d4a2d8e662c 100644 --- a/Code/Mantid/Framework/API/src/FileLoaderRegistry.cpp +++ b/Code/Mantid/Framework/API/src/FileLoaderRegistry.cpp @@ -87,20 +87,20 @@ namespace Mantid const boost::shared_ptr<IAlgorithm> FileLoaderRegistryImpl::chooseLoader(const std::string &filename) const { using Kernel::FileDescriptor; - using Kernel::HDFDescriptor; + using Kernel::NexusDescriptor; m_log.debug() << "Trying to find loader for '" << filename << "'" << std::endl; IAlgorithm_sptr bestLoader; - if(HDFDescriptor::isHDF(filename)) + if(NexusDescriptor::isHDF(filename)) { - m_log.debug() << filename << " looks like a HDF file. Checking registered HDF loaders\n"; - bestLoader = searchForLoader<HDFDescriptor,IHDFFileLoader>(filename, m_names[HDF], m_log); + m_log.debug() << filename << " looks like a Nexus file. Checking registered Nexus loaders\n"; + bestLoader = searchForLoader<NexusDescriptor,IHDFFileLoader>(filename, m_names[Nexus], m_log); } else { m_log.debug() << "Checking registered non-HDF loaders\n"; - bestLoader = searchForLoader<FileDescriptor,IFileLoader>(filename, m_names[NonHDF], m_log); + bestLoader = searchForLoader<FileDescriptor,IFileLoader>(filename, m_names[Generic], m_log); } if(!bestLoader) @@ -121,21 +121,21 @@ namespace Mantid bool FileLoaderRegistryImpl::canLoad(const std::string & algorithmName,const std::string & filename) const { using Kernel::FileDescriptor; - using Kernel::HDFDescriptor; + using Kernel::NexusDescriptor; // Check if it is in one of our lists - bool hdf(false),nonHDF(false); - if(m_names[HDF].find(algorithmName) != m_names[HDF].end()) hdf = true; - else if(m_names[NonHDF].find(algorithmName) != m_names[NonHDF].end()) nonHDF = true; + bool nexus(false),nonHDF(false); + if(m_names[Nexus].find(algorithmName) != m_names[Nexus].end()) nexus = true; + else if(m_names[Generic].find(algorithmName) != m_names[Generic].end()) nonHDF = true; - if(!hdf && !nonHDF) throw std::invalid_argument("FileLoaderRegistryImpl::canLoad - Algorithm '" + algorithmName + "' is not registered as a loader."); + if(!nexus && !nonHDF) throw std::invalid_argument("FileLoaderRegistryImpl::canLoad - Algorithm '" + algorithmName + "' is not registered as a loader."); std::multimap<std::string,int> names; names.insert(std::make_pair(algorithmName, -1)); IAlgorithm_sptr loader; - if(hdf && HDFDescriptor::isHDF(filename)) + if(nexus && NexusDescriptor::isHDF(filename)) { - loader = searchForLoader<HDFDescriptor,IHDFFileLoader>(filename, names, m_log); + loader = searchForLoader<NexusDescriptor,IHDFFileLoader>(filename, names, m_log); } else { diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h index 7780f5d0e5b..ec4a821112c 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h @@ -81,7 +81,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling\\Nexus";} /// Returns a confidence value that this algorithm can load a file - int confidence(Kernel::HDFDescriptor & descriptor) const; + int confidence(Kernel::NexusDescriptor & descriptor) const; /** Sets whether the pixel counts will be pre-counted. * @param value :: true if you want to precount. */ diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadILL.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadILL.h index 2a34c292c9b..738cbec387f 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadILL.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadILL.h @@ -59,7 +59,7 @@ public: } /// Returns a confidence value that this algorithm can load a file - int confidence(Kernel::HDFDescriptor & descriptor) const; + int confidence(Kernel::NexusDescriptor & descriptor) const; private: /// Sets documentation strings for this algorithm diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadISISNexus2.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadISISNexus2.h index 6129202078d..54dcda3c82d 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadISISNexus2.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadISISNexus2.h @@ -82,7 +82,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling\\Nexus"; } /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; /// Spectra block descriptor struct SpectraBlock diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadLLB.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadLLB.h index 99810e6fb2c..4a920e74c4f 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadLLB.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadLLB.h @@ -43,7 +43,7 @@ public: virtual const std::string category() const; /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; private: virtual void initDocs(); diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasEventNexus.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasEventNexus.h index 8602e3199b4..8af76af5f98 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasEventNexus.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasEventNexus.h @@ -43,7 +43,7 @@ namespace DataHandling virtual const std::string category() const; /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; private: virtual void initDocs(); diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasNexus.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasNexus.h index e835dea809a..42320ad7fc6 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasNexus.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMcStasNexus.h @@ -42,7 +42,7 @@ namespace DataHandling virtual const std::string category() const; /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; private: virtual void initDocs(); diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus.h index a706b9b092b..ab06e9a1f73 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus.h @@ -73,7 +73,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling\\Nexus;Muon"; } /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor &) const; + virtual int confidence(Kernel::NexusDescriptor &) const; protected: diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus1.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus1.h index a99b1644ac5..a7b79abfe8d 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus1.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus1.h @@ -75,7 +75,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling\\Nexus;Muon"; } /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; protected: /// Overwrites Algorithm method diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus2.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus2.h index 6aea1fb4838..f14525aa91c 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus2.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadMuonNexus2.h @@ -70,7 +70,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling\\Nexus;Muon"; } /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; private: /// Sets documentation strings for this algorithm diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNXSPE.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNXSPE.h index 7092771d289..4c4d5c34944 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNXSPE.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNXSPE.h @@ -52,7 +52,7 @@ namespace DataHandling virtual const std::string category() const { return "DataHandling\\Nexus;DataHandling\\SPE;Inelastic";} /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; private: /// Sets documentation strings for this algorithm diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h index 7ca826a9290..cf78b841c39 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadNexusProcessed.h @@ -63,7 +63,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling\\Nexus";} /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; private: /// Sets documentation strings for this algorithm diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadQKK.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadQKK.h index 7747760e99f..0f2a06bdc08 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadQKK.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadQKK.h @@ -52,7 +52,7 @@ public: virtual const std::string category() const { return "DataHandling"; } /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; private: /// Sets documentation strings for this algorithm diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSINQ.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSINQ.h index 15d51f05191..8ff9bc03dd9 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSINQ.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSINQ.h @@ -52,7 +52,7 @@ public: virtual const std::string category() const; /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; private: virtual void initDocs(); diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSNSNexus.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSNSNexus.h index 8bd7afc188d..cb5370dea1b 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSNSNexus.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSNSNexus.h @@ -59,7 +59,7 @@ namespace Mantid virtual const std::string category() const { return "Deprecated"; } /// Returns a confidence value that this algorithm can load a file (Required by base class) - virtual int confidence(Kernel::HDFDescriptor &) const { return 0; } + virtual int confidence(Kernel::NexusDescriptor &) const { return 0; } }; } // namespace DataHandling diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSassena.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSassena.h index 86dcb636484..92e42a29fb4 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSassena.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadSassena.h @@ -68,7 +68,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling\\Sassena"; } /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; protected: /// Add a workspace to the group and register in the analysis data service diff --git a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadTOFRawNexus.h b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadTOFRawNexus.h index b6cf54bedb4..f125785ecbf 100644 --- a/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadTOFRawNexus.h +++ b/Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/LoadTOFRawNexus.h @@ -64,7 +64,7 @@ public: static std::string getEntryName(const std::string & filename); /// Returns a confidence value that this algorithm can load a file - virtual int confidence(Kernel::HDFDescriptor & descriptor) const; + virtual int confidence(Kernel::NexusDescriptor & descriptor) const; void countPixels(const std::string &nexusfilename, const std::string & entry_name, std::vector<std::string> & bankNames); diff --git a/Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp b/Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp index 717e701d02a..748b2a93ce7 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp @@ -56,7 +56,7 @@ namespace Mantid namespace DataHandling { -DECLARE_HDF_FILELOADER_ALGORITHM(LoadEventNexus); +DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadEventNexus); using namespace Kernel; using namespace Geometry; @@ -916,7 +916,7 @@ LoadEventNexus::~LoadEventNexus() * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ -int LoadEventNexus::confidence(Kernel::HDFDescriptor & descriptor) const +int LoadEventNexus::confidence(Kernel::NexusDescriptor & descriptor) const { int confidence(0); if(descriptor.classTypeExists("NXevent_data")) diff --git a/Code/Mantid/Framework/DataHandling/src/LoadILL.cpp b/Code/Mantid/Framework/DataHandling/src/LoadILL.cpp index 812509709c8..c21fccff388 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadILL.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadILL.cpp @@ -31,7 +31,7 @@ using namespace Kernel; using namespace API; using namespace NeXus; -DECLARE_HDF_FILELOADER_ALGORITHM(LoadILL) + DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadILL); ; /** @@ -55,8 +55,8 @@ void LoadILL::initDocs() { * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ - -int LoadILL::confidence(Kernel::HDFDescriptor & descriptor) const { + int LoadILL::confidence(Kernel::NexusDescriptor & descriptor) const + { const std::string path = descriptor.pathOfType("NXinstrument"); g_log.debug() << "Path of type NXinstrument: " << path << std::endl; @@ -70,7 +70,7 @@ int LoadILL::confidence(Kernel::HDFDescriptor & descriptor) const { g_log.debug() << "\t: " << *it << std::endl; if (instrumentName == *it) return 80; - } + } return 0; } diff --git a/Code/Mantid/Framework/DataHandling/src/LoadILLSANS.cpp b/Code/Mantid/Framework/DataHandling/src/LoadILLSANS.cpp index 6633d2f25e0..ca439766d99 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadILLSANS.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadILLSANS.cpp @@ -18,7 +18,7 @@ using namespace Kernel; using namespace API; using namespace NeXus; -DECLARE_HDF_FILELOADER_ALGORITHM(LoadILLSANS) +DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadILLSANS) //---------------------------------------------------------------------------------------------- /** Constructor @@ -67,7 +67,7 @@ void LoadILLSANS::initDocs() { * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ -int LoadILLSANS::confidence(Kernel::HDFDescriptor & descriptor) const +int LoadILLSANS::confidence(Kernel::NexusDescriptor & descriptor) const { const std::string path = descriptor.pathOfType("NXinstrument"); g_log.debug() << "Path of type NXinstrument: " << path << std::endl; diff --git a/Code/Mantid/Framework/DataHandling/src/LoadISISNexus2.cpp b/Code/Mantid/Framework/DataHandling/src/LoadISISNexus2.cpp index 3728e3f55d1..6a9b4aef99d 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadISISNexus2.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadISISNexus2.cpp @@ -43,7 +43,7 @@ namespace Mantid { namespace DataHandling { - DECLARE_HDF_FILELOADER_ALGORITHM(LoadISISNexus2); + DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadISISNexus2); using namespace Kernel; using namespace API; @@ -64,7 +64,7 @@ namespace Mantid * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ - int LoadISISNexus2::confidence(Kernel::HDFDescriptor & descriptor) const + int LoadISISNexus2::confidence(Kernel::NexusDescriptor & descriptor) const { if(descriptor.pathOfTypeExists("/raw_data_1","NXentry")) return 80; return 0; diff --git a/Code/Mantid/Framework/DataHandling/src/LoadLLB.cpp b/Code/Mantid/Framework/DataHandling/src/LoadLLB.cpp index 53690ebedad..a4acfaa8e93 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadLLB.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadLLB.cpp @@ -22,8 +22,8 @@ using namespace Kernel; using namespace API; using namespace NeXus; -DECLARE_HDF_FILELOADER_ALGORITHM(LoadLLB) -; +DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadLLB); + //---------------------------------------------------------------------------------------------- /** Constructor @@ -62,7 +62,8 @@ const std::string LoadLLB::category() const { * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ -int LoadLLB::confidence(Kernel::HDFDescriptor & descriptor) const { +int LoadLLB::confidence(Kernel::NexusDescriptor & descriptor) const +{ const auto & firstEntry = descriptor.firstEntryNameType(); const std::string path = "/" + firstEntry.first + "/nxinstrument/name"; diff --git a/Code/Mantid/Framework/DataHandling/src/LoadMcStasEventNexus.cpp b/Code/Mantid/Framework/DataHandling/src/LoadMcStasEventNexus.cpp index 81aa624a66a..e951d170593 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadMcStasEventNexus.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadMcStasEventNexus.cpp @@ -42,7 +42,7 @@ namespace DataHandling using namespace DataObjects; // Register the algorithm into the AlgorithmFactory - DECLARE_HDF_FILELOADER_ALGORITHM(LoadMcStasEventNexus); + DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadMcStasEventNexus); //---------------------------------------------------------------------------------------------- @@ -306,7 +306,7 @@ namespace DataHandling * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ - int LoadMcStasEventNexus::confidence(Kernel::HDFDescriptor & descriptor) const + int LoadMcStasEventNexus::confidence(Kernel::NexusDescriptor & descriptor) const { UNUSED_ARG(descriptor) // Not implemented yet therefore return no confidence diff --git a/Code/Mantid/Framework/DataHandling/src/LoadMcStasNexus.cpp b/Code/Mantid/Framework/DataHandling/src/LoadMcStasNexus.cpp index 970e5e8d9e6..c9b205e6d69 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadMcStasNexus.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadMcStasNexus.cpp @@ -25,7 +25,7 @@ namespace DataHandling using namespace Kernel; using namespace API; - DECLARE_HDF_FILELOADER_ALGORITHM(LoadMcStasNexus); + DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadMcStasNexus); //---------------------------------------------------------------------------------------------- /** Constructor @@ -57,7 +57,7 @@ namespace DataHandling * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ - int LoadMcStasNexus::confidence(Kernel::HDFDescriptor & descriptor) const + int LoadMcStasNexus::confidence(Kernel::NexusDescriptor & descriptor) const { using namespace ::NeXus; // We will look at the first entry and check for a diff --git a/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus.cpp b/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus.cpp index bb7d2e7887f..779a73a675a 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus.cpp @@ -167,7 +167,7 @@ namespace Mantid * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ - int LoadMuonNexus::confidence(Kernel::HDFDescriptor &) const + int LoadMuonNexus::confidence(Kernel::NexusDescriptor &) const { return 0; // Not to be used but LoadMuonNexus2, which inherits from this will } diff --git a/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus1.cpp b/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus1.cpp index 7c92f59056a..e5f7655b19f 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus1.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus1.cpp @@ -69,7 +69,7 @@ namespace Mantid namespace DataHandling { // Register the algorithm into the algorithm factory - DECLARE_HDF_FILELOADER_ALGORITHM(LoadMuonNexus1); + DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadMuonNexus1); /// Sets documentation strings for this algorithm void LoadMuonNexus1::initDocs() @@ -639,7 +639,7 @@ namespace Mantid * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ - int LoadMuonNexus1::confidence(Kernel::HDFDescriptor & descriptor) const + int LoadMuonNexus1::confidence(Kernel::NexusDescriptor & descriptor) const { const auto & firstEntryNameType = descriptor.firstEntryNameType(); const std::string root = "/" + firstEntryNameType.first; diff --git a/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus2.cpp b/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus2.cpp index 0adc5559784..33050677294 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus2.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadMuonNexus2.cpp @@ -74,7 +74,7 @@ namespace Mantid namespace DataHandling { // Register the algorithm into the algorithm factory - DECLARE_HDF_FILELOADER_ALGORITHM(LoadMuonNexus2); + DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadMuonNexus2); using namespace Kernel; using namespace API; @@ -103,7 +103,7 @@ namespace Mantid std::string filePath = getPropertyValue("Filename"); LoadMuonNexus1 load1; load1.initialize(); - Kernel::HDFDescriptor descriptor(filePath); + Kernel::NexusDescriptor descriptor(filePath); int confidence1 = load1.confidence(descriptor); int confidence2 = this->confidence(descriptor); @@ -488,7 +488,7 @@ namespace Mantid * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ - int LoadMuonNexus2::confidence(Kernel::HDFDescriptor & descriptor) const + int LoadMuonNexus2::confidence(Kernel::NexusDescriptor & descriptor) const { const auto & firstEntryNameType = descriptor.firstEntryNameType(); const std::string root = "/" + firstEntryNameType.first; diff --git a/Code/Mantid/Framework/DataHandling/src/LoadNXSPE.cpp b/Code/Mantid/Framework/DataHandling/src/LoadNXSPE.cpp index f9dbe0a0f6d..1d9f214a0b3 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadNXSPE.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadNXSPE.cpp @@ -29,7 +29,7 @@ namespace Mantid namespace DataHandling { - DECLARE_HDF_FILELOADER_ALGORITHM(LoadNXSPE); + DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadNXSPE); using namespace Mantid::Kernel; using namespace Mantid::API; @@ -64,7 +64,7 @@ namespace DataHandling * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ - int LoadNXSPE::confidence(Kernel::HDFDescriptor & descriptor) const + int LoadNXSPE::confidence(Kernel::NexusDescriptor & descriptor) const { int confidence(0); typedef std::map<std::string,std::string> string_map_t; diff --git a/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp b/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp index 6377de7ed3b..822d3e28ffc 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadNexusProcessed.cpp @@ -60,7 +60,7 @@ namespace DataHandling { // Register the algorithm into the algorithm factory -DECLARE_HDF_FILELOADER_ALGORITHM(LoadNexusProcessed); +DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadNexusProcessed); /// Sets documentation strings for this algorithm void LoadNexusProcessed::initDocs() @@ -93,7 +93,7 @@ LoadNexusProcessed::~LoadNexusProcessed() * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ -int LoadNexusProcessed::confidence(Kernel::HDFDescriptor & descriptor) const +int LoadNexusProcessed::confidence(Kernel::NexusDescriptor & descriptor) const { if(descriptor.pathExists("/mantid_workspace_1")) return 80; else return 0; diff --git a/Code/Mantid/Framework/DataHandling/src/LoadQKK.cpp b/Code/Mantid/Framework/DataHandling/src/LoadQKK.cpp index d97dd76c174..d83b040b317 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadQKK.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadQKK.cpp @@ -32,14 +32,14 @@ namespace Mantid { // Register the algorithm into the AlgorithmFactory - DECLARE_HDF_FILELOADER_ALGORITHM(LoadQKK); + DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadQKK); /** * Return the confidence with with this algorithm can load the file * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ - int LoadQKK::confidence(Kernel::HDFDescriptor & descriptor) const + int LoadQKK::confidence(Kernel::NexusDescriptor & descriptor) const { const auto & firstEntryName = descriptor.firstEntryNameType().first; if(descriptor.pathExists("/" + firstEntryName + "/data/hmm_xy")) return 80; diff --git a/Code/Mantid/Framework/DataHandling/src/LoadSINQ.cpp b/Code/Mantid/Framework/DataHandling/src/LoadSINQ.cpp index d52a2747e05..0c19f6bc688 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadSINQ.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadSINQ.cpp @@ -26,7 +26,7 @@ using namespace Kernel; using namespace API; using namespace NeXus; -DECLARE_HDF_FILELOADER_ALGORITHM(LoadSINQ); +DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadSINQ); //---------------------------------------------------------------------------------------------- /** Constructor @@ -72,7 +72,7 @@ void LoadSINQ::initDocs() { * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ -int LoadSINQ::confidence(Kernel::HDFDescriptor & descriptor) const +int LoadSINQ::confidence(Kernel::NexusDescriptor & descriptor) const { const std::string path = descriptor.pathOfType("NXinstrument"); g_log.debug() << "Path of type NXinstrument: " << path << std::endl; diff --git a/Code/Mantid/Framework/DataHandling/src/LoadSassena.cpp b/Code/Mantid/Framework/DataHandling/src/LoadSassena.cpp index e1ecd2fb13d..d3d566e54f6 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadSassena.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadSassena.cpp @@ -42,7 +42,7 @@ namespace Mantid namespace DataHandling { -DECLARE_HDF_FILELOADER_ALGORITHM(LoadSassena); +DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadSassena); /// Sets documentation strings for this algorithm void LoadSassena::initDocs() @@ -56,7 +56,7 @@ void LoadSassena::initDocs() * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ -int LoadSassena::confidence(Kernel::HDFDescriptor & descriptor) const +int LoadSassena::confidence(Kernel::NexusDescriptor & descriptor) const { if(descriptor.hasRootAttr("sassena_version")) return 99; return 0; diff --git a/Code/Mantid/Framework/DataHandling/src/LoadTOFRawNexus.cpp b/Code/Mantid/Framework/DataHandling/src/LoadTOFRawNexus.cpp index f6d01293e5f..886af395956 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadTOFRawNexus.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadTOFRawNexus.cpp @@ -34,7 +34,7 @@ namespace Mantid namespace DataHandling { -DECLARE_HDF_FILELOADER_ALGORITHM(LoadTOFRawNexus); +DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadTOFRawNexus); using namespace Kernel; using namespace API; @@ -83,7 +83,7 @@ void LoadTOFRawNexus::init() * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ -int LoadTOFRawNexus::confidence(Kernel::HDFDescriptor & descriptor) const +int LoadTOFRawNexus::confidence(Kernel::NexusDescriptor & descriptor) const { int confidence(0); if( descriptor.pathOfTypeExists("/entry", "NXentry") || diff --git a/Code/Mantid/Framework/DataHandling/src/UpdateInstrumentFromFile.cpp b/Code/Mantid/Framework/DataHandling/src/UpdateInstrumentFromFile.cpp index 509c49bf7eb..2e0343e5488 100644 --- a/Code/Mantid/Framework/DataHandling/src/UpdateInstrumentFromFile.cpp +++ b/Code/Mantid/Framework/DataHandling/src/UpdateInstrumentFromFile.cpp @@ -45,7 +45,7 @@ would tell the algorithm to interpret the columns as: #include "MantidAPI/MatrixWorkspace.h" #include "MantidGeometry/Instrument.h" #include "MantidGeometry/Instrument/ComponentHelper.h" -#include "MantidKernel/HDFDescriptor.h" +#include "MantidKernel/NexusDescriptor.h" #include <nexus/NeXusFile.hpp> #include <nexus/NeXusException.hpp> #include "LoadRaw/isisraw2.h" @@ -134,10 +134,10 @@ namespace Mantid m_ignoreMonitors = (!moveMonitors); // Check file type - if(HDFDescriptor::isHDF(filename)) + if(NexusDescriptor::isHDF(filename)) { LoadISISNexus2 isisNexus; - auto *descriptor = new Kernel::HDFDescriptor(filename); + auto *descriptor = new Kernel::NexusDescriptor(filename); if(isisNexus.confidence(*descriptor) > 0) { delete descriptor; diff --git a/Code/Mantid/Framework/DataHandling/test/LoadQKKTest.h b/Code/Mantid/Framework/DataHandling/test/LoadQKKTest.h index 66afb7cb6e8..1bf8c8d3c02 100644 --- a/Code/Mantid/Framework/DataHandling/test/LoadQKKTest.h +++ b/Code/Mantid/Framework/DataHandling/test/LoadQKKTest.h @@ -31,7 +31,7 @@ public: Mantid::DataHandling::LoadQKK loader; loader.initialize(); loader.setPropertyValue("Filename", "QKK0029775.nx.hdf"); // find the full path - Mantid::Kernel::HDFDescriptor descr(loader.getPropertyValue("Filename")); + Mantid::Kernel::NexusDescriptor descr(loader.getPropertyValue("Filename")); TS_ASSERT_EQUALS(80, loader.confidence(descr)); } diff --git a/Code/Mantid/Framework/DataHandling/test/LoadSassenaTest.h b/Code/Mantid/Framework/DataHandling/test/LoadSassenaTest.h index 7e3ffd555ec..fb34ea78da4 100644 --- a/Code/Mantid/Framework/DataHandling/test/LoadSassenaTest.h +++ b/Code/Mantid/Framework/DataHandling/test/LoadSassenaTest.h @@ -28,7 +28,7 @@ public: { if( !m_alg.isInitialized() ) m_alg.initialize(); m_alg.setPropertyValue( "Filename", m_inputFile ); - Mantid::Kernel::HDFDescriptor descr(m_alg.getPropertyValue("Filename")); + Mantid::Kernel::NexusDescriptor descr(m_alg.getPropertyValue("Filename")); TS_ASSERT_EQUALS(m_alg.confidence(descr), 99); } diff --git a/Code/Mantid/Framework/DataHandling/test/LoadTOFRawNexusTest.h b/Code/Mantid/Framework/DataHandling/test/LoadTOFRawNexusTest.h index df760f3dc47..118719863f8 100644 --- a/Code/Mantid/Framework/DataHandling/test/LoadTOFRawNexusTest.h +++ b/Code/Mantid/Framework/DataHandling/test/LoadTOFRawNexusTest.h @@ -33,19 +33,19 @@ public: TS_ASSERT_THROWS_NOTHING( alg.initialize() ); alg.setPropertyValue("Filename", "REF_L_32035.nxs"); - Mantid::Kernel::HDFDescriptor descr(alg.getPropertyValue("Filename")); + Mantid::Kernel::NexusDescriptor descr(alg.getPropertyValue("Filename")); TS_ASSERT_EQUALS( alg.confidence(descr), 80 ); alg.setPropertyValue("Filename", "CNCS_7860_event.nxs"); - Mantid::Kernel::HDFDescriptor descr2(alg.getPropertyValue("Filename")); + Mantid::Kernel::NexusDescriptor descr2(alg.getPropertyValue("Filename")); TS_ASSERT_EQUALS( alg.confidence(descr2), 20 ); alg.setPropertyValue("Filename", "argus0026577.nxs"); - Mantid::Kernel::HDFDescriptor descr3(alg.getPropertyValue("Filename")); + Mantid::Kernel::NexusDescriptor descr3(alg.getPropertyValue("Filename")); TS_ASSERT_EQUALS( alg.confidence(descr3), 0 ); alg.setPropertyValue("Filename", "PG3_733.nxs"); - Mantid::Kernel::HDFDescriptor descr4(alg.getPropertyValue("Filename")); + Mantid::Kernel::NexusDescriptor descr4(alg.getPropertyValue("Filename")); TS_ASSERT_EQUALS( alg.confidence(descr4), 0 ); } diff --git a/Code/Mantid/Framework/Kernel/CMakeLists.txt b/Code/Mantid/Framework/Kernel/CMakeLists.txt index 4dabe75619b..37a95ec5f64 100644 --- a/Code/Mantid/Framework/Kernel/CMakeLists.txt +++ b/Code/Mantid/Framework/Kernel/CMakeLists.txt @@ -27,7 +27,6 @@ set ( SRC_FILES src/FloatingPointComparison.cpp src/FreeBlock.cpp src/Glob.cpp - src/HDFDescriptor.cpp src/IPropertyManager.cpp src/ISaveable.cpp src/InstrumentInfo.cpp @@ -55,6 +54,7 @@ set ( SRC_FILES src/MultiFileValidator.cpp src/NDRandomNumberGenerator.cpp src/NeutronAtom.cpp + src/NexusDescriptor.cpp src/NexusTestHelper.cpp src/ParaViewVersion.cpp src/ProgressBase.cpp @@ -146,7 +146,6 @@ set ( INC_FILES inc/MantidKernel/FreeBlock.h inc/MantidKernel/FunctionTask.h inc/MantidKernel/Glob.h - inc/MantidKernel/HDFDescriptor.h inc/MantidKernel/IPropertyManager.h inc/MantidKernel/IPropertySettings.h inc/MantidKernel/ISaveable.h @@ -181,6 +180,7 @@ set ( INC_FILES inc/MantidKernel/NDPseudoRandomNumberGenerator.h inc/MantidKernel/NDRandomNumberGenerator.h inc/MantidKernel/NeutronAtom.h + inc/MantidKernel/NexusDescriptor.h inc/MantidKernel/NexusTestHelper.h inc/MantidKernel/NullValidator.h inc/MantidKernel/ParaViewVersion.h @@ -266,7 +266,6 @@ set ( TEST_FILES FunctionTaskTest.h GlobTest.h HermitePolynomialsTest.h - HDFDescriptorTest.h IPropertySettingsTest.h ISaveableTest.h IValidatorTest.h @@ -292,6 +291,7 @@ set ( TEST_FILES NDPseudoRandomNumberGeneratorTest.h NDRandomNumberGeneratorTest.h NeutronAtomTest.h + NexusDescriptorTest.h NullValidatorTest.h ProgressBaseTest.h ProgressTextTest.h diff --git a/Code/Mantid/Framework/Kernel/inc/MantidKernel/HDFDescriptor.h b/Code/Mantid/Framework/Kernel/inc/MantidKernel/NexusDescriptor.h similarity index 92% rename from Code/Mantid/Framework/Kernel/inc/MantidKernel/HDFDescriptor.h rename to Code/Mantid/Framework/Kernel/inc/MantidKernel/NexusDescriptor.h index 348de678854..ed08929bc23 100644 --- a/Code/Mantid/Framework/Kernel/inc/MantidKernel/HDFDescriptor.h +++ b/Code/Mantid/Framework/Kernel/inc/MantidKernel/NexusDescriptor.h @@ -1,5 +1,5 @@ -#ifndef MANTID_KERNEL_HIERARCHICALFILEDESCRIPTOR_H_ -#define MANTID_KERNEL_HIERARCHICALFILEDESCRIPTOR_H_ +#ifndef MANTID_KERNEL_NEXUSDESCRIPTOR_H_ +#define MANTID_KERNEL_NEXUSDESCRIPTOR_H_ #include "MantidKernel/ClassMacros.h" #include "MantidKernel/DllConfig.h" @@ -20,7 +20,7 @@ namespace Mantid { /** - Defines a wrapper around a file whose internal structure is stored in a hierarchy, e.g NeXus. + Defines a wrapper around a file whose internal structure can be accessed using the NeXus API On construction the simple details about the layout of the file are cached for faster querying later. @@ -44,7 +44,7 @@ namespace Mantid File change history is stored at: <https://github.com/mantidproject/mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ - class MANTID_KERNEL_DLL HDFDescriptor + class MANTID_KERNEL_DLL NexusDescriptor { public: /// Enumerate HDF possible versions @@ -63,9 +63,9 @@ namespace Mantid public: /// Constructor accepting a filename - HDFDescriptor(const std::string & filename); + NexusDescriptor(const std::string & filename); /// Destructor - ~HDFDescriptor(); + ~NexusDescriptor(); /** * Access the filename @@ -97,8 +97,8 @@ namespace Mantid bool classTypeExists(const std::string & classType) const; private: - DISABLE_DEFAULT_CONSTRUCT(HDFDescriptor); - DISABLE_COPY_AND_ASSIGN(HDFDescriptor); + DISABLE_DEFAULT_CONSTRUCT(NexusDescriptor); + DISABLE_COPY_AND_ASSIGN(NexusDescriptor); /// Initialize object with filename void initialize(const std::string& filename); diff --git a/Code/Mantid/Framework/Kernel/src/HDFDescriptor.cpp b/Code/Mantid/Framework/Kernel/src/NexusDescriptor.cpp similarity index 74% rename from Code/Mantid/Framework/Kernel/src/HDFDescriptor.cpp rename to Code/Mantid/Framework/Kernel/src/NexusDescriptor.cpp index e9a22c66fbe..c49c01a698a 100644 --- a/Code/Mantid/Framework/Kernel/src/HDFDescriptor.cpp +++ b/Code/Mantid/Framework/Kernel/src/NexusDescriptor.cpp @@ -1,4 +1,4 @@ -#include "MantidKernel/HDFDescriptor.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/Exception.h" #include <nexus/NeXusFile.hpp> @@ -14,17 +14,17 @@ namespace Mantid namespace Kernel { //--------------------------------------------------------------------------------------------------------------------------- - // static HDFDescriptor constants + // static NexusDescriptor constants //--------------------------------------------------------------------------------------------------------------------------- /// Size of HDF magic number - const size_t HDFDescriptor::HDFMagicSize = 4; + const size_t NexusDescriptor::HDFMagicSize = 4; /// HDF cookie that is stored in the first 4 bytes of the file. - const unsigned char HDFDescriptor::HDFMagic[4] = {'\016','\003','\023','\001'}; // From HDF4::hfile.h + const unsigned char NexusDescriptor::HDFMagic[4] = {'\016','\003','\023','\001'}; // From HDF4::hfile.h /// Size of HDF5 signature - size_t HDFDescriptor::HDF5SignatureSize = 8; + size_t NexusDescriptor::HDF5SignatureSize = 8; /// signature identifying a HDF5 file. - const unsigned char HDFDescriptor::HDF5Signature[8] = { 137, 'H', 'D', 'F', '\r', '\n', '\032', '\n' }; + const unsigned char NexusDescriptor::HDF5Signature[8] = { 137, 'H', 'D', 'F', '\r', '\n', '\032', '\n' }; namespace { @@ -36,10 +36,10 @@ namespace Mantid * Currently simply checks for the HDF signatures and returns true if one of them is found * @param fileHandle A file handled opened and pointing at the start of the file. On return the * fileHandle is left at the start of the file - * @param version One of the HDFDescriptor::Version enumerations specifying the required version + * @param version One of the NexusDescriptor::Version enumerations specifying the required version * @return True if the file is considered hierarchical, false otherwise */ - bool isHDFHandle(FILE *fileHandle, HDFDescriptor::Version version) + bool isHDFHandle(FILE *fileHandle, NexusDescriptor::Version version) { if(!fileHandle) throw std::invalid_argument("HierarchicalFileDescriptor::isHierarchical - Invalid file handle"); @@ -48,16 +48,16 @@ namespace Mantid // HDF4 check requires 4 bytes, HDF5 check requires 8 bytes // Use same buffer and waste a few bytes if only checking HDF4 unsigned char buffer[8] = {'0','0','0','0','0','0','0','0'}; - std::fread(static_cast<void*>(&buffer), sizeof(unsigned char), HDFDescriptor::HDF5SignatureSize, fileHandle); + std::fread(static_cast<void*>(&buffer), sizeof(unsigned char), NexusDescriptor::HDF5SignatureSize, fileHandle); // Number of bytes read doesn't matter as if it is not enough then the memory simply won't match // as the buffer has been "zeroed" - if(version == HDFDescriptor::Version5 || version == HDFDescriptor::AnyVersion ) + if(version == NexusDescriptor::Version5 || version == NexusDescriptor::AnyVersion ) { - result = (std::memcmp(&buffer, &HDFDescriptor::HDF5Signature, HDFDescriptor::HDF5SignatureSize) == 0); + result = (std::memcmp(&buffer, &NexusDescriptor::HDF5Signature, NexusDescriptor::HDF5SignatureSize) == 0); } - if(!result && (version == HDFDescriptor::Version4 || version == HDFDescriptor::AnyVersion) ) + if(!result && (version == NexusDescriptor::Version4 || version == NexusDescriptor::AnyVersion) ) { - result = (std::memcmp(&buffer, &HDFDescriptor::HDFMagic, HDFDescriptor::HDFMagicSize) == 0); + result = (std::memcmp(&buffer, &NexusDescriptor::HDFMagic, NexusDescriptor::HDFMagicSize) == 0); } // Return file stream to start of file @@ -67,16 +67,16 @@ namespace Mantid } //--------------------------------------------------------------------------------------------------------------------------- - // static HDFDescriptor methods + // static NexusDescriptor methods //--------------------------------------------------------------------------------------------------------------------------- /** * Checks for the HDF signatures and returns true if one of them is found * @param filename A string filename to check - * @param version One of the HDFDescriptor::Version enumerations specifying the required version + * @param version One of the NexusDescriptor::Version enumerations specifying the required version * @return True if the file is considered hierarchical, false otherwise */ - bool HDFDescriptor::isHDF(const std::string & filename, const Version version) + bool NexusDescriptor::isHDF(const std::string & filename, const Version version) { FILE *fd = fopen(filename.c_str(), "rb"); if(!fd) @@ -89,7 +89,7 @@ namespace Mantid } //--------------------------------------------------------------------------------------------------------------------------- - // HDFDescriptor public methods + // NexusDescriptor public methods //--------------------------------------------------------------------------------------------------------------------------- /** * Constructs the wrapper @@ -97,17 +97,17 @@ namespace Mantid * @throws std::invalid_argument if the file is not identified to be hierarchical. This currently * involves simply checking for the signature if a HDF file at the start of the file */ - HDFDescriptor::HDFDescriptor(const std::string & filename) + NexusDescriptor::NexusDescriptor(const std::string & filename) : m_filename(), m_extension(), m_firstEntryNameType(), m_rootAttrs(), m_pathsToTypes(), m_file(NULL) { if(filename.empty()) { - throw std::invalid_argument("HDFDescriptor() - Empty filename '" + filename + "'"); + throw std::invalid_argument("NexusDescriptor() - Empty filename '" + filename + "'"); } if(!Poco::File(filename).exists()) { - throw std::invalid_argument("HDFDescriptor() - File '" + filename + "' does not exist"); + throw std::invalid_argument("NexusDescriptor() - File '" + filename + "' does not exist"); } try { @@ -115,19 +115,19 @@ namespace Mantid } catch(::NeXus::Exception &) { - throw std::invalid_argument("HDFDescriptor::initialize - File '" + filename + "' does not look like a HDF file."); + throw std::invalid_argument("NexusDescriptor::initialize - File '" + filename + "' does not look like a HDF file."); } } /** */ - HDFDescriptor::~HDFDescriptor() + NexusDescriptor::~NexusDescriptor() { delete m_file; } /// Returns the name & type of the first entry in the file - const std::pair<std::string,std::string> & HDFDescriptor::firstEntryNameType() const + const std::pair<std::string,std::string> & NexusDescriptor::firstEntryNameType() const { return m_firstEntryNameType; } @@ -136,7 +136,7 @@ namespace Mantid * @param name The name of an attribute * @return True if the attribute exists, false otherwise */ - bool HDFDescriptor::hasRootAttr(const std::string &name) const + bool NexusDescriptor::hasRootAttr(const std::string &name) const { return (m_rootAttrs.count(name) == 1); } @@ -145,7 +145,7 @@ namespace Mantid * @param path A string giving a path using UNIX-style path separators (/), e.g. /raw_data_1, /entry/bank1 * @return True if the path exists in the file, false otherwise */ - bool HDFDescriptor::pathExists(const std::string& path) const + bool NexusDescriptor::pathExists(const std::string& path) const { return (m_pathsToTypes.find(path) != m_pathsToTypes.end()); } @@ -155,7 +155,7 @@ namespace Mantid * @param type A string specifying the required type * @return True if the path exists in the file, false otherwise */ - bool HDFDescriptor::pathOfTypeExists(const std::string& path, const std::string & type) const + bool NexusDescriptor::pathOfTypeExists(const std::string& path, const std::string & type) const { auto it = m_pathsToTypes.find(path); if(it != m_pathsToTypes.end()) @@ -169,21 +169,23 @@ namespace Mantid * @param type A string specifying the required type * @return path A string giving a path using UNIX-style path separators (/), e.g. /raw_data_1, /entry/bank1 */ - std::string HDFDescriptor::pathOfType(const std::string & type) const { - auto iend = m_pathsToTypes.end(); - for (auto it = m_pathsToTypes.begin(); it != iend; ++it) { - if (type == it->second) - return it->first; - } - return ""; - } + std::string NexusDescriptor::pathOfType(const std::string & type) const + { + auto iend = m_pathsToTypes.end(); + for (auto it = m_pathsToTypes.begin(); it != iend; ++it) + { + if (type == it->second) + return it->first; + } + return ""; + } /** * @param classType A string name giving a class type * @return True if the type exists in the file, false otherwise */ - bool HDFDescriptor::classTypeExists(const std::string & classType) const + bool NexusDescriptor::classTypeExists(const std::string & classType) const { auto iend = m_pathsToTypes.end(); for(auto it = m_pathsToTypes.begin(); it != iend; ++it) @@ -194,13 +196,13 @@ namespace Mantid } //--------------------------------------------------------------------------------------------------------------------------- - // HDFDescriptor private methods + // NexusDescriptor private methods //--------------------------------------------------------------------------------------------------------------------------- /** * Creates the internal cached structure of the file as a tree of nodes */ - void HDFDescriptor::initialize(const std::string& filename) + void NexusDescriptor::initialize(const std::string& filename) { m_filename = filename; m_extension = "." + Poco::Path(filename).getExtension(); @@ -222,7 +224,7 @@ namespace Mantid * @param pmap [Out] An output map filled with mappings of path->type * @param level An integer defining the current level in the file */ - void HDFDescriptor::walkFile(::NeXus::File & file,const std::string & rootPath, const std::string & className, + void NexusDescriptor::walkFile(::NeXus::File & file,const std::string & rootPath, const std::string & className, std::map<std::string, std::string> & pmap, int level) { if (!rootPath.empty()) diff --git a/Code/Mantid/Framework/Kernel/test/HDFDescriptorTest.h b/Code/Mantid/Framework/Kernel/test/NexusDescriptorTest.h similarity index 70% rename from Code/Mantid/Framework/Kernel/test/HDFDescriptorTest.h rename to Code/Mantid/Framework/Kernel/test/NexusDescriptorTest.h index 34fef08452e..59a832cac18 100644 --- a/Code/Mantid/Framework/Kernel/test/HDFDescriptorTest.h +++ b/Code/Mantid/Framework/Kernel/test/NexusDescriptorTest.h @@ -1,9 +1,9 @@ -#ifndef MANTID_KERNEL_HDFDESCRIPTORTEST_H_ -#define MANTID_KERNEL_HDFDESCRIPTORTEST_H_ +#ifndef MANTID_KERNEL_NEXUSDESCRIPTORTEST_H_ +#define MANTID_KERNEL_NEXUSDESCRIPTORTEST_H_ #include <cxxtest/TestSuite.h> #include "MantidKernel/ConfigService.h" -#include "MantidKernel/HDFDescriptor.h" +#include "MantidKernel/NexusDescriptor.h" #include <boost/make_shared.hpp> #include <boost/shared_ptr.hpp> @@ -14,18 +14,18 @@ #include <cstdio> -using Mantid::Kernel::HDFDescriptor; +using Mantid::Kernel::NexusDescriptor; -class HDFDescriptorTest : public CxxTest::TestSuite +class NexusDescriptorTest : public CxxTest::TestSuite { public: // This pair of boilerplate methods prevent the suite being created statically // This means the constructor isn't called when running other tests - static HDFDescriptorTest *createSuite() { return new HDFDescriptorTest(); } - static void destroySuite( HDFDescriptorTest *suite ) { delete suite; } + static NexusDescriptorTest *createSuite() { return new NexusDescriptorTest(); } + static void destroySuite( NexusDescriptorTest *suite ) { delete suite; } - HDFDescriptorTest() + NexusDescriptorTest() { using Mantid::Kernel::ConfigService; auto dataPaths = ConfigService::Instance().getDataSearchDirs(); @@ -48,42 +48,42 @@ public: "The AutoTestData directory needs to be in the search path"); } - m_testHDF5 = boost::make_shared<HDFDescriptor>(m_testHDF5Path); + m_testHDF5 = boost::make_shared<NexusDescriptor>(m_testHDF5Path); } //=================================== Static isHDF methods ====================================== void test_isHDF_Returns_False_For_Non_HDF_Filename() { - TS_ASSERT(!HDFDescriptor::isHDF(m_testNonHDFPath)); - TS_ASSERT(!HDFDescriptor::isHDF(m_testNonHDFPath, HDFDescriptor::AnyVersion)); - TS_ASSERT(!HDFDescriptor::isHDF(m_testNonHDFPath, HDFDescriptor::Version4)); - TS_ASSERT(!HDFDescriptor::isHDF(m_testNonHDFPath, HDFDescriptor::Version5)); + TS_ASSERT(!NexusDescriptor::isHDF(m_testNonHDFPath)); + TS_ASSERT(!NexusDescriptor::isHDF(m_testNonHDFPath, NexusDescriptor::AnyVersion)); + TS_ASSERT(!NexusDescriptor::isHDF(m_testNonHDFPath, NexusDescriptor::Version4)); + TS_ASSERT(!NexusDescriptor::isHDF(m_testNonHDFPath, NexusDescriptor::Version5)); } void test_isHDF_Defaults_To_All_Versions() { - TS_ASSERT(HDFDescriptor::isHDF(m_testHDF4Path)); - TS_ASSERT(HDFDescriptor::isHDF(m_testHDF5Path)); + TS_ASSERT(NexusDescriptor::isHDF(m_testHDF4Path)); + TS_ASSERT(NexusDescriptor::isHDF(m_testHDF5Path)); } void test_isHDF_With_Version4_Returns_True_Only_For_HDF4() { - TS_ASSERT(HDFDescriptor::isHDF(m_testHDF4Path, HDFDescriptor::Version4)); - TS_ASSERT(!HDFDescriptor::isHDF(m_testHDF5Path, HDFDescriptor::Version4)); + TS_ASSERT(NexusDescriptor::isHDF(m_testHDF4Path, NexusDescriptor::Version4)); + TS_ASSERT(!NexusDescriptor::isHDF(m_testHDF5Path, NexusDescriptor::Version4)); } void test_isHDF_With_Version5_Returns_True_Only_For_HDF4() { - TS_ASSERT(HDFDescriptor::isHDF(m_testHDF5Path, HDFDescriptor::Version5)); - TS_ASSERT(!HDFDescriptor::isHDF(m_testHDF4Path, HDFDescriptor::Version5)); + TS_ASSERT(NexusDescriptor::isHDF(m_testHDF5Path, NexusDescriptor::Version5)); + TS_ASSERT(!NexusDescriptor::isHDF(m_testHDF4Path, NexusDescriptor::Version5)); } void test_isHDF_Throws_With_Invalid_Filename() { - TS_ASSERT_THROWS(HDFDescriptor::isHDF(""), std::invalid_argument); + TS_ASSERT_THROWS(NexusDescriptor::isHDF(""), std::invalid_argument); } - //=================================== HDFDescriptor methods ================================== + //=================================== NexusDescriptor methods ================================== void test_Constructor_Initializes_Object_Correctly_Given_HDF_File() { @@ -93,17 +93,17 @@ public: void test_Constructor_Throws_With_Empty_filename() { - TS_ASSERT_THROWS(HDFDescriptor(""), std::invalid_argument); + TS_ASSERT_THROWS(NexusDescriptor(""), std::invalid_argument); } void test_Constructor_Throws_With_NonExistant_filename() { - TS_ASSERT_THROWS(HDFDescriptor("__ThisShouldBeANonExistantFile.txt"), std::invalid_argument); + TS_ASSERT_THROWS(NexusDescriptor("__ThisShouldBeANonExistantFile.txt"), std::invalid_argument); } void test_Constructor_Throws_When_Given_File_Not_Identified_As_HDF() { - TS_ASSERT_THROWS(HDFDescriptor fd(m_testNonHDFPath), std::invalid_argument); + TS_ASSERT_THROWS(NexusDescriptor fd(m_testNonHDFPath), std::invalid_argument); } void test_File_Handle_Returned_By_Data_Is_Valid() @@ -174,8 +174,8 @@ private: std::string m_testHDF5Path; std::string m_testHDF4Path; std::string m_testNonHDFPath; - boost::shared_ptr<HDFDescriptor> m_testHDF5; + boost::shared_ptr<NexusDescriptor> m_testHDF5; }; -#endif /* MANTID_KERNEL_HDFDESCRIPTORTEST_H_ */ +#endif /* MANTID_KERNEL_NEXUSDESCRIPTORTEST_H_ */ diff --git a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h index 66ed5102d39..37cad7505f1 100644 --- a/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h +++ b/Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/LoadMD.h @@ -50,7 +50,7 @@ namespace MDAlgorithms virtual const std::string category() const { return "MDAlgorithms";} /// Returns a confidence value that this algorithm can load a file - int confidence(Kernel::HDFDescriptor & descriptor) const; + int confidence(Kernel::NexusDescriptor & descriptor) const; private: /// Sets documentation strings for this algorithm diff --git a/Code/Mantid/Framework/MDAlgorithms/src/LoadMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/LoadMD.cpp index a7955777db1..ef1fa3b1269 100644 --- a/Code/Mantid/Framework/MDAlgorithms/src/LoadMD.cpp +++ b/Code/Mantid/Framework/MDAlgorithms/src/LoadMD.cpp @@ -56,7 +56,7 @@ namespace Mantid namespace MDAlgorithms { - DECLARE_HDF_FILELOADER_ALGORITHM(LoadMD); + DECLARE_NEXUS_FILELOADER_ALGORITHM(LoadMD); //---------------------------------------------------------------------------------------------- /** Constructor @@ -78,7 +78,7 @@ namespace Mantid * @param descriptor A descriptor for the file * @returns An integer specifying the confidence level. 0 indicates it will not be used */ - int LoadMD::confidence(Kernel::HDFDescriptor & descriptor) const + int LoadMD::confidence(Kernel::NexusDescriptor & descriptor) const { int confidence(0); const auto & rootPathNameType = descriptor.firstEntryNameType(); diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/EventNexusFileMemento.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/EventNexusFileMemento.cpp index 11af894fdbe..3ae8a2ca52e 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/EventNexusFileMemento.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/EventNexusFileMemento.cpp @@ -3,7 +3,7 @@ #include "MantidAPI/FileLoaderRegistry.h" #include "MantidAPI/IEventWorkspace.h" #include "MantidGeometry/Crystal/OrientedLattice.h" -#include "MantidKernel/HDFDescriptor.h" +#include "MantidKernel/NexusDescriptor.h" #include "MantidKernel/Matrix.h" #include <iostream> #include <fstream> -- GitLab