31#include <nexus/NeXusFile.hpp>
32#include <nexus/NeXusException.hpp>
49 return std::find(std::begin(monitorBlocks), std::end(monitorBlocks), dataBlock) != std::end(monitorBlocks);
53 for (
auto &dataBlock : dataBlocks) {
54 if (matchesMonitorBlock(dataBlock)) {
67using namespace Kernel;
70using namespace HistogramData;
75 : m_filename(), m_instrument_name(), m_samplename(), m_detBlockInfo(), m_monBlockInfo(), m_loadBlockInfo(),
76 m_have_detector(false), m_hasVMSBlock(false), m_load_selected_spectra(false), m_wsInd2specNum_map(),
77 m_spec2det_map(), m_entrynumber(0), m_tof_data(), m_spec(), m_spec_end(nullptr), m_monitors(), m_logCreator(),
78 m_progress(), m_nexusFile() {}
97 const std::vector<std::string> exts{
".nxs",
".n*"};
99 "The name of the Nexus file to load");
102 auto mustBePositiveSpectrum = std::make_shared<BoundedValidator<specnum_t>>();
103 mustBePositiveSpectrum->setLower(0);
107 auto mustBePositive = std::make_shared<BoundedValidator<int64_t>>();
108 declareProperty(
"EntryNumber",
static_cast<int64_t
>(0), mustBePositive,
109 "0 indicates that every entry is loaded, into a separate "
110 "workspace within a group. "
111 "A positive number identifies one entry to be loaded, into "
114 std::vector<std::string> monitorOptions{
"Include",
"Exclude",
"Separate"};
115 std::map<std::string, std::string> monitorOptionsAliases;
116 monitorOptionsAliases[
"1"] =
"Separate";
117 monitorOptionsAliases[
"0"] =
"Exclude";
119 std::make_shared<Kernel::StringListValidator>(monitorOptions, monitorOptionsAliases),
120 "Option to control the loading of monitors.\n"
121 "Allowed options are Include,Exclude, Separate.\n"
122 "Include:The default is Include option would load monitors with the "
123 "workspace if monitors spectra are within the range of loaded "
125 "If the time binning for the monitors is different from the\n"
126 "binning of the detectors this option is equivalent to the Separate "
128 "Exclude:Exclude option excludes monitors from the output workspace.\n"
129 "Separate:Separate option loads monitors into a separate workspace "
130 "called: OutputWorkspace_monitors.\n"
132 "1: Equivalent to Separate.\n"
133 "0: Equivalent to Exclude.\n");
147 bool bincludeMonitors, bseparateMonitors, bexcludeMonitors;
174 spectrum_index.
load();
175 ndets = spectrum_index.
dim0();
180 }
catch (std::runtime_error &) {
191 for (
auto it = entry.
groups().cbegin(); it != entry.
groups().cend(); ++it) {
192 if (it->nxclass ==
"NXmonitor")
206 if (ndets == 0 && nmons == 0) {
207 if (bexcludeMonitors) {
208 g_log.
warning() <<
"Nothing to do. No detectors found and no monitor "
212 g_log.
error() <<
"Invalid NeXus structure, cannot find detector or monitor blocks.";
213 throw std::runtime_error(
"Inconsistent NeXus file structure.");
234 local_workspace->setYUnit(
"Counts");
237 m_progress->report(
"Loading instrument and run details");
246 else if (bseparateMonitors) {
253 if (!foundInstrument) {
259 local_workspace->loadSampleAndLogInfoNexus(
m_nexusFile.get());
286 wksp_group->setTitle(local_workspace->getTitle());
290 const std::string prop_name =
"OutputWorkspace_";
293 std::ostringstream os;
295 m_progress->report(
"Loading period " + os.str());
297 local_workspace = std::dynamic_pointer_cast<DataObjects::Workspace2D>(
307 wksp_group->addWorkspace(local_workspace);
308 setProperty(prop_name + os.str(), std::static_pointer_cast<Workspace>(local_workspace));
311 setProperty(
"OutputWorkspace", std::dynamic_pointer_cast<Workspace>(wksp_group));
313 setProperty(
"OutputWorkspace", std::dynamic_pointer_cast<Workspace>(local_workspace));
319 if (bseparateMonitors) {
326 auto monitor_workspace = std::dynamic_pointer_cast<DataObjects::Workspace2D>(
342 local_workspace->setMonitorWorkspace(monitor_workspace);
344 ISISRunLogs monLogCreator(monitor_workspace->run());
345 monLogCreator.
addPeriodLogs(1, monitor_workspace->mutableRun());
347 const std::string monitorPropBase =
"MonitorWorkspace";
348 const std::string monitorWsNameBase = wsName +
"_monitors";
351 monitor_group->setTitle(monitor_workspace->getTitle());
354 std::ostringstream os;
356 m_progress->report(
"Loading period " + os.str());
358 monitor_workspace = std::dynamic_pointer_cast<DataObjects::Workspace2D>(
361 monLogCreator.
addPeriodLogs(p, monitor_workspace->mutableRun());
366 auto data_ws = std::static_pointer_cast<API::MatrixWorkspace>(wksp_group->getItem(p - 1));
367 data_ws->setMonitorWorkspace(monitor_workspace);
371 monitor_group->addWorkspace(monitor_workspace);
372 setProperty(monitorPropBase + os.str(), std::static_pointer_cast<Workspace>(monitor_workspace));
377 setProperty(monitorPropBase, std::dynamic_pointer_cast<Workspace>(monitor_group));
382 setProperty(monitorPropBase, std::static_pointer_cast<Workspace>(monitor_workspace));
385 g_log.
information() <<
" no monitors to load for workspace: " << wsName <<
'\n';
400 const Run &run = ws->run();
408 g_log.
warning(
"Workspace has not proton_charge_by_period log");
421 bool range_supplied(
false);
430 if (bexcludeMonitor || bseparateMonitors) {
437 range_supplied =
true;
444 range_supplied =
true;
449 if (spec_min > spec_max) {
450 throw std::invalid_argument(
"Inconsistent range properties. SpectrumMin is "
451 "larger than SpectrumMax.");
455 std::string err =
"Inconsistent range property. SpectrumMax is larger than number of "
458 throw std::invalid_argument(err);
464 std::string err =
"Invalid entry number entered. File contains " +
466 throw std::invalid_argument(err);
474 std::vector<specnum_t> spec_list =
getProperty(
"SpectrumList");
475 auto hasSpecList =
false;
477 if (!spec_list.empty()) {
481 std::sort(spec_list.begin(), spec_list.end());
486 bool isSpectraListTooLarge;
487 bool isSpectraListTooSmall;
490 if (bseparateMonitors) {
493 isSpectraListTooLarge = spec_list.back() > std::max(maxMonBlock, maxLoadBlock);
494 isSpectraListTooSmall = spec_list.front() < std::min(minMonBlock, minLoadBlock);
497 isSpectraListTooLarge = spec_list.back() > maxLoadBlock;
498 isSpectraListTooSmall = spec_list.front() < minLoadBlock;
501 if (isSpectraListTooLarge) {
502 std::string err =
"The specified spectrum list contains a spectrum number which is "
504 "than the largest loadable spectrum number for your selection of "
505 "excluded/included/separate monitors. The largest loadable "
506 "spectrum number is " +
508 throw std::invalid_argument(err);
510 if (isSpectraListTooSmall) {
511 std::string err =
"The specified spectrum list contains a spectrum number which is "
513 "than the smallest loadable spectrum number for your selection of "
514 "excluded/included/separate monitors. The smallest loadable "
515 "spectrum number is " +
517 throw std::invalid_argument(err);
522 if (range_supplied) {
525 auto isInRange = [&spec_min, &spec_max](
specnum_t x) {
return (spec_min <=
x) && (
x <= spec_max); };
527 spec_list.erase(remove_if(spec_list.begin(), spec_list.end(), isInRange), spec_list.end());
530 for (
auto i = spec_min; i < spec_max + 1; ++i) {
531 spec_list.emplace_back(i);
533 std::sort(spec_list.begin(), spec_list.end());
545 if (bexcludeMonitor || bseparateMonitors) {
546 auto newMonitors = getMonitorsFromComposite(composite,
m_monBlockInfo);
552 if (!newMonitors.isEmpty()) {
559 if (bseparateMonitors && composite.
isEmpty()) {
561 bseparateMonitors =
false;
573 if (range_supplied) {
577 new_monitors.
truncate(spec_min, spec_max);
588 throw std::invalid_argument(
"Your spectrum number selection was not valid. "
589 "Make sure that you select spectrum numbers "
590 "and ranges which are compatible with your "
591 "selection of excluded/included/separate monitors. ");
594 return bseparateMonitors;
610 if (range_supplied || hasSpectraList ||
true) {
613 for (; !generator->isDone(); generator->next()) {
614 auto spec_num =
static_cast<specnum_t>(generator->getValue());
628 std::vector<specnum_t> includedMonitors;
631 auto isMonitor = [&monitors](
specnum_t spectrumNumber) {
return monitors.find(spectrumNumber) != monitors.end(); };
632 for (
const auto &dataBlock : dataBlocks) {
633 auto min = dataBlock.getMinSpectrumID();
634 if (isMonitor(min)) {
636 includedMonitors.emplace_back(min);
638 auto max = dataBlock.getMaxSpectrumID();
647 return block1.last < block2.first;
653 auto allMonitorsIncluded = monitors.size() == includedMonitors.size();
654 if (!includedMonitors.empty() && !allMonitorsIncluded) {
655 for (
auto it = monitors.begin(); it != monitors.end();) {
656 if (std::find(includedMonitors.begin(), includedMonitors.end(), it->first) != includedMonitors.end()) {
667 const auto nSpec = std::accumulate(
669 [](
size_t sum,
const auto &spectraBlock) { return sum + spectraBlock.last - spectraBlock.first + 1; });
684 if (block1.first > block1.last && block2.first > block2.last)
685 throw std::runtime_error(
"LoadISISNexus2: inconsistent spectra ranges");
686 if (block1.last >= block2.first) {
687 throw std::runtime_error(
"LoadISISNexus2: the range of SpectraBlocks must not overlap");
702 bool update_spectra2det_mapping) {
703 int64_t hist_index = 0;
704 int64_t period_index(period - 1);
707 if (spectraBlock.isMonitor) {
711 mondata.
load(1,
static_cast<int>(period - 1));
714 local_workspace->setHistogram(hist_index, BinEdges(timeBins(), timeBins() + timeBins.
dim0()),
717 if (update_spectra2det_mapping) {
718 auto &spec = local_workspace->getSpectrum(hist_index);
721 spec.setSpectrumNo(specNum);
729 const int *
const spec_begin =
m_spec.data();
733 const int64_t blocksize = 8;
734 const int64_t rangesize = spectraBlock.last - spectraBlock.first + 1;
735 const int64_t fullblocks = rangesize / blocksize;
736 int64_t spectra_no = spectraBlock.first;
740 int64_t filestart = std::lower_bound(spec_begin,
m_spec_end, spectra_no) - spec_begin;
741 if (fullblocks > 0) {
742 for (int64_t i = 0; i < fullblocks; ++i) {
743 loadBlock(data, blocksize, period_index, filestart, hist_index, spectra_no, local_workspace);
744 filestart += blocksize;
747 int64_t finalblock = rangesize - (fullblocks * blocksize);
748 if (finalblock > 0) {
749 loadBlock(data, finalblock, period_index, filestart, hist_index, spectra_no, local_workspace);
755 const std::string title = entry.
getString(
"title");
756 local_workspace->setTitle(title);
758 local_workspace->mutableRun().addProperty(
"run_title", title,
true);
759 }
catch (std::runtime_error &) {
770 m_logCreator->addPeriodLogs(
static_cast<int>(period), local_workspace->mutableRun());
786 data.
load(
static_cast<int>(blocksize),
static_cast<int>(period),
787 static_cast<int>(start));
788 int *data_start = data();
790 int64_t
final(hist + blocksize);
791 while (hist <
final) {
793 local_workspace->setHistogram(hist, BinEdges(
m_tof_data), Counts(data_start, data_end));
797 auto &spec = local_workspace->getSpectrum(hist);
802 spec.setSpectrumNo(specNum);
816 bool executionSuccessful(
true);
822 }
catch (std::invalid_argument &) {
824 executionSuccessful =
false;
825 }
catch (std::runtime_error &) {
826 g_log.
information(
"Unable to successfully run LoadInstrument Child Algorithm");
827 executionSuccessful =
false;
829 if (executionSuccessful) {
831 const auto &
pmap = localWorkspace->constInstrumentParameters();
832 if (
pmap.contains(localWorkspace->getInstrument()->getComponentID(),
"det-pos-source")) {
833 std::shared_ptr<Geometry::Parameter> updateDets =
834 pmap.get(localWorkspace->getInstrument()->getComponentID(),
"det-pos-source");
835 std::string
value = updateDets->value<std::string>();
836 if (
value.substr(0, 8) ==
"datafile") {
839 updateInst->setPropertyValue(
"Filename",
m_filename);
840 if (
value ==
"datafile-ignore-phi") {
841 updateInst->setProperty(
"IgnorePhi",
true);
843 "in the data file except for the phi values");
850 updateInst->execute();
863 API::Run &runDetails = local_workspace->mutableRun();
882 g_log.
debug() <<
"Sample geometry - ID: " << local_workspace->mutableSample().getGeometryFlag()
883 <<
", thickness: " << local_workspace->mutableSample().getThickness()
884 <<
", height: " << local_workspace->mutableSample().getHeight()
885 <<
", width: " << local_workspace->mutableSample().getWidth() <<
"\n";
895 alg->setPropertyValue(
"Filename", this->
getProperty(
"Filename"));
898 alg->executeAsChildAlg();
899 }
catch (std::runtime_error &) {
900 g_log.
warning() <<
"Unable to load run logs. There will be no log "
901 <<
"data associated with this workspace\n";
906 ws->populateInstrumentParameters();
940 int64_t n_vms_compat_spectra, std::map<specnum_t, std::string> &monitors,
941 bool excludeMonitors,
bool separateMonitors) {
942 size_t nmons = monitors.size();
948 for (
const auto &monitor : monitors) {
949 auto monID = monitor.first;
951 monTemp.setMinSpectrumID(monID);
952 monTemp.setMaxSpectrumID(monID);
964 separateMonitors =
false;
965 return separateMonitors;
976 data.
dim2() , monitorSpectra);
988 bool removeMonitors = excludeMonitors || separateMonitors;
995 if (!removeMonitors) {
996 g_log.
warning() <<
" Performing separate loading as can not load spectra "
997 "and monitors in the single workspace:\n";
1007 separateMonitors =
true;
1008 removeMonitors =
true;
1018 if (!removeMonitors) {
1025 if (separateMonitors)
1029 if ((totNumOfSpectra !=
static_cast<size_t>(n_vms_compat_spectra)) ||
1030 (spectraID_max - spectraID_min + 1 !=
static_cast<int64_t
>(n_vms_compat_spectra))) {
1038 throw std::runtime_error(
"LoadISISNexus: There seems to be an "
1039 "inconsistency in the spectrum numbers.");
1043 return separateMonitors;
1054 auto hasMultipleTimeRegimes(
false);
1058 hasMultipleTimeRegimes = dae.
containsGroup(
"time_channels_3");
1061 return hasMultipleTimeRegimes;
double value
The value of the point.
std::map< DeltaEMode::Type, std::string > index
#define DECLARE_NEXUS_FILELOADER_ALGORITHM(classname)
DECLARE_NEXUS_FILELOADER_ALGORITHM should be used in place of the standard DECLARE_ALGORITHM macro wh...
void declareProperty(std::unique_ptr< Kernel::Property > p, const std::string &doc="") override
Add a property to the list of managed properties.
std::string getPropertyValue(const std::string &name) const override
Get the value of a property as a string.
TypedValue getProperty(const std::string &name) const override
Get the value of a property.
virtual std::shared_ptr< Algorithm > createChildAlgorithm(const std::string &name, const double startProgress=-1., const double endProgress=-1., const bool enableLogging=true, const int &version=-1)
Create a Child Algorithm.
@ Load
allowed here which will be passed to the algorithm
bool hasProperty(const std::string &name) const
Does the property exist on the object.
void addProperty(Kernel::Property *prop, bool overwrite=false)
Add data to the object in the form of a property.
This class stores information regarding an experimental run as a series of log entries.
A minimal class to hold the mapping between the spectrum number and its related detector ID numbers f...
const std::set< detid_t > & getDetectorIDsForSpectrumNo(const specnum_t spectrumNo) const
Class to hold a set of workspaces.
A property class for workspaces.
DataBlockComposite: The DataBlockComposite handles a collection of DataBlocks.
specnum_t getMinSpectrumID() const override
void truncate(specnum_t specMin, specnum_t specMax)
std::vector< specnum_t > getAllSpectrumNumbers()
Provides a container with all spectrum numbers.
size_t getNumberOfSpectra() const override
int getNumberOfPeriods() const override
std::unique_ptr< DataBlockGenerator > getGenerator() const override
size_t getNumberOfChannels() const override
std::vector< DataBlock > getDataBlocks()
specnum_t getMaxSpectrumID() const override
void addDataBlock(const DataBlock &dataBlock)
void removeSpectra(DataBlockComposite &toRemove)
Removes the input data blocks from the current list of data blocks.
DataBlock: The DataBlock class holds information about a contiguous block of spectrum numbers.
Defines a class to aid in creating ISIS specific run logs for periods, status etc.
void addPeriodLogs(const int period, API::Run &exptRun)
Adds period related logs.
static bool runLoadIDFFromNexus(const std::string &nexusfilename, T localWorkspace, const std::string &top_entry_name, Algorithm *alg)
Load instrument for Nexus file.
int64_t m_entrynumber
The number of the input entry.
std::string m_filename
The name and path of the input file.
DataBlockComposite m_monBlockInfo
bool findSpectraDetRangeInFile(NeXus::NXEntry &entry, std::vector< specnum_t > &spectrum_index, int64_t ndets, int64_t n_vms_compat_spectra, std::map< specnum_t, std::string > &monitors, bool excludeMonitors, bool separateMonitors)
Method takes input parameters which describe monitor loading and analyze them against spectra/monitor...
boost::scoped_ptr< ISISRunLogs > m_logCreator
A pointer to the ISISRunLogs creator.
void loadSampleData(DataObjects::Workspace2D_sptr &, const Mantid::NeXus::NXEntry &entry)
Load in details about the sample.
void loadRunDetails(DataObjects::Workspace2D_sptr &local_workspace, Mantid::NeXus::NXEntry &entry)
Load in details about the run.
const specnum_t * m_spec_end
Pointer to one-past-the-end of spectrum number array (m_spec)
void createPeriodLogs(int64_t period, DataObjects::Workspace2D_sptr &local_workspace)
Creates period log data in the workspace.
std::map< int64_t, specnum_t > m_wsInd2specNum_map
map of workspace Index to spectra Number (spectraID)
void loadBlock(Mantid::NeXus::NXDataSetTyped< int > &data, int64_t blocksize, int64_t period, int64_t start, int64_t &hist, int64_t &spec_num, DataObjects::Workspace2D_sptr &local_workspace)
Perform a call to nxgetslab, via the NexusClasses wrapped methods for a given block-size.
void loadLogs(DataObjects::Workspace2D_sptr &ws)
Load log data from the nexus file.
void exec() override
Overwrites Algorithm method.
void loadPeriodData(int64_t period, Mantid::NeXus::NXEntry &entry, DataObjects::Workspace2D_sptr &local_workspace, bool update_spectra2det_mapping=false)
Load a given period into the workspace.
void checkOverlappingSpectraRange()
Check if any of the spectra block ranges overlap.
std::map< specnum_t, std::string > m_monitors
Monitors, map spectrum index to monitor group name.
bool isMultipleTimeRegimeFile(const NeXus::NXEntry &entry) const
Check if is the file is a multiple time regime file.
bool m_have_detector
Is there a detector block.
std::shared_ptr< API::Progress > m_progress
Progress reporting object.
int confidence(Kernel::NexusDescriptor &descriptor) const override
Returns a confidence value that this algorithm can load a file.
void validateMultiPeriodLogs(const Mantid::API::MatrixWorkspace_sptr &)
Check for a set of synthetic logs associated with multi-period log data.
std::string m_instrument_name
The instrument name from Nexus.
std::shared_ptr< HistogramData::HistogramX > m_tof_data
Time channels.
LoadISISNexus2()
Default constructor.
DataBlockComposite m_detBlockInfo
std::vector< specnum_t > m_spec
Spectra numbers.
void runLoadInstrument(DataObjects::Workspace2D_sptr &)
Run LoadInstrument as a ChildAlgorithm.
boost::scoped_ptr< ::NeXus::File > m_nexusFile
DataBlockComposite m_loadBlockInfo
API::SpectrumDetectorMapping m_spec2det_map
spectra Number to detector ID (multi)map
static double dblSqrt(double in)
Personal wrapper for sqrt to allow msvs to compile.
size_t prepareSpectraBlocks(std::map< specnum_t, std::string > &monitors, DataBlockComposite &LoadBlock)
Prepare a vector of SpectraBlock structures to simplify loading.
bool checkOptionalProperties(bool bseparateMonitors, bool bexcludeMonitor)
Check the validity of the optional properties of the algorithm and identify if partial data should be...
void buildSpectraInd2SpectraNumMap(bool range_supplied, bool hasSpectraList, DataBlockComposite &dataBlockComposite)
Build the list of spectra to load and include into spectra-detectors map.
std::vector< SpectraBlock > m_spectraBlocks
List of disjoint data blocks to load.
bool m_load_selected_spectra
if true, a spectra list or range of spectra is supplied
void init() override
Overwrites Algorithm method.
static void ProcessLoadMonitorOptions(bool &bincludeMonitors, bool &bseparateMonitors, bool &bexcludeMonitors, API::Algorithm *const pAlgo)
The method to interpret LoadMonitors property options and convert then into boolean values.
Support for a property that holds an array of values.
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
void debug(const std::string &msg)
Logs at debug level.
void error(const std::string &msg)
Logs at error level.
void warning(const std::string &msg)
Logs at warning level.
void information(const std::string &msg)
Logs at information level.
Defines a wrapper around a file whose internal structure can be accessed using the NeXus API.
bool pathOfTypeExists(const std::string &path, const std::string &type) const
Query if a path exists of a given type.
OptionalBool : Tri-state bool.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
The base class for a Nexus class (group).
NXInt openNXInt(const std::string &name) const
Creates and opens an integer dataset.
NXClass openNXGroup(const std::string &name) const
Creates and opens an arbitrary (non-standard) class (group).
bool containsGroup(const std::string &query) const
Returns whether an individual group (or group) is present.
std::vector< NXClassInfo > & groups() const
Returns a list of all classes (or groups) in this NXClass.
NXFloat openNXFloat(const std::string &name) const
Creates and opens a float dataset.
std::string getString(const std::string &name) const
Returns a string.
Templated class implementation of NXDataSet.
container_T< T > & vecBuffer()
Returns a the internal buffer.
void load(const int blocksize=1, int i=-1, int j=-1, int k=-1, int l=-1) override
Implementation of the virtual NXDataSet::load(...) method.
int dim2() const
Returns the number of elements along the third dimension.
int dim0() const
Returns the number of elements along the first dimension.
void open()
Opens the data set.
Implements NXdata Nexus class.
NXInt openIntData()
Opens data of int type.
Implements NXentry Nexus class.
NXData openNXData(const std::string &name) const
Opens a NXData.
NXhandle m_fileID
Nexus file id.
std::string path() const
Returns the absolute path to the object.
Implements NXroot Nexus class.
NXEntry openEntry(const std::string &name)
Opens an entry – a topmost Nexus class.
std::shared_ptr< WorkspaceGroup > WorkspaceGroup_sptr
shared pointer to Mantid::API::WorkspaceGroup
Kernel::Logger g_log("ExperimentInfo")
static logger object
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
void loadSampleGeometry(API::Sample &sample, const NeXus::NXEntry &entry, const bool hasVMSBlock)
Load geometrical data about the sample from the nexus entry into a workspace.
std::tuple< NeXus::NXInt, NeXus::NXInt > findDetectorIDsAndSpectrumNumber(const NeXus::NXEntry &entry, const bool hasVMSBlock)
find detector ids and spectrum numbers
int64_t findNumberOfSpectra(const NeXus::NXEntry &entry, const bool hasVMSBlock)
find the number of spectra in the nexus file
std::shared_ptr< HistogramData::HistogramX > loadTimeData(const NeXus::NXEntry &entry)
Load the time data from nexus entry.
void loadRunDetails(API::Run &runDetails, const NeXus::NXEntry &entry, const bool hasVMSBlock)
Load data about the run.
void DLLExport populateDataBlockCompositeWithContainer(DataBlockComposite &dataBlockComposite, T &indexContainer, int64_t nArray, int numberOfPeriods, size_t numberOfChannels, std::vector< specnum_t > monitorSpectra)
Populates a DataBlockComposite with DataBlocks which are extracted from a indexable collection (array...
std::shared_ptr< Workspace2D > Workspace2D_sptr
shared pointer to Mantid::DataObjects::Workspace2D
std::unique_ptr< T > create(const P &parent, const IndexArg &indexArg, const HistArg &histArg)
This is the create() method that all the other create() methods call.
constexpr int EMPTY_INT() noexcept
Returns what we consider an "empty" integer within a property.
int32_t specnum_t
Typedef for a spectrum Number.
Generate a tableworkspace to store the calibration results.
std::string to_string(const wide_integer< Bits, Signed > &n)
Spectra block descriptor.
@ Output
An output workspace.