Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::API::Run Class Reference

This class stores information regarding an experimental run as a series of log entries. More...

#include <Run.h>

Inheritance diagram for Mantid::API::Run:
Mantid::API::LogManager

Public Member Functions

size_t addGoniometer (const Geometry::Goniometer &goniometer)
 Append a goniometer to the run.
 
void clearGoniometers ()
 Clear all goniometers on the Run.
 
std::shared_ptr< Runclone ()
 Clone.
 
void filterByTime (const Types::Core::DateAndTime start, const Types::Core::DateAndTime stop) override
 Filter the logs by time.
 
std::tuple< double, double, double > getBadPulseRange (const std::string &logname="proton_charge", const double &cutoff=95.) const
 determine the range of bad pulses to filter
 
std::vector< double > getBinBoundaries () const
 Returns the vector of bin boundaries.
 
const Geometry::GoniometergetGoniometer () const
 Return reference to the first const Goniometer object for this run.
 
const Geometry::GoniometergetGoniometer (const size_t index) const
 Return reference to a const Goniometer object for the run.
 
const std::vector< Kernel::Matrix< double > > getGoniometerMatrices () const
 Get vector of all goniometer matrices in the Run.
 
const Kernel::Matrix< double > & getGoniometerMatrix () const
 Retrieve the first goniometer rotation matrix.
 
const Kernel::Matrix< double > & getGoniometerMatrix (const size_t index) const
 Retrieve the a goniometer rotation matrix.
 
size_t getMemorySize () const override
 Return an approximate memory size for the object in bytes.
 
size_t getNumGoniometers () const
 Get the number of goniometers in the Run.
 
double getProtonCharge () const
 Get the proton charge.
 
std::pair< double, double > histogramBinBoundaries (const double value) const
 Returns the bin boundaries for a given value.
 
void integrateProtonCharge (const std::string &logname="proton_charge") const
 Integrate the proton charge over the whole run time - default log proton_charge.
 
void loadNexus (Nexus::File *file, const std::string &group, bool keepOpen=false) override
 Load the run from a NeXus file with a given group name.
 
void loadNexus (Nexus::File *file, const std::string &group, const Mantid::Nexus::NexusDescriptor &fileInfo, const std::string &prefix, bool keepOpen=false) override
 Load the run from a NeXus file with a given group name.
 
Geometry::GoniometermutableGoniometer ()
 Return reference to the first non-const Goniometer object for this run.
 
Geometry::GoniometermutableGoniometer (const size_t index)
 Return reference to a non-const Goniometer object for the run.
 
bool operator!= (const Run &other)
 
Runoperator+= (const Run &rhs)
 Addition.
 
Runoperator= (const Run &other)
 
bool operator== (const Run &other)
 
 Run ()
 
 Run (const Run &other)
 
void saveNexus (Nexus::File *file, const std::string &group, bool keepOpen=false) const override
 Save the run to a NeXus file with a given group name.
 
void setDuration ()
 update property "duration" with the duration of the Run's TimeROI attribute
 
void setGoniometer (const Geometry::Goniometer &goniometer, const bool useLogValues)
 Set a single gonoimeter & read the average values from the logs if told to do so.
 
void setGoniometers (const Geometry::Goniometer &goniometer)
 Set the gonoimeters using the individual values.
 
void setProtonCharge (const double charge)
 Set the proton charge.
 
void setTimeROI (const Kernel::TimeROI &timeroi) override
 
void storeHistogramBinBoundaries (const std::vector< double > &histoBins)
 Store the given values as a set of histogram bin boundaries.
 
 ~Run ()
 
- Public Member Functions inherited from Mantid::API::LogManager
void addLogData (Kernel::Property *p)
 Add a log entry.
 
void addLogData (std::unique_ptr< Kernel::Property > p, bool overwrite=false)
 Add a log entry.
 
template<class TYPE >
void addProperty (const std::string &name, const TYPE &value, bool overwrite=false)
 Add a property of given type.
 
template<class TYPE >
void addProperty (const std::string &name, const TYPE &value, const std::string &units, bool overwrite=false)
 Add a property of a specified type (Simply creates a Kernel::Property of that type) and set its units.
 
