Mantid
Loading...
Searching...
No Matches
LoadBBY2.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2010 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
13// #include "MantidAPI/IFileLoader.h"
15#include "MantidDataHandling/DllConfig.h"
21
22namespace Mantid {
23namespace DataHandling {
24/*
25Loads a Bilby data file. Implements API::IFileLoader and its file check methods
26to recognise a file as the one containing Bilby data.
27
28@author David Mannicke (ANSTO), Anders Markvardsen (ISIS), Roman Tolchenov
29(Tessella plc)
30@date 11/07/2014
31*/
32
33class MANTID_DATAHANDLING_DLL LoadBBY2 : public API::NexusFileLoader {
34
36 // core values or non standard conversion
37 std::string sample_name;
38 std::string sample_description;
39 std::string start_time;
40 int64_t bm_counts;
41 int32_t att_pos;
44 bool is_tof; // tof or wavelength data
45 double wavelength; // -> /nvs067/lambda
49 };
50
51public:
52 // description
53 LoadBBY2();
54 int version() const override { return 1; }
55 const std::vector<std::string> seeAlso() const override { return {"Load", "LoadBBY"}; }
56 const std::string name() const override { return "LoadBBY2"; }
57 const std::string category() const override { return "DataHandling\\ANSTO"; }
58 const std::string summary() const override { return "Loads a Bilby data file into a workspace."; }
59
60 // returns a confidence value that this algorithm can load a specified file
61 int confidence(Nexus::NexusDescriptor &descriptor) const override;
62
63protected:
64 // initialisation
65 void init() override;
66 // execution
67 void execLoader() override;
68
69private:
70 // region of interest
71 static std::vector<bool> createRoiVector(const std::string &maskfile);
72
73 // instrument creation
74 void createInstrument(const Nexus::NXEntry &entry, uint64_t startTime, uint64_t endTime,
75 InstrumentInfo &instrumentInfo, std::map<std::string, double> &logParams,
76 std::map<std::string, std::string> &logStrings, std::map<std::string, std::string> &allParams);
77 void loadInstrumentParameters(const Nexus::NXEntry &entry, uint64_t startTime, uint64_t endTime,
78 std::map<std::string, double> &logParams,
79 std::map<std::string, std::string> &logStrings,
80 std::map<std::string, std::string> &allParams);
81
82 bool useHMScanTime{false};
83};
84
85} // namespace DataHandling
86} // namespace Mantid
const std::string name() const override
function to return a name of the algorithm, must be overridden in all algorithms
Definition LoadBBY2.h:56
const std::string summary() const override
function returns a summary message that will be displayed in the default GUI, and in the help.
Definition LoadBBY2.h:58
const std::string category() const override
function to return a category of the algorithm.
Definition LoadBBY2.h:57
int version() const override
function to return a version of the algorithm, must be overridden in all algorithms
Definition LoadBBY2.h:54
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 LoadBBY2.h:55
A class that holds information about an instrument.
Implements NXentry Nexus class.
Helper class which provides the Collimation Length for SANS instruments.