Mantid
Loading...
Searching...
No Matches
ProcessBankData.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
11#include "MantidKernel/Task.h"
12
13#include <memory>
14
15namespace Mantid {
16namespace API {
17class Progress;
18}
19namespace DataHandling {
20class DefaultEventLoader;
21
25public:
44 std::shared_ptr<std::vector<uint32_t>> const &event_id,
45 std::shared_ptr<std::vector<float>> const &event_time_of_flight, size_t numEvents, size_t startAt,
46 std::shared_ptr<std::vector<uint64_t>> const &event_index,
47 std::shared_ptr<BankPulseTimes> const &thisBankPulseTimes, bool have_weight,
48 std::shared_ptr<std::vector<float>> const &event_weight, detid_t min_event_id, detid_t max_event_id);
49
50 void run() override;
51
52private:
53 size_t getWorkspaceIndexFromPixelID(const detid_t pixID);
55
59 std::string entry_name;
61 const std::vector<size_t> &pixelID_to_wi_vector;
67 std::shared_ptr<std::vector<uint32_t> const> event_detid;
69 std::shared_ptr<std::vector<float> const> event_time_of_flight;
71 size_t numEvents;
73 size_t startAt;
75 std::shared_ptr<std::vector<uint64_t> const> event_index;
77 std::shared_ptr<BankPulseTimes const> thisBankPulseTimes;
81 std::shared_ptr<std::vector<float> const> event_weight;
86}; // ENDDEF-CLASS ProcessBankData
87} // namespace DataHandling
88} // namespace Mantid
Helper class for reporting progress from algorithms.
Definition Progress.h:25
Helper class for LoadEventNexus that is specific to the current default loading code for NXevent_data...
This task does the disk IO from loading the NXS file, and so will be on a disk IO mutex.
size_t getWorkspaceIndexFromPixelID(const detid_t pixID)
Get the workspace index for a given pixel ID.
std::shared_ptr< std::vector< uint64_t > const > event_index
vector of event index (length of # of pulses)
detid_t m_min_detid
Minimum pixel id (inclusive)
detid_t m_max_detid
Maximum pixel id (inclusive)
bool have_weight
Flag for simulated data.
DefaultEventLoader & m_loader
Algorithm being run.
std::shared_ptr< std::vector< float > const > event_weight
event weights array
std::string entry_name
NXS address to bank.
size_t startAt
index of the first event from event_index
detid_t pixelID_to_wi_offset
Offset in the pixelID_to_wi_vector to use.
std::shared_ptr< std::vector< float > const > event_time_of_flight
event TOF array
std::shared_ptr< std::vector< uint32_t > const > event_detid
event pixel ID array
const std::vector< size_t > & pixelID_to_wi_vector
Vector where (index = pixel ID+pixelID_to_wi_offset), value = workspace index)
API::Progress * prog
Progress reporting.
std::shared_ptr< BankPulseTimes const > thisBankPulseTimes
Pulse times for this bank.
void run() override
Run the data processing FIXME/TODO - split run() into readable methods.
A Task is a unit of work to be scheduled and run by a ThreadPool.
Definition Task.h:29
Helper class which provides the Collimation Length for SANS instruments.
int32_t detid_t
Typedef for a detector ID.