Mantid
Loading...
Searching...
No Matches
LoadILLSALSA.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2021 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
10#include "MantidDataHandling/DllConfig.h"
13
14#include <H5Cpp.h>
15
16#include <memory>
17#include <string>
18#include <vector>
19
20namespace Mantid {
21namespace DataHandling {
25class MANTID_DATAHANDLING_DLL LoadILLSALSA : public API::IFileLoader<Kernel::NexusDescriptor> {
26public:
28 const std::string name() const override { return "LoadILLSALSA"; }
30 const std::string summary() const override { return "Loads an ILL SALSA NeXus file."; }
32 int version() const override { return 1; }
33 const std::vector<std::string> seeAlso() const override { return {"LoadNexus"}; }
35 const std::string category() const override { return "DataHandling\\Nexus;ILL\\Strain"; }
37 int confidence(Kernel::NexusDescriptor &descriptor) const override;
38
39private:
40 // Number of pixel on the detector in the vertical dimension
41 static const size_t VERTICAL_NUMBER_PIXELS;
42 // Number of pixel on the detector in the horizontal dimension
43 static const size_t HORIZONTAL_NUMBER_PIXELS;
44 // Initialisation code
45 void init() override;
46 // Execution code
47 void exec() override;
48 // set the instrument
49 void setInstrument(double distance, double angle);
50 // load data from v1 Nexus
51 void loadNexusV1(const H5::H5File &h5file);
52 // load data from V2 Nexus
53 void loadNexusV2(const H5::H5File &h5file);
54 // fill workspace with metadata
55 void fillWorkspaceMetadata(const std::string &filename);
56 // Output workspace
57 std::shared_ptr<DataObjects::Workspace2D> m_outputWorkspace;
58};
59
60} // namespace DataHandling
61} // namespace Mantid
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
Definition: IFileLoader.h:19
Loads an ILL SALSA NeXus file into a Mantid workspace.
Definition: LoadILLSALSA.h:25
const std::string category() const override
Algorithm's category for identification.
Definition: LoadILLSALSA.h:35
const std::string summary() const override
Summary of algorithms purpose.
Definition: LoadILLSALSA.h:30
int version() const override
Algorithm's version.
Definition: LoadILLSALSA.h:32
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Definition: LoadILLSALSA.h:33
std::shared_ptr< DataObjects::Workspace2D > m_outputWorkspace
Definition: LoadILLSALSA.h:57
static const size_t HORIZONTAL_NUMBER_PIXELS
Definition: LoadILLSALSA.h:43
const std::string name() const override
Algorithm's name.
Definition: LoadILLSALSA.h:28
static const size_t VERTICAL_NUMBER_PIXELS
Definition: LoadILLSALSA.h:41
Defines a wrapper around a file whose internal structure can be accessed using the NeXus API.
Helper class which provides the Collimation Length for SANS instruments.