Mantid
Loading...
Searching...
No Matches
GetSpiceDataRawCountsFromMD.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 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
12#include "MantidMDAlgorithms/DllConfig.h"
13
14namespace Mantid {
15namespace MDAlgorithms {
16
21class MANTID_MDALGORITHMS_DLL GetSpiceDataRawCountsFromMD final : public API::Algorithm {
22public:
24 const std::string name() const override { return "GetSpiceDataRawCountsFromMD"; }
25
27 const std::string summary() const override {
28 return "Get detectors' raw counts or sample environment log values from "
29 "IMDEventWorkspace created from SPICE data file.";
30 }
31
33 int version() const override { return (1); }
34
36 const std::string category() const override { return "Diffraction\\ConstantWavelength"; }
37
38private:
40 void init() override;
41
43 void exec() override;
44
46 void exportDetCountsOfRun(const API::IMDEventWorkspace_const_sptr &datamdws,
47 const API::IMDEventWorkspace_const_sptr &monitormdws, const int runnumber,
48 std::vector<double> &vecX, std::vector<double> &vecY, std::string &xlabel,
49 std::string &ylabel, bool donormalize);
50
52 void exportIndividualDetCounts(const API::IMDEventWorkspace_const_sptr &datamdws,
53 const API::IMDEventWorkspace_const_sptr &monitormdws, const int detid,
54 std::vector<double> &vecX, std::vector<double> &vecY, std::string &xlabel,
55 std::string &ylabel, const bool &donormalize);
56
58 void exportSampleLogValue(const API::IMDEventWorkspace_const_sptr &datamdws, const std::string &samplelogname,
59 std::vector<double> &vecX, std::vector<double> &vecY, std::string &xlabel,
60 std::string &ylabel);
61
63 void getDetCounts(const API::IMDEventWorkspace_const_sptr &mdws, const int &runnumber, const int &detid,
64 std::vector<double> &vecX, std::vector<double> &vecY, bool formX);
65
67 void getSampleLogValues(const API::IMDEventWorkspace_const_sptr &mdws, const std::string &samplelogname,
68 const int runnumber, std::vector<double> &vecSampleLog);
69
71 API::MatrixWorkspace_sptr createOutputWorkspace(const std::vector<double> &vecX, const std::vector<double> &vecY,
72 const std::string &xlabel, const std::string &ylabel);
73};
74
75} // namespace MDAlgorithms
76} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
GetSpiceDataRawCountsFromMD : Export raw detectors' counts or sample log values from IMDEventWorkspac...
const std::string category() const override
Algorithm's category for identification.
int version() const override
Algorithm's version.
const std::string summary() const override
Summary of algorithms purpose.
const std::string name() const override
Algorithm's name.
std::shared_ptr< const IMDEventWorkspace > IMDEventWorkspace_const_sptr
Shared pointer to Mantid::API::IMDEventWorkspace (const version)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
Helper class which provides the Collimation Length for SANS instruments.