Mantid
Loading...
Searching...
No Matches
LoadILLTOF3.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2025 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"
14
15namespace Mantid {
16namespace DataHandling {
20class MANTID_DATAHANDLING_DLL LoadILLTOF3 : public API::IFileLoader<Nexus::NexusDescriptor> {
21public:
25 const std::string name() const override { return "LoadILLTOF"; }
27 const std::string summary() const override { return "Loads an ILL TOF NeXus file."; }
28
30 int version() const override { return 3; }
31 const std::vector<std::string> seeAlso() const override { return {"LoadNexus"}; }
33 const std::string category() const override { return "DataHandling\\Nexus;ILL\\Direct"; }
34
36 int confidence(Nexus::NexusDescriptor &descriptor) const override;
37
38private:
39 // Initialisation code
40 void init() override;
41 // Execution code
42 void exec() override;
43
44 void addAllNexusFieldsAsProperties(const std::string &filename);
45 void addEnergyToRun();
46 void addFacility();
47 void addPulseInterval();
48
49 void fillStaticWorkspace(const Nexus::NXEntry &entry, const std::vector<std::string> &monitorList, bool convertToTOF);
50 void fillScanWorkspace(const Nexus::NXEntry &entry, const std::vector<std::string> &monitorList);
51
52 std::vector<std::string> getMonitorInfo(const Nexus::NXEntry &firstEntry);
53 void initWorkspace(const Nexus::NXEntry &entry);
54
55 void loadInstrumentDetails(const Nexus::NXEntry &);
56 void loadTimeDetails(const Nexus::NXEntry &entry);
57
58 std::vector<double> prepareAxis(const Nexus::NXEntry &entry, bool convertToTOF);
59
61
62 std::string m_instrumentName;
63 std::string m_instrumentAddress;
64
65 // Variables describing the data in the detector
66 size_t m_numberOfTubes; // number of tubes - X
67 size_t m_numberOfPixelsPerTube; // number of pixels per tube - Y
68 size_t m_numberOfChannels; // time channels - Z
69 size_t m_numberOfHistograms; // number of histograms (individual detectors)
70 size_t m_numberOfMonitors; // number of monitors
71
72 // Values parsed from the nexus file
76 std::string m_monitorName;
77 bool m_isScan; // whether the loaded data is a scan measurement
78};
79
80} // namespace DataHandling
81} // 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 IN4/5/6/Panther NeXus file into a Mantid workspace.
Definition LoadILLTOF3.h:20
int version() const override
Algorithm's version.
Definition LoadILLTOF3.h:30
const std::string category() const override
Algorithm's category for identification.
Definition LoadILLTOF3.h:33
std::string m_instrumentName
Name of the instrument.
Definition LoadILLTOF3.h:62
std::string m_instrumentAddress
Name of the instrument address.
Definition LoadILLTOF3.h:63
const std::string name() const override
Algorithm's name.
Definition LoadILLTOF3.h:25
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 LoadILLTOF3.h:31
const std::string summary() const override
Summary of algorithms purpose.
Definition LoadILLTOF3.h:27
API::MatrixWorkspace_sptr m_localWorkspace
Definition LoadILLTOF3.h:60
Implements NXentry Nexus class.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.