void addProperty (Kernel::Property *prop, bool overwrite=false)
 Add data to the object in the form of a property.
 
void addProperty (std::unique_ptr< Kernel::Property > prop, bool overwrite=false)
 Add data to the object in the form of a property.
 
void clearLogs ()
 Clear the logs.
 
void clearOutdatedTimeSeriesLogValues ()
 Empty all but the last value out of all TimeSeriesProperty logs.
 
void clearSingleValueCache ()
 Clear the cache of calculated statistics.
 
void clearTimeSeriesLogs ()
 Empty the values out of all TimeSeriesProperty logs.
 
LogManagercloneInTimeROI (const Kernel::TimeROI &timeROI)
 Create a new LogManager with a partial copy of its time series properties according to TimeROI.
 
void copyAndFilterProperties (const LogManager &other, const Kernel::TimeROI &timeROI)
 Copy properties from another LogManager; filter copied time series properties according to TimeROI.
 
const Types::Core::DateAndTime endTime () const
 Return the run end time.
 
void filterByLog (Mantid::Kernel::LogFilter *filter, const std::vector< std::string > &excludedFromFiltering=std::vector< std::string >())
 Filter the run by the given log filter.
 
const Types::Core::DateAndTime getFirstPulseTime () const
 Return the first pulse time from sample logs.
 
Kernel::TimeSeriesProperty< bool > * getInvalidValuesFilter (const std::string &logName) const
 returns the invalid values log if the log has a matching invalid values log filter
 
const Types::Core::DateAndTime getLastPulseTime () const
 Return the last pulse time from sample logs.
 
double getLogAsSingleValue (const std::string &name, Kernel::Math::StatisticType statistic=Kernel::Math::Mean) const
 
const std::vector< Kernel::Property * > & getLogData () const
 Access all log entries.
 
Kernel::PropertygetLogData (const std::string &name) const
 Access a single log entry.
 
const std::vector< Kernel::Property * > & getProperties () const
 Return all of the current properties.
 
Kernel::PropertygetProperty (const std::string &name) const
 Returns the named property as a pointer.
 
int getPropertyAsIntegerValue (const std::string &name) const
 Returns a property as an integer value.
 
double getPropertyAsSingleValue (const std::string &name, Kernel::Math::StatisticType statistic=Kernel::Math::Mean) const
 Returns a property as a single double value from its name.
 
template<typename HeldType >
HeldType getPropertyValueAsType (const std::string &name) const
 Get the value of a property as the given TYPE.
 
const std::string & getProtonChargeLogName () const
 
const std::string & getProtonChargeUnfilteredName () const
 
Kernel::TimeSeriesPropertyStatistics getStatistics (const std::string &name) const
 Returns various statistics computations for a given property.
 
double getTimeAveragedStd (const std::string &name) const
 Get the time averaged standard deviation for a log.
 
double getTimeAveragedValue (const std::string &name) const
 Get the time averaged value for a log.
 
const Kernel::TimeROIgetTimeROI () const
 
template<typename T >
Kernel::TimeSeriesProperty< T > * getTimeSeriesProperty (const std::string &name) const
 Returns a property as a time series property.
 
bool hasInvalidValuesFilter (const std::string &logName) const
 returns true if the log has a matching invalid values log filter
 
bool hasProperty (const std::string &name) const
 Does the property exist on the object.
 
 LogManager ()
 
 LogManager (const LogManager &other)
 
bool operator!= (const LogManager &other) const
 
LogManageroperator= (const LogManager &other)
 
bool operator== (const LogManager &other) const
 
virtual void removeDataOutsideTimeROI ()
 For the time series properties, remove values according to TimeROI.
 
void removeLogData (const std::string &name, const bool delproperty=true)
 Remove a named log entry.
 
void removeProperty (const std::string &name, bool delProperty=true)
 Remove a named property.
 
void setStartAndEndTime (const Types::Core::DateAndTime &start, const Types::Core::DateAndTime &end)
 Set the run start and end.
 
const Types::Core::DateAndTime startTime () const
 Return the run start time.
 
