Mantid
Loading...
Searching...
No Matches
LoadSINQFocus.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2013 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//---------------------------------------------------
14#include "MantidDataHandling/DllConfig.h"
17
18namespace Mantid {
19namespace DataHandling {
20
30class MANTID_DATAHANDLING_DLL LoadSINQFocus : public API::IFileLoader<Kernel::NexusDescriptor>,
32public:
34 const std::string name() const override;
36 const std::string summary() const override { return "Loads a FOCUS nexus file from the PSI"; }
37
38 int version() const override;
39 const std::vector<std::string> seeAlso() const override { return {"LoadSINQ", "LoadSINQFile"}; }
40 const std::string category() const override;
41
43 int confidence(Kernel::NexusDescriptor &descriptor) const override;
44
45private:
46 void init() override;
47 void exec() override;
48 void setInstrumentName(const NeXus::NXEntry &entry);
49 void initWorkSpace(NeXus::NXEntry &);
50 void loadDataIntoTheWorkSpace(NeXus::NXEntry &);
52 static double calculateError(double in) { return sqrt(in); }
53 void loadExperimentDetails(const NeXus::NXEntry &);
54 void loadRunDetails(const NeXus::NXEntry &);
55 void runLoadInstrument();
56
57 std::vector<std::string> m_supportedInstruments;
58 std::string m_instrumentName;
59 std::string m_instrumentPath;
61 size_t m_numberOfTubes; // number of tubes - X
62 size_t m_numberOfPixelsPerTube; // number of pixels per tube - Y
63 size_t m_numberOfChannels; // time channels - Z
65};
66
67} // namespace DataHandling
68} // namespace Mantid
Class for marking algorithms as deprecated.
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 PSI nexus file into a Mantid workspace.
Definition: LoadSINQFocus.h:31
API::MatrixWorkspace_sptr m_localWorkspace
Definition: LoadSINQFocus.h:60
static double calculateError(double in)
Calculate error for y.
Definition: LoadSINQFocus.h:52
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: LoadSINQFocus.h:39
std::vector< std::string > m_supportedInstruments
Definition: LoadSINQFocus.h:57
const std::string summary() const override
Summary of algorithms purpose.
Definition: LoadSINQFocus.h:36
Defines a wrapper around a file whose internal structure can be accessed using the NeXus API.
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.