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
afe52f3d
Commit
afe52f3d
authored
6 years ago
by
Tom Jubb
Browse files
Options
Downloads
Patches
Plain Diff
Refs #23642 Clang formatting.
parent
1e82494f
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/TestHelpers/src/MuonWorkspaceCreationHelper.cpp
+22
-20
22 additions, 20 deletions
Framework/TestHelpers/src/MuonWorkspaceCreationHelper.cpp
with
22 additions
and
20 deletions
Framework/TestHelpers/src/MuonWorkspaceCreationHelper.cpp
+
22
−
20
View file @
afe52f3d
...
...
@@ -66,7 +66,8 @@ double eData::operator()(const double, size_t) { return 0.005; }
*/
MatrixWorkspace_sptr
createCountsWorkspace
(
size_t
nspec
,
size_t
maxt
,
double
seed
,
size_t
detectorIDseed
,
bool
hist
,
double
xStart
,
double
xEnd
)
{
bool
hist
,
double
xStart
,
double
xEnd
)
{
MatrixWorkspace_sptr
ws
=
WorkspaceCreationHelper
::
create2DWorkspaceFromFunction
(
...
...
@@ -97,7 +98,8 @@ MatrixWorkspace_sptr createCountsWorkspace(size_t nspec, size_t maxt,
MatrixWorkspace_sptr
createCountsWorkspace
(
size_t
nspec
,
size_t
maxt
,
double
seed
,
size_t
detectorIDseed
)
{
return
createCountsWorkspace
(
nspec
,
maxt
,
seed
,
detectorIDseed
,
true
,
0.0
,
1.0
);
return
createCountsWorkspace
(
nspec
,
maxt
,
seed
,
detectorIDseed
,
true
,
0.0
,
1.0
);
}
/**
...
...
@@ -141,29 +143,29 @@ createMultiPeriodWorkspaceGroup(const int &nPeriods, size_t nspec, size_t maxt,
Mantid
::
API
::
WorkspaceGroup_sptr
createMultiPeriodAsymmetryData
(
const
int
&
nPeriods
,
size_t
nspec
,
size_t
maxt
,
const
std
::
string
&
wsGroupName
)
{
Mantid
::
API
::
WorkspaceGroup_sptr
wsGroup
=
boost
::
make_shared
<
Mantid
::
API
::
WorkspaceGroup
>
();
Mantid
::
API
::
AnalysisDataService
::
Instance
().
addOrReplace
(
wsGroupName
,
wsGroup
);
const
std
::
string
&
wsGroupName
)
{
Mantid
::
API
::
WorkspaceGroup_sptr
wsGroup
=
boost
::
make_shared
<
Mantid
::
API
::
WorkspaceGroup
>
();
Mantid
::
API
::
AnalysisDataService
::
Instance
().
addOrReplace
(
wsGroupName
,
wsGroup
);
std
::
string
wsNameStem
=
"MuonDataPeriod_"
;
std
::
string
wsName
;
std
::
string
wsNameStem
=
"MuonDataPeriod_"
;
std
::
string
wsName
;
boost
::
shared_ptr
<
Mantid
::
Geometry
::
Instrument
>
inst1
=
boost
::
make_shared
<
Mantid
::
Geometry
::
Instrument
>
();
inst1
->
setName
(
"EMU"
);
boost
::
shared_ptr
<
Mantid
::
Geometry
::
Instrument
>
inst1
=
boost
::
make_shared
<
Mantid
::
Geometry
::
Instrument
>
();
inst1
->
setName
(
"EMU"
);
for
(
int
period
=
1
;
period
<
nPeriods
+
1
;
period
++
)
{
Mantid
::
API
::
MatrixWorkspace_sptr
ws
=
createAsymmetryWorkspace
(
nspec
,
maxt
,
yDataAsymmetry
(
10.0
*
period
,
0.1
*
period
));
for
(
int
period
=
1
;
period
<
nPeriods
+
1
;
period
++
)
{
Mantid
::
API
::
MatrixWorkspace_sptr
ws
=
createAsymmetryWorkspace
(
nspec
,
maxt
,
yDataAsymmetry
(
10.0
*
period
,
0.1
*
period
));
wsGroup
->
addWorkspace
(
ws
);
wsName
=
wsNameStem
+
std
::
to_string
(
period
);
Mantid
::
API
::
AnalysisDataService
::
Instance
().
addOrReplace
(
wsName
,
ws
);
}
wsGroup
->
addWorkspace
(
ws
);
wsName
=
wsNameStem
+
std
::
to_string
(
period
);
Mantid
::
API
::
AnalysisDataService
::
Instance
().
addOrReplace
(
wsName
,
ws
);
}
return
wsGroup
;
return
wsGroup
;
}
/**
...
...
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