virtual ~LogManager ()
 Destructor.
 

Private Member Functions

void calculateAverageGoniometerMatrix ()
 Calculate the average gonoimeter matrix.
 
void calculateGoniometerMatrices (const Geometry::Goniometer &goniometer)
 Calculate the gonoimeter matrices from logs.
 
void copyGoniometers (const Run &other)
 Copy the goniometers from another.
 
void loadNexusCommon (Nexus::File *file, const std::string &nameClass)
 
void mergeMergables (Mantid::Kernel::PropertyManager &sum, const Mantid::Kernel::PropertyManager &toAdd)
 Adds all the time series in from one property manager into another.
 

Private Attributes

std::vector< std::unique_ptr< Geometry::Goniometer > > m_goniometers
 Goniometer for this run.
 
std::vector< double > m_histoBins
 A set of histograms that can be stored here for future reference.
 

Additional Inherited Members

- Static Public Member Functions inherited from Mantid::API::LogManager
static std::string getInvalidValuesFilterLogName (const std::string &logName)
 Gets the correct log name for the matching invalid values log for a given log name.
 
- Protected Member Functions inherited from Mantid::API::LogManager
bool hasEndTime () const
 
bool hasStartTime () const
 
bool hasValidProtonChargeLog (std::string &error) const
 Check if the proton_charge log exists, is of valid type, and is not empty.
 
void loadNexus (Nexus::File *file, const Mantid::Nexus::NexusDescriptor &fileInfo, const std::string &prefix)
 
void loadNexus (Nexus::File *file, const std::map< std::string, std::string > &entries)
 Load the run from a NeXus file with a given group name.
 
- Protected Attributes inherited from Mantid::API::LogManager
std::unique_ptr< Kernel::PropertyManagerm_manager
 A pointer to a property manager.
 
std::unique_ptr< Kernel::TimeROIm_timeroi
 
- Static Protected Attributes inherited from Mantid::API::LogManager
static const std::string PROTON_CHARGE_LOG_NAME = "gd_prtn_chrg"
 Name of the log entry containing the proton charge when retrieved using getProtonCharge.
 
static const std::string PROTON_CHARGE_UNFILTERED_LOG_NAME = LogManager::PROTON_CHARGE_LOG_NAME + "_unfiltered"
 Flag to signify if a filter has been applied to the proton charge log.
 

Detailed Description

This class stores information regarding an experimental run as a series of log entries.

Author
Martyn Gigg, Tessella plc
Date
22/07/2010

Definition at line 35 of file Run.h.

Constructor & Destructor Documentation

◆ Run() [1/2]

Mantid::API::Run::Run ( )

Definition at line 89 of file Run.cpp.

References m_goniometers.

◆ Run() [2/2]

Mantid::API::Run::Run ( const Run other)

Definition at line 94 of file Run.cpp.

References copyGoniometers().

◆ ~Run()

Mantid::API::Run::~Run ( )
default

Member Function Documentation

◆ addGoniometer()

size_t Mantid::API::Run::addGoniometer ( const Geometry::Goniometer goniometer)

Append a goniometer to the run.

Add a new Goniometer to this Run.

Parameters
goniometer:: goniometer to add
Returns
the index at which it was added

Definition at line 582 of file Run.cpp.

References m_goniometers.

◆ calculateAverageGoniometerMatrix()

void Mantid::API::Run::calculateAverageGoniometerMatrix ( )
private

Calculate the average gonoimeter matrix.

Calculate the average goniometer matrix.

Definition at line 795 of file Run.cpp.

References Mantid::API::g_log, Mantid::API::LogManager::getLogAsSingleValue(), Mantid::API::LogManager::getStatistics(), Mantid::Kernel::Math::LastValue, m_goniometers, and Mantid::Kernel::Logger::warning().

Referenced by setGoniometer().

◆ calculateGoniometerMatrices()

void Mantid::API::Run::calculateGoniometerMatrices ( const Geometry::Goniometer goniometer)
private

Calculate the gonoimeter matrices from logs.

Calculate the goniometer matrixes from logs.

Parameters
goniometergoniometer with axes names to use

Definition at line 833 of file Run.cpp.

