47 const auto histnumber =
static_cast<int>(inWS->getNumberHistograms());
49 auto x = Kernel::make_cow<HistogramData::HistogramX>(OutXValues_scaled);
52 for (
int i = 0; i < histnumber; ++i) {
55 const auto &el = inWS->getSpectrum(i);
58 el.generateHistogramPulseTime(*XValues_new, y_data, e_data);
61 outputWS->setSharedX(i,
x);
64 outputWS->mutableY(i) = y_data;
65 outputWS->mutableE(i) = e_data;
80 uint64_t timeMax =
static_cast<uint64_t
>(ws->getPulseTimeMax().totalNanoseconds());
83 timeMax +=
static_cast<uint64_t
>(ws->getTofMax() * 1e3);
94 return ws->getPulseTimeMin().totalNanoseconds();
#define DECLARE_ALGORITHM(classname)
#define PARALLEL_START_INTERRUPT_REGION
Begins a block to skip processing is the algorithm has been interupted Note the end of the block if n...
#define PARALLEL_END_INTERRUPT_REGION
Ends a block to skip processing is the algorithm has been interupted Note the start of the block if n...
#define PARALLEL_FOR_IF(condition)
Empty definitions - to enable set your complier to enable openMP.
#define PARALLEL_CHECK_INTERRUPT_REGION
Adds a check after a Parallel region to see if it was interupted.
Helper class for reporting progress from algorithms.
RebinByPulseTimes : Rebin an input EventWorkspace according to the pulse times of the events.
const std::string category() const override
Algorithm's category for identification.
uint64_t getMaxX(Mantid::API::IEventWorkspace_sptr) const override
Get the minimum x across all spectra in workspace.
void doHistogramming(Mantid::API::IEventWorkspace_sptr inWS, Mantid::API::MatrixWorkspace_sptr outputWS, Mantid::MantidVecPtr &XValues_new, Mantid::MantidVec &OutXValues_scaled, Mantid::API::Progress &prog) override
Do the algorithm specific histogramming.
uint64_t getMinX(Mantid::API::IEventWorkspace_sptr) const override
Get the maximum x across all spectra in workspace.
const std::string name() const override
Algorithm's name for identification.
int version() const override
Algorithm's version for identification.
void report()
Increments the loop counter by 1, then sends the progress notification on behalf of its algorithm.
Implements a copy on write data template.
std::shared_ptr< IEventWorkspace > IEventWorkspace_sptr
shared pointer to Mantid::API::IEventWorkspace
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::enable_if< std::is_pointer< Arg >::value, bool >::type threadSafe(Arg workspace)
Thread-safety check Checks the workspace to ensure it is suitable for multithreaded access.
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces