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 "MantidNexus/NexusFile.h"
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(Nexus::NexusDescriptor & /*descriptor*/) const override { return 0; }
56
57private:
59 void init() override;
61 void execLoader() override;
62
64 void loadLogs(Nexus::File &file, const std::string &absolute_entry_name, const std::string &entry_class,
65 const std::shared_ptr<API::MatrixWorkspace> &workspace, const std::vector<std::string> &allow_list,
66 const std::vector<std::string> &block_list) const;
67
69 void loadNXLog(Nexus::File &file, const std::string &absolute_entry_name, const std::string &entry_class,
70 const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
71
78 void loadSELog(Nexus::File &file, const std::string &absolute_entry_name,
79 const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
80 void loadVetoPulses(Nexus::File &file, const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
82 void loadNPeriods(Nexus::File &file, const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
83
85 std::shared_ptr<API::Progress> m_progress;
86
89 std::string freqStart;
90
91 mutable std::vector<std::string> m_logsWithInvalidValues;
92};
93
94} // namespace DataHandling
95} // namespace Mantid
IPeaksWorkspace_sptr workspace
Loads the run logs from a NeXus file.
std::vector< std::string > m_logsWithInvalidValues
std::shared_ptr< API::Progress > m_progress
Progress reporting object.
LoadNexusLogs()
Default constructor.
int version() const override
Algorithm's version for identification overriding a virtual method.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
int confidence(Nexus::NexusDescriptor &) const override
Returns a confidence value that this algorithm can load a file.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
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.
Helper class which provides the Collimation Length for SANS instruments.