References Mantid::Geometry::Goniometer::getAxis(), Mantid::Geometry::Goniometer::getNumberAxes(), m_goniometers, and Mantid::Geometry::GoniometerAxis::name.

Referenced by setGoniometers().

◆ clearGoniometers()

void Mantid::API::Run::clearGoniometers ( )

Clear all goniometers on the Run.

Remove all goniometers on the Run.

Definition at line 589 of file Run.cpp.

References m_goniometers.

◆ clone()

std::shared_ptr< Run > Mantid::API::Run::clone ( )

Clone.

Definition at line 120 of file Run.cpp.

References clone(), m_histoBins, and Mantid::API::LogManager::m_manager.

Referenced by clone().

◆ copyGoniometers()

void Mantid::API::Run::copyGoniometers ( const Run other)
private

Copy the goniometers from another.

Parameters
other:: other workspace to copy

Definition at line 884 of file Run.cpp.

References m_goniometers.

Referenced by operator=(), and Run().

◆ filterByTime()

void Mantid::API::Run::filterByTime ( const Types::Core::DateAndTime  start,
const Types::Core::DateAndTime  stop 
)
overridevirtual

Filter the logs by time.

Filter out a run by time range.

Takes out any TimeSeriesProperty log entries outside of the given absolute time range [start,stop), except for the entries immediately before and after the time range.

Total proton charge will get re-integrated after filtering.

Parameters
start:: Absolute start time.
stop:: Absolute stop time.

Reimplemented from Mantid::API::LogManager.

Definition at line 141 of file Run.cpp.

References Mantid::API::LogManager::filterByTime(), and integrateProtonCharge().

◆ getBadPulseRange()

std::tuple< double, double, double > Mantid::API::Run::getBadPulseRange ( const std::string &  logname = "proton_charge",
const double &  cutoff = 95. 
) const

determine the range of bad pulses to filter

Determine the range of bad pulses to filter based on the cutoff.

Returns
min pcharge, max pcharge, mean pcharge
Exceptions
Exception::NotFoundErrorif the proton charge not found or invalid

Definition at line 398 of file Run.cpp.

References Mantid::API::LogManager::getLogData(), Mantid::API::LogManager::hasProperty(), Mantid::Kernel::TimeSeriesPropertyStatistics::maximum, and Mantid::Kernel::TimeSeriesPropertyStatistics::mean.

Referenced by Mantid::Algorithms::FilterBadPulses::exec().

◆ getBinBoundaries()

std::vector< double > Mantid::API::Run::getBinBoundaries ( ) const

Returns the vector of bin boundaries.

Returns the energy bin boundaries.

Throws a std::runtime_error if the energy bins have not been set.

Returns
The bin boundaries vector

Definition at line 505 of file Run.cpp.

References m_histoBins.

◆ getGoniometer() [1/2]

const Geometry::Goniometer & Mantid::API::Run::getGoniometer ( ) const

Return reference to the first const Goniometer object for this run.

Returns
A reference to the const Goniometer object for this run

Definition at line 525 of file Run.cpp.

References m_goniometers.

Referenced by Mantid::DataObjects::LeanElasticPeaksWorkspace::createPeakHKL(), Mantid::DataObjects::PeaksWorkspace::createPeakHKL(), Mantid::DataObjects::PeaksWorkspace::createPeakQSample(), export_Run(), and Mantid::DataHandling::SetSample::setSampleShape().

◆ getGoniometer() [2/2]

const Geometry::Goniometer & Mantid::API::Run::getGoniometer ( const size_t  index) const

Return reference to a const Goniometer object for the run.

Get the Goniometer for the given associated experiment-info index.

Parameters
index:: index of the run to get.
Returns
goniometer

Definition at line 597 of file Run.cpp.

References index, and m_goniometers.

◆ getGoniometerMatrices()

const std::vector< Kernel::Matrix< double > > Mantid::API::Run::getGoniometerMatrices ( ) const

Get vector of all goniometer matrices in the Run.

Get a vector of all the gonoimeter rotation matries.

Returns
vector of 3x3 double rotation matrix

Definition at line 632 of file Run.cpp.

