Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix string format for multiple files input in Elwin tab. #36751

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ void InelasticDataManipulationElwinTab::runFileInput() {

QFileInfo firstFileInfo(inputFilenames[0]);
const auto filename = firstFileInfo.baseName().toStdString();

auto workspaceBaseName = filename.substr(0, filename.find_last_of("_"));

if (inputFilenames.size() > 1) {
Expand All @@ -141,8 +140,8 @@ void InelasticDataManipulationElwinTab::runFileInput() {
// reassemble workspace base name with additional run number
runNumber = runNumber.substr(runNumberStart, strLength);
auto baseName = firstFileInfo.baseName().toStdString();
const auto prefix = baseName.substr(baseName.find_last_of("_"));
const auto suffix = baseName.substr(baseName.length() - baseName.find_last_of("_"));
const auto prefix = baseName.substr(0, baseName.find_first_of("_"));
const auto suffix = baseName.substr(baseName.find_first_of("_"));
workspaceBaseName = prefix + "-" + runNumber + suffix;
}

Expand All @@ -155,7 +154,6 @@ void InelasticDataManipulationElwinTab::runFileInput() {
m_model->setupLoadAlgorithm(m_batchAlgoRunner, inputFilename.toStdString(), workspaceName);
inputWorkspacesString += workspaceName + ",";
}

m_model->setupGroupAlgorithm(m_batchAlgoRunner, inputWorkspacesString, inputGroupWsName);
m_model->setupElasticWindowMultiple(m_batchAlgoRunner, workspaceBaseName, inputGroupWsName, m_view->getLogName(),
m_view->getLogValue());
Expand Down
Loading