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
67bfe7d7
Commit
67bfe7d7
authored
Feb 22, 2016
by
Tom Perkins
Browse files
Change declareProperty calls in MDAlgorithms to use unique_ptrs
re #15289
parent
4b5012d2
Changes
67
Hide whitespace changes
Inline
Side-by-side
Framework/MDAlgorithms/src/AccumulateMD.cpp
View file @
67bfe7d7
...
...
@@ -221,22 +221,22 @@ const std::string AccumulateMD::summary() const {
* Initialize the algorithm's properties.
*/
void
AccumulateMD
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDEventWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"An input MDEventWorkspace to append data to."
);
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDEventWorkspace
>
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"MDEventWorkspace with new data appended."
);
declareProperty
(
new
ArrayProperty
<
std
::
string
>
(
Kernel
::
make_unique
<
ArrayProperty
<
std
::
string
>
>
(
"DataSources"
,
boost
::
make_shared
<
MandatoryValidator
<
std
::
vector
<
std
::
string
>>>
(),
Direction
::
Input
),
"Input workspaces to process, or filenames to load and process"
);
declareProperty
(
new
ArrayProperty
<
double
>
(
"EFix"
,
Direction
::
Input
),
declareProperty
(
make_unique
<
ArrayProperty
<
double
>
>
(
"EFix"
,
Direction
::
Input
),
"datasource energy values in meV"
);
std
::
vector
<
std
::
string
>
e_mode_options
{
"Elastic"
,
"Direct"
,
"Indirect"
};
...
...
@@ -246,48 +246,49 @@ void AccumulateMD::init() {
"Analysis mode ['Elastic', 'Direct', 'Indirect']."
);
declareProperty
(
new
ArrayProperty
<
double
>
(
Kernel
::
make_unique
<
ArrayProperty
<
double
>
>
(
"Alatt"
,
boost
::
make_shared
<
MandatoryValidator
<
std
::
vector
<
double
>>>
(),
Direction
::
Input
),
"Lattice parameters"
);
declareProperty
(
new
ArrayProperty
<
double
>
(
Kernel
::
make_unique
<
ArrayProperty
<
double
>
>
(
"Angdeg"
,
boost
::
make_shared
<
MandatoryValidator
<
std
::
vector
<
double
>>>
(),
Direction
::
Input
),
"Lattice angles"
);
declareProperty
(
new
ArrayProperty
<
double
>
(
Kernel
::
make_unique
<
ArrayProperty
<
double
>
>
(
"u"
,
boost
::
make_shared
<
MandatoryValidator
<
std
::
vector
<
double
>>>
(),
Direction
::
Input
),
"Lattice vector parallel to neutron beam"
);
declareProperty
(
new
ArrayProperty
<
double
>
(
Kernel
::
make_unique
<
ArrayProperty
<
double
>
>
(
"v"
,
boost
::
make_shared
<
MandatoryValidator
<
std
::
vector
<
double
>>>
(),
Direction
::
Input
),
"Lattice vector perpendicular to neutron beam in the horizontal plane"
);
declareProperty
(
new
ArrayProperty
<
double
>
(
"Psi"
,
Direction
::
Input
),
declareProperty
(
make_unique
<
ArrayProperty
<
double
>
>
(
"Psi"
,
Direction
::
Input
),
"Psi rotation in degrees. Optional or one entry per run."
);
declareProperty
(
new
ArrayProperty
<
double
>
(
"Gl"
,
Direction
::
Input
),
declareProperty
(
make_unique
<
ArrayProperty
<
double
>
>
(
"Gl"
,
Direction
::
Input
),
"gl rotation in degrees. Optional or one entry per run."
);
declareProperty
(
new
ArrayProperty
<
double
>
(
"Gs"
,
Direction
::
Input
),
declareProperty
(
make_unique
<
ArrayProperty
<
double
>
>
(
"Gs"
,
Direction
::
Input
),
"gs rotation in degrees. Optional or one entry per run."
);
declareProperty
(
new
PropertyWithValue
<
bool
>
(
"InPlace"
,
true
,
Direction
::
Input
),
make_unique
<
PropertyWithValue
<
bool
>
>
(
"InPlace"
,
true
,
Direction
::
Input
),
"Execute conversions to MD and Merge in one-step. Less "
"memory overhead."
);
declareProperty
(
new
PropertyWithValue
<
bool
>
(
"Clean"
,
false
,
Direction
::
Input
),
"Create workspace from fresh rather than appending to "
"existing workspace data."
);
declareProperty
(
make_unique
<
PropertyWithValue
<
bool
>>
(
"Clean"
,
false
,
Direction
::
Input
),
"Create workspace from fresh rather than appending to "
"existing workspace data."
);
}
/*
...
...
Framework/MDAlgorithms/src/BinMD.cpp
View file @
67bfe7d7
...
...
@@ -50,8 +50,8 @@ BinMD::~BinMD() {}
/** Initialize the algorithm's properties.
*/
void
BinMD
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"An input MDWorkspace."
);
// Properties for specifying the slice to perform.
...
...
@@ -60,14 +60,15 @@ void BinMD::init() {
// --------------- Processing methods and options
// ---------------------------------------
std
::
string
grp
=
"Methods"
;
declareProperty
(
new
PropertyWithValue
<
std
::
string
>
(
"ImplicitFunctionXML"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
PropertyWithValue
<
std
::
string
>
>
(
"ImplicitFunctionXML"
,
""
,
Direction
::
Input
),
"XML string describing the implicit function determining "
"which bins to use."
);
setPropertyGroup
(
"ImplicitFunctionXML"
,
grp
);
declareProperty
(
new
PropertyWithValue
<
bool
>
(
"IterateEvents"
,
true
,
Direction
::
Input
),
make_unique
<
PropertyWithValue
<
bool
>>
(
"IterateEvents"
,
true
,
Direction
::
Input
),
"Alternative binning method where you iterate through every event, "
"placing them in the proper bin.
\n
"
"This may be faster for workspaces with few events and lots of output "
...
...
@@ -75,14 +76,14 @@ void BinMD::init() {
setPropertyGroup
(
"IterateEvents"
,
grp
);
declareProperty
(
new
PropertyWithValue
<
bool
>
(
"Parallel"
,
false
,
Direction
::
Input
),
make_unique
<
PropertyWithValue
<
bool
>
>
(
"Parallel"
,
false
,
Direction
::
Input
),
"Temporary parameter: true to run in parallel. This is ignored for "
"file-backed workspaces, where running in parallel makes things slower "
"due to disk thrashing."
);
setPropertyGroup
(
"Parallel"
,
grp
);
declareProperty
(
new
WorkspaceProperty
<
Workspace
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
Workspace
>
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"A name for the output MDHistoWorkspace."
);
}
...
...
Framework/MDAlgorithms/src/BinaryOperationMD.cpp
View file @
67bfe7d7
...
...
@@ -46,18 +46,18 @@ const std::string BinaryOperationMD::category() const {
/** Initialize the algorithm's properties.
*/
void
BinaryOperationMD
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDWorkspace
>
(
inputPropName1
(),
""
,
Direction
::
Input
),
declareProperty
(
Kernel
::
make_unique
<
WorkspaceProperty
<
IMDWorkspace
>
>
(
inputPropName1
(),
""
,
Direction
::
Input
),
"An MDEventWorkspace, MDHistoWorkspace or "
"WorkspaceSingleValue as the left-hand side of the "
"operation."
);
declareProperty
(
new
WorkspaceProperty
<
IMDWorkspace
>
(
inputPropName2
(),
""
,
Direction
::
Input
),
declareProperty
(
Kernel
::
make_unique
<
WorkspaceProperty
<
IMDWorkspace
>
>
(
inputPropName2
(),
""
,
Direction
::
Input
),
"An MDEventWorkspace, MDHistoWorkspace or "
"WorkspaceSingleValue as the right-hand side of the "
"operation."
);
declareProperty
(
new
WorkspaceProperty
<
IMDWorkspace
>
(
outputPropName
(),
""
,
Direction
::
Output
),
declareProperty
(
Kernel
::
make_unique
<
WorkspaceProperty
<
IMDWorkspace
>
>
(
outputPropName
(),
""
,
Direction
::
Output
),
"Name of the output MDEventWorkspace or MDHistoWorkspace."
);
this
->
initExtraProperties
();
}
...
...
Framework/MDAlgorithms/src/BoxControllerSettingsAlgorithm.cpp
View file @
67bfe7d7
...
...
@@ -44,19 +44,19 @@ void BoxControllerSettingsAlgorithm::initBoxControllerProps(
valueVec
.
push_back
(
boost
::
lexical_cast
<
int
>
(
value
));
declareProperty
(
new
ArrayProperty
<
int
>
(
"SplitInto"
,
valueVec
),
Kernel
::
make_unique
<
ArrayProperty
<
int
>
>
(
"SplitInto"
,
valueVec
),
"A comma separated list of into how many sub-grid elements each "
"dimension should split; "
"or just one to split into the same number for all dimensions. Default "
+
SplitInto
+
"."
);
declareProperty
(
new
PropertyWithValue
<
int
>
(
"SplitThreshold"
,
SplitThreshold
,
mustBePositive
),
make_unique
<
PropertyWithValue
<
int
>
>
(
"SplitThreshold"
,
SplitThreshold
,
mustBePositive
),
"How many events in a box before it should be split. Default "
+
Strings
::
toString
(
SplitThreshold
)
+
"."
);
declareProperty
(
new
PropertyWithValue
<
int
>
(
declareProperty
(
make_unique
<
PropertyWithValue
<
int
>
>
(
"MaxRecursionDepth"
,
MaxRecursionDepth
,
mustBeMoreThen1
),
"How many levels of box splitting recursion are allowed. "
"The smallest box will have each side length :math:`l = "
...
...
Framework/MDAlgorithms/src/CalculateCoverageDGS.cpp
View file @
67bfe7d7
...
...
@@ -101,7 +101,7 @@ void CalculateCoverageDGS::cacheDimensionXValues() {
/** Initialize the algorithm's properties.
*/
void
CalculateCoverageDGS
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<>
(
declareProperty
(
make_unique
<
WorkspaceProperty
<>
>
(
"InputWorkspace"
,
""
,
Mantid
::
Kernel
::
Direction
::
Input
,
boost
::
make_shared
<
InstrumentValidator
>
()),
"An input workspace."
);
...
...
@@ -116,19 +116,22 @@ void CalculateCoverageDGS::init() {
Q1
[
0
]
=
1.
;
Q2
[
1
]
=
1.
;
Q3
[
2
]
=
1.
;
declareProperty
(
new
ArrayProperty
<
double
>
(
"Q1Basis"
,
Q1
,
mustBe3D
),
"Q1 projection direction in the x,y,z format. Q1, Q2, Q3 "
"must not be coplanar"
);
declareProperty
(
new
ArrayProperty
<
double
>
(
"Q2Basis"
,
Q2
,
mustBe3D
),
"Q2 projection direction in the x,y,z format. Q1, Q2, Q3 "
"must not be coplanar"
);
declareProperty
(
new
ArrayProperty
<
double
>
(
"Q3Basis"
,
Q3
,
mustBe3D
),
"Q3 projection direction in the x,y,z format. Q1, Q2, Q3 "
"must not be coplanar"
);
declareProperty
(
new
PropertyWithValue
<
double
>
(
"IncidentEnergy"
,
EMPTY_DBL
(),
mustBePositive
,
Mantid
::
Kernel
::
Direction
::
Input
),
Kernel
::
make_unique
<
ArrayProperty
<
double
>>
(
"Q1Basis"
,
Q1
,
mustBe3D
),
"Q1 projection direction in the x,y,z format. Q1, Q2, Q3 "
"must not be coplanar"
);
declareProperty
(
Kernel
::
make_unique
<
ArrayProperty
<
double
>>
(
"Q2Basis"
,
Q2
,
mustBe3D
),
"Q2 projection direction in the x,y,z format. Q1, Q2, Q3 "
"must not be coplanar"
);
declareProperty
(
Kernel
::
make_unique
<
ArrayProperty
<
double
>>
(
"Q3Basis"
,
Q3
,
mustBe3D
),
"Q3 projection direction in the x,y,z format. Q1, Q2, Q3 "
"must not be coplanar"
);
declareProperty
(
make_unique
<
PropertyWithValue
<
double
>>
(
"IncidentEnergy"
,
EMPTY_DBL
(),
mustBePositive
,
Mantid
::
Kernel
::
Direction
::
Input
),
"Incident energy. If set, will override Ei in the input workspace"
);
std
::
vector
<
std
::
string
>
options
{
"Q1"
,
"Q2"
,
"Q3"
,
"DeltaE"
};
...
...
@@ -149,7 +152,7 @@ void CalculateCoverageDGS::init() {
dim
+
" step size. If empty the dimension will be "
"integrated between minimum and maximum values"
);
}
declareProperty
(
new
WorkspaceProperty
<
Workspace
>
(
declareProperty
(
make_unique
<
WorkspaceProperty
<
Workspace
>
>
(
"OutputWorkspace"
,
""
,
Mantid
::
Kernel
::
Direction
::
Output
),
"A name for the output data MDHistoWorkspace."
);
}
...
...
Framework/MDAlgorithms/src/CentroidPeaksMD.cpp
View file @
67bfe7d7
...
...
@@ -37,8 +37,8 @@ CentroidPeaksMD::~CentroidPeaksMD() {}
/** Initialize the algorithm's properties.
*/
void
CentroidPeaksMD
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDEventWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"An input MDEventWorkspace."
);
std
::
vector
<
std
::
string
>
propOptions
{
"Q (lab frame)"
,
"Q (sample frame)"
,
...
...
@@ -48,17 +48,18 @@ void CentroidPeaksMD::init() {
"Ignored: algorithm uses the InputWorkspace's coordinates."
);
declareProperty
(
new
PropertyWithValue
<
double
>
(
"PeakRadius"
,
1.0
,
Direction
::
Input
),
make_unique
<
PropertyWithValue
<
double
>>
(
"PeakRadius"
,
1.0
,
Direction
::
Input
),
"Fixed radius around each peak position in which to calculate the "
"centroid."
);
declareProperty
(
new
WorkspaceProperty
<
PeaksWorkspace
>
(
"PeaksWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
PeaksWorkspace
>
>
(
"PeaksWorkspace"
,
""
,
Direction
::
Input
),
"A PeaksWorkspace containing the peaks to centroid."
);
declareProperty
(
new
WorkspaceProperty
<
PeaksWorkspace
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
make_unique
<
WorkspaceProperty
<
PeaksWorkspace
>
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"The output PeaksWorkspace will be a copy of the input PeaksWorkspace "
"with the peaks' positions modified by the new found centroids."
);
}
...
...
Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp
View file @
67bfe7d7
...
...
@@ -37,22 +37,23 @@ CentroidPeaksMD2::~CentroidPeaksMD2() {}
/** Initialize the algorithm's properties.
*/
void
CentroidPeaksMD2
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDEventWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"An input MDEventWorkspace."
);
declareProperty
(
new
PropertyWithValue
<
double
>
(
"PeakRadius"
,
1.0
,
Direction
::
Input
),
make_unique
<
PropertyWithValue
<
double
>>
(
"PeakRadius"
,
1.0
,
Direction
::
Input
),
"Fixed radius around each peak position in which to calculate the "
"centroid."
);
declareProperty
(
new
WorkspaceProperty
<
PeaksWorkspace
>
(
"PeaksWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
PeaksWorkspace
>
>
(
"PeaksWorkspace"
,
""
,
Direction
::
Input
),
"A PeaksWorkspace containing the peaks to centroid."
);
declareProperty
(
new
WorkspaceProperty
<
PeaksWorkspace
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
make_unique
<
WorkspaceProperty
<
PeaksWorkspace
>
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"The output PeaksWorkspace will be a copy of the input PeaksWorkspace "
"with the peaks' positions modified by the new found centroids."
);
}
...
...
Framework/MDAlgorithms/src/ChangeQConvention.cpp
View file @
67bfe7d7
...
...
@@ -43,8 +43,8 @@ ChangeQConvention::~ChangeQConvention() {}
/** Initialize the algorithm's properties.
*/
void
ChangeQConvention
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
InOut
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
InOut
),
"An input MDEventWorkspace or MDHistoWorkspace."
);
}
...
...
Framework/MDAlgorithms/src/CloneMDWorkspace.cpp
View file @
67bfe7d7
...
...
@@ -33,16 +33,17 @@ CloneMDWorkspace::~CloneMDWorkspace() {}
/** Initialize the algorithm's properties.
*/
void
CloneMDWorkspace
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"An input MDEventWorkspace/MDHistoWorkspace."
);
declareProperty
(
new
WorkspaceProperty
<
IMDWorkspace
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDWorkspace
>
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"Name of the output MDEventWorkspace/MDHistoWorkspace."
);
std
::
vector
<
std
::
string
>
exts
(
1
,
".nxs"
);
declareProperty
(
new
FileProperty
(
"Filename"
,
""
,
FileProperty
::
OptionalSave
,
exts
),
Kernel
::
make_unique
<
FileProperty
>
(
"Filename"
,
""
,
FileProperty
::
OptionalSave
,
exts
),
"If the input workspace is file-backed, specify a file to which to save "
"the cloned workspace.
\n
"
"If the workspace is file-backed but this parameter is NOT specified, "
...
...
Framework/MDAlgorithms/src/CompactMD.cpp
View file @
67bfe7d7
...
...
@@ -101,11 +101,11 @@ void CompactMD::findFirstNonZeroMinMaxExtents(
*/
void
CompactMD
::
init
()
{
// input workspace to compact
declareProperty
(
new
WorkspaceProperty
<
IMDHistoWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDHistoWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"MDHistoWorkspace to compact"
);
// output workspace that will have been compacted
declareProperty
(
new
WorkspaceProperty
<
IMDHistoWorkspace
>
(
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDHistoWorkspace
>
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"Output compacted workspace"
);
}
...
...
Framework/MDAlgorithms/src/CompareMDWorkspaces.cpp
View file @
67bfe7d7
...
...
@@ -62,12 +62,12 @@ const std::string CompareMDWorkspaces::category() const {
/** Initialize the algorithm's properties.
*/
void
CompareMDWorkspaces
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDWorkspace
>
(
"Workspace1"
,
""
,
Direction
::
Input
),
"First MDWorkspace to compare."
);
declareProperty
(
new
WorkspaceProperty
<
IMDWorkspace
>
(
"Workspace2"
,
""
,
Direction
::
Input
),
"Second MDWorkspace to compare."
);
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDWorkspace
>>
(
"Workspace1"
,
""
,
Direction
::
Input
),
"First MDWorkspace to compare."
);
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDWorkspace
>>
(
"Workspace2"
,
""
,
Direction
::
Input
),
"Second MDWorkspace to compare."
);
declareProperty
(
"Tolerance"
,
0.0
,
...
...
@@ -77,10 +77,11 @@ void CompareMDWorkspaces::init() {
"structure."
);
declareProperty
(
new
PropertyWithValue
<
bool
>
(
"Equals"
,
false
,
Direction
::
Output
),
make_unique
<
PropertyWithValue
<
bool
>
>
(
"Equals"
,
false
,
Direction
::
Output
),
"Boolean set to true if the workspaces match."
);
declareProperty
(
new
PropertyWithValue
<
std
::
string
>
(
"Result"
,
""
,
Direction
::
Output
),
make_unique
<
PropertyWithValue
<
std
::
string
>>
(
"Result"
,
""
,
Direction
::
Output
),
"String describing the difference found between the workspaces"
);
declareProperty
(
"IgnoreBoxID"
,
false
,
"To ignore box ID-s when comparing MD "
"boxes as Multithreaded splitting "
...
...
Framework/MDAlgorithms/src/ConvertCWPDMDToSpectra.cpp
View file @
67bfe7d7
...
...
@@ -35,26 +35,26 @@ ConvertCWPDMDToSpectra::~ConvertCWPDMDToSpectra() {}
//----------------------------------------------------------------------------------------------
void
ConvertCWPDMDToSpectra
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDEventWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"Name of the input MDEventWorkspace that stores detectors "
"counts from a constant-wave powder diffraction experiment."
);
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDEventWorkspace
>
>
(
"InputMonitorWorkspace"
,
""
,
Direction
::
Input
),
"Name of the input MDEventWorkspace that stores monitor "
"counts from a constant-wave powder diffraciton experiment."
);
declareProperty
(
new
ArrayProperty
<
double
>
(
"BinningParams"
),
make_unique
<
ArrayProperty
<
double
>
>
(
"BinningParams"
),
"A comma separated list of first bin boundary, width, last bin boundary. "
"Optionally
\n
"
"this can be followed by a comma and more widths and last boundary "
"pairs.
\n
"
"Negative width values indicate logarithmic binning."
);
declareProperty
(
new
WorkspaceProperty
<
MatrixWorkspace
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
MatrixWorkspace
>
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"Name of the output workspace for reduced data."
);
std
::
vector
<
std
::
string
>
vecunits
{
"2theta"
,
"dSpacing"
,
...
...
@@ -76,7 +76,7 @@ void ConvertCWPDMDToSpectra::init() {
declareProperty
(
"ScaleFactor"
,
1.0
,
"Scaling factor on the normalized counts."
);
declareProperty
(
new
ArrayProperty
<
int
>
(
"ExcludedDetectorIDs"
),
declareProperty
(
make_unique
<
ArrayProperty
<
int
>
>
(
"ExcludedDetectorIDs"
),
"A comma separated list of integers to indicate the IDs of "
"the detectors that will be excluded from binning."
);
...
...
Framework/MDAlgorithms/src/ConvertCWSDExpToMomentum.cpp
View file @
67bfe7d7
...
...
@@ -38,29 +38,29 @@ ConvertCWSDExpToMomentum::~ConvertCWSDExpToMomentum() {}
*/
void
ConvertCWSDExpToMomentum
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
ITableWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
make_unique
<
WorkspaceProperty
<
ITableWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"Name of table workspace for data file names in the experiment."
);
declareProperty
(
"CreateVirtualInstrument"
,
false
,
"Flag to create virtual instrument."
);
declareProperty
(
new
WorkspaceProperty
<
ITableWorkspace
>
(
declareProperty
(
make_unique
<
WorkspaceProperty
<
ITableWorkspace
>
>
(
"DetectorTableWorkspace"
,
""
,
Direction
::
Input
,
PropertyMode
::
Optional
),
"Name of table workspace containing all the detectors."
);
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDEventWorkspace
>
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"Name of MDEventWorkspace containing all experimental data."
);
declareProperty
(
new
ArrayProperty
<
double
>
(
"SourcePosition"
),
declareProperty
(
make_unique
<
ArrayProperty
<
double
>
>
(
"SourcePosition"
),
"A vector of 3 doubles for position of source."
);
declareProperty
(
new
ArrayProperty
<
double
>
(
"SamplePosition"
),
declareProperty
(
make_unique
<
ArrayProperty
<
double
>
>
(
"SamplePosition"
),
"A vector of 3 doubles for position of sample."
);
declareProperty
(
new
ArrayProperty
<
double
>
(
"PixelDimension"
),
declareProperty
(
make_unique
<
ArrayProperty
<
double
>
>
(
"PixelDimension"
),
"A vector of 8 doubles to determine a cubic pixel's size."
);
declareProperty
(
"IsBaseName"
,
true
,
"It is specified as true if the data "
...
...
@@ -68,7 +68,8 @@ void ConvertCWSDExpToMomentum::init() {
"base name without directory."
);
declareProperty
(
new
FileProperty
(
"Directory"
,
""
,
FileProperty
::
OptionalDirectory
),
make_unique
<
FileProperty
>
(
"Directory"
,
""
,
FileProperty
::
OptionalDirectory
),
"Directory where data files are if InputWorkspace gives data file name "
"as the base file name as indicated by 'IsBaseName'."
);
}
...
...
Framework/MDAlgorithms/src/ConvertCWSDMDtoHKL.cpp
View file @
67bfe7d7
...
...
@@ -47,32 +47,32 @@ ConvertCWSDMDtoHKL::~ConvertCWSDMDtoHKL() {}
/** Init
*/
void
ConvertCWSDMDtoHKL
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDEventWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"Name of the input MDEventWorkspace that stores detectors "
"counts from a constant-wave powder diffraction experiment."
);
declareProperty
(
new
WorkspaceProperty
<
PeaksWorkspace
>
(
"PeaksWorkspace"
,
""
,
Direction
::
Input
,
PropertyMode
::
Optional
),
"Input Peaks Workspace"
);
declareProperty
(
make_unique
<
WorkspaceProperty
<
PeaksWorkspace
>>
(
"PeaksWorkspace"
,
""
,
Direction
::
Input
,
PropertyMode
::
Optional
),
"Input Peaks Workspace"
);
declareProperty
(
new
ArrayProperty
<
double
>
(
"UBMatrix"
),
make_unique
<
ArrayProperty
<
double
>
>
(
"UBMatrix"
),
"A comma seperated list of doubles for UB matrix from (0,0), (0,1)"
"... (2,1),(2,2)"
);
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
declareProperty
(
make_unique
<
WorkspaceProperty
<
IMDEventWorkspace
>
>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"Name of the output MDEventWorkspace in HKL-space."
);
declareProperty
(
new
FileProperty
(
"QSampleFileName"
,
""
,
API
::
FileProperty
::
OptionalSave
),
"Name of file for sample sample."
);
declareProperty
(
make_unique
<
FileProperty
>
(
"QSampleFileName"
,
""
,
API
::
FileProperty
::
OptionalSave
),
"Name of file for sample sample."
);
declareProperty
(
new
FileProperty
(
"HKLFileName"
,
""
,
API
::
FileProperty
::
OptionalSave
),
"Name of file for HKL."
);
declareProperty
(
make_unique
<
FileProperty
>
(
"HKLFileName"
,
""
,
API
::
FileProperty
::
OptionalSave
),
"Name of file for HKL."
);
}
//----------------------------------------------------------------------------------------------
...
...
Framework/MDAlgorithms/src/ConvertMDHistoToMatrixWorkspace.cpp
View file @
67bfe7d7
...
...
@@ -93,12 +93,12 @@ DECLARE_ALGORITHM(ConvertMDHistoToMatrixWorkspace)
/// Decalare the properties
void
ConvertMDHistoToMatrixWorkspace
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
API
::
IMDHistoWorkspace
>
(
declareProperty
(
make_unique
<
WorkspaceProperty
<
API
::
IMDHistoWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"An input IMDHistoWorkspace."
);
declareProperty
(
new
WorkspaceProperty
<>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"An output Workspace2D."
);
declareProperty
(
make_unique
<
WorkspaceProperty
<>>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"An output Workspace2D."
);
std
::
vector
<
std
::
string
>
normalizations
(
3
);
normalizations
[
0
]
=
"NoNormalization"
;
...
...
@@ -111,7 +111,7 @@ void ConvertMDHistoToMatrixWorkspace::init() {
"Signal normalization method"
);
declareProperty
(
new
PropertyWithValue
<
bool
>
(
"FindXAxis"
,
true
,
Direction
::
Input
),
make_unique
<
PropertyWithValue
<
bool
>
>
(
"FindXAxis"
,
true
,
Direction
::
Input
),
"If True, tries to automatically determine the dimension to use as the "
"output x-axis. Applies to line cut MD workspaces."
);
}
...
...
Framework/MDAlgorithms/src/ConvertSpiceDataToRealSpace.cpp
View file @
67bfe7d7
...
...
@@ -47,12 +47,12 @@ ConvertSpiceDataToRealSpace::~ConvertSpiceDataToRealSpace() {}
/** Init
*/
void
ConvertSpiceDataToRealSpace
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
TableWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
TableWorkspace
>
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"Input table workspace for data."
);
declareProperty
(
new
WorkspaceProperty
<
MatrixWorkspace
>
(
"RunInfoWorkspace"
,
""
,
Direction
::
Input
),
declareProperty
(
make_unique
<
WorkspaceProperty
<
MatrixWorkspace
>
>
(
"RunInfoWorkspace"
,
""
,
Direction
::
Input
),
"Input matrix workspace containing sample logs. "
"It can be the RunInfoWorkspace output from LoadSpiceAscii. "
"It serves as parent workspace in the algorithm."
);
...