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 API {
22class MatrixWorkspace;
23}
24namespace Geometry {
25class CompAssembly;
26class Component;
27class CSGObject;
28class ObjComponent;
29class Instrument;
30} // namespace Geometry
31
32namespace DataHandling {
53class MANTID_DATAHANDLING_DLL LoadInstrument : public API::Algorithm {
54public:
56 const std::string name() const override { return "LoadInstrument"; };
58 const std::string summary() const override {
59 return "Loads an Instrument Definition File (IDF) into a workspace. After "
60 "the IDF has been read this algorithm will attempt to run the Child "
61 "Algorithm LoadParameterFile; where if IDF filename is of the form "
62 "IDENTIFIER_Definition.xml then the instrument parameters in the "
63 "file named IDENTIFIER_Parameters.xml would be loaded.";
64 }
65
67 int version() const override { return 1; };
68 const std::vector<std::string> seeAlso() const override {
69 return {"LoadInstrumentFromNexus", "LoadInstrumentFromRaw", "ExportGeometry", "Load"};
70 }
72 const std::string category() const override { return "DataHandling\\Instrument"; }
73
74private:
75 void init() override;
76 void exec() override;
77
79 void runLoadParameterFile(const std::shared_ptr<API::MatrixWorkspace> &ws);
80
82 static std::recursive_mutex m_mutex;
83};
84
85} // namespace DataHandling
86} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
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.