Mantid
Loading...
Searching...
No Matches
LoadInstrument.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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
13namespace Poco {
14namespace XML {
15class Element;
16}
17} // namespace Poco
19
20namespace Mantid {
21namespace Kernel {
22class V3D;
23}
24namespace API {
25class MatrixWorkspace;
26}
27namespace Geometry {
28class CompAssembly;
29class Component;
30class CSGObject;
31class ObjComponent;
32class Instrument;
33} // namespace Geometry
34
35namespace DataHandling {
56class MANTID_DATAHANDLING_DLL LoadInstrument : public API::DistributedAlgorithm {
57public:
59 const std::string name() const override { return "LoadInstrument"; };
61 const std::string summary() const override {
62 return "Loads an Instrument Definition File (IDF) into a workspace. After "
63 "the IDF has been read this algorithm will attempt to run the Child "
64 "Algorithm LoadParameterFile; where if IDF filename is of the form "
65 "IDENTIFIER_Definition.xml then the instrument parameters in the "
66 "file named IDENTIFIER_Parameters.xml would be loaded.";
67 }
68
70 int version() const override { return 1; };
71 const std::vector<std::string> seeAlso() const override {
72 return {"LoadInstrumentFromNexus", "LoadInstrumentFromRaw", "ExportGeometry", "Load"};
73 }
75 const std::string category() const override { return "DataHandling\\Instrument"; }
76
77private:
78 void init() override;
79 void exec() override;
80
82 void runLoadParameterFile(const std::shared_ptr<API::MatrixWorkspace> &ws, const std::string &filename);
83
85 static std::recursive_mutex m_mutex;
86};
87
88} // namespace DataHandling
89} // namespace Mantid
Base class for algorithms that treat all spectra independently, i.e., we can trivially parallelize ov...
Loads instrument data from an XML or Nexus instrument description file and adds it to a workspace.
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
static std::recursive_mutex m_mutex
Mutex to avoid simultaneous access.
const std::string summary() const override
Summary of algorithms purpose.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
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.
Helper class which provides the Collimation Length for SANS instruments.
Definition: Algorithm.h:30