Mantid
Loading...
Searching...
No Matches
Framework
DataHandling
inc
MantidDataHandling
LoadNexusProcessed2.h
Go to the documentation of this file.
1
// Mantid Repository : https://github.com/mantidproject/mantid
2
//
3
// Copyright © 2019 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
9
#include "
MantidAPI/Algorithm.h
"
10
#include "MantidDataHandling/DllConfig.h"
11
#include "
MantidDataHandling/LoadNexusProcessed.h
"
12
#include "
MantidGeometry/IDTypes.h
"
13
#include "MantidIndexing/SpectrumNumber.h"
14
#include "
MantidNexus/NexusDescriptor.h
"
15
#include <string>
16
#include <unordered_map>
17
18
namespace
Mantid
{
19
namespace
API
{
20
class
Workspace;
21
class
MatrixWorkspace;
22
}
// namespace API
23
namespace
Nexus {
24
class
NXEntry;
25
}
26
namespace
DataHandling {
28
enum class
InstrumentLayout
{
Mantid
,
NexusFormat
,
NotRecognised
};
29
37
class
MANTID_DATAHANDLING_DLL
LoadNexusProcessed2
:
public
LoadNexusProcessed
{
38
public
:
39
// algorithm "name" is still "LoadNexusProcessed" (not "LoadNexusProcessed2"):
40
// `cppcheck` has an issue with any "useless" override.
41
// const std::string name() const override;
42
43
int
version()
const override
;
44
int
confidence(
Nexus::NexusDescriptor
&descriptor)
const override
;
45
46
private
:
47
void
readSpectraToDetectorMapping(
Mantid::Nexus::NXEntry
&mtd_entry,
Mantid::API::MatrixWorkspace
&ws)
override
;
48
50
bool
loadNexusGeometry(
Mantid::API::Workspace
&ws,
size_t
entryNumber,
Kernel::Logger
&logger,
51
const
std::string &filePath)
override
;
52
54
void
extractMappingInfoNew(
const
Mantid::Nexus::NXEntry
&mtd_entry);
55
56
InstrumentLayout
m_instrumentLayout = InstrumentLayout::Mantid;
57
58
// Local cache vectors:
59
// spectral mapping information is accumulated before
60
// the instrument geometry has been completely loaded.
61
//
62
// The key is the NXentry-group name (in order to allow for group workspaces).
63
std::unordered_map<std::string, std::vector<Indexing::SpectrumNumber>>
m_spectrumNumberss
;
64
std::unordered_map<std::string, std::vector<Mantid::detid_t>>
m_detectorIdss
;
65
std::unordered_map<std::string, std::vector<int>>
m_detectorCountss
;
66
};
67
68
}
// namespace DataHandling
69
}
// namespace Mantid
Algorithm.h
IDTypes.h
LoadNexusProcessed.h
NexusDescriptor.h
Mantid::API::MatrixWorkspace
Base MatrixWorkspace Abstract Class.
Definition
MatrixWorkspace.h:92
Mantid::API::Workspace
Base Workspace Abstract Class.
Definition
Workspace.h:29
Mantid::DataHandling::LoadNexusProcessed2
LoadNexusProcessed2 : Second variation of LoadNexusProcess, built to handle ESS file specifics in add...
Definition
LoadNexusProcessed2.h:37
Mantid::DataHandling::LoadNexusProcessed2::m_spectrumNumberss
std::unordered_map< std::string, std::vector< Indexing::SpectrumNumber > > m_spectrumNumberss
Definition
LoadNexusProcessed2.h:63
Mantid::DataHandling::LoadNexusProcessed2::m_detectorCountss
std::unordered_map< std::string, std::vector< int > > m_detectorCountss
Definition
LoadNexusProcessed2.h:65
Mantid::DataHandling::LoadNexusProcessed2::m_detectorIdss
std::unordered_map< std::string, std::vector< Mantid::detid_t > > m_detectorIdss
Definition
LoadNexusProcessed2.h:64
Mantid::DataHandling::LoadNexusProcessed
Loads a workspace from a NeXus Processed entry in a NeXus file.
Definition
LoadNexusProcessed.h:40
Mantid::Kernel::Logger
The Logger class is in charge of the publishing messages from the framework through various channels.
Definition
Logger.h:51
Mantid::Nexus::NXEntry
Implements NXentry Nexus class.
Definition
NexusClasses.h:667
Mantid::Nexus::NexusDescriptor
Definition
NexusDescriptor.h:23
API
Definition
ChudleyElliotSQE.h:11
Mantid::DataHandling::InstrumentLayout
InstrumentLayout
Layout information relating to detector-spectra mappings.
Definition
LoadNexusProcessed2.h:28
Mantid::DataHandling::InstrumentLayout::NexusFormat
@ NexusFormat
Mantid::DataHandling::InstrumentLayout::Mantid
@ Mantid
Mantid::DataHandling::InstrumentLayout::NotRecognised
@ NotRecognised
Mantid
Helper class which provides the Collimation Length for SANS instruments.
Definition
AbsorptionCorrection.h:18
Generated by
1.9.8