Mantid
Loading...
Searching...
No Matches
SetInstrumentParameter.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 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 "MantidAlgorithms/DllConfig.h"
11
12#include <string>
13#include <vector>
14
15namespace Mantid {
16
17namespace Geometry {
18class ComponentInfo;
19} // namespace Geometry
20
21namespace Algorithms {
22
26class MANTID_ALGORITHMS_DLL SetInstrumentParameter final : public API::Algorithm {
27public:
28 const std::string name() const override;
30 const std::string summary() const override {
31 return "Add or replace an parameter attached to an instrument component.";
32 }
33
34 int version() const override;
35 const std::vector<std::string> seeAlso() const override {
36 return {"RotateInstrumentComponent", "MoveInstrumentComponent"};
37 }
38 const std::string category() const override;
39 std::map<std::string, std::string> validateInputs() override;
40
41private:
42 void init() override;
43 void exec() override;
44
45 static std::vector<size_t> componentsWithName(const Mantid::Geometry::ComponentInfo &componentInfo,
46 const std::string &name);
47 void addParameter(Mantid::Geometry::ComponentInfo &componentInfo, const size_t componentIndex,
48 const std::string &paramName, const std::string &paramType, const std::string &paramValue) const;
49};
50
51} // namespace Algorithms
52} // namespace Mantid
std::string name
Definition Run.cpp:60
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
SetInstrumentParameter : A simple algorithm to add or set the value of an instrument parameter.
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 algorithms related to this algorithm.
ComponentInfo : Provides a component centric view on to the instrument.
Helper class which provides the Collimation Length for SANS instruments.