Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
7fe9fe02
Commit
7fe9fe02
authored
May 06, 2011
by
Janik Zikovsky
Browse files
Refs #2934: PeaksWorkspace: expose to IPropertyManager.
parent
421c4a29
Changes
3
Hide whitespace changes
Inline
Side-by-side
Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/PeaksWorkspace.h
View file @
7fe9fe02
...
...
@@ -223,8 +223,11 @@ namespace DataObjects
};
/// Typedef for a shared pointer to a peaks workspace.
typedef
boost
::
shared_ptr
<
PeaksWorkspace
>
PeaksWorkspace_sptr
;
/// Typedef for a shared pointer to a peaks workspace.
typedef
boost
::
shared_ptr
<
PeaksWorkspace
>
PeaksWorkspace_sptr
;
/// Typedef for a shared pointer to a const peaks workspace.
typedef
boost
::
shared_ptr
<
const
PeaksWorkspace
>
PeaksWorkspace_const_sptr
;
}
}
...
...
Code/Mantid/Framework/DataObjects/src/PeaksWorkspace.cpp
View file @
7fe9fe02
...
...
@@ -479,3 +479,47 @@ namespace DataObjects
}
}
///\cond TEMPLATE
namespace
Mantid
{
namespace
Kernel
{
template
<
>
DLLExport
Mantid
::
DataObjects
::
PeaksWorkspace_sptr
IPropertyManager
::
getValue
<
Mantid
::
DataObjects
::
PeaksWorkspace_sptr
>
(
const
std
::
string
&
name
)
const
{
PropertyWithValue
<
Mantid
::
DataObjects
::
PeaksWorkspace_sptr
>*
prop
=
dynamic_cast
<
PropertyWithValue
<
Mantid
::
DataObjects
::
PeaksWorkspace_sptr
>*>
(
getPointerToProperty
(
name
));
if
(
prop
)
{
return
*
prop
;
}
else
{
std
::
string
message
=
"Attempt to assign property "
+
name
+
" to incorrect type. Expected PeaksWorkspace."
;
throw
std
::
runtime_error
(
message
);
}
}
template
<
>
DLLExport
Mantid
::
DataObjects
::
PeaksWorkspace_const_sptr
IPropertyManager
::
getValue
<
Mantid
::
DataObjects
::
PeaksWorkspace_const_sptr
>
(
const
std
::
string
&
name
)
const
{
PropertyWithValue
<
Mantid
::
DataObjects
::
PeaksWorkspace_sptr
>*
prop
=
dynamic_cast
<
PropertyWithValue
<
Mantid
::
DataObjects
::
PeaksWorkspace_sptr
>*>
(
getPointerToProperty
(
name
));
if
(
prop
)
{
return
prop
->
operator
()();
}
else
{
std
::
string
message
=
"Attempt to assign property "
+
name
+
" to incorrect type. Expected const PeaksWorkspace."
;
throw
std
::
runtime_error
(
message
);
}
}
}
// namespace Kernel
}
// namespace Mantid
///\endcond TEMPLATE
Code/Mantid/Framework/MDEvents/src/MDEWPeakIntegration.cpp
View file @
7fe9fe02
...
...
@@ -96,7 +96,7 @@ namespace MDEvents
void
MDEWPeakIntegration
::
exec
()
{
inWS
=
getProperty
(
"InputWorkspace"
);
//
peakWS = getProperty("PeaksWorkspace");
peakWS
=
getProperty
(
"PeaksWorkspace"
);
CALL_MDEVENT_FUNCTION
(
this
->
integrate
,
inWS
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment