-
Notifications
You must be signed in to change notification settings - Fork 122
/
LoadMcStas.h
47 lines (37 loc) · 1.7 KB
/
LoadMcStas.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
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2013 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/IEventWorkspace.h"
#include "MantidAPI/IFileLoader.h"
#include "MantidKernel/NexusDescriptor.h"
#include "MantidKernel/System.h"
#include "MantidAPI/WorkspaceGroup_fwd.h"
namespace Mantid {
namespace DataHandling {
/** LoadMcStas : TODO: DESCRIPTION
*/
class DLLExport LoadMcStas : public API::IFileLoader<Kernel::NexusDescriptor> {
public:
const std::string name() const override;
/// Summary of algorithms purpose
const std::string summary() const override { return "Loads a McStas NeXus file into an workspace."; }
int version() const override;
const std::vector<std::string> seeAlso() const override { return {"LoadMcStasNexus", "LoadNexus"}; }
const std::string category() const override;
/// Returns a confidence value that this algorithm can load a file
int confidence(Kernel::NexusDescriptor &descriptor) const override;
private:
void init() override;
void exec() override;
API::WorkspaceGroup_sptr groupWorkspaces(const std::vector<std::string> &workspaces) const;
std::vector<std::string> readEventData(const std::map<std::string, std::string> &eventEntries, ::NeXus::File &nxFile);
std::vector<std::string> readHistogramData(const std::map<std::string, std::string> &histogramEntries,
::NeXus::File &nxFile);
};
} // namespace DataHandling
} // namespace Mantid