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
5f008949
Commit
5f008949
authored
Jun 01, 2015
by
Owen Arnold
Browse files
refs #11868. Complete move
parent
eb707112
Changes
55
Hide whitespace changes
Inline
Side-by-side
Code/Mantid/Framework/Crystal/src/IndexSXPeaks.cpp
View file @
5f008949
...
...
@@ -17,6 +17,7 @@ DECLARE_ALGORITHM(IndexSXPeaks)
using
namespace
Geometry
;
using
namespace
API
;
using
namespace
Kernel
;
/** Initialisation method.
*
...
...
Code/Mantid/Framework/Crystal/src/IntegratePeakTimeSlices.cpp
View file @
5f008949
...
...
@@ -839,7 +839,7 @@ void IntegratePeakTimeSlices::FindPlane(V3D ¢er, V3D &xvec, V3D &yvec,
double
&
ROW
,
double
&
COL
,
int
&
NROWS
,
int
&
NCOLS
,
double
&
pixWidthx
,
double
&
pixHeighty
,
API
::
IPeak
const
&
peak
)
const
{
Geometry
::
IPeak
const
&
peak
)
const
{
NROWS
=
NCOLS
=
-
1
;
IDetector_const_sptr
det
=
peak
.
getDetector
();
...
...
Code/Mantid/Framework/Crystal/src/OptimizeCrystalPlacement.cpp
View file @
5f008949
...
...
@@ -26,6 +26,7 @@ using Mantid::Geometry::IndexingUtils;
using
Mantid
::
Geometry
::
Instrument
;
using
Mantid
::
Geometry
::
Instrument_const_sptr
;
using
Mantid
::
Geometry
::
ParameterMap
;
using
namespace
Mantid
::
Geometry
;
namespace
Mantid
{
...
...
Code/Mantid/Framework/Crystal/src/PeakIntegration.cpp
View file @
5f008949
...
...
@@ -308,7 +308,7 @@ int PeakIntegration::fitneighbours(int ipeak, std::string det_name, int x0,
UNUSED_ARG
(
det_name
);
UNUSED_ARG
(
x0
);
UNUSED_ARG
(
y0
);
API
::
IPeak
&
peak
=
Peaks
->
getPeak
(
ipeak
);
Geometry
::
IPeak
&
peak
=
Peaks
->
getPeak
(
ipeak
);
// Number of slices
int
TOFmax
=
0
;
...
...
Code/Mantid/Framework/Crystal/src/SCDCalibratePanels.cpp
View file @
5f008949
...
...
@@ -122,7 +122,7 @@ SCDCalibratePanels::calcWorkspace(DataObjects::PeaksWorkspace_sptr &pwks,
for
(
size_t
k
=
0
;
k
<
bankNames
.
size
();
++
k
)
{
for
(
int
j
=
0
;
j
<
pwks
->
getNumberPeaks
();
++
j
)
{
const
API
::
IPeak
&
peak
=
pwks
->
getPeak
((
int
)
j
);
const
Geometry
::
IPeak
&
peak
=
pwks
->
getPeak
((
int
)
j
);
if
(
std
::
find
(
bankNames
.
begin
(),
bankNames
.
end
(),
peak
.
getBankName
())
!=
bankNames
.
end
())
if
(
IndexingUtils
::
ValidIndex
(
peak
.
getHKL
(),
tolerance
))
{
...
...
@@ -978,7 +978,7 @@ void SCDCalibratePanels::exec() {
int
BankNumDef
=
200
;
for
(
size_t
q
=
0
;
q
<
nData
;
q
+=
3
)
{
int
pk
=
(
int
)
xVals
[
q
];
const
API
::
IPeak
&
peak
=
peaksWs
->
getPeak
(
pk
);
const
Geometry
::
IPeak
&
peak
=
peaksWs
->
getPeak
(
pk
);
string
bankName
=
peak
.
getBankName
();
size_t
pos
=
bankName
.
find_last_not_of
(
"0123456789"
);
...
...
Code/Mantid/Framework/Crystal/src/SCDPanelErrors.cpp
View file @
5f008949
...
...
@@ -1206,7 +1206,7 @@ SCDPanelErrors::calcWorkspace(DataObjects::PeaksWorkspace_sptr &pwks,
for
(
size_t
k
=
0
;
k
<
bankNames
.
size
();
++
k
)
for
(
size_t
j
=
0
;
j
<
pwks
->
rowCount
();
++
j
)
{
API
::
IPeak
&
peak
=
pwks
->
getPeak
((
int
)
j
);
Geometry
::
IPeak
&
peak
=
pwks
->
getPeak
((
int
)
j
);
if
(
peak
.
getBankName
().
compare
(
bankNames
[
k
])
==
0
)
if
(
peak
.
getH
()
!=
0
||
peak
.
getK
()
!=
0
||
peak
.
getL
()
!=
0
)
if
(
peak
.
getH
()
-
floor
(
peak
.
getH
())
<
tolerance
||
...
...
Code/Mantid/Framework/Crystal/test/AddPeakHKLTest.h
View file @
5f008949
...
...
@@ -10,6 +10,7 @@
#include
"MantidTestHelpers/ComponentCreationHelper.h"
using
Mantid
::
Crystal
::
AddPeakHKL
;
using
Mantid
::
Geometry
::
IPeak
;
using
namespace
Mantid
::
Kernel
;
using
namespace
Mantid
::
API
;
using
namespace
Mantid
::
DataObjects
;
...
...
Code/Mantid/Framework/Crystal/test/FindSXPeaksTest.h
View file @
5f008949
...
...
@@ -4,7 +4,7 @@
#include
<cxxtest/TestSuite.h>
#include
"MantidTestHelpers/WorkspaceCreationHelper.h"
#include
"MantidCrystal/FindSXPeaks.h"
#include
"Mantid
API
/IPeak.h"
#include
"Mantid
Geometry/Crystal
/IPeak.h"
using
namespace
Mantid
::
API
;
using
namespace
Mantid
::
Crystal
;
...
...
Code/Mantid/Framework/Crystal/test/IndexSXPeaksTest.h
View file @
5f008949
...
...
@@ -8,10 +8,11 @@
#include
"MantidCrystal/IndexSXPeaks.h"
#include
"MantidCrystal/LoadIsawPeaks.h"
#include
"MantidCrystal/LoadIsawUB.h"
#include
"Mantid
API
/IPeak.h"
#include
"Mantid
Geometry/Crystal
/IPeak.h"
#include
<cmath>
using
namespace
Mantid
::
API
;
using
namespace
Mantid
::
Geometry
;
using
namespace
Mantid
::
Crystal
;
using
namespace
Mantid
::
DataObjects
;
...
...
Code/Mantid/Framework/Crystal/test/IntegratePeakTimeSlicesTest.h
View file @
5f008949
...
...
@@ -35,7 +35,7 @@
#include
"MantidAPI/FrameworkManager.h"
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidKernel/Unit.h"
#include
"Mantid
API
/IPeak.h"
#include
"Mantid
Geometry/Crystal
/IPeak.h"
#include
<math.h>
#include
<map>
...
...
Code/Mantid/Framework/Crystal/test/OptimizeCrystalPlacementTest.h
View file @
5f008949
...
...
@@ -101,7 +101,7 @@ public:
for
(
int
i
=
0
;
i
<
peaks1
->
getNumberPeaks
();
++
i
)
if
(
peaks1
->
getPeak
(
i
).
getRunNumber
()
==
5638
)
{
API
::
IPeak
&
peak
=
peaks1
->
getPeak
(
i
);
Geometry
::
IPeak
&
peak
=
peaks1
->
getPeak
(
i
);
if
(
Gon
==
ZMat
)
{
origGon5638
=
peak
.
getGoniometerMatrix
();
...
...
@@ -160,7 +160,7 @@ public:
for
(
int
i
=
0
;
i
<
peaks1
->
getNumberPeaks
();
++
i
)
{
API
::
IPeak
&
peak
=
peaks1
->
getPeak
(
i
);
Geometry
::
IPeak
&
peak
=
peaks1
->
getPeak
(
i
);
int
RunNum
=
peak
.
getRunNumber
();
Kernel
::
Matrix
<
double
>
GG
;
...
...
@@ -234,7 +234,7 @@ public:
void
test_SamplePosition
()
{
init
();
API
::
IPeak
&
peak
=
peaks1
->
getPeak
(
0
);
Geometry
::
IPeak
&
peak
=
peaks1
->
getPeak
(
0
);
boost
::
shared_ptr
<
const
Geometry
::
Instrument
>
Inst
=
peak
.
getInstrument
();
Kernel
::
V3D
SampPos
(
.0003
,
-
.00025
,
.00015
);
...
...
Code/Mantid/Framework/Crystal/test/PeakClusterProjectionTest.h
View file @
5f008949
...
...
@@ -8,7 +8,7 @@
#include
"MantidAPI/FrameworkManager.h"
#include
"MantidAPI/IMDHistoWorkspace.h"
#include
"MantidAPI/IPeaksWorkspace.h"
#include
"Mantid
API
/IPeak.h"
#include
"Mantid
Geometry/Crystal
/IPeak.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidTestHelpers/MDEventsTestHelper.h"
...
...
Code/Mantid/Framework/Crystal/test/SCDPanelErrorsTest.h
View file @
5f008949
...
...
@@ -13,7 +13,7 @@
#include
"MantidCrystal/SCDPanelErrors.h"
#include
"MantidDataObjects/PeaksWorkspace.h"
#include
"MantidDataObjects/Workspace2D.h"
#include
"Mantid
API
/IPeak.h"
#include
"Mantid
Geometry/Crystal
/IPeak.h"
#include
"MantidGeometry/Instrument/RectangularDetector.h"
#include
"MantidCrystal/SCDPanelErrors.h"
#include
"MantidGeometry/Instrument.h"
...
...
Code/Mantid/Framework/DataObjects/test/PeakTest.h
View file @
5f008949
...
...
@@ -99,7 +99,7 @@ public:
p
.
setRunNumber
(
1234
);
p
.
addContributingDetID
(
10103
);
const
Mantid
::
API
::
IPeak
&
ipeak
=
p
;
const
Mantid
::
Geometry
::
IPeak
&
ipeak
=
p
;
Peak
p2
(
ipeak
);
TS_ASSERT_EQUALS
(
p
.
getRow
(),
p2
.
getRow
());
TS_ASSERT_EQUALS
(
p
.
getCol
(),
p2
.
getCol
());
...
...
Code/Mantid/Framework/DataObjects/test/PeaksWorkspaceTest.h
View file @
5f008949
...
...
@@ -272,7 +272,7 @@ public:
{
auto
pw
=
buildPW
();
// 1 peaks each with single detector
// Add a detector to the peak
Mantid
::
API
::
IPeak
&
ipeak
=
pw
->
getPeak
(
0
);
Mantid
::
Geometry
::
IPeak
&
ipeak
=
pw
->
getPeak
(
0
);
auto
&
peak
=
static_cast
<
Peak
&>
(
ipeak
);
peak
.
addContributingDetID
(
2
);
peak
.
addContributingDetID
(
3
);
...
...
@@ -299,10 +299,10 @@ public:
auto
pw
=
createSaveTestPeaksWorkspace
();
// 5 peaks each with single detector
// Add some detectors
Mantid
::
API
::
IPeak
&
ipeak3
=
pw
->
getPeak
(
2
);
Mantid
::
Geometry
::
IPeak
&
ipeak3
=
pw
->
getPeak
(
2
);
auto
&
peak3
=
static_cast
<
Peak
&>
(
ipeak3
);
peak3
.
addContributingDetID
(
11
);
Mantid
::
API
::
IPeak
&
ipeak5
=
pw
->
getPeak
(
4
);
Mantid
::
Geometry
::
IPeak
&
ipeak5
=
pw
->
getPeak
(
4
);
auto
&
peak5
=
static_cast
<
Peak
&>
(
ipeak5
);
peak5
.
addContributingDetID
(
51
);
peak5
.
addContributingDetID
(
52
);
...
...
Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakMarker2D.cpp
View file @
5f008949
...
...
@@ -126,7 +126,7 @@ void PeakMarker2D::drawSquare(QPainter& painter)const
/**
* Save some peak information.
*/
void
PeakMarker2D
::
setPeak
(
const
Mantid
::
API
::
IPeak
&
peak
,
int
row
)
void
PeakMarker2D
::
setPeak
(
const
Mantid
::
Geometry
::
IPeak
&
peak
,
int
row
)
{
m_h
=
peak
.
getH
();
m_k
=
peak
.
getK
();
...
...
@@ -139,7 +139,7 @@ void PeakMarker2D::setPeak(const Mantid::API::IPeak& peak, int row)
/**
* Return reference to the peak.
*/
const
Mantid
::
API
::
IPeak
&
PeakMarker2D
::
getPeak
()
const
const
Mantid
::
Geometry
::
IPeak
&
PeakMarker2D
::
getPeak
()
const
{
return
m_peakOverlay
.
getPeak
(
m_row
);
}
Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakMarker2D.h
View file @
5f008949
...
...
@@ -2,7 +2,7 @@
#define MANTIDPLOT_PEAKMARKER2D_H_
#include
"Shape2D.h"
#include
"Mantid
API
/IPeak.h"
#include
"Mantid
Geometry/Crystal
/IPeak.h"
class
PeakOverlay
;
...
...
@@ -38,8 +38,8 @@ public:
Symbol
getSymbol
()
const
{
return
m_symbol
;}
void
setSymbol
(
Symbol
s
){
m_symbol
=
s
;}
Style
getStyle
()
const
;
void
setPeak
(
const
Mantid
::
API
::
IPeak
&
peak
,
int
row
=
-
1
);
const
Mantid
::
API
::
IPeak
&
getPeak
()
const
;
void
setPeak
(
const
Mantid
::
Geometry
::
IPeak
&
peak
,
int
row
=
-
1
);
const
Mantid
::
Geometry
::
IPeak
&
getPeak
()
const
;
double
getH
()
const
{
return
m_h
;}
double
getK
()
const
{
return
m_k
;}
double
getL
()
const
{
return
m_l
;}
...
...
Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakOverlay.cpp
View file @
5f008949
...
...
@@ -192,7 +192,7 @@ void PeakOverlay::createMarkers(const PeakMarker2D::Style& style)
this
->
clear
();
for
(
int
i
=
0
;
i
<
nPeaks
;
++
i
)
{
Mantid
::
API
::
IPeak
&
peak
=
getPeak
(
i
);
Mantid
::
Geometry
::
IPeak
&
peak
=
getPeak
(
i
);
const
Mantid
::
Kernel
::
V3D
&
pos
=
peak
.
getDetPos
();
// Project the peak (detector) position onto u,v coords
double
u
,
v
,
uscale
,
vscale
;
...
...
@@ -288,7 +288,7 @@ int PeakOverlay::getNumberPeaks()const
* @param i :: Peak index.
* @return A reference to the peak.
*/
Mantid
::
API
::
IPeak
&
PeakOverlay
::
getPeak
(
int
i
)
Mantid
::
Geometry
::
IPeak
&
PeakOverlay
::
getPeak
(
int
i
)
{
return
m_peaksWorkspace
->
getPeak
(
i
);
}
...
...
@@ -345,7 +345,7 @@ void PeakOverlay::setPeakVisibility(double xmin, double xmax, QString units)
{
PeakMarker2D
*
marker
=
dynamic_cast
<
PeakMarker2D
*>
(
shape
);
if
(
!
marker
)
continue
;
Mantid
::
API
::
IPeak
&
peak
=
getPeak
(
marker
->
getRow
());
Mantid
::
Geometry
::
IPeak
&
peak
=
getPeak
(
marker
->
getRow
());
double
x
=
0.0
;
switch
(
xUnits
)
{
...
...
Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/PeakOverlay.h
View file @
5f008949
...
...
@@ -65,7 +65,7 @@ public:
void
addMarker
(
PeakMarker2D
*
m
);
QList
<
PeakMarker2D
*>
getMarkersWithID
(
int
detID
)
const
;
int
getNumberPeaks
()
const
;
Mantid
::
API
::
IPeak
&
getPeak
(
int
);
Mantid
::
Geometry
::
IPeak
&
getPeak
(
int
);
/// Return PeaksWorkspace associated with this overlay.
boost
::
shared_ptr
<
Mantid
::
API
::
IPeaksWorkspace
>
getPeaksWorkspace
()
{
return
m_peaksWorkspace
;}
/// set HKL precision
...
...
Code/Mantid/MantidQt/CustomInterfaces/src/MantidEVWorker.cpp
View file @
5f008949
...
...
@@ -8,7 +8,7 @@
#include
"MantidAPI/IEventWorkspace.h"
#include
"MantidAPI/IMDWorkspace.h"
#include
"MantidAPI/IPeaksWorkspace.h"
#include
"Mantid
API
/IPeak.h"
#include
"Mantid
Geometry/Crystal
/IPeak.h"
#include
"MantidGeometry/Crystal/OrientedLattice.h"
#include
"MantidKernel/EmptyValues.h"
#include
"MantidKernel/Logger.h"
...
...
@@ -20,6 +20,7 @@ namespace CustomInterfaces
{
using
namespace
Mantid
::
Kernel
;
using
namespace
Mantid
::
Geometry
;
using
namespace
Mantid
::
API
;
namespace
...
...
@@ -306,7 +307,7 @@ bool MantidEVWorker::findPeaks( const std::string & ev_ws_name,
IPeaksWorkspace_sptr
peaks_ws
=
ADS
.
retrieveWS
<
IPeaksWorkspace
>
(
peaks_ws_name
);
for
(
int
iPeak
=
0
;
iPeak
<
peaks_ws
->
getNumberPeaks
();
iPeak
++
)
{
Mantid
::
API
::
IPeak
&
peak
=
peaks_ws
->
getPeak
(
iPeak
);
Mantid
::
Geometry
::
IPeak
&
peak
=
peaks_ws
->
getPeak
(
iPeak
);
if
(
use_monitor_counts
)
peak
.
setMonitorCount
(
monitor_count
);
else
...
...
Prev
1
2
3
Next
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