Permalink
Browse files

Refs #5609. Add an error message about dead times for ARGUS.

  • Loading branch information...
1 parent 869b4a6 commit c84e4125ecdc0c7e2fcae429e69572adc4cdb584 @Robert-Whitley Robert-Whitley committed Jul 19, 2012
Showing with 21 additions and 13 deletions.
  1. +21 −13 Code/Mantid/MantidQt/CustomInterfaces/src/MuonAnalysis.cpp
@@ -1102,25 +1102,33 @@ void MuonAnalysis::inputFileChanged(const QStringList& files)
if (m_previousFilenames.size() > 1)
plusRangeWorkspaces();
- // Get dead times from data.
- if ((m_uiForm.instrSelector->currentText().toUpper().toStdString() != "ARGUS") && (m_uiForm.deadTimeType->currentIndex() == 1) )
+ if (m_uiForm.instrSelector->currentText().toUpper().toStdString() != "ARGUS")
{
- getDeadTimeFromData(deadTimes);
- }
- // Get dead times from file.
- else if ((m_uiForm.instrSelector->currentText().toUpper().toStdString() != "ARGUS") && (m_uiForm.deadTimeType->currentIndex() == 2) )
- {
- QString deadTimeFile(m_uiForm.mwRunDeadTimeFile->getFirstFilename() );
-
- try
+ // Get dead times from data.
+ if (m_uiForm.deadTimeType->currentIndex() == 1)
{
- getDeadTimeFromFile(deadTimeFile);
+ getDeadTimeFromData(deadTimes);
}
- catch (std::exception&)
+ // Get dead times from file.
+ else if (m_uiForm.deadTimeType->currentIndex() == 2)
{
- QMessageBox::information(this, "Mantid - MuonAnalysis", "A problem occurred while applying dead times.");
+ QString deadTimeFile(m_uiForm.mwRunDeadTimeFile->getFirstFilename() );
+
+ try
+ {
+ getDeadTimeFromFile(deadTimeFile);
+ }
+ catch (std::exception&)
+ {
+ QMessageBox::information(this, "Mantid - MuonAnalysis", "A problem occurred while applying dead times.");
+ }
}
}
+ else if (m_uiForm.deadTimeType->currentIndex() != 0)
+ {
+ QMessageBox::information(this, "Mantid - Muon Analysis", "Dead times are currently not implemented in ARGUS files."
+ + QString("\nAs a result, no dead times will be applied.") );
+ }
// Make the options available
m_optionTab->nowDataAvailable();

0 comments on commit c84e412

Please sign in to comment.