|
Mantid
|
Implements a lazy-loading mechanism for the experimental information stored in a NeXus file. More...
#include <FileBackedExperimentInfo.h>
Public Member Functions | |
| ExperimentInfo * | cloneExperimentInfo () const override |
| This clones the FileBackedExperimentInfo and will not cause a load of the information. More... | |
| FileBackedExperimentInfo (std::string filename, std::string nxpath) | |
| Create an object based on a NeXus file and path. More... | |
Public Member Functions inherited from Mantid::API::ExperimentInfo | |
| virtual ExperimentInfo * | cloneExperimentInfo () const |
| Clone us. More... | |
| const Geometry::ComponentInfo & | componentInfo () const |
| const Geometry::ParameterMap & | constInstrumentParameters () const |
| Const version. More... | |
| void | copyExperimentInfoFrom (const ExperimentInfo *other) |
| Copy everything from the given experiment object. More... | |
| const Geometry::DetectorInfo & | detectorInfo () const |
| Return a const reference to the DetectorInfo object. More... | |
| ExperimentInfo () | |
| Default constructor. More... | |
| ExperimentInfo (const ExperimentInfo &) | |
| Copy constructor. More... | |
| std::string | getAvailableWorkspaceEndDate () const |
| Return workspace end date as a formatted string (strftime style, as returned by Kernel::DateAdnTime) string, if available. More... | |
| std::string | getAvailableWorkspaceStartDate () const |
| Return workspace start date as a formatted string (strftime, as returned by Types::Core::DateAndTime) string, if available. More... | |
| double | getEFixed (const detid_t detID) const |
| Easy access to the efixed value for this run & detector ID. More... | |
| double | getEFixed (const std::shared_ptr< const Geometry::IDetector > &detector=std::shared_ptr< const Geometry::IDetector >{nullptr}) const |
| Easy access to the efixed value for this run & optional detector. More... | |
| double | getEFixedForIndirect (const std::shared_ptr< const Geometry::IDetector > &detector, const std::vector< std::string > ¶meterNames) const |
| double | getEFixedGivenEMode (const std::shared_ptr< const Geometry::IDetector > &detector, const Kernel::DeltaEMode::Type emode) const |
| Easy access to the efixed value for this run & detector. More... | |
| Kernel::DeltaEMode::Type | getEMode () const |
| Returns the emode for this run. More... | |
| Geometry::Instrument_const_sptr | getInstrument () const |
| Returns the parameterized instrument. More... | |
| Kernel::Property * | getLog (const std::string &log) const |
| Access a log for this experiment. More... | |
| double | getLogAsSingleValue (const std::string &log) const |
| Access a single value from a log for this experiment. More... | |
| int | getRunNumber () const |
| Utility method to get the run number. More... | |
| std::string | getWorkspaceStartDate () const |
| Returns the start date for this experiment (or current time if no info available) More... | |
| Geometry::ParameterMap & | instrumentParameters () |
| Returns a modifiable set of instrument parameters. More... | |
| const Geometry::ParameterMap & | instrumentParameters () const |
| Returns the set of parameters modifying the base instrument (const-version) More... | |
| void | invalidateSpectrumDefinition (const size_t index) |
| Notifies the ExperimentInfo that a spectrum definition has changed. More... | |
| void | loadExperimentInfoNexus (const std::string &nxFilename, ::NeXus::File *file, std::string ¶meterStr) |
| Loads an experiment description from the open NeXus file. More... | |
| void | loadExperimentInfoNexus (const std::string &nxFilename, ::NeXus::File *file, std::string ¶meterStr, const Mantid::Kernel::NexusHDF5Descriptor &fileInfo, const std::string &prefix) |
| void | loadInstrumentInfoNexus (const std::string &nxFilename, ::NeXus::File *file) |
| Load the instrument from an open NeXus file without reading any parameters. More... | |
| void | loadInstrumentInfoNexus (const std::string &nxFilename, ::NeXus::File *file, std::string ¶meterStr) |
| Load the instrument from an open NeXus file. More... | |
| void | loadInstrumentParametersNexus (::NeXus::File *file, std::string ¶meterStr) |
| Load instrument parameters from an open Nexus file in Instument group if found there. More... | |
| void | loadSampleAndLogInfoNexus (::NeXus::File *file) |
| Load the sample and log info from an open NeXus file. More... | |
| void | loadSampleAndLogInfoNexus (::NeXus::File *file, const Mantid::Kernel::NexusHDF5Descriptor &fileInfo, const std::string &prefix) |
| Load the sample and log info from an open NeXus file. More... | |
| Geometry::ComponentInfo & | mutableComponentInfo () |
| Geometry::DetectorInfo & | mutableDetectorInfo () |
| Return a non-const reference to the DetectorInfo object. More... | |
| Run & | mutableRun () |
| Writable version of the run object. More... | |
| Sample & | mutableSample () |
| Writable version of the sample object. More... | |
| SpectrumInfo & | mutableSpectrumInfo () |
| Return a non-const reference to the SpectrumInfo object. More... | |
| ExperimentInfo & | operator= (const ExperimentInfo &) |
| Implements the copy assignment operator. More... | |
| void | populateInstrumentParameters () |
| Add parameters to the instrument parameter map that are defined in instrument definition file or parameter file, which may contain parameters that require logfile data to be available. More... | |
| void | readParameterMap (const std::string ¶meterStr) |
| Populate the parameter map given a string. More... | |
| const Run & | run () const |
| Run details object access. More... | |
| const Sample & | sample () const |
| Sample accessors. More... | |
| void | saveExperimentInfoNexus (::NeXus::File *file, bool saveInstrument, bool saveSample, bool saveLogs) const |
| Saves this experiment description to the open NeXus file. More... | |
| void | saveExperimentInfoNexus (::NeXus::File *file, bool saveLegacyInstrument=true) const |
| Saves this experiment description to the open NeXus file. More... | |
| void | setDetectorGrouping (const size_t index, const std::set< detid_t > &detIDs) const |
Sets the detector grouping for the spectrum with the given index. More... | |
| void | setEFixed (const detid_t detID, const double value) |
| Set the efixed value for a given detector ID. More... | |
| void | setInstrument (const Geometry::Instrument_const_sptr &instr) |
| Instrument accessors. More... | |
| void | setNumberOfDetectorGroups (const size_t count) const |
| Sets the number of detector groups. More... | |
| void | setSharedRun (Kernel::cow_ptr< Run > run) |
| Set the run object. Use in particular to clear run without copying old run. More... | |
| Kernel::cow_ptr< Run > | sharedRun () |
| Return the cow ptr of the run. More... | |
| const SpectrumInfo & | spectrumInfo () const |
| Return a reference to the SpectrumInfo object. More... | |
| const std::string | toString () const |
| Returns a string description of the object. More... | |
| void | updateSpectrumDefinitionIfNecessary (const size_t index) const |
| virtual | ~ExperimentInfo () |
| Virtual destructor. More... | |
Private Member Functions | |
| void | populateFromFile () const |
| Populate this object with the data from the file. More... | |
| void | populateIfNotLoaded () const override |
| Check if the object has been populated and load the information if it has not. More... | |
Private Attributes | |
| std::string | m_filename |
| bool | m_loaded |
| std::string | m_nxpath |
Additional Inherited Members | |
Protected Member Functions inherited from Mantid::API::ExperimentInfo | |
| size_t | numberOfDetectorGroups () const |
| Returns the number of detector groups. More... | |
| virtual void | populateIfNotLoaded () const |
| Called as the first operation of most public methods. More... | |
| void | setSpectrumDefinitions (Kernel::cow_ptr< std::vector< SpectrumDefinition > > spectrumDefinitions) |
| Sets the SpectrumDefinition for all spectra. More... | |
| virtual void | updateCachedDetectorGrouping (const size_t index) const |
| Update detector grouping for spectrum with given index. More... | |
Protected Attributes inherited from Mantid::API::ExperimentInfo | |
| std::shared_ptr< Geometry::ParameterMap > | m_parmap |
| Parameters modifying the base instrument. More... | |
| Geometry::Instrument_const_sptr | sptr_instrument |
| The base (unparametrized) instrument. More... | |
Implements a lazy-loading mechanism for the experimental information stored in a NeXus file.
Definition at line 19 of file FileBackedExperimentInfo.h.
| Mantid::API::FileBackedExperimentInfo::FileBackedExperimentInfo | ( | std::string | filename, |
| std::string | nxpath | ||
| ) |
Create an object based on a NeXus file and path.
| filename | The full path to the file |
| nxpath | Path to the location of the experiment information |
Definition at line 30 of file FileBackedExperimentInfo.cpp.
|
overridevirtual |
This clones the FileBackedExperimentInfo and will not cause a load of the information.
Reimplemented from Mantid::API::ExperimentInfo.
Definition at line 38 of file FileBackedExperimentInfo.cpp.
|
private |
Populate this object with the data from the file.
Definition at line 53 of file FileBackedExperimentInfo.cpp.
References Mantid::API::ExperimentInfo::loadExperimentInfoNexus(), m_filename, m_loaded, m_nxpath, and Mantid::API::ExperimentInfo::readParameterMap().
Referenced by populateIfNotLoaded().
|
overrideprivatevirtual |
Check if the object has been populated and load the information if it has not.
Reimplemented from Mantid::API::ExperimentInfo.
Definition at line 44 of file FileBackedExperimentInfo.cpp.
References m_loaded, and populateFromFile().
|
private |
Definition at line 29 of file FileBackedExperimentInfo.h.
Referenced by populateFromFile().
|
mutableprivate |
Definition at line 28 of file FileBackedExperimentInfo.h.
Referenced by populateFromFile(), and populateIfNotLoaded().
|
private |
Definition at line 30 of file FileBackedExperimentInfo.h.
Referenced by populateFromFile().