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<Nexus::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(Nexus::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(const 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(const Nexus::NXEntry &entry); //, int ElasticPeakPosition = -1);
53
54 void runLoadInstrument();
55
57
58 std::string m_instrumentName;
59 std::string m_instrumentAddress;
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
std::string name
Definition Run.cpp:60
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
std::string m_instrumentAddress
Name of the instrument address.
Definition LoadMLZ.h:59
API::MatrixWorkspace_sptr m_localWorkspace
Definition LoadMLZ.h:56
std::string m_instrumentName
Name of the instrument.
Definition LoadMLZ.h:58
Nexus::NXData loadNexusFileData(Nexus::NXEntry &entry)
std::vector< std::vector< int > > getMonitorInfo(Nexus::NXEntry &firstEntry)
std::vector< std::string > m_supportedInstruments
Definition LoadMLZ.h:81
const std::string summary() const override
Summary of algorithms purpose.
Definition LoadMLZ.h:31
Implements NXdata Nexus class.
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.