Skip to content

Commit

Permalink
Cherry pick pull request #18972
Browse files Browse the repository at this point in the history
refs #18950 Forced deadTime data to be read during cache

(cherry picked from commit a2b5275)

refs #18950 Empty cache for deadTimes, firstGoodData and startTime

(cherry picked from commit 67ea45d)

refs #18950 Removed indent in DataLoader

(cherry picked from commit 7efdc11)

refs #18950 Renamed emptyCache to clearCache

(cherry picked from commit abd3fe0)

refs #18950 clang format

(cherry picked from commit 786d435)

Add patch release note
  • Loading branch information
AnthonyLim23 authored and martyngigg committed Feb 23, 2017
1 parent 7f17f80 commit 03062ed
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
Expand Up @@ -95,6 +95,8 @@ class MANTIDQT_CUSTOMINTERFACES_DLL MuonAnalysisDataLoader {
/// Load dead times from file
Mantid::API::Workspace_sptr
loadDeadTimesFromFile(const std::string &filename) const;
// empty the cache
void clearCache();

protected:
/// Set properties of algorithm from options
Expand Down
4 changes: 3 additions & 1 deletion MantidQt/CustomInterfaces/src/Muon/MuonAnalysis.cpp
Expand Up @@ -2694,7 +2694,7 @@ void MuonAnalysis::doSetToolbarsHidden(bool hidden) {
*/
void MuonAnalysis::onDeadTimeTypeChanged(int choice) {
m_deadTimesChanged = true;

m_dataLoader.clearCache();
if (choice == 0 || choice == 1) // if choice == none || choice == from file
{
m_uiForm.mwRunDeadTimeFile->setVisible(false);
Expand Down Expand Up @@ -2757,6 +2757,7 @@ void MuonAnalysis::deadTimeFileSelected() {
* from the form
*/
void MuonAnalysis::setTimeZeroState(int checkBoxState) {
m_dataLoader.clearCache();
if (checkBoxState == -1)
checkBoxState = m_uiForm.timeZeroAuto->checkState();

Expand All @@ -2778,6 +2779,7 @@ void MuonAnalysis::setTimeZeroState(int checkBoxState) {
* from the form
*/
void MuonAnalysis::setFirstGoodDataState(int checkBoxState) {
m_dataLoader.clearCache();
if (checkBoxState == -1)
checkBoxState = m_uiForm.firstGoodDataAuto->checkState();

Expand Down
6 changes: 6 additions & 0 deletions MantidQt/CustomInterfaces/src/Muon/MuonAnalysisDataLoader.cpp
Expand Up @@ -472,5 +472,11 @@ void MuonAnalysisDataLoader::updateCache() const {
}
}

void MuonAnalysisDataLoader::clearCache() {
if (!m_loadedDataCache.empty()) {
m_loadedDataCache.clear();
}
}

} // namespace CustomInterfaces
} // namespace MantidQt
7 changes: 6 additions & 1 deletion docs/source/release/v3.9.1/index.rst
Expand Up @@ -37,7 +37,9 @@ Changes in this version
* `18915 <https://www.github.com/mantidproject/mantid/pull/18915>`_ Add missing parameter in function call in performance test
* `18926 <https://www.github.com/mantidproject/mantid/pull/18926>`_ Fix wrong detector selection when loading high angle bank user files in ISIS SANS
* `18927 <https://www.github.com/mantidproject/mantid/pull/18927>`_ Fix sum file behaviour for vesuvio diffraction
* `18955 <https://www.github.com/mantidproject/mantid/pull/18955>`_ Fix crash in MonitorDlg
* `18959 <https://www.github.com/mantidproject/mantid/pull/18959>`_ Blank instrument view with U correction
* `18972 <https://www.github.com/mantidproject/mantid/pull/18972>`_ Fix reading dead time data in Muon interface

Summary of impact
-----------------
Expand Down Expand Up @@ -72,9 +74,12 @@ Summary of impact
+-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+
| 18927 | Allow Vesuvio to sum runs in diffraction reduction | Fix incorrect assignment in loop | **low** |
+-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+
| 18955 | Avoid possible crash in algorithm monitor dialog | Check for null pointer | **low** |
+-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+
| 18959 | Fixes blank view when U correction applied | Fix missing call after #18875 | **medium** |
+-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+

| 18972 | Loads data with/without dead-time correction as per user request | Clear data cache after option is updated | **low** |
+-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+

.. _download page: http://download.mantidproject.org

Expand Down

0 comments on commit 03062ed

Please sign in to comment.