References m_goniometers.

◆ getGoniometerMatrix() [1/2]

const Mantid::Kernel::DblMatrix & Mantid::API::Run::getGoniometerMatrix ( ) const

Retrieve the first goniometer rotation matrix.

Get the gonimeter rotation matrix, calculated using the previously set Goniometer object as well as the angles loaded in the run (if any).

Returns
3x3 double rotation matrix

Definition at line 570 of file Run.cpp.

References getGoniometerMatrix().

Referenced by Mantid::MDAlgorithms::MDNorm::calQTransform(), and getGoniometerMatrix().

◆ getGoniometerMatrix() [2/2]

const Mantid::Kernel::DblMatrix & Mantid::API::Run::getGoniometerMatrix ( const size_t  index) const

Retrieve the a goniometer rotation matrix.

Get the gonoimeter rotation matrix, calculated using the previously set Goniometer object as well as the angles loaded in the run (if any).

Parameters
index:: index of the run to get.
Returns
3x3 double rotation matrix

Definition at line 622 of file Run.cpp.

References index, and m_goniometers.

◆ getMemorySize()

size_t Mantid::API::Run::getMemorySize ( ) const
overridevirtual

Return an approximate memory size for the object in bytes.

Return the total memory used by the run object, in bytes.

Reimplemented from Mantid::API::LogManager.

Definition at line 517 of file Run.cpp.

References Mantid::API::LogManager::getMemorySize(), m_goniometers, and m_histoBins.

Referenced by Mantid::API::MatrixWorkspace::getMemorySize(), and Mantid::DataObjects::EventWorkspace::getMemorySize().

◆ getNumGoniometers()

size_t Mantid::API::Run::getNumGoniometers ( ) const

Get the number of goniometers in the Run.

Returns
the number of goniometers's in this Run

Definition at line 574 of file Run.cpp.

References m_goniometers.

Referenced by export_Run().

◆ getProtonCharge()

double Mantid::API::Run::getProtonCharge ( ) const

◆ histogramBinBoundaries()

std::pair< double, double > Mantid::API::Run::histogramBinBoundaries ( const double  value) const

Returns the bin boundaries for a given value.

Returns the energy bin boundaries for a given energy value if they have been stored here.

Throws a std::runtime_error if the energy bins have not been set and a std::out_of_range error if the input value is out of the stored range

Returns
The bin boundaries for the given energy value

Definition at line 476 of file Run.cpp.

References Mantid::Kernel::VectorHelper::getBinIndex(), index, m_histoBins, and value.

◆ integrateProtonCharge()

void Mantid::API::Run::integrateProtonCharge ( const std::string &  logname = "proton_charge") const

Integrate the proton charge over the whole run time - default log proton_charge.

Calculate the total proton charge by integrating up all the entries in the "proton_charge" time series log.

This is then saved in the log entry using setProtonCharge(). If "proton_charge" is not found, the value is not stored

Conversion factor between picoColumbs and microAmp*hours

Definition at line 333 of file Run.cpp.

References Mantid::API::g_log, Mantid::API::LogManager::getProperty(), Mantid::API::LogManager::getTimeROI(), Mantid::API::LogManager::hasProperty(), Mantid::API::LogManager::m_manager, Mantid::API::LogManager::PROTON_CHARGE_UNFILTERED_LOG_NAME, setProtonCharge(), Mantid::Kernel::TimeSeriesProperty< TYPE >::timesAsVector(), Mantid::Kernel::Property::units(), Mantid::Kernel::TimeROI::update_or_replace_intersection(), Mantid::Kernel::TimeROI::useAll(), Mantid::Kernel::TimeSeriesProperty< TYPE >::valuesAsVector(), and Mantid::Kernel::Logger::warning().

Referenced by export_Run(), filterByTime(), getProtonCharge(), Mantid::DataHandling::LoadEventPreNexus2::setProtonCharge(), and setTimeROI().

◆ loadNexus() [1/2]

void Mantid::API::Run::loadNexus ( Nexus::File *  file,
const std::string &  group,
bool  keepOpen = false 
)
overridevirtual

