Newer
Older
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
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source
// & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
#ifndef MANTID_DATAHANDLING_LOADNEXUSPROCESSED2_H_
#define MANTID_DATAHANDLING_LOADNEXUSPROCESSED2_H_
#include "MantidAPI/Algorithm.h"
#include "MantidDataHandling/DllConfig.h"
#include "MantidDataHandling/LoadNexusProcessed.h"
#include <string>
namespace Mantid {
namespace API {
class Workspace;
class MatrixWorkspace;
} // namespace API
namespace NeXus {
class NXEntry;
}
namespace DataHandling {
/// Layout information relating to detector-spectra mappings
enum class InstrumentLayout { Mantid, NexusFormat, NotRecognised };
/** LoadNexusProcessed2 : Second variation of LoadNexusProcess, built to handle
* ESS file specifics in addition to existing behaviour for standard Mantid
* Processed files.
*/
class MANTID_DATAHANDLING_DLL LoadNexusProcessed2 : public LoadNexusProcessed {
public:
const std::string name() const override;
int version() const override;
private:
void readSpectraToDetectorMapping(Mantid::NeXus::NXEntry &mtd_entry,
Mantid::API::MatrixWorkspace &ws) override;
/// Extract mapping information where it is build across NXDetectors
void extractMappingInfoNew(Mantid::NeXus::NXEntry &mtd_entry);
/// Load nexus geometry and apply to workspace
bool loadNexusGeometry(Mantid::API::Workspace &ws,
const int nWorkspaceEntries, Kernel::Logger &logger,
const std::string &filename) override;
/// Local caches
InstrumentLayout m_instrumentLayout = InstrumentLayout::Mantid;
std::vector<Indexing::SpectrumNumber> m_spectrumNumbers;
std::vector<Mantid::detid_t> m_detectorIds;
};
} // namespace DataHandling
} // namespace Mantid
#endif /* MANTID_DATAHANDLING_LOADNEXUSPROCESSED2_H_ */