Newer
Older
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
//----------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------
#include "MantidAPI/IFileLoader.h"
#include "MantidDataObjects/Workspace2D.h"
#include "MantidKernel/FileDescriptor.h"
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
namespace Mantid {
namespace DataHandling {
/**
Loads an instrument definition file into a workspace, with the purpose of being
able to visualise an instrument without requiring to read in a ISIS raw datafile
first.
The name of the algorithm refers to the fact that an instrument
is loaded into a workspace but without any real data - hence the reason for
referring to
it as an 'empty' instrument.
Required Properties:
<UL>
<LI> Filename - The name of an instrument definition file </LI>
<LI> OutputWorkspace - The name of the workspace in which to store the imported
instrument</LI>
</UL>
Optional Properties: (note that these options are not available if reading a
multiperiod file)
<UL>
<LI> detector_value - This value affect the colour of the detectorss in the
instrument display window</LI>
<LI> monitor_value - This value affect the colour of the monitors in the
instrument display window</LI>
</UL>
@author Anders Markvardsen, ISIS, RAL
@date 31/10/2008
*/
class DLLExport LoadEmptyInstrument
: public API::IFileLoader<Kernel::FileDescriptor> {
public:
/// Algorithm's name for identification overriding a virtual method
const std::string name() const override { return "LoadEmptyInstrument"; }
const std::string summary() const override {
return "Loads an Instrument Definition File (IDF) into a workspace rather "
"than a data file.";
}
/// Algorithm's version for identification overriding a virtual method
int version() const override { return 1; }
const std::vector<std::string> seeAlso() const override {
/// Algorithm's category for identification overriding a virtual method
const std::string category() const override {
return "DataHandling\\Instrument";
}
/// Returns a confidence value that this algorithm can load a file
int confidence(Kernel::FileDescriptor &descriptor) const override;
private:
/// Overwrites Algorithm method.
API::MatrixWorkspace_sptr
runLoadInstrument(const std::string &filename,
const std::string &instrumentname);
};
} // namespace DataHandling