Mantid
Loading...
Searching...
No Matches
SaveIsawPeaks.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
10#include "MantidCrystal/DllConfig.h"
13
14namespace Mantid {
15
16namespace DataObjects {
17class PeaksWorkspace;
18using PeaksWorkspace_sptr = std::shared_ptr<PeaksWorkspace>;
19} // namespace DataObjects
20
21namespace Crystal {
22
28class MANTID_CRYSTAL_DLL SaveIsawPeaks final : public API::Algorithm {
29public:
31 const std::string name() const override { return "SaveIsawPeaks"; };
33 const std::string summary() const override { return "Save a PeaksWorkspace to a ISAW-style ASCII .peaks file."; }
34
36 int version() const override { return 1; };
37 const std::vector<std::string> seeAlso() const override { return {"LoadIsawPeaks"}; }
39 const std::string category() const override { return "Crystal\\DataHandling;DataHandling\\Isaw"; }
40
41private:
43 bool m_isModulatedStructure = false;
44
46 void init() override;
48 void exec() override;
50 Kernel::V3D findPixelPos(const std::string &bankName, int col, int row);
51 void sizeBanks(const std::string &bankName, int &NCOLS, int &NROWS, double &xsize, double &ysize);
52 bool bankMasked(size_t componentIndex, const Geometry::DetectorInfo &detectorInfo);
53 void writeOffsets(std::ofstream &out, double qSign, const std::vector<double> &offset);
56};
57
58} // namespace Crystal
59} // namespace Mantid
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:76
Save a PeaksWorkspace to a ISAW-style ASCII .peaks file.
int version() const override
Algorithm's version for identification.
DataObjects::PeaksWorkspace_sptr m_ws
const std::string category() const override
Algorithm's category for identification.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
const std::string name() const override
Algorithm's name for identification.
Geometry::Instrument_const_sptr inst
const std::string summary() const override
Summary of algorithms purpose.
Geometry::DetectorInfo is an intermediate step towards a DetectorInfo that is part of Instrument-2....
Class for 3D vectors.
Definition V3D.h:34
std::shared_ptr< PeaksWorkspace > PeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
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.