This task does the disk IO from loading the NXS file, and so will be on a disk IO mutex.
More...
#include <ProcessBankData.h>
|
| ProcessBankData (DefaultEventLoader &loader, std::string entry_name, API::Progress *prog, std::shared_ptr< std::vector< uint32_t > > event_id, std::shared_ptr< std::vector< float > > event_time_of_flight, size_t numEvents, size_t startAt, std::shared_ptr< std::vector< uint64_t > > event_index, std::shared_ptr< BankPulseTimes > thisBankPulseTimes, bool have_weight, std::shared_ptr< std::vector< float > > event_weight, detid_t min_event_id, detid_t max_event_id) |
| Constructor. More...
|
|
void | run () override |
| Run the data processing FIXME/TODO - split run() into readable methods. More...
|
|
virtual double | cost () |
| What is the computational cost of this task? More...
|
|
std::shared_ptr< std::mutex > | getMutex () |
| Get the mutex object for this Task. More...
|
|
virtual void | run ()=0 |
| Main method that performs the work for the task. More...
|
|
void | setMutex (const std::shared_ptr< std::mutex > &mutex) |
| Set the mutex object for this Task. More...
|
|
void | setMutexObject (void *object) |
| Use an arbitrary pointer to lock (mutex) the execution of this task. More...
|
|
| Task () |
| Default constructor. More...
|
|
| Task (double cost) |
| Constructor with cost. More...
|
|
virtual | ~Task ()=default |
| Destructor. More...
|
|
|
double | m_cost |
| Cached computational cost for the thread. More...
|
|
std::shared_ptr< std::mutex > | m_mutex |
| Mutex associated with this task (can be NULL) More...
|
|
This task does the disk IO from loading the NXS file, and so will be on a disk IO mutex.
Definition at line 26 of file ProcessBankData.h.
◆ ProcessBankData()
Mantid::DataHandling::ProcessBankData::ProcessBankData |
( |
DefaultEventLoader & |
loader, |
|
|
std::string |
entry_name, |
|
|
API::Progress * |
prog, |
|
|
std::shared_ptr< std::vector< uint32_t > > |
event_id, |
|
|
std::shared_ptr< std::vector< float > > |
event_time_of_flight, |
|
|
size_t |
numEvents, |
|
|
size_t |
startAt, |
|
|
std::shared_ptr< std::vector< uint64_t > > |
event_index, |
|
|
std::shared_ptr< BankPulseTimes > |
thisBankPulseTimes, |
|
|
bool |
have_weight, |
|
|
std::shared_ptr< std::vector< float > > |
event_weight, |
|
|
detid_t |
min_event_id, |
|
|
detid_t |
max_event_id |
|
) |
| |
Constructor.
- Parameters
-
loader | :: DefaultEventLoader |
entry_name | :: name of the bank |
prog | :: Progress reporter |
event_id | :: array with event IDs |
event_time_of_flight | :: array with event TOFS |
numEvents | :: how many events in the arrays |
startAt | :: index of the first event from event_index |
event_index | :: vector of event index (length of # of pulses) |
thisBankPulseTimes | :: ptr to the pulse times for this particular bank. |
have_weight | :: flag for handling simulated files |
event_weight | :: array with weights for events |
min_event_id | ;: minimum detector ID to load |
max_event_id | :: maximum detector ID to load |
- Returns
Definition at line 17 of file ProcessBankData.cpp.
References Mantid::Kernel::Task::m_cost, and numEvents.
◆ getFirstEventIndex()
size_t Mantid::DataHandling::ProcessBankData::getFirstEventIndex |
( |
const size_t |
pulseIndex | ) |
const |
|
private |
◆ getLastEventIndex()
size_t Mantid::DataHandling::ProcessBankData::getLastEventIndex |
( |
const size_t |
pulseIndex, |
|
|
const size_t |
numPulses |
|
) |
| const |
|
private |
◆ getWorkspaceIndexFromPixelID()
size_t Mantid::DataHandling::ProcessBankData::getWorkspaceIndexFromPixelID |
( |
const detid_t |
pixID | ) |
|
|
private |
◆ run()
void Mantid::DataHandling::ProcessBankData::run |
( |
| ) |
|
|
overridevirtual |
Run the data processing FIXME/TODO - split run() into readable methods.
Implements Mantid::Kernel::Task.
Definition at line 62 of file ProcessBankData.cpp.
References Mantid::DataHandling::DefaultEventLoader::alg, entry_name, event_id, event_index, Mantid::DataHandling::DefaultEventLoader::eventVectors, getFirstEventIndex(), getLastEventIndex(), getWorkspaceIndexFromPixelID(), have_weight, m_loader, m_max_id, m_min_id, m_timer, Mantid::DataHandling::DefaultEventLoader::m_ws, numEvents, Mantid::DataHandling::DefaultEventLoader::precount, prog, Mantid::DataObjects::PULSETIME_SORT, Mantid::Kernel::ProgressBase::report(), startAt, thisBankPulseTimes, Mantid::DataObjects::UNSORTED, and Mantid::DataHandling::DefaultEventLoader::weightedEventVectors.
◆ entry_name
std::string Mantid::DataHandling::ProcessBankData::entry_name |
|
private |
◆ event_id
std::shared_ptr<std::vector<uint32_t> > Mantid::DataHandling::ProcessBankData::event_id |
|
private |
◆ event_index
std::shared_ptr<std::vector<uint64_t> > Mantid::DataHandling::ProcessBankData::event_index |
|
private |
◆ event_time_of_flight
std::shared_ptr<std::vector<float> > Mantid::DataHandling::ProcessBankData::event_time_of_flight |
|
private |
◆ event_weight
std::shared_ptr<std::vector<float> > Mantid::DataHandling::ProcessBankData::event_weight |
|
private |
◆ have_weight
bool Mantid::DataHandling::ProcessBankData::have_weight |
|
private |
◆ m_loader
◆ m_max_id
detid_t Mantid::DataHandling::ProcessBankData::m_max_id |
|
private |
◆ m_min_id
detid_t Mantid::DataHandling::ProcessBankData::m_min_id |
|
private |
◆ m_timer
◆ numEvents
size_t Mantid::DataHandling::ProcessBankData::numEvents |
|
private |
◆ pixelID_to_wi_offset
detid_t Mantid::DataHandling::ProcessBankData::pixelID_to_wi_offset |
|
private |
◆ pixelID_to_wi_vector
const std::vector<size_t>& Mantid::DataHandling::ProcessBankData::pixelID_to_wi_vector |
|
private |
◆ prog
◆ startAt
size_t Mantid::DataHandling::ProcessBankData::startAt |
|
private |
◆ thisBankPulseTimes
std::shared_ptr<BankPulseTimes> Mantid::DataHandling::ProcessBankData::thisBankPulseTimes |
|
private |
The documentation for this class was generated from the following files: