Skip to content

Commit

Permalink
Refs #8534. More unused functions removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbekasov committed Dec 3, 2013
1 parent 2dfd9d0 commit 1564b9d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,6 @@ private slots:
/// get period labels
QStringList getPeriodLabels() const;

/// handle period user choice when plotting
void handlePeriodChoice(const QString wsName, const QStringList& periodLabel, const QString& groupName);

// The form generated by Qt Designer
Ui::MuonAnalysis m_uiForm;

Expand Down Expand Up @@ -411,9 +408,6 @@ private slots:
/// time zero returned in ms
double timeZero();

/// Get the new plot name
QString getNewPlotName(const QString & cropWSfirstPart);

/// set grouping in table from information from nexus raw file
void setGroupingFromNexus(const QString& nexusFile);

Expand Down
84 changes: 0 additions & 84 deletions Code/Mantid/MantidQt/CustomInterfaces/src/MuonAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2099,63 +2099,6 @@ void MuonAnalysis::clearTablesAndCombo()
}
}



/**
* Used by plotGroup and plotPair.
*/
void MuonAnalysis::handlePeriodChoice(const QString wsName, const QStringList& periodLabel, const QString& /*groupName*/)
{
if ( periodLabel.size() == 2 )
{
if ( m_uiForm.homePeriodBoxMath->currentText()=="+" )
{
Mantid::API::IAlgorithm_sptr alg = Mantid::API::AlgorithmManager::Instance().create("Plus");
alg->setPropertyValue("LHSWorkspace", wsName.toStdString() + periodLabel.at(0).toStdString());
alg->setPropertyValue("RHSWorkspace", wsName.toStdString() + periodLabel.at(1).toStdString());
alg->setPropertyValue("OutputWorkspace", wsName.toStdString() + periodLabel.at(0).toStdString());
alg->execute();

alg = Mantid::API::AlgorithmManager::Instance().create("Plus");
alg->setPropertyValue("LHSWorkspace", wsName.toStdString() + periodLabel.at(0).toStdString() + "_Raw");
alg->setPropertyValue("RHSWorkspace", wsName.toStdString() + periodLabel.at(1).toStdString() + "_Raw");
alg->setPropertyValue("OutputWorkspace", wsName.toStdString() + periodLabel.at(0).toStdString() + "_Raw");
alg->execute();
}
else
{
Mantid::API::IAlgorithm_sptr alg = Mantid::API::AlgorithmManager::Instance().create("Minus");
alg->setPropertyValue("LHSWorkspace", wsName.toStdString() + periodLabel.at(0).toStdString());
alg->setPropertyValue("RHSWorkspace", wsName.toStdString() + periodLabel.at(1).toStdString());
alg->setPropertyValue("OutputWorkspace", wsName.toStdString() + periodLabel.at(0).toStdString());
alg->execute();

alg = Mantid::API::AlgorithmManager::Instance().create("Minus");
alg->setPropertyValue("LHSWorkspace", wsName.toStdString() + periodLabel.at(0).toStdString() + "_Raw");
alg->setPropertyValue("RHSWorkspace", wsName.toStdString() + periodLabel.at(1).toStdString() + "_Raw");
alg->setPropertyValue("OutputWorkspace", wsName.toStdString() + periodLabel.at(0).toStdString() + "_Raw");
alg->execute();
}

Mantid::API::AnalysisDataService::Instance().remove((wsName + periodLabel.at(1)).toStdString() );
Mantid::API::AnalysisDataService::Instance().remove((wsName + periodLabel.at(1) + "_Raw").toStdString() );

Mantid::API::AnalysisDataService::Instance().rename((wsName + periodLabel.at(0)).toStdString(), wsName.toStdString());
Mantid::API::AnalysisDataService::Instance().rename((wsName + periodLabel.at(0)+"_Raw").toStdString(), (wsName+"_Raw").toStdString());
}
else
{
if ( periodLabel.at(0) != "" )
{
Mantid::API::AnalysisDataService::Instance().rename((wsName + periodLabel.at(0)).toStdString(), wsName.toStdString());
Mantid::API::AnalysisDataService::Instance().rename((wsName + periodLabel.at(0)+"_Raw").toStdString(), (wsName+"_Raw").toStdString());
}
}
}




/**
* Get period labels for the periods selected in the GUI
* @return Return empty string if no periods (well just one period). If more
Expand Down Expand Up @@ -2420,33 +2363,6 @@ void MuonAnalysis::showPlot(const QString& wsName)
}
}

QString MuonAnalysis::getNewPlotName(const QString & cropWSfirstPart)
{
// check if this workspace already exist to avoid replotting an existing workspace
QString cropWS("");
int plotNum = 1;
while (1==1)
{
cropWS = cropWSfirstPart + "; #" + boost::lexical_cast<std::string>(plotNum).c_str();
if ( AnalysisDataService::Instance().doesExist(cropWS.toStdString()) )
{
if((m_uiForm.plotCreation->currentIndex() == 0) || (m_uiForm.plotCreation->currentIndex() == 2) )
{
closePlotWindow(cropWS);
AnalysisDataService::Instance().remove(cropWS.toStdString());
break;
}
else
plotNum++;
}
else
{
break;
}
}
return cropWS;
}

/**
* Is Grouping set.
*
Expand Down

0 comments on commit 1564b9d

Please sign in to comment.