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::Algorithm {
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
55private:
57 void init() override;
59 void exec() override;
60
62 void loadLogs(Nexus::File &file, const std::string &absolute_entry_name, const std::string &entry_class,
63 const std::shared_ptr<API::MatrixWorkspace> &workspace, const std::vector<std::string> &allow_list,
64 const std::vector<std::string> &block_list) const;
65
67 void loadNXLog(Nexus::File &file, const std::string &absolute_entry_name, const std::string &entry_class,
68 const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
69
76 void loadSELog(Nexus::File &file, const std::string &absolute_entry_name,
77 const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
78 void loadVetoPulses(Nexus::File &file, const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
80 void loadNPeriods(Nexus::File &file, const std::shared_ptr<API::MatrixWorkspace> &workspace) const;
81
83 std::shared_ptr<API::Progress> m_progress;
84
87 std::string freqStart;
88
89 mutable std::vector<std::string> m_logsWithInvalidValues;
90};
91
92} // namespace DataHandling
93} // namespace Mantid
IPeaksWorkspace_sptr workspace
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
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.
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.