Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
58133549
Commit
58133549
authored
Mar 09, 2021
by
Whitfield, Ross
Browse files
clang
parent
341e8011
Changes
3
Hide whitespace changes
Inline
Side-by-side
Framework/DataObjects/inc/MantidDataObjects/LeanElasticPeakColumn.h
View file @
58133549
...
...
@@ -28,7 +28,8 @@ class DLLExport LeanElasticPeakColumn : public Mantid::API::Column {
public:
/// Construct a column with a reference to the peaks list, a name & type
LeanElasticPeakColumn
(
std
::
vector
<
LeanElasticPeak
>
&
peaks
,
const
std
::
string
&
name
);
LeanElasticPeakColumn
(
std
::
vector
<
LeanElasticPeak
>
&
peaks
,
const
std
::
string
&
name
);
/// Number of individual elements in the column.
size_t
size
()
const
override
{
return
m_peaks
.
size
();
}
...
...
Framework/DataObjects/src/LeanElasticPeakColumn.cpp
View file @
58133549
...
...
@@ -71,7 +71,8 @@ const std::string typeFromName(const std::string &name) {
if
(
iter
!=
typeIndex
.
data
().
end
())
{
return
iter
->
second
;
}
else
{
throw
std
::
runtime_error
(
"LeanElasticPeakColumn - Unknown column name:
\"
"
+
name
+
throw
std
::
runtime_error
(
"LeanElasticPeakColumn - Unknown column name:
\"
"
+
name
+
"
\"
"
"Peak column names/types must be explicitly "
"marked in LeanElasticPeakColumn.cpp"
);
...
...
@@ -84,8 +85,8 @@ const std::string typeFromName(const std::string &name) {
* @param peaks :: vector of peaks
* @param name :: name for the column
*/
LeanElasticPeakColumn
::
LeanElasticPeakColumn
(
std
::
vector
<
LeanElasticPeak
>
&
peaks
,
const
std
::
string
&
name
)
LeanElasticPeakColumn
::
LeanElasticPeakColumn
(
std
::
vector
<
LeanElasticPeak
>
&
peaks
,
const
std
::
string
&
name
)
:
m_peaks
(
peaks
),
m_oldRows
()
{
this
->
m_name
=
name
;
this
->
m_type
=
typeFromName
(
name
);
// Throws if the name is unknown
...
...
@@ -94,7 +95,8 @@ LeanElasticPeakColumn::LeanElasticPeakColumn(std::vector<LeanElasticPeak> &peaks
this
->
m_hklPrec
=
hklPrec
.
get_value_or
(
2
);
if
(
!
hklPrec
.
is_initialized
())
{
g_log
.
information
()
<<
"In LeanElasticPeakColumn constructor, did not find any value for '"
<<
key
<<
"In LeanElasticPeakColumn constructor, did not find any value for '"
<<
key
<<
"' from the Config Service. Using default: "
<<
this
->
m_hklPrec
<<
"
\n
"
;
}
...
...
@@ -117,7 +119,8 @@ const std::type_info &LeanElasticPeakColumn::get_type_info() const {
return
typeid
(
V3D
);
}
else
{
throw
std
::
runtime_error
(
"LeanElasticPeakColumn::get_type_info() - Unknown column type: "
+
m_name
);
"LeanElasticPeakColumn::get_type_info() - Unknown column type: "
+
m_name
);
}
}
...
...
@@ -132,8 +135,8 @@ const std::type_info &LeanElasticPeakColumn::get_pointer_type_info() const {
}
else
if
(
type
()
==
"V3D"
)
{
return
typeid
(
V3D
*
);
}
else
{
throw
std
::
runtime_error
(
"LeanElasticPeakColumn::get_pointer_type_info() -: "
+
m_name
);
throw
std
::
runtime_error
(
"LeanElasticPeakColumn::get_pointer_type_info() -: "
+
m_name
);
}
}
...
...
@@ -239,9 +242,10 @@ long int LeanElasticPeakColumn::sizeOfData() const {
*/
void
LeanElasticPeakColumn
::
resize
(
size_t
count
)
{
UNUSED_ARG
(
count
);
throw
Exception
::
NotImplementedError
(
"LeanElasticPeakColumn::resize - Peaks must be "
"added through the PeaksWorkspace "
"interface."
);
throw
Exception
::
NotImplementedError
(
"LeanElasticPeakColumn::resize - Peaks must be "
"added through the PeaksWorkspace "
"interface."
);
}
/**
...
...
@@ -252,9 +256,10 @@ void LeanElasticPeakColumn::resize(size_t count) {
*/
void
LeanElasticPeakColumn
::
insert
(
size_t
index
)
{
UNUSED_ARG
(
index
);
throw
Exception
::
NotImplementedError
(
"LeanElasticPeakColumn::insert - Peaks must be "
"inserted through the PeaksWorkspace "
"interface."
);
throw
Exception
::
NotImplementedError
(
"LeanElasticPeakColumn::insert - Peaks must be "
"inserted through the PeaksWorkspace "
"interface."
);
}
/**
...
...
@@ -265,9 +270,10 @@ void LeanElasticPeakColumn::insert(size_t index) {
*/
void
LeanElasticPeakColumn
::
remove
(
size_t
index
)
{
UNUSED_ARG
(
index
);
throw
Exception
::
NotImplementedError
(
"LeanElasticPeakColumn::remove - Peaks must be "
"remove through the PeaksWorkspace "
"interface."
);
throw
Exception
::
NotImplementedError
(
"LeanElasticPeakColumn::remove - Peaks must be "
"remove through the PeaksWorkspace "
"interface."
);
}
/**
...
...
@@ -333,9 +339,9 @@ LeanElasticPeakColumn *LeanElasticPeakColumn::clone() const {
}
double
LeanElasticPeakColumn
::
toDouble
(
size_t
/*index*/
)
const
{
throw
std
::
runtime_error
(
"LeanElasticPeakColumn::toDouble() not implemented,
LeanElasticPeakColumn "
"is has no general write access"
);
throw
std
::
runtime_error
(
"LeanElasticPeakColumn::toDouble() not implemented, "
"
LeanElasticPeakColumn "
"is has no general write access"
);
}
void
LeanElasticPeakColumn
::
fromDouble
(
size_t
/*index*/
,
double
/*value*/
)
{
...
...
@@ -345,7 +351,7 @@ void LeanElasticPeakColumn::fromDouble(size_t /*index*/, double /*value*/) {
}
void
LeanElasticPeakColumn
::
setPeakHKLOrRunNumber
(
const
size_t
index
,
const
double
val
)
{
const
double
val
)
{
LeanElasticPeak
&
peak
=
m_peaks
[
index
];
if
(
m_name
==
"h"
)
peak
.
setH
(
val
);
...
...
Framework/Kernel/src/Property.cpp
View file @
58133549
...
...
@@ -382,8 +382,9 @@ std::string getUnmangledTypeName(const std::type_info &type) {
string
(
"EventWorkspace"
));
typestrings
.
emplace
(
typeid
(
std
::
shared_ptr
<
PeaksWorkspace
>
).
name
(),
string
(
"PeaksWorkspace"
));
typestrings
.
emplace
(
typeid
(
std
::
shared_ptr
<
LeanElasticPeaksWorkspace
>
).
name
(),
string
(
"LeanElasticPeaksWorkspace"
));
typestrings
.
emplace
(
typeid
(
std
::
shared_ptr
<
LeanElasticPeaksWorkspace
>
).
name
(),
string
(
"LeanElasticPeaksWorkspace"
));
typestrings
.
emplace
(
typeid
(
std
::
shared_ptr
<
IPeaksWorkspace
>
).
name
(),
string
(
"IPeaksWorkspace"
));
typestrings
.
emplace
(
typeid
(
std
::
shared_ptr
<
GroupingWorkspace
>
).
name
(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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