-
Notifications
You must be signed in to change notification settings - Fork 122
/
ConjoinXRuns.h
62 lines (52 loc) · 1.99 KB
/
ConjoinXRuns.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include "MantidAPI/Algorithm.h"
#include "MantidAPI/MatrixWorkspace_fwd.h"
#include "MantidAlgorithms/DllConfig.h"
#include <list>
namespace Mantid {
namespace Algorithms {
/** ConjoinXRuns : This algorithms joins the input workspaces horizontally,
* i.e. by appending (concatenating) their columns.
*/
class MANTID_ALGORITHMS_DLL ConjoinXRuns : public API::Algorithm {
public:
const std::string name() const override;
int version() const override;
const std::string category() const override;
const std::string summary() const override;
std::map<std::string, std::string> validateInputs() override;
/// ConjoinXRuns parameter names of the paramter file for sample log merging
static const std::string SUM_MERGE;
static const std::string TIME_SERIES_MERGE;
static const std::string LIST_MERGE;
static const std::string WARN_MERGE;
static const std::string WARN_MERGE_TOLERANCES;
static const std::string FAIL_MERGE;
static const std::string FAIL_MERGE_TOLERANCES;
protected:
void fillHistory() override;
private:
void init() override;
void exec() override;
std::string checkLogEntry(const API::MatrixWorkspace_sptr &) const;
std::vector<double> getXAxis(const API::MatrixWorkspace_sptr &) const;
void joinSpectrum(int64_t);
/// Sample log entry name
std::string m_logEntry;
/// Progress reporting
std::unique_ptr<API::Progress> m_progress;
/// List of input matrix workspaces
std::list<API::MatrixWorkspace_sptr> m_inputWS;
/// Output workspace
API::MatrixWorkspace_sptr m_outWS;
/// X-axis cache if sample log is given
std::map<std::string, std::vector<double>> m_axisCache;
};
} // namespace Algorithms
} // namespace Mantid