Mantid
Loading...
Searching...
No Matches
LoadMLZ.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 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
9//---------------------------------------------------
10// Includes
11//---------------------------------------------------
13#include "MantidDataHandling/DllConfig.h"
16
17namespace Mantid {
18namespace DataHandling {
22class MANTID_DATAHANDLING_DLL LoadMLZ : public API::IFileLoader<Kernel::NexusDescriptor> {
23public:
24 LoadMLZ();
25
26 const std::string name() const override;
27 int version() const override;
28 const std::string category() const override;
29
31 const std::string summary() const override { return "Loads a nexus file from MLZ facility."; }
32
34 int confidence(Kernel::NexusDescriptor &descriptor) const override;
35
36private:
37 void init() override;
38 void exec() override;
39
40 void loadInstrumentDetails(const NeXus::NXEntry &);
41 void loadTimeDetails(const NeXus::NXEntry &entry);
42
43 std::vector<std::vector<int>> getMonitorInfo(NeXus::NXEntry &firstEntry);
44
45 void initWorkSpace(NeXus::NXEntry &entry);
46 void initInstrumentSpecific();
47 void loadRunDetails(NeXus::NXEntry &entry);
48 void loadExperimentDetails(const NeXus::NXEntry &entry);
49
51 void maskDetectors(const NeXus::NXEntry &entry);
52 void loadDataIntoTheWorkSpace(NeXus::NXEntry &entry); //, int ElasticPeakPosition = -1);
53
54 void runLoadInstrument();
55
57
58 std::string m_instrumentName;
59 std::string m_instrumentPath;
60
61 // Variables describing the data in the detector
62 size_t m_numberOfTubes; // number of tubes - X
63 size_t m_numberOfPixelsPerTube; // number of pixels per tube - Y
64 size_t m_numberOfChannels; // time channels - Z
66
67 /* Values parsed from the nexus file */
75
76 double m_l1;
77 double m_l2;
78
79 double m_t1; // time of flight from source to sample
80
81 std::vector<std::string> m_supportedInstruments;
82};
83
84} // namespace DataHandling
85} // 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
LoadMLZ : Loads MLZ nexus or hdf file into a Mantid workspace.
Definition: LoadMLZ.h:22
API::MatrixWorkspace_sptr m_localWorkspace
Definition: LoadMLZ.h:56
std::string m_instrumentName
Name of the instrument.
Definition: LoadMLZ.h:58
std::string m_instrumentPath
Name of the instrument path.
Definition: LoadMLZ.h:59
std::vector< std::vector< int > > getMonitorInfo(NeXus::NXEntry &firstEntry)
NeXus::NXData loadNexusFileData(NeXus::NXEntry &entry)
std::vector< std::string > m_supportedInstruments
Definition: LoadMLZ.h:81
const std::string summary() const override
Summary of algorithms purpose.
Definition: LoadMLZ.h:31
Defines a wrapper around a file whose internal structure can be accessed using the NeXus API.
Implements NXdata Nexus class.
Definition: NexusClasses.h:795
Implements NXentry Nexus class.
Definition: NexusClasses.h:898
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.