Mantid
Loading...
Searching...
No Matches
ConvToMDHistoWS.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2010 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
14
15namespace Mantid {
16
17// Forward declaration
18namespace API {
19class Progress;
20}
21namespace MDAlgorithms {
33//-----------------------------------------------
35
36public:
39
40 size_t initialize(const MDWSDescription &WSD, std::shared_ptr<MDEventWSWrapper> inWSWrapper,
41 bool ignoreZeros) override;
42
43 void runConversion(API::Progress *pProgress) override;
44
45private:
46 // the number of spectra to process by single computational thread;
48 // the size of temporary buffer, each thread stores data in before adding
49 // these data to target MD workspace;
51 // internal function used to identify m_spectraChunk and m_bufferSize
52 void estimateThreadWork(size_t nThreads, size_t specSize, size_t nPointsToProcess);
53 // the function does a chunk of work. Expected to run on a thread.
54 size_t conversionChunk(size_t startSpectra) override;
55};
56
57} // namespace MDAlgorithms
58} // namespace Mantid
Helper class for reporting progress from algorithms.
Definition: Progress.h:25
Class describes the interface to the methods, which perform conversion from usual workspaces to MDEve...
Definition: ConvToMDBase.h:34
The class to transform matrix workspace into MDEvent workspace when matrix workspace is ragged 2D wor...
void runConversion(API::Progress *pProgress) override
run conversion as multithread job
size_t initialize(const MDWSDescription &WSD, std::shared_ptr< MDEventWSWrapper > inWSWrapper, bool ignoreZeros) override
method sets up all internal variables necessary to convert from Matrix2D workspace to MDEvent workspa...
size_t conversionChunk(size_t startSpectra) override
convert range of spectra starting from initial spectra startSpectra into MD events
void estimateThreadWork(size_t nThreads, size_t specSize, size_t nPointsToProcess)
function calculates the size of temporary memory used to keep convertTo MD data before these data sho...
helper class describes the properties of target MD workspace, which should be obtained as the result ...
Helper class which provides the Collimation Length for SANS instruments.