Mantid
Loading...
Searching...
No Matches
EQSANSLoad.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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//----------------------------------------------------------------------
12#include "MantidAPI/Algorithm.h"
16
17namespace Mantid {
18namespace WorkflowAlgorithms {
24class DLLExport EQSANSLoad final : public API::Algorithm {
25public:
28 : API::Algorithm(), m_low_TOF_cut(0), m_high_TOF_cut(0), m_center_x(0), m_center_y(0), m_mask_as_string(""),
29 m_output_message(""), m_moderator_position(0) {
30 for (int i = 0; i < 3; i++)
31 for (int j = 0; j < 8; j++)
32 m_slit_positions[i][j] = EQSANSInstrument::default_slit_positions[i][j];
33
34 // Slit to source distance in mm for the three slit wheels
35 m_slit_to_source[0] = 10080;
36 m_slit_to_source[1] = 11156;
37 m_slit_to_source[2] = 12150;
38 }
40 const std::string name() const override { return "EQSANSLoad"; }
42 const std::string summary() const override { return "Load EQSANS data."; }
44 int version() const override { return (1); }
46 const std::string category() const override { return "Workflow\\SANS"; }
47
48private:
50 void init() override;
52 void exec() override;
53 std::string findConfigFile(const int &run);
54 void readConfigFile(const std::string &filePath);
55 void readRectangularMasks(const std::string &line);
56 void readTOFcuts(const std::string &line);
57 void readBeamCenter(const std::string &line);
58 void readModeratorPosition(const std::string &line);
59 void readSourceSlitSize(const std::string &line);
60 void getSourceSlitSize();
61 void moveToBeamCenter();
62
65 double m_center_x;
66 double m_center_y;
67 std::string m_mask_as_string;
68 std::string m_output_message;
71 double m_slit_positions[3][8];
72 int m_slit_to_source[3];
73};
74
75} // namespace WorkflowAlgorithms
76} // namespace Mantid
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
Definition: System.h:53
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Subtract dark current for EQSANS.
Definition: EQSANSLoad.h:24
const std::string name() const override
Algorithm's name.
Definition: EQSANSLoad.h:40
API::MatrixWorkspace_sptr dataWS
Definition: EQSANSLoad.h:70
int version() const override
Algorithm's version.
Definition: EQSANSLoad.h:44
const std::string category() const override
Algorithm's category for identification.
Definition: EQSANSLoad.h:46
const std::string summary() const override
Summary of algorithms purpose.
Definition: EQSANSLoad.h:42
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.