-
Notifications
You must be signed in to change notification settings - Fork 122
/
LoadDiffCal.h
54 lines (46 loc) · 1.86 KB
/
LoadDiffCal.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
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2015 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 "MantidGeometry/Instrument.h"
#include "MantidKernel/System.h"
namespace H5 {
class H5File;
class Group;
} // namespace H5
namespace Mantid {
namespace DataHandling {
/** LoadDiffCal : TODO: DESCRIPTION
*/
class DLLExport LoadDiffCal : public API::Algorithm {
public:
const std::string name() const override;
int version() const override;
const std::vector<std::string> seeAlso() const override { return {"SaveDiffCal"}; }
const std::string category() const override;
const std::string summary() const override;
protected:
Parallel::ExecutionMode
getParallelExecutionMode(const std::map<std::string, Parallel::StorageMode> &storageModes) const override;
private:
void init() override;
void exec() override;
void getInstrument(H5::H5File &file);
void loadGroupingFromAlternateFile();
void runLoadCalFile();
void makeGroupingWorkspace(const std::vector<int32_t> &detids, const std::vector<int32_t> &groups);
void makeMaskWorkspace(const std::vector<int32_t> &detids, const std::vector<int32_t> &use);
void makeCalWorkspace(const std::vector<int32_t> &detids, const std::vector<double> &difc,
const std::vector<double> &difa, const std::vector<double> &tzero,
const std::vector<int32_t> &dasids, const std::vector<double> &offsets,
const std::vector<int32_t> &use);
std::string m_filename;
std::string m_workspaceName;
Geometry::Instrument_const_sptr m_instrument;
};
} // namespace DataHandling
} // namespace Mantid