Mantid
Loading...
Searching...
No Matches
LoadNexusLogs.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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
10#include "MantidDataHandling/DllConfig.h"
11#include <nexus/NeXusFile.hpp>
12#include <vector>
13
14namespace Mantid {
15namespace Kernel {
16class Property;
17}
18namespace API {
19class MatrixWorkspace;
20}
21
22namespace DataHandling {
23
37class MANTID_DATAHANDLING_DLL LoadNexusLogs : public API::NexusFileLoader {
38public:
42 const std::string name() const override { return "LoadNexusLogs"; }
44 const std::string summary() const override {
45 return "Loads run logs (temperature, pulse charges, etc.) from a NeXus "
46 "file and adds it to the run information in a workspace.";
47 }
48
50 int version() const override { return 1; }
51 const std::vector<std::string> seeAlso() const override { return {"LoadLog", "MergeLogs"}; }
53 const std::string category() const override { return "DataHandling\\Logs;DataHandling\\Nexus"; }
54
55 int confidence(Kernel::NexusHDF5Descriptor & /*descriptor*/) const override { return 0; }
56
57private:
59 void init() override;
61 void execLoader() override;
62
70 void loadLogs(::NeXus::File &file, const std::string &absolute_entry_name, const std::string &entry_class,
71 const std::shared_ptr<API::MatrixWorkspace> &workspace, const std::vector<std::string> &allow_list,
72 const std::vector<std::string> &block_list) const;
73
81 void loadNXLog(::NeXus::File &file, const std::string &absolute_entry_name, const std::string &entry_class,
82 const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
83
90 void loadSELog(::NeXus::File &file, const std::string &absolute_entry_name,
91 const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
92 void loadVetoPulses(::NeXus::File &file, const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
93 void loadNPeriods(::NeXus::File &file, const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
94
96 std::shared_ptr<API::Progress> m_progress;
97
100 std::string freqStart;
101
102 mutable std::vector<std::string> m_logsWithInvalidValues;
103};
104
105} // namespace DataHandling
106} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
Loads the run logs from a NeXus file.
Definition: LoadNexusLogs.h:37
std::vector< std::string > m_logsWithInvalidValues
std::shared_ptr< API::Progress > m_progress
Progress reporting object.
Definition: LoadNexusLogs.h:96
LoadNexusLogs()
Default constructor.
int confidence(Kernel::NexusHDF5Descriptor &) const override
Returns a confidence value that this algorithm can load a file.
Definition: LoadNexusLogs.h:55
int version() const override
Algorithm's version for identification overriding a virtual method.
Definition: LoadNexusLogs.h:50
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
Definition: LoadNexusLogs.h:42
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
Definition: LoadNexusLogs.h:53
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
Definition: LoadNexusLogs.h:51
std::string freqStart
Use frequency start for Monitor19 and Special1_19 logs with "No Time" for SNAP.
const std::string summary() const override
Summary of algorithms purpose.
Definition: LoadNexusLogs.h:44
Helper class which provides the Collimation Length for SANS instruments.