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"
15#include "MantidWorkflowAlgorithms/DllConfig.h"
17
18namespace Mantid {
19namespace WorkflowAlgorithms {
25class MANTID_WORKFLOWALGORITHMS_DLL EQSANSLoad final : public API::Algorithm {
26public:
29 : API::Algorithm(), m_low_TOF_cut(0), m_high_TOF_cut(0), m_center_x(0), m_center_y(0), m_mask_as_string(""),
30 m_output_message(""), m_moderator_position(0) {
31 for (int i = 0; i < 3; i++)
32 for (int j = 0; j < 8; j++)
33 m_slit_positions[i][j] = EQSANSInstrument::default_slit_positions[i][j];
34
35 // Slit to source distance in mm for the three slit wheels
36 m_slit_to_source[0] = 10080;
37 m_slit_to_source[1] = 11156;
38 m_slit_to_source[2] = 12150;
39 }
41 const std::string name() const override { return "EQSANSLoad"; }
43 const std::string summary() const override { return "Load EQSANS data."; }
45 int version() const override { return (1); }
47 const std::string category() const override { return "Workflow\\SANS"; }
48
49private:
51 void init() override;
53 void exec() override;
54 std::string findConfigFile(const int &run);
55 void readConfigFile(const std::string &filePath);
56 void readRectangularMasks(const std::string &line);
57 void readTOFcuts(const std::string &line);
58 void readBeamCenter(const std::string &line);
59 void readModeratorPosition(const std::string &line);
60 void readSourceSlitSize(const std::string &line);
61 void getSourceSlitSize();
62 void moveToBeamCenter();
63
66 double m_center_x;
67 double m_center_y;
68 std::string m_mask_as_string;
69 std::string m_output_message;
72 double m_slit_positions[3][8];
73 int m_slit_to_source[3];
74};
75
76} // namespace WorkflowAlgorithms
77} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Subtract dark current for EQSANS.
Definition EQSANSLoad.h:25
const std::string name() const override
Algorithm's name.
Definition EQSANSLoad.h:41
API::MatrixWorkspace_sptr dataWS
Definition EQSANSLoad.h:71
int version() const override
Algorithm's version.
Definition EQSANSLoad.h:45
const std::string category() const override
Algorithm's category for identification.
Definition EQSANSLoad.h:47
const std::string summary() const override
Summary of algorithms purpose.
Definition EQSANSLoad.h:43
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.