Mantid
Loading...
Searching...
No Matches
LoadSwans.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2016 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
11#include "MantidDataHandling/DllConfig.h"
14#include <map>
15
16namespace Mantid {
17namespace DataHandling {
18
21class MANTID_DATAHANDLING_DLL LoadSwans final : public API::IFileLoader<Kernel::FileDescriptor> {
22public:
24 const std::string name() const override;
25 int version() const override;
26 const std::string category() const override;
27 const std::string summary() const override;
29 int confidence(Kernel::FileDescriptor &descriptor) const override;
30
31private:
32 void init() override;
33 void exec() override;
34 std::map<uint32_t, std::vector<uint32_t>> loadData();
35 std::vector<double> loadMetaData();
36 void setMetaDataAsWorkspaceProperties(const std::vector<double> &metadata);
37 void loadDataIntoTheWorkspace(const std::map<uint32_t, std::vector<uint32_t>> &eventMap);
38 void setTimeAxis();
39 void loadInstrument();
40 void placeDetectorInSpace();
41 unsigned int getDetectorSize();
42
43 // Member variables
45 unsigned int m_detector_size = 0;
46
47 // Constants:
48 // This has to be here because the data file to date has no metadata
49 const std::string m_instrumentName = "SWANS";
50};
51
52} // namespace DataHandling
53} // 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
LoadSwans : Test Loader to read data from the LDRD new SWANS detector.
Definition: LoadSwans.h:21
DataObjects::EventWorkspace_sptr m_ws
Definition: LoadSwans.h:44
Defines a wrapper around an open file.
std::shared_ptr< EventWorkspace > EventWorkspace_sptr
shared pointer to the EventWorkspace class
Helper class which provides the Collimation Length for SANS instruments.