Load the run from a NeXus file with a given group name.

Load the object from an open NeXus file.

Parameters
file:: open NeXus file
group:: name of the group to open. Empty string to NOT open a group, but load any NXlog in the current open group.
keepOpen:: If true, then the file is left open after doing to load

Reimplemented from Mantid::API::LogManager.

Definition at line 765 of file Run.cpp.

References Mantid::API::LogManager::getProperty(), group, Mantid::API::LogManager::hasProperty(), Mantid::API::LogManager::loadNexus(), loadNexusCommon(), and setProtonCharge().

◆ loadNexus() [2/2]

void Mantid::API::Run::loadNexus ( Nexus::File *  file,
const std::string &  group,
const Mantid::Nexus::NexusDescriptor fileInfo,
const std::string &  prefix,
bool  keepOpen = false 
)
overridevirtual

Load the run from a NeXus file with a given group name.

Load the object from an open NeXus file.

Overload that uses NexusDescriptor for faster metadata lookup

Parameters
file:: open NeXus file
group:: name of the group to open. Empty string to NOT open a group, but load any NXlog in the current open group.
fileInfodescriptor with in-memory index with all entries
prefixindicates current group location in file (absolute name)
keepOpen:: If true, then the file is left open after doing to load

Reimplemented from Mantid::API::LogManager.

Definition at line 700 of file Run.cpp.

References Mantid::Nexus::NexusDescriptor::getAllEntries(), Mantid::API::LogManager::getProperty(), group, Mantid::API::LogManager::hasProperty(), Mantid::API::LogManager::loadNexus(), loadNexusCommon(), and setProtonCharge().

Referenced by Mantid::API::ExperimentInfo::loadSampleAndLogInfoNexus(), and Mantid::API::ExperimentInfo::loadSampleAndLogInfoNexus().

◆ loadNexusCommon()

void Mantid::API::Run::loadNexusCommon ( Nexus::File *  file,
const std::string &  nameClass 
)
private

◆ mergeMergables()

void Mantid::API::Run::mergeMergables ( Mantid::Kernel::PropertyManager sum,
const Mantid::Kernel::PropertyManager toAdd 
)
private

Adds all the time series in from one property manager into another.

Adds all the time series in the second property manager to those in the first.

Parameters
sumthe properties to add to
toAddthe properties to add

Definition at line 862 of file Run.cpp.

References Mantid::Kernel::PropertyManager::declareProperty(), Mantid::Kernel::PropertyManager::getProperties(), Mantid::Kernel::PropertyManager::getProperty(), and Mantid::Kernel::Property::merge().

Referenced by operator+=().

◆ mutableGoniometer() [1/2]

Geometry::Goniometer & Mantid::API::Run::mutableGoniometer ( )

Return reference to the first non-const Goniometer object for this run.

Returns
A reference to the non-const Goniometer object for this run

Definition at line 528 of file Run.cpp.

References m_goniometers.

◆ mutableGoniometer() [2/2]

Geometry::Goniometer & Mantid::API::Run::mutableGoniometer ( const size_t  index)

Return reference to a non-const Goniometer object for the run.

Get the non-const Goniometer for the given associated experiment-info index.

Parameters
index:: index of the run to get.
Returns
goniometer

Definition at line 609 of file Run.cpp.

References index, and m_goniometers.

◆ operator!=()

bool Mantid::API::Run::operator!= ( const Run other)

Definition at line 118 of file Run.cpp.

References operator==().

◆ operator+=()

Run & Mantid::API::Run::operator+= ( const Run rhs)

Addition.

Adds just the properties that are safe to add.

All time series are merged together and the list of addable properties are added

Parameters
rhsThe object that is being added to this.
Returns
A reference to the summed object

Definition at line 204 of file Run.cpp.

References Mantid::Kernel::TimeROI::addROI(), Mantid::API::LogManager::endTime(), left, Mantid::API::LogManager::m_manager, Mantid::API::LogManager::m_timeroi, mergeMergables(), name, rhs, right, Mantid::Kernel::Property::setValue(), Mantid::API::LogManager::startTime(), Mantid::Kernel::TimeROI::update_union(), and Mantid::Kernel::TimeROI::useAll().

