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