Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
2614ba40
Commit
2614ba40
authored
5 years ago
by
Robert Applin
Browse files
Options
Downloads
Patches
Plain Diff
Refs #25647. Review changes
parent
7422f599
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
qt/scientific_interfaces/Indirect/ISISEnergyTransfer.cpp
+7
-6
7 additions, 6 deletions
qt/scientific_interfaces/Indirect/ISISEnergyTransfer.cpp
with
7 additions
and
6 deletions
qt/scientific_interfaces/Indirect/ISISEnergyTransfer.cpp
+
7
−
6
View file @
2614ba40
...
...
@@ -114,25 +114,25 @@ void deleteWorkspace(std::string const &name) {
deleter
->
execute
();
}
double
getSampleLog
(
std
::
string
const
&
workspace
Name
,
double
getSampleLog
(
MatrixWorkspace_const_sptr
workspace
,
std
::
string
const
&
logName
,
double
const
&
defaultValue
)
{
try
{
return
getADSMatrixWorkspace
(
workspace
Name
)
->
getLogAsSingleValue
(
logName
);
return
workspace
->
getLogAsSingleValue
(
logName
);
}
catch
(
std
::
exception
const
&
)
{
return
defaultValue
;
}
}
double
getSampleLog
(
std
::
string
const
&
workspace
Name
,
double
getSampleLog
(
MatrixWorkspace_const_sptr
workspace
,
std
::
vector
<
std
::
string
>
const
&
logNames
,
double
const
&
defaultValue
)
{
double
value
(
defaultValue
);
for
(
auto
const
&
logName
:
logNames
)
{
value
=
getSampleLog
(
workspace
Name
,
logName
,
defaultValue
);
value
=
getSampleLog
(
workspace
,
logName
,
defaultValue
);
if
(
value
!=
defaultValue
)
break
;
}
deleteWorkspace
(
workspaceName
);
deleteWorkspace
(
workspace
->
get
Name
()
);
return
value
;
}
...
...
@@ -143,7 +143,8 @@ double loadSampleLog(std::string const &filename,
auto
loader
=
loadAlgorithm
(
filename
,
temporaryWorkspace
);
loader
->
execute
();
return
getSampleLog
(
temporaryWorkspace
,
logNames
,
defaultValue
);
return
getSampleLog
(
getADSMatrixWorkspace
(
temporaryWorkspace
),
logNames
,
defaultValue
);
}
}
// namespace
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment