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
f093f68a
Commit
f093f68a
authored
Jun 02, 2011
by
Janik Zikovsky
Browse files
Refs #3130: Stub for MDEWFindPeaks.
parent
9b493893
Changes
4
Hide whitespace changes
Inline
Side-by-side
Code/Mantid/Framework/MDEvents/CMakeLists.txt
View file @
f093f68a
...
...
@@ -9,6 +9,7 @@ set ( SRC_FILES
src/MDBin.cpp
src/MDBox.cpp
src/MDCentroidPeaks.cpp
src/MDEWFindPeaks.cpp
src/MDEWPeakIntegration.cpp
src/MDEventFactory.cpp
src/MDEventWorkspace.cpp
...
...
@@ -42,6 +43,7 @@ set ( INC_FILES
inc/MantidMDEvents/MDCentroidPeaks.h
inc/MantidMDEvents/MDDimensionExtents.h
inc/MantidMDEvents/MDDimensionStats.h
inc/MantidMDEvents/MDEWFindPeaks.h
inc/MantidMDEvents/MDEWPeakIntegration.h
inc/MantidMDEvents/MDEvent.h
inc/MantidMDEvents/MDEventFactory.h
...
...
@@ -65,6 +67,7 @@ set ( TEST_FILES
test/MDBoxTest.h
test/MDCentroidPeaksTest.h
test/MDDimensionStatsTest.h
test/MDEWFindPeaksTest.h
test/MDEWPeakIntegrationTest.h
test/MDEventFactoryTest.h
test/MDEventTest.h
...
...
Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDEWFindPeaks.h
0 → 100644
View file @
f093f68a
#ifndef MANTID_MDEVENTS_MDEWFINDPEAKS_H_
#define MANTID_MDEVENTS_MDEWFINDPEAKS_H_
#include
"MantidKernel/System.h"
#include
"MantidAPI/Algorithm.h"
namespace
Mantid
{
namespace
MDEvents
{
/** MDEWFindPeaks : TODO: DESCRIPTION
*
* @author
* @date 2011-06-02
*/
class
DLLExport
MDEWFindPeaks
:
public
API
::
Algorithm
{
public:
MDEWFindPeaks
();
~
MDEWFindPeaks
();
/// Algorithm's name for identification
virtual
const
std
::
string
name
()
const
{
return
"MDEWFindPeaks"
;};
/// Algorithm's version for identification
virtual
int
version
()
const
{
return
1
;};
/// Algorithm's category for identification
virtual
const
std
::
string
category
()
const
{
return
"General"
;}
private:
/// Sets documentation strings for this algorithm
virtual
void
initDocs
();
/// Initialise the properties
void
init
();
/// Run the algorithm
void
exec
();
};
}
// namespace Mantid
}
// namespace MDEvents
#endif
/* MANTID_MDEVENTS_MDEWFINDPEAKS_H_ */
Code/Mantid/Framework/MDEvents/src/MDEWFindPeaks.cpp
0 → 100644
View file @
f093f68a
#include
"MantidMDEvents/MDEWFindPeaks.h"
#include
"MantidKernel/System.h"
namespace
Mantid
{
namespace
MDEvents
{
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM
(
MDEWFindPeaks
)
using
namespace
Mantid
::
Kernel
;
using
namespace
Mantid
::
API
;
//----------------------------------------------------------------------------------------------
/** Constructor
*/
MDEWFindPeaks
::
MDEWFindPeaks
()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
MDEWFindPeaks
::~
MDEWFindPeaks
()
{
}
//----------------------------------------------------------------------------------------------
/// Sets documentation strings for this algorithm
void
MDEWFindPeaks
::
initDocs
()
{
this
->
setWikiSummary
(
"Find peaks in reciprocal space in a MDEventWorkspace."
);
this
->
setOptionalMessage
(
"Find peaks in reciprocal space in a MDEventWorkspace."
);
this
->
setWikiDescription
(
""
""
);
}
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void
MDEWFindPeaks
::
init
()
{
declareProperty
(
new
WorkspaceProperty
<>
(
"InputWorkspace"
,
""
,
Direction
::
Input
),
"An input workspace."
);
declareProperty
(
new
WorkspaceProperty
<>
(
"OutputWorkspace"
,
""
,
Direction
::
Output
),
"An output workspace."
);
}
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void
MDEWFindPeaks
::
exec
()
{
}
}
// namespace Mantid
}
// namespace MDEvents
Code/Mantid/Framework/MDEvents/test/MDEWFindPeaksTest.h
0 → 100644
View file @
f093f68a
#ifndef MANTID_MDEVENTS_MDEWFINDPEAKSTEST_H_
#define MANTID_MDEVENTS_MDEWFINDPEAKSTEST_H_
#include
<cxxtest/TestSuite.h>
#include
"MantidKernel/Timer.h"
#include
"MantidKernel/System.h"
#include
<iostream>
#include
<iomanip>
#include
"MantidMDEvents/MDEWFindPeaks.h"
using
namespace
Mantid
::
MDEvents
;
using
namespace
Mantid
::
API
;
class
MDEWFindPeaksTest
:
public
CxxTest
::
TestSuite
{
public:
void
test_Init
()
{
MDEWFindPeaks
alg
;
TS_ASSERT_THROWS_NOTHING
(
alg
.
initialize
()
)
TS_ASSERT
(
alg
.
isInitialized
()
)
}
void
xtest_exec
()
{
// Name of the output workspace.
std
::
string
outWSName
(
"MDEWFindPeaksTest_OutputWS"
);
MDEWFindPeaks
alg
;
TS_ASSERT_THROWS_NOTHING
(
alg
.
initialize
()
)
TS_ASSERT
(
alg
.
isInitialized
()
)
TS_ASSERT_THROWS_NOTHING
(
alg
.
setPropertyValue
(
"REPLACE_PROPERTY_NAME_HERE!!!!"
,
"value"
)
);
TS_ASSERT_THROWS_NOTHING
(
alg
.
setPropertyValue
(
"OutputWorkspace"
,
outWSName
)
);
TS_ASSERT_THROWS_NOTHING
(
alg
.
execute
();
);
TS_ASSERT
(
alg
.
isExecuted
()
);
// Retrieve the workspace from data service. TODO: Change to your desired type
Workspace_sptr
ws
;
TS_ASSERT_THROWS_NOTHING
(
ws
=
boost
::
dynamic_pointer_cast
<
Workspace
>
(
AnalysisDataService
::
Instance
().
retrieve
(
outWSName
))
);
TS_ASSERT
(
ws
);
if
(
!
ws
)
return
;
// TODO: Check the results
// Remove workspace from the data service.
AnalysisDataService
::
Instance
().
remove
(
outWSName
);
}
void
test_Something
()
{
}
};
#endif
/* MANTID_MDEVENTS_MDEWFINDPEAKSTEST_H_ */
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