Mantid
Loading...
Searching...
No Matches
LoadMuonNexus2.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidDataHandling/DllConfig.h"
15
16namespace Mantid {
17
18namespace DataHandling {
19
47class MANTID_DATAHANDLING_DLL LoadMuonNexus2 : public LoadMuonNexus {
48public:
52 const std::string name() const override { return "LoadMuonNexus"; }
54 const std::string summary() const override {
55 return "The LoadMuonNexus algorithm will read the given NeXus Muon data "
56 "file Version 2 and use the results to populate the named "
57 "workspace. LoadMuonNexus may be invoked by LoadNexus if it is "
58 "given a NeXus file of this type.";
59 }
60
62 int version() const override { return 2; }
63 const std::vector<std::string> seeAlso() const override { return {"LoadNexus"}; }
65 const std::string category() const override { return "DataHandling\\Nexus;Muon\\DataHandling"; }
66
68 int confidence(Kernel::NexusDescriptor &descriptor) const override;
69
70private:
72 void exec() override;
74 void doExec();
75
76 HistogramData::Histogram loadData(const Mantid::HistogramData::BinEdges &edges, const Mantid::NeXus::NXInt &counts,
77 int period, int spec);
78 void loadLogs(const API::MatrixWorkspace_sptr &ws, Mantid::NeXus::NXEntry &entry, int period);
79 void loadRunDetails(const DataObjects::Workspace2D_sptr &localWorkspace);
80 std::map<int, std::set<int>> loadDetectorMapping(const Mantid::NeXus::NXInt &spectrumIndex);
81};
82
83} // namespace DataHandling
84} // namespace Mantid
Loads an file in NeXus Muon format version 1 and 2 and stores it in a 2D workspace (Workspace2D class...
const std::string summary() const override
Summary of algorithms purpose.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
int version() const override
Algorithm's version for identification overriding a virtual method.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
It is a base class for loaders for versions 1 and 2 of the muon nexus file format.
Definition: LoadMuonNexus.h:50
Defines a wrapper around a file whose internal structure can be accessed using the NeXus API.
Templated class implementation of NXDataSet.
Definition: NexusClasses.h:203
Implements NXentry Nexus class.
Definition: NexusClasses.h:898
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< Workspace2D > Workspace2D_sptr
shared pointer to Mantid::DataObjects::Workspace2D
Helper class which provides the Collimation Length for SANS instruments.