20#include <nexus/NeXusFile.hpp>
22#include <boost/scoped_ptr.hpp>
30namespace DataHandling {
64 const std::string
name()
const override {
return "LoadISISNexus"; }
66 int version()
const override {
return 2; }
67 const std::vector<std::string>
seeAlso()
const override {
return {
"LoadEventNexus",
"SaveISISNexus"}; }
69 const std::string
category()
const override {
return "DataHandling\\Nexus"; }
71 const std::string
summary()
const override {
return "Loads a file in ISIS NeXus format."; }
79 SpectraBlock(int64_t f, int64_t l,
bool is_mon,
const std::string &monname)
80 : first(f), last(l), isMonitor(is_mon), monName(monname) {}
94 bool checkOptionalProperties(
bool bseparateMonitors,
bool bexcludeMonitor);
97 size_t prepareSpectraBlocks(std::map<specnum_t, std::string> &monitors,
DataBlockComposite &LoadBlock);
108 bool update_spectra2det_mapping =
false);
119 void buildSpectraInd2SpectraNumMap(
bool range_supplied,
bool hasSpectraList,
DataBlockComposite &dataBlockComposite);
122 void checkOverlappingSpectraRange();
168 static double dblSqrt(
double in);
174 bool findSpectraDetRangeInFile(
NeXus::NXEntry &entry, std::vector<specnum_t> &spectrum_index, int64_t ndets,
175 int64_t n_vms_compat_spectra, std::map<specnum_t, std::string> &monitors,
176 bool excludeMonitors,
bool separateMonitors);
Defines an interface to an algorithm that loads a file so that it can take part in the automatic sele...
A minimal class to hold the mapping between the spectrum number and its related detector ID numbers f...
DataBlockComposite: The DataBlockComposite handles a collection of DataBlocks.
Loads a file in a NeXus format and stores it in a 2D workspace.
int64_t m_entrynumber
The number of the input entry.
const std::vector< std::string > seeAlso() const override
Function to return all of the seeAlso (these are not validated) algorithms related to this algorithm....
std::string m_filename
The name and path of the input file.
DataBlockComposite m_monBlockInfo
boost::scoped_ptr< ISISRunLogs > m_logCreator
A pointer to the ISISRunLogs creator.
const specnum_t * m_spec_end
Pointer to one-past-the-end of spectrum number array (m_spec)
int version() const override
Algorithm's version for identification overriding a virtual method.
std::map< int64_t, specnum_t > m_wsInd2specNum_map
map of workspace Index to spectra Number (spectraID)
std::map< specnum_t, std::string > m_monitors
Monitors, map spectrum index to monitor group name.
const std::string summary() const override
Summary of algorithms purpose.
bool m_have_detector
Is there a detector block.
std::shared_ptr< API::Progress > m_progress
Progress reporting object.
std::string m_instrument_name
The instrument name from Nexus.
std::shared_ptr< HistogramData::HistogramX > m_tof_data
Time channels.
const std::string name() const override
Algorithm's name for identification overriding a virtual method.
DataBlockComposite m_detBlockInfo
std::vector< specnum_t > m_spec
Spectra numbers.
boost::scoped_ptr< ::NeXus::File > m_nexusFile
DataBlockComposite m_loadBlockInfo
API::SpectrumDetectorMapping m_spec2det_map
spectra Number to detector ID (multi)map
const std::string category() const override
Algorithm's category for identification overriding a virtual method.
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
std::string m_samplename
The sample name read from Nexus.
Defines a wrapper around a file whose internal structure can be accessed using the NeXus API.
Templated class implementation of NXDataSet.
Implements NXentry Nexus class.
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< Workspace2D > Workspace2D_sptr
shared pointer to Mantid::DataObjects::Workspace2D
Helper class which provides the Collimation Length for SANS instruments.
int32_t specnum_t
Typedef for a spectrum Number.
Spectra block descriptor.
SpectraBlock(int64_t f, int64_t l, bool is_mon, const std::string &monname)
Constructor - initialize the block.
int64_t last
last spectrum number of the block
bool isMonitor
is the data in a monitor group
int64_t first
first spectrum number of the block