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
4c9c647e
Commit
4c9c647e
authored
Apr 15, 2011
by
Janik Zikovsky
Browse files
Refs #2838: Start of a Peak object.
parent
d04e3cab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Code/Mantid/Framework/DataObjects/CMakeLists.txt
View file @
4c9c647e
...
...
@@ -8,6 +8,7 @@ set ( SRC_FILES
src/Histogram1D.cpp
src/ManagedDataBlock2D.cpp
src/ManagedWorkspace2D.cpp
src/Peak.cpp
src/PeaksWorkspace.cpp
src/TableColumn.cpp
src/TableWorkspace.cpp
...
...
@@ -32,6 +33,7 @@ set ( INC_FILES
inc/MantidDataObjects/Histogram1D.h
inc/MantidDataObjects/ManagedDataBlock2D.h
inc/MantidDataObjects/ManagedWorkspace2D.h
inc/MantidDataObjects/Peak.h
inc/MantidDataObjects/PeaksWorkspace.h
inc/MantidDataObjects/TableColumn.h
inc/MantidDataObjects/TablePointerColumn.h
...
...
@@ -49,6 +51,7 @@ set ( TEST_FILES
test/LibraryManagerTest.h
test/ManagedDataBlock2DTest.h
test/ManagedWorkspace2DTest.h
test/PeakTest.h
test/PeaksWorkspaceTest.h
test/RefAxisTest.h
test/TableWorkspacePropertyTest.h
...
...
Code/Mantid/Framework/DataObjects/inc/MantidDataObjects/Peak.h
0 → 100644
View file @
4c9c647e
#ifndef MANTID_DATAOBJECTS_PEAK_H_
#define MANTID_DATAOBJECTS_PEAK_H_
#include
"MantidKernel/System.h"
#include
"MantidGeometry/Math/Matrix.h"
namespace
Mantid
{
namespace
DataObjects
{
/** Structure describing a single-crystal peak
*
* @author Janik Zikovsky
* @date 2011-04-15 13:24:07.963491
*/
class
Peak
{
public:
Peak
();
~
Peak
();
int
getDetectorID
()
const
;
double
getFinalEnergy
()
const
;
double
getH
()
const
;
double
getInitialEnergy
()
const
;
double
getIntensity
()
const
;
double
getK
()
const
;
double
getL
()
const
;
double
getSigIntensity
()
const
;
void
setDetectorID
(
int
m_DetectorID
);
void
setFinalEnergy
(
double
m_FinalEnergy
);
void
setH
(
double
m_H
);
void
setInitialEnergy
(
double
m_InitialEnergy
);
void
setIntensity
(
double
m_Intensity
);
void
setK
(
double
m_K
);
void
setL
(
double
m_L
);
void
setSigIntensity
(
double
m_SigIntensity
);
Mantid
::
Geometry
::
Matrix
<
double
>
getOrientationMatrix
()
const
;
void
setOrientationMatrix
(
Mantid
::
Geometry
::
Matrix
<
double
>
m_OrientationMatrix
);
// -- Still to implement --
double
getWavelength
();
double
getDSpacing
();
std
::
string
getBankName
();
int
getRow
();
int
getCol
();
protected:
/// Integrated peak intensity
double
m_Intensity
;
/// Error (sigma) on peak intensity
double
m_SigIntensity
;
/// Final energy of the peak
double
m_FinalEnergy
;
/// Initial Energy of the peak
double
m_InitialEnergy
;
/// ID of the detector
int
m_DetectorID
;
/// H of the peak
double
m_H
;
/// K of the peak
double
m_K
;
/// L of the peak
double
m_L
;
/// Sample orientation matrix
Mantid
::
Geometry
::
Matrix
<
double
>
m_OrientationMatrix
;
};
}
// namespace Mantid
}
// namespace DataObjects
#endif
/* MANTID_DATAOBJECTS_PEAK_H_ */
Code/Mantid/Framework/DataObjects/src/Peak.cpp
0 → 100644
View file @
4c9c647e
#include
"MantidDataObjects/Peak.h"
#include
"MantidKernel/System.h"
namespace
Mantid
{
namespace
DataObjects
{
//----------------------------------------------------------------------------------------------
/** Constructor
*/
Peak
::
Peak
()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
Peak
::~
Peak
()
{
}
int
Peak
::
getDetectorID
()
const
{
return
m_DetectorID
;
}
double
Peak
::
getFinalEnergy
()
const
{
return
m_FinalEnergy
;
}
double
Peak
::
getH
()
const
{
return
m_H
;
}
double
Peak
::
getInitialEnergy
()
const
{
return
m_InitialEnergy
;
}
double
Peak
::
getIntensity
()
const
{
return
m_Intensity
;
}
double
Peak
::
getK
()
const
{
return
m_K
;
}
double
Peak
::
getL
()
const
{
return
m_L
;
}
double
Peak
::
getSigIntensity
()
const
{
return
m_SigIntensity
;
}
void
Peak
::
setDetectorID
(
int
m_DetectorID
)
{
this
->
m_DetectorID
=
m_DetectorID
;
}
void
Peak
::
setFinalEnergy
(
double
m_FinalEnergy
)
{
this
->
m_FinalEnergy
=
m_FinalEnergy
;
}
void
Peak
::
setH
(
double
m_H
)
{
this
->
m_H
=
m_H
;
}
void
Peak
::
setInitialEnergy
(
double
m_InitialEnergy
)
{
this
->
m_InitialEnergy
=
m_InitialEnergy
;
}
void
Peak
::
setIntensity
(
double
m_Intensity
)
{
this
->
m_Intensity
=
m_Intensity
;
}
void
Peak
::
setK
(
double
m_K
)
{
this
->
m_K
=
m_K
;
}
void
Peak
::
setL
(
double
m_L
)
{
this
->
m_L
=
m_L
;
}
void
Peak
::
setSigIntensity
(
double
m_SigIntensity
)
{
this
->
m_SigIntensity
=
m_SigIntensity
;
}
Mantid
::
Geometry
::
Matrix
<
double
>
Peak
::
getOrientationMatrix
()
const
{
return
this
->
m_OrientationMatrix
;
}
void
Peak
::
setOrientationMatrix
(
Mantid
::
Geometry
::
Matrix
<
double
>
m_OrientationMatrix
)
{
this
->
m_OrientationMatrix
=
m_OrientationMatrix
;
}
}
// namespace Mantid
}
// namespace DataObjects
Code/Mantid/Framework/DataObjects/test/PeakTest.h
0 → 100644
View file @
4c9c647e
#ifndef MANTID_DATAOBJECTS_PEAKTEST_H_
#define MANTID_DATAOBJECTS_PEAKTEST_H_
#include
<cxxtest/TestSuite.h>
#include
"MantidKernel/Timer.h"
#include
"MantidKernel/System.h"
#include
<iostream>
#include
<iomanip>
#include
"MantidDataObjects/Peak.h"
using
namespace
Mantid
::
DataObjects
;
class
PeakTest
:
public
CxxTest
::
TestSuite
{
public:
void
test_Something
()
{
}
};
#endif
/* MANTID_DATAOBJECTS_PEAKTEST_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