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
d8fcdf18
Commit
d8fcdf18
authored
Sep 15, 2011
by
Janik Zikovsky
Browse files
Refs #3720: Renamed a bunch of MDEW algorithms to MD.
parent
3d889b87
Changes
33
Hide whitespace changes
Inline
Side-by-side
Code/Mantid/Framework/Kernel/test/DiskMRUTest.h
View file @
d8fcdf18
...
...
@@ -1052,7 +1052,7 @@ public:
}
/** Demonstrate that calling "save" manually without using the MRU write buffer will slow things down
* due to seeking. Was an issue in LoadMD
EW
*/
* due to seeking. Was an issue in LoadMD */
void
test_withFakeSeeking_growingData_savingWithoutUsingMRU
()
{
CPUTimer
tim
;
...
...
Code/Mantid/Framework/MDEvents/CMakeLists.txt
View file @
d8fcdf18
...
...
@@ -4,6 +4,7 @@ set ( SRC_FILES
src/AffineMatrixParameterParser.cpp
src/BinToMDHistoWorkspace.cpp
src/BoxController.cpp
src/CentroidPeaksMD.cpp
src/CloneMDEventWorkspace.cpp
src/CoordTransformAffine.cpp
src/CoordTransformAffineParser.cpp
...
...
@@ -12,25 +13,24 @@ set ( SRC_FILES
src/CoordTransformDistanceParser.cpp
src/CreateMDEventWorkspace.cpp
src/FakeMDEventData.cpp
src/FindPeaksMD.cpp
src/IMDBox.cpp
src/LoadMDEW.cpp
src/IntegratePeaksMD.cpp
src/LoadMD.cpp
src/LoadSQW.cpp
src/MDBin.cpp
src/MDBox.cpp
src/MDBoxIterator.cpp
src/MDCentroidPeaks.cpp
src/MDEWFindPeaks.cpp
src/MDEWPeakIntegration.cpp
src/MDEventFactory.cpp
src/MDEventWorkspace.cpp
src/MDGridBox.cpp
src/MDHistoWorkspace.cpp
src/MDLeanEvent.cpp
src/MakeDiffractionMDEventWorkspace.cpp
src/MergeMD
EW
.cpp
src/MergeMD.cpp
src/OneStepMDEW.cpp
src/PlusMD
EW
.cpp
src/SaveMD
EW
.cpp
src/PlusMD.cpp
src/SaveMD.cpp
)
set
(
SRC_UNITY_IGNORE_FILES
...
...
@@ -44,11 +44,11 @@ set ( SRC_UNITY_IGNORE_FILES
# Header files
set
(
INC_FILES
inc/MantidMDEvents/MDEvent.h
inc/MantidMDEvents/AffineMatrixParameter.h
inc/MantidMDEvents/AffineMatrixParameterParser.h
inc/MantidMDEvents/BinToMDHistoWorkspace.h
inc/MantidMDEvents/BoxController.h
inc/MantidMDEvents/CentroidPeaksMD.h
inc/MantidMDEvents/CloneMDEventWorkspace.h
inc/MantidMDEvents/CoordTransformAffine.h
inc/MantidMDEvents/CoordTransformAffineParser.h
...
...
@@ -57,26 +57,26 @@ set ( INC_FILES
inc/MantidMDEvents/CoordTransformDistanceParser.h
inc/MantidMDEvents/CreateMDEventWorkspace.h
inc/MantidMDEvents/FakeMDEventData.h
inc/MantidMDEvents/FindPeaksMD.h
inc/MantidMDEvents/IMDBox.h
inc/MantidMDEvents/LoadMDEW.h
inc/MantidMDEvents/IntegratePeaksMD.h
inc/MantidMDEvents/LoadMD.h
inc/MantidMDEvents/LoadSQW.h
inc/MantidMDEvents/MDBin.h
inc/MantidMDEvents/MDBox.h
inc/MantidMDEvents/MDBoxIterator.h
inc/MantidMDEvents/MDCentroidPeaks.h
inc/MantidMDEvents/MDDimensionStats.h
inc/MantidMDEvents/MDEWFindPeaks.h
inc/MantidMDEvents/MDEWPeakIntegration.h
inc/MantidMDEvents/MDEvent.h
inc/MantidMDEvents/MDEventFactory.h
inc/MantidMDEvents/MDEventWorkspace.h
inc/MantidMDEvents/MDGridBox.h
inc/MantidMDEvents/MDHistoWorkspace.h
inc/MantidMDEvents/MDLeanEvent.h
inc/MantidMDEvents/MakeDiffractionMDEventWorkspace.h
inc/MantidMDEvents/MergeMD
EW
.h
inc/MantidMDEvents/MergeMD.h
inc/MantidMDEvents/OneStepMDEW.h
inc/MantidMDEvents/PlusMD
EW
.h
inc/MantidMDEvents/SaveMD
EW
.h
inc/MantidMDEvents/PlusMD.h
inc/MantidMDEvents/SaveMD.h
)
# Test files. Other source files required.
...
...
@@ -84,6 +84,7 @@ set ( TEST_FILES
test/AffineMatrixParameterParserTest.h
test/AffineMatrixParameterTest.h
test/BoxControllerTest.h
test/CentroidPeaksMDTest.h
test/CloneMDEventWorkspaceTest.h
test/CoordTransformAffineParserTest.h
test/CoordTransformAffineTest.h
...
...
@@ -92,16 +93,15 @@ set ( TEST_FILES
test/CoordTransformDistanceTest.h
test/CreateMDEventWorkspaceTest.h
test/FakeMDEventDataTest.h
test/FindPeaksMDTest.h
test/IMDBoxTest.h
test/LoadMDEWTest.h
test/IntegratePeaksMDTest.h
test/LoadMDTest.h
test/LoadSQWTest.h
test/MDBinTest.h
test/MDBoxIteratorTest.h
test/MDBoxTest.h
test/MDCentroidPeaksTest.h
test/MDDimensionStatsTest.h
test/MDEWFindPeaksTest.h
test/MDEWPeakIntegrationTest.h
test/MDEventFactoryTest.h
test/MDEventTest.h
test/MDEventWorkspaceTest.h
...
...
@@ -109,10 +109,10 @@ set ( TEST_FILES
test/MDHistoWorkspaceTest.h
test/MDLeanEventTest.h
test/MakeDiffractionMDEventWorkspaceTest.h
test/MergeMD
EW
Test.h
test/MergeMDTest.h
test/OneStepMDEWTest.h
test/PlusMD
EW
Test.h
test/SaveMD
EW
Test.h
test/PlusMDTest.h
test/SaveMDTest.h
)
set
(
GMOCK_TEST_FILES
...
...
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/
MD
CentroidPeaks.h
→
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/CentroidPeaks
MD
.h
View file @
d8fcdf18
...
...
@@ -17,14 +17,14 @@ namespace MDEvents
* @author Janik Zikovsky
* @date 2011-06-01
*/
class
DLLExport
MD
CentroidPeaks
:
public
API
::
Algorithm
class
DLLExport
CentroidPeaks
MD
:
public
API
::
Algorithm
{
public:
MD
CentroidPeaks
();
~
MD
CentroidPeaks
();
CentroidPeaks
MD
();
~
CentroidPeaks
MD
();
/// Algorithm's name for identification
virtual
const
std
::
string
name
()
const
{
return
"
MD
CentroidPeaks"
;};
virtual
const
std
::
string
name
()
const
{
return
"CentroidPeaks
MD
"
;};
/// Algorithm's version for identification
virtual
int
version
()
const
{
return
1
;};
/// Algorithm's category for identification
...
...
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/
MDEW
FindPeaks.h
→
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/FindPeaks
MD
.h
View file @
d8fcdf18
...
...
@@ -13,19 +13,19 @@ namespace Mantid
namespace
MDEvents
{
/**
MDEW
FindPeaks : TODO: DESCRIPTION
/** FindPeaks
MD
: TODO: DESCRIPTION
*
* @author
* @date 2011-06-02
*/
class
DLLExport
MDEW
FindPeaks
:
public
API
::
Algorithm
class
DLLExport
FindPeaks
MD
:
public
API
::
Algorithm
{
public:
MDEW
FindPeaks
();
~
MDEW
FindPeaks
();
FindPeaks
MD
();
~
FindPeaks
MD
();
/// Algorithm's name for identification
virtual
const
std
::
string
name
()
const
{
return
"
MDEW
FindPeaks"
;};
virtual
const
std
::
string
name
()
const
{
return
"FindPeaks
MD
"
;};
/// Algorithm's version for identification
virtual
int
version
()
const
{
return
1
;};
/// Algorithm's category for identification
...
...
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/
MDEWPeakIntegration
.h
→
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/
IntegratePeaksMD
.h
View file @
d8fcdf18
...
...
@@ -17,14 +17,14 @@ namespace MDEvents
* @author Janik Zikovsky
* @date 2011-04-13 18:11:53.496539
*/
class
DLLExport
MDEWPeakIntegration
:
public
API
::
Algorithm
class
DLLExport
IntegratePeaksMD
:
public
API
::
Algorithm
{
public:
MDEWPeakIntegration
();
~
MDEWPeakIntegration
();
IntegratePeaksMD
();
~
IntegratePeaksMD
();
/// Algorithm's name for identification
virtual
const
std
::
string
name
()
const
{
return
"
MDEWPeakIntegration
"
;};
virtual
const
std
::
string
name
()
const
{
return
"
IntegratePeaksMD
"
;};
/// Algorithm's version for identification
virtual
int
version
()
const
{
return
1
;};
/// Algorithm's category for identification
...
...
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/LoadMD
EW
.h
→
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/LoadMD.h
View file @
d8fcdf18
...
...
@@ -37,14 +37,14 @@ namespace MDEvents
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class
DLLExport
LoadMD
EW
:
public
API
::
Algorithm
class
DLLExport
LoadMD
:
public
API
::
Algorithm
{
public:
LoadMD
EW
();
~
LoadMD
EW
();
LoadMD
();
~
LoadMD
();
/// Algorithm's name for identification
virtual
const
std
::
string
name
()
const
{
return
"LoadMD
EW
"
;};
virtual
const
std
::
string
name
()
const
{
return
"LoadMD"
;};
/// Algorithm's version for identification
virtual
int
version
()
const
{
return
1
;};
/// Algorithm's category for identification
...
...
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDBox.h
View file @
d8fcdf18
...
...
@@ -119,7 +119,7 @@ namespace MDEvents
bool
getInMemory
()
const
{
return
m_inMemory
;
}
/** Set whether the box data (from disk) is loaded in memory (for SaveMD
EW
with MakeFileBacked).
/** Set whether the box data (from disk) is loaded in memory (for SaveMD with MakeFileBacked).
* @param inMem :: true if it is in memory */
void
setInMemory
(
const
bool
inMem
)
{
m_inMemory
=
inMem
;
}
...
...
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MergeMD
EW
.h
→
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MergeMD.h
View file @
d8fcdf18
...
...
@@ -38,14 +38,14 @@ namespace MDEvents
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class
DLLExport
MergeMD
EW
:
public
API
::
Algorithm
class
DLLExport
MergeMD
:
public
API
::
Algorithm
{
public:
MergeMD
EW
();
~
MergeMD
EW
();
MergeMD
();
~
MergeMD
();
/// Algorithm's name for identification
virtual
const
std
::
string
name
()
const
{
return
"MergeMD
EW
"
;};
virtual
const
std
::
string
name
()
const
{
return
"MergeMD"
;};
/// Algorithm's version for identification
virtual
int
version
()
const
{
return
1
;};
/// Algorithm's category for identification
...
...
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/PlusMD
EW
.h
→
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/PlusMD.h
View file @
d8fcdf18
...
...
@@ -11,7 +11,7 @@ namespace Mantid
namespace
MDEvents
{
/** PlusMD
EW
: TODO: DESCRIPTION
/** PlusMD : TODO: DESCRIPTION
@author
@date 2011-08-12
...
...
@@ -36,14 +36,14 @@ namespace MDEvents
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class
DLLExport
PlusMD
EW
:
public
API
::
Algorithm
class
DLLExport
PlusMD
:
public
API
::
Algorithm
{
public:
PlusMD
EW
();
~
PlusMD
EW
();
PlusMD
();
~
PlusMD
();
/// Algorithm's name for identification
virtual
const
std
::
string
name
()
const
{
return
"PlusMD
EW
"
;};
virtual
const
std
::
string
name
()
const
{
return
"PlusMD"
;};
/// Algorithm's version for identification
virtual
int
version
()
const
{
return
1
;};
/// Algorithm's category for identification
...
...
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/SaveMD
EW
.h
→
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/SaveMD.h
View file @
d8fcdf18
...
...
@@ -35,14 +35,14 @@ namespace MDEvents
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class
DLLExport
SaveMD
EW
:
public
API
::
Algorithm
class
DLLExport
SaveMD
:
public
API
::
Algorithm
{
public:
SaveMD
EW
();
~
SaveMD
EW
();
SaveMD
();
~
SaveMD
();
/// Algorithm's name for identification
virtual
const
std
::
string
name
()
const
{
return
"SaveMD
EW
"
;};
virtual
const
std
::
string
name
()
const
{
return
"SaveMD"
;};
/// Algorithm's version for identification
virtual
int
version
()
const
{
return
1
;};
/// Algorithm's category for identification
...
...
Code/Mantid/Framework/MDEvents/src/
MD
CentroidPeaks.cpp
→
Code/Mantid/Framework/MDEvents/src/CentroidPeaks
MD
.cpp
View file @
d8fcdf18
...
...
@@ -2,9 +2,9 @@
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidKernel/System.h"
#include
"MantidMDEvents/CoordTransformDistance.h"
#include
"MantidMDEvents/
MD
CentroidPeaks.h"
#include
"MantidMDEvents/CentroidPeaks
MD
.h"
#include
"MantidMDEvents/MDEventFactory.h"
#include
"MantidMDEvents/
MDEWPeakIntegration
.h"
#include
"MantidMDEvents/
IntegratePeaksMD
.h"
using
Mantid
::
DataObjects
::
PeaksWorkspace
;
...
...
@@ -14,7 +14,7 @@ namespace MDEvents
{
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM
(
MD
CentroidPeaks
)
DECLARE_ALGORITHM
(
CentroidPeaks
MD
)
using
namespace
Mantid
::
API
;
using
namespace
Mantid
::
DataObjects
;
...
...
@@ -26,21 +26,21 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Constructor
*/
MD
CentroidPeaks
::
MDCentroidPeaks
()
CentroidPeaksMD
::
CentroidPeaks
MD
()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
MD
CentroidPeaks
::~
MD
CentroidPeaks
()
CentroidPeaks
MD
::~
CentroidPeaks
MD
()
{
}
//----------------------------------------------------------------------------------------------
/// Sets documentation strings for this algorithm
void
MD
CentroidPeaks
::
initDocs
()
void
CentroidPeaks
MD
::
initDocs
()
{
this
->
setWikiSummary
(
"Find the centroid of single-crystal peaks in a MDEventWorkspace, in order to refine their positions."
);
this
->
setOptionalMessage
(
"Find the centroid of single-crystal peaks in a MDEventWorkspace, in order to refine their positions."
);
...
...
@@ -57,7 +57,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void
MD
CentroidPeaks
::
init
()
void
CentroidPeaks
MD
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"An input MDEventWorkspace."
);
...
...
@@ -85,7 +85,7 @@ namespace MDEvents
* @param ws :: MDEventWorkspace to integrate
*/
template
<
typename
MDE
,
size_t
nd
>
void
MD
CentroidPeaks
::
integrate
(
typename
MDEventWorkspace
<
MDE
,
nd
>::
sptr
ws
)
void
CentroidPeaks
MD
::
integrate
(
typename
MDEventWorkspace
<
MDE
,
nd
>::
sptr
ws
)
{
if
(
nd
!=
3
)
throw
std
::
invalid_argument
(
"For now, we expect the input MDEventWorkspace to have 3 dimensions only."
);
...
...
@@ -178,7 +178,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void
MD
CentroidPeaks
::
exec
()
void
CentroidPeaks
MD
::
exec
()
{
inWS
=
getProperty
(
"InputWorkspace"
);
...
...
Code/Mantid/Framework/MDEvents/src/CloneMDEventWorkspace.cpp
View file @
d8fcdf18
...
...
@@ -100,7 +100,7 @@ namespace MDEvents
g_log
.
information
()
<<
"File copied successfully."
<<
std
::
endl
;
// Now load it back
IAlgorithm_sptr
alg
=
createSubAlgorithm
(
"LoadMD
EW
"
,
0.5
,
1.0
,
false
);
IAlgorithm_sptr
alg
=
createSubAlgorithm
(
"LoadMD"
,
0.5
,
1.0
,
false
);
alg
->
setPropertyValue
(
"Filename"
,
outFilename
);
alg
->
setPropertyValue
(
"FileBackEnd"
,
"1"
);
alg
->
setPropertyValue
(
"Memory"
,
"0"
);
//TODO: How much memory?
...
...
Code/Mantid/Framework/MDEvents/src/CreateMDEventWorkspace.cpp
View file @
d8fcdf18
...
...
@@ -219,14 +219,14 @@ namespace MDEvents
if
(
!
filename
.
empty
())
{
// First save to the NXS file
g_log
.
notice
()
<<
"Running SaveMD
EW
"
<<
std
::
endl
;
IAlgorithm_sptr
alg
=
createSubAlgorithm
(
"SaveMD
EW
"
);
g_log
.
notice
()
<<
"Running SaveMD"
<<
std
::
endl
;
IAlgorithm_sptr
alg
=
createSubAlgorithm
(
"SaveMD"
);
alg
->
setPropertyValue
(
"Filename"
,
filename
);
alg
->
setProperty
(
"InputWorkspace"
,
out
);
alg
->
executeAsSubAlg
();
// And now re-load it with this file as the backing.
g_log
.
notice
()
<<
"Running LoadMD
EW
"
<<
std
::
endl
;
alg
=
createSubAlgorithm
(
"LoadMD
EW
"
);
g_log
.
notice
()
<<
"Running LoadMD"
<<
std
::
endl
;
alg
=
createSubAlgorithm
(
"LoadMD"
);
alg
->
setPropertyValue
(
"Filename"
,
filename
);
alg
->
setProperty
(
"FileBackEnd"
,
true
);
alg
->
setPropertyValue
(
"Memory"
,
getPropertyValue
(
"Memory"
));
...
...
Code/Mantid/Framework/MDEvents/src/
MDEW
FindPeaks.cpp
→
Code/Mantid/Framework/MDEvents/src/FindPeaks
MD
.cpp
View file @
d8fcdf18
#include
"MantidMDEvents/
MDEW
FindPeaks.h"
#include
"MantidMDEvents/FindPeaks
MD
.h"
#include
"MantidKernel/System.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidMDEvents/MDEventFactory.h"
...
...
@@ -15,28 +15,28 @@ namespace MDEvents
{
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM
(
MDEW
FindPeaks
)
DECLARE_ALGORITHM
(
FindPeaks
MD
)
//----------------------------------------------------------------------------------------------
/** Constructor
*/
MDEW
FindPeaks
::
MDEW
FindPeaks
()
FindPeaks
MD
::
FindPeaks
MD
()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
MDEW
FindPeaks
::~
MDEW
FindPeaks
()
FindPeaks
MD
::~
FindPeaks
MD
()
{
}
//----------------------------------------------------------------------------------------------
/// Sets documentation strings for this algorithm
void
MDEW
FindPeaks
::
initDocs
()
void
FindPeaks
MD
::
initDocs
()
{
this
->
setWikiSummary
(
"Find peaks in reciprocal space in a MDEventWorkspace."
);
this
->
setOptionalMessage
(
"Find peaks in reciprocal space in a MDEventWorkspace."
);
...
...
@@ -59,7 +59,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void
MDEW
FindPeaks
::
init
()
void
FindPeaks
MD
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"An input MDEventWorkspace with at least 3 dimensions."
);
...
...
@@ -99,7 +99,7 @@ namespace MDEvents
* @param ws :: MDEventWorkspace to integrate
*/
template
<
typename
MDE
,
size_t
nd
>
void
MDEW
FindPeaks
::
findPeaks
(
typename
MDEventWorkspace
<
MDE
,
nd
>::
sptr
ws
)
void
FindPeaks
MD
::
findPeaks
(
typename
MDEventWorkspace
<
MDE
,
nd
>::
sptr
ws
)
{
if
(
nd
<
3
)
throw
std
::
invalid_argument
(
"Workspace must have at least 3 dimensions."
);
...
...
@@ -321,7 +321,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void
MDEW
FindPeaks
::
exec
()
void
FindPeaks
MD
::
exec
()
{
bool
AppendPeaks
=
getProperty
(
"AppendPeaks"
);
...
...
Code/Mantid/Framework/MDEvents/src/
MDEWPeakIntegration
.cpp
→
Code/Mantid/Framework/MDEvents/src/
IntegratePeaksMD
.cpp
View file @
d8fcdf18
...
...
@@ -2,7 +2,7 @@
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidKernel/System.h"
#include
"MantidMDEvents/MDEventFactory.h"
#include
"MantidMDEvents/
MDEWPeakIntegration
.h"
#include
"MantidMDEvents/
IntegratePeaksMD
.h"
#include
"MantidMDEvents/CoordTransformDistance.h"
namespace
Mantid
...
...
@@ -11,7 +11,7 @@ namespace MDEvents
{
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM
(
MDEWPeakIntegration
)
DECLARE_ALGORITHM
(
IntegratePeaksMD
)
using
namespace
Mantid
::
Kernel
;
using
namespace
Mantid
::
API
;
...
...
@@ -23,21 +23,21 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Constructor
*/
MDEWPeakIntegration
::
MDEWPeakIntegration
()
IntegratePeaksMD
::
IntegratePeaksMD
()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
MDEWPeakIntegration
::~
MDEWPeakIntegration
()
IntegratePeaksMD
::~
IntegratePeaksMD
()
{
}
//----------------------------------------------------------------------------------------------
/// Sets documentation strings for this algorithm
void
MDEWPeakIntegration
::
initDocs
()
void
IntegratePeaksMD
::
initDocs
()
{
this
->
setWikiSummary
(
"Integrate single-crystal peaks in reciprocal space, for [[MDEventWorkspace]]s."
);
this
->
setOptionalMessage
(
"Integrate single-crystal peaks in reciprocal space, for MDEventWorkspaces."
);
...
...
@@ -53,7 +53,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void
MDEWPeakIntegration
::
init
()
void
IntegratePeaksMD
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<
IMDEventWorkspace
>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"An input MDEventWorkspace."
);
...
...
@@ -86,7 +86,7 @@ namespace MDEvents
* @param ws :: MDEventWorkspace to integrate
*/
template
<
typename
MDE
,
size_t
nd
>
void
MDEWPeakIntegration
::
integrate
(
typename
MDEventWorkspace
<
MDE
,
nd
>::
sptr
ws
)
void
IntegratePeaksMD
::
integrate
(
typename
MDEventWorkspace
<
MDE
,
nd
>::
sptr
ws
)
{
if
(
nd
!=
3
)
throw
std
::
invalid_argument
(
"For now, we expect the input MDEventWorkspace to have 3 dimensions only."
);
...
...
@@ -185,7 +185,7 @@ namespace MDEvents
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void
MDEWPeakIntegration
::
exec
()
void
IntegratePeaksMD
::
exec
()
{
inWS
=
getProperty
(
"InputWorkspace"
);
...
...
Code/Mantid/Framework/MDEvents/src/LoadMD
EW
.cpp
→
Code/Mantid/Framework/MDEvents/src/LoadMD.cpp
View file @
d8fcdf18
...
...
@@ -9,7 +9,7 @@
#include
"MantidKernel/Memory.h"
#include
"MantidKernel/PropertyWithValue.h"
#include
"MantidKernel/System.h"
#include
"MantidMDEvents/LoadMD
EW
.h"
#include
"MantidMDEvents/LoadMD.h"
#include
"MantidMDEvents/MDEventFactory.h"
#include
<boost/algorithm/string.hpp>
#include
<vector>
...
...
@@ -24,27 +24,27 @@ namespace Mantid
{
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM
(
LoadMD
EW
)
DECLARE_ALGORITHM
(
LoadMD
)
//----------------------------------------------------------------------------------------------
/** Constructor
*/
LoadMD
EW
::
LoadMD
EW
()
LoadMD
::
LoadMD
()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
LoadMD
EW
::~
LoadMD
EW
()
LoadMD
::~
LoadMD
()
{
}
//----------------------------------------------------------------------------------------------
/// Sets documentation strings for this algorithm
void
LoadMD
EW
::
initDocs
()
void
LoadMD
::
initDocs
()
{
this
->
setWikiSummary
(
"Load a .nxs file into a MDEventWorkspace."
);
this
->
setOptionalMessage
(
"Load a .nxs file into a MDEventWorkspace."
);
...
...
@@ -54,7 +54,7 @@ namespace Mantid
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void
LoadMD
EW
::
init
()
void
LoadMD
::
init
()
{
std
::
vector
<
std
::
string
>
exts
;
...
...
@@ -85,7 +85,7 @@ namespace Mantid
*
* @param ws :: MDEventWorkspace to load
*/
void
LoadMD
EW
::
loadExperimentInfos
(
IMDEventWorkspace_sptr
ws
)
void
LoadMD
::
loadExperimentInfos
(
IMDEventWorkspace_sptr
ws
)
{
// First, find how many experimentX blocks there are
std
::
map
<
std
::
string
,
std
::
string
>
entries
;
...
...
@@ -148,7 +148,7 @@ namespace Mantid
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void
LoadMD
EW
::
exec
()
void
LoadMD
::
exec
()
{
m_filename
=
getPropertyValue
(
"Filename"
);
...
...
@@ -161,10 +161,10 @@ namespace Mantid
std
::
vector
<
int32_t
>
vecDims
;
file
->
readData
(
"dimensions"
,
vecDims
);
if
(
vecDims
.
empty
())
throw
std
::
runtime_error
(
"LoadMD
EW
:: Error loading number of dimensions."
);
throw
std
::
runtime_error
(
"LoadMD:: Error loading number of dimensions."
);
size_t
numDims
=
vecDims
[
0
];
if
(
numDims
<=
0
)
throw
std
::
runtime_error
(
"LoadMD
EW
:: number of dimensions <= 0."
);
throw
std
::
runtime_error
(
"LoadMD:: number of dimensions <= 0."
);
//The type of event
std
::
string
eventType
;
...
...
@@ -192,7 +192,7 @@ namespace Mantid