◆ operator=()

Run & Mantid::API::Run::operator= ( const Run other)

Definition at line 99 of file Run.cpp.

References copyGoniometers(), m_histoBins, and Mantid::API::LogManager::operator=().

◆ operator==()

bool Mantid::API::Run::operator== ( const Run other)

Definition at line 108 of file Run.cpp.

References m_goniometers, m_histoBins, and Mantid::API::LogManager::operator==().

Referenced by operator!=().

◆ saveNexus()

void Mantid::API::Run::saveNexus ( Nexus::File *  file,
const std::string &  group,
bool  keepOpen = false 
) const
overridevirtual

Save the run to a NeXus file with a given group name.

Save the object to an open NeXus file.

Parameters
file:: open NeXus file
group:: name of the group to create
keepOpen:: If true, leave the file open after saving

Reimplemented from Mantid::API::LogManager.

Definition at line 647 of file Run.cpp.

References group, Mantid::API::LogManager::hasProperty(), m_goniometers, m_histoBins, Mantid::API::LogManager::saveNexus(), and std::to_string().

Referenced by Mantid::API::ExperimentInfo::saveExperimentInfoNexus(), and Mantid::API::ExperimentInfo::saveExperimentInfoNexus().

◆ setDuration()

void Mantid::API::Run::setDuration ( )

update property "duration" with the duration of the Run's TimeROI attribute

Update property "duration" with the duration of the Run's TimeROI attribute.

If the Run's TimeROI is empty, this member function does nothing.

Definition at line 429 of file Run.cpp.

References Mantid::API::LogManager::addProperty(), Mantid::API::LogManager::getProperty(), Mantid::API::LogManager::hasProperty(), Mantid::API::LogManager::m_timeroi, Mantid::Kernel::Property::setUnits(), and Mantid::Kernel::Property::setValue().

Referenced by setTimeROI().

◆ setGoniometer()

void Mantid::API::Run::setGoniometer ( const Geometry::Goniometer goniometer,
const bool  useLogValues 
)

Set a single gonoimeter & read the average values from the logs if told to do so.

Set the gonoimeter & optionally read the average values from the logs.

Parameters
goniometer:: A reference to a goniometer
useLogValues:: If true, recalculate the goniometer using the log values

Definition at line 537 of file Run.cpp.

References calculateAverageGoniometerMatrix(), and m_goniometers.

◆ setGoniometers()

void Mantid::API::Run::setGoniometers ( const Geometry::Goniometer goniometer)

Set the gonoimeters using the individual values.

Set the gonoimeter & read the individual values from the logs.

Parameters
goniometer:: A reference to a goniometer

Definition at line 554 of file Run.cpp.

References calculateGoniometerMatrices(), and m_goniometers.

◆ setProtonCharge()

void Mantid::API::Run::setProtonCharge ( const double  charge)

◆ setTimeROI()

void Mantid::API::Run::setTimeROI ( const Kernel::TimeROI timeroi)
overridevirtual

◆ storeHistogramBinBoundaries()

void Mantid::API::Run::storeHistogramBinBoundaries ( const std::vector< double > &  histoBins)

Store the given values as a set of histogram bin boundaries.

Store the given values as a set of energy bin boundaries.

Throws

  • an invalid_argument if fewer than 2 values are given;
  • an out_of_range error if first value is greater of equal to the last
    Parameters
    histoBins:: A vector of values that are interpreted as bin boundaries from a histogram

Definition at line 452 of file Run.cpp.

References m_histoBins.

Member Data Documentation

◆ m_goniometers

std::vector<std::unique_ptr<Geometry::Goniometer> > Mantid::API::Run::m_goniometers
private

◆ m_histoBins

std::vector<double> Mantid::API::Run::m_histoBins
private

A set of histograms that can be stored here for future reference.

Definition at line 126 of file Run.h.

Referenced by clone(), getBinBoundaries(), getMemorySize(), histogramBinBoundaries(), loadNexusCommon(), operator=(), operator==(), saveNexus(), and storeHistogramBinBoundaries().


The documentation for this class was generated from the following files: