Mantid
Loading...
Searching...
No Matches
LoadCalFile.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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
12#include "MantidDataHandling/DllConfig.h"
17
18namespace Mantid {
19namespace DataHandling {
20
27class MANTID_DATAHANDLING_DLL LoadCalFile final : public API::Algorithm {
28public:
30 const std::string name() const override { return "LoadCalFile"; };
32 const std::string summary() const override {
33 return "Loads a 5-column ASCII .cal file into up to 3 workspaces: a "
34 "GroupingWorkspace, OffsetsWorkspace and/or MaskWorkspace.";
35 }
36
38 int version() const override { return 1; };
39 const std::vector<std::string> seeAlso() const override {
40 return {"LoadDiffCal", "ReadGroupsFromFile", "CreateDummyCalFile", "CreateCalFileByNames",
41 "AlignDetectors", "DiffractionFocussing", "SaveCalFile", "MergeCalFiles"};
42 }
44 const std::string category() const override { return R"(DataHandling\Text;Diffraction\DataHandling\CalFiles)"; }
45
46 static void getInstrument3WaysInit(Mantid::API::Algorithm *alg);
47
48 static Geometry::Instrument_const_sptr getInstrument3Ways(API::Algorithm *alg);
49 static bool instrumentIsSpecified(API::Algorithm *alg);
50
51 static void readCalFile(const std::string &calFileName, const Mantid::DataObjects::GroupingWorkspace_sptr &groupWS,
54
55protected:
56 Parallel::ExecutionMode
57 getParallelExecutionMode(const std::map<std::string, Parallel::StorageMode> &storageModes) const override;
58
59private:
61 void init() override;
63 void exec() override;
64
66 static bool idIsMonitor(const Mantid::Geometry::Instrument_const_sptr &inst, int detID);
67};
68
69} // namespace DataHandling
70} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:85
Algorithm to load a 5-column ascii .cal file into up to 3 workspaces: a GroupingWorkspace,...
Definition: LoadCalFile.h:27
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: LoadCalFile.h:39
const std::string summary() const override
Summary of algorithms purpose.
Definition: LoadCalFile.h:32
int version() const override
Algorithm's version for identification.
Definition: LoadCalFile.h:38
const std::string category() const override
Algorithm's category for identification.
Definition: LoadCalFile.h:44
const std::string name() const override
Algorithm's name for identification.
Definition: LoadCalFile.h:30
std::shared_ptr< GroupingWorkspace > GroupingWorkspace_sptr
shared pointer to the GroupingWorkspace class
std::shared_ptr< MaskWorkspace > MaskWorkspace_sptr
shared pointer to the MaskWorkspace class
Definition: MaskWorkspace.h:64
std::shared_ptr< OffsetsWorkspace > OffsetsWorkspace_sptr
shared pointer to the OffsetsWorkspace class
std::shared_ptr< const Instrument > Instrument_const_sptr
Shared pointer to an const instrument object.
Helper class which provides the Collimation Length for SANS instruments.