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
f04f58dd
Commit
f04f58dd
authored
Feb 26, 2016
by
Tom Perkins
Browse files
Clang-format patch re #15289
parent
bdce1bfe
Changes
47
Hide whitespace changes
Inline
Side-by-side
Framework/API/inc/MantidAPI/AnalysisDataService.h
View file @
f04f58dd
...
...
@@ -196,26 +196,26 @@ typedef const Poco::AutoPtr<Mantid::Kernel::DataService<
typedef
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
BeforeReplaceNotification
WorkspaceBeforeReplaceNotification
;
typedef
const
Poco
::
AutoPtr
<
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
BeforeReplaceNotification
>
&
WorkspaceBeforeReplaceNotification_ptr
;
Mantid
::
API
::
Workspace
>::
BeforeReplaceNotification
>
&
WorkspaceBeforeReplaceNotification_ptr
;
typedef
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
AfterReplaceNotification
WorkspaceAfterReplaceNotification
;
typedef
const
Poco
::
AutoPtr
<
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
AfterReplaceNotification
>
&
WorkspaceAfterReplaceNotification_ptr
;
Mantid
::
API
::
Workspace
>::
AfterReplaceNotification
>
&
WorkspaceAfterReplaceNotification_ptr
;
typedef
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
PreDeleteNotification
WorkspacePreDeleteNotification
;
typedef
const
Poco
::
AutoPtr
<
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
PreDeleteNotification
>
&
WorkspacePreDeleteNotification_ptr
;
typedef
const
Poco
::
AutoPtr
<
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
PreDeleteNotification
>
&
WorkspacePreDeleteNotification_ptr
;
typedef
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
PostDeleteNotification
WorkspacePostDeleteNotification
;
typedef
const
Poco
::
AutoPtr
<
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
PostDeleteNotification
>
&
WorkspacePostDeleteNotification_ptr
;
typedef
const
Poco
::
AutoPtr
<
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
PostDeleteNotification
>
&
WorkspacePostDeleteNotification_ptr
;
typedef
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
ClearNotification
ClearADSNotification
;
...
...
@@ -225,25 +225,25 @@ typedef const Poco::AutoPtr<Mantid::Kernel::DataService<
typedef
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
RenameNotification
WorkspaceRenameNotification
;
typedef
const
Poco
::
AutoPtr
<
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
RenameNotification
>
&
WorkspaceRenameNotification_ptr
;
Mantid
::
Kernel
::
DataService
<
Mantid
::
API
::
Workspace
>::
RenameNotification
>
&
WorkspaceRenameNotification_ptr
;
typedef
AnalysisDataServiceImpl
::
GroupWorkspacesNotification
WorkspacesGroupedNotification
;
typedef
const
Poco
::
AutoPtr
<
AnalysisDataServiceImpl
::
GroupWorkspacesNotification
>
&
WorkspacesGroupedNotification_ptr
;
AnalysisDataServiceImpl
::
GroupWorkspacesNotification
>
&
WorkspacesGroupedNotification_ptr
;
typedef
AnalysisDataServiceImpl
::
UnGroupingWorkspaceNotification
WorkspaceUnGroupingNotification
;
typedef
const
Poco
::
AutoPtr
<
AnalysisDataServiceImpl
::
UnGroupingWorkspaceNotification
>
&
WorkspaceUnGroupingNotification_ptr
;
AnalysisDataServiceImpl
::
UnGroupingWorkspaceNotification
>
&
WorkspaceUnGroupingNotification_ptr
;
typedef
AnalysisDataServiceImpl
::
GroupUpdatedNotification
GroupUpdatedNotification
;
typedef
const
Poco
::
AutoPtr
<
AnalysisDataServiceImpl
::
GroupUpdatedNotification
>
&
GroupUpdatedNotification_ptr
;
typedef
const
Poco
::
AutoPtr
<
AnalysisDataServiceImpl
::
GroupUpdatedNotification
>
&
GroupUpdatedNotification_ptr
;
}
// Namespace API
}
// Namespace Mantid
...
...
Framework/API/inc/MantidAPI/ExperimentInfo.h
View file @
f04f58dd
...
...
@@ -115,8 +115,9 @@ public:
/// Easy access to the efixed value for this run & detector ID
virtual
double
getEFixed
(
const
detid_t
detID
)
const
;
/// Easy access to the efixed value for this run & optional detector
virtual
double
getEFixed
(
const
Geometry
::
IDetector_const_sptr
detector
=
Geometry
::
IDetector_const_sptr
())
const
;
virtual
double
getEFixed
(
const
Geometry
::
IDetector_const_sptr
detector
=
Geometry
::
IDetector_const_sptr
())
const
;
/// Set the efixed value for a given detector ID
virtual
void
setEFixed
(
const
detid_t
detID
,
const
double
value
);
...
...
Framework/API/inc/MantidAPI/FunctionFactory.h
View file @
f04f58dd
...
...
@@ -160,8 +160,8 @@ typedef MANTID_API_DLL Mantid::Kernel::SingletonHolder<FunctionFactoryImpl>
typedef
FunctionFactoryImpl
::
UpdateNotification
FunctionFactoryUpdateNotification
;
/// Convenient typedef for an UpdateNotification AutoPtr
typedef
const
Poco
::
AutoPtr
<
FunctionFactoryUpdateNotification
>
&
FunctionFactoryUpdateNotification_ptr
;
typedef
const
Poco
::
AutoPtr
<
FunctionFactoryUpdateNotification
>
&
FunctionFactoryUpdateNotification_ptr
;
}
// namespace API
}
// namespace Mantid
...
...
Framework/API/src/CompositeFunction.cpp
View file @
f04f58dd
...
...
@@ -669,8 +669,7 @@ void CompositeFunction::setUpForFit() {
ParameterTie
*
tie
=
getTie
(
i
);
if
(
tie
&&
!
tie
->
isConstant
())
{
g_log
.
warning
()
<<
"Numeric derivatives should be used when "
"non-constant ties defined."
<<
std
::
endl
;
"non-constant ties defined."
<<
std
::
endl
;
break
;
}
}
...
...
Framework/API/src/Expression.cpp
View file @
f04f58dd
...
...
@@ -11,8 +11,8 @@ namespace API {
typedef
Mantid
::
Kernel
::
StringTokenizer
tokenizer
;
const
std
::
string
DEFAULT_OPS_STR
[]
=
{
";"
,
","
,
"="
,
"== != > < <= >="
,
"&& || ^^"
,
"+ -"
,
"* /"
,
"^"
};
const
std
::
string
DEFAULT_OPS_STR
[]
=
{
";"
,
","
,
"="
,
"== != > < <= >="
,
"&& || ^^"
,
"+ -"
,
"* /"
,
"^"
};
Expression
::
Expression
()
{
...
...
Framework/API/src/MatrixWorkspace.cpp
View file @
f04f58dd
...
...
@@ -524,8 +524,8 @@ std::vector<size_t> MatrixWorkspace::getDetectorIDToWorkspaceIndexVector(
int
index
=
det
+
offset
;
if
(
index
<
0
||
index
>=
outSize
)
{
g_log
.
debug
()
<<
"MatrixWorkspace::getDetectorIDToWorkspaceIndexVector("
"): detector ID found ("
<<
det
<<
" at workspace index "
<<
workspaceIndex
"): detector ID found ("
<<
det
<<
" at workspace index "
<<
workspaceIndex
<<
") is invalid."
<<
std
::
endl
;
}
else
// Save it at that point.
...
...
Framework/Algorithms/inc/MantidAlgorithms/GeneratePeaks.h
View file @
f04f58dd
...
...
@@ -71,8 +71,8 @@ private:
void
processTableColumnNames
();
void
importPeaksFromTable
(
std
::
map
<
specnum_t
,
std
::
vector
<
std
::
pair
<
double
,
API
::
IFunction_sptr
>>>
&
functionmap
);
std
::
map
<
specnum_t
,
std
::
vector
<
std
::
pair
<
double
,
API
::
IFunction_sptr
>>>
&
functionmap
);
/// Import peak and background function parameters from vector
void
importPeakFromVector
(
...
...
@@ -81,8 +81,8 @@ private:
/// Generate peaks in output data workspaces
void
generatePeaks
(
const
std
::
map
<
specnum_t
,
std
::
vector
<
std
::
pair
<
double
,
API
::
IFunction_sptr
>>>
&
functionmap
,
std
::
vector
<
std
::
pair
<
double
,
API
::
IFunction_sptr
>>>
&
functionmap
,
API
::
MatrixWorkspace_sptr
dataWS
);
/// Check whether function has a certain parameter
...
...
Framework/Algorithms/src/CreateSampleWorkspace.cpp
View file @
f04f58dd
...
...
@@ -182,8 +182,7 @@ void CreateSampleWorkspace::exec() {
// down
binWidth
=
xMax
-
xMin
;
g_log
.
warning
()
<<
"The bin width is so large that there is less than one "
"bin - it has been changed to "
<<
binWidth
<<
std
::
endl
;
"bin - it has been changed to "
<<
binWidth
<<
std
::
endl
;
}
std
::
string
functionString
=
""
;
...
...
Framework/Algorithms/src/GeneratePeaks.cpp
View file @
f04f58dd
...
...
@@ -244,8 +244,8 @@ void GeneratePeaks::processAlgProperties(std::string &peakfunctype,
* spectrum
*/
void
GeneratePeaks
::
importPeaksFromTable
(
std
::
map
<
specnum_t
,
std
::
vector
<
std
::
pair
<
double
,
API
::
IFunction_sptr
>>>
&
functionmap
)
{
std
::
map
<
specnum_t
,
std
::
vector
<
std
::
pair
<
double
,
API
::
IFunction_sptr
>>>
&
functionmap
)
{
size_t
numpeaks
=
m_funcParamWS
->
rowCount
();
size_t
icolchi2
=
m_funcParamWS
->
columnCount
()
-
1
;
size_t
numpeakparams
=
m_peakFunction
->
nParams
();
...
...
@@ -433,8 +433,8 @@ void GeneratePeaks::importPeakFromVector(
*/
void
GeneratePeaks
::
generatePeaks
(
const
std
::
map
<
specnum_t
,
std
::
vector
<
std
::
pair
<
double
,
API
::
IFunction_sptr
>>>
&
functionmap
,
std
::
vector
<
std
::
pair
<
double
,
API
::
IFunction_sptr
>>>
&
functionmap
,
API
::
MatrixWorkspace_sptr
dataWS
)
{
// Calcualte function
std
::
map
<
specnum_t
,
...
...
Framework/Algorithms/src/GetAllEi.cpp
View file @
f04f58dd
...
...
@@ -661,8 +661,7 @@ bool GetAllEi::findMonitorPeak(const API::MatrixWorkspace_sptr &inputWS,
boost
::
lexical_cast
<
std
::
string
>
(
peak1TwoSigma
)
+
"
\n
and Peak at mon2: Ei= "
+
boost
::
lexical_cast
<
std
::
string
>
(
peak2Pos
)
+
"and height: "
+
boost
::
lexical_cast
<
std
::
string
>
(
peak1Height
)
<<
std
::
endl
;
boost
::
lexical_cast
<
std
::
string
>
(
peak1Height
)
<<
std
::
endl
;
return
false
;
}
...
...
Framework/Algorithms/src/GetEi.cpp
View file @
f04f58dd
...
...
@@ -97,14 +97,14 @@ void GetEi::exec() {
// write a lot of stuff to the log at user level as it is very possible for
// fit routines not to the expected thing
g_log
.
information
()
<<
"Based on the user selected energy the first peak "
"will be searched for at TOF "
<<
peakLoc0
<<
" micro seconds +/-"
"will be searched for at TOF "
<<
peakLoc0
<<
" micro seconds +/-"
<<
boost
::
lexical_cast
<
std
::
string
>
(
100.0
*
HALF_WINDOW
)
<<
"%
\n
"
;
const
double
peakLoc1
=
1e6
*
timeToFly
(
dist2moni1
,
E_est
);
g_log
.
information
()
<<
"Based on the user selected energy the second peak "
"will be searched for at TOF "
<<
peakLoc1
<<
" micro seconds +/-"
"will be searched for at TOF "
<<
peakLoc1
<<
" micro seconds +/-"
<<
boost
::
lexical_cast
<
std
::
string
>
(
100.0
*
HALF_WINDOW
)
<<
"%
\n
"
;
...
...
@@ -380,8 +380,8 @@ void GetEi::getPeakEstimates(double &height, int64_t ¢reInd,
"the monitor spectrum, which is at TOF "
<<
(
m_tempWS
->
readX
(
0
)[
centreInd
]
+
m_tempWS
->
readX
(
0
)[
centreInd
+
1
])
/
2
<<
"
(peak height "
<<
height
<<
"
counts/microsecond)
\n
"
;
2
<<
" (peak height "
<<
height
<<
" counts/microsecond)
\n
"
;
}
/** Estimates the closest time, looking either or back, when the number of
* counts is
...
...
Framework/Crystal/src/AnvredCorrection.cpp
View file @
f04f58dd
...
...
@@ -66,11 +66,19 @@ using namespace Geometry;
using
namespace
API
;
using
namespace
DataObjects
;
using
namespace
Mantid
::
PhysicalConstants
;
std
::
map
<
int
,
double
>
detScale
=
{
{
17
,
1.092114823
},
{
18
,
0.869105443
},
{
22
,
1.081377685
},
{
26
,
1.055199489
},
{
27
,
1.070308725
},
{
28
,
0.886157884
},
{
36
,
1.112773972
},
{
37
,
1.012894506
},
{
38
,
1.049384146
},
{
39
,
0.890313805
},
{
47
,
1.068553893
},
{
48
,
0.900566426
},
{
58
,
0.911249203
}};
std
::
map
<
int
,
double
>
detScale
=
{{
17
,
1.092114823
},
{
18
,
0.869105443
},
{
22
,
1.081377685
},
{
26
,
1.055199489
},
{
27
,
1.070308725
},
{
28
,
0.886157884
},
{
36
,
1.112773972
},
{
37
,
1.012894506
},
{
38
,
1.049384146
},
{
39
,
0.890313805
},
{
47
,
1.068553893
},
{
48
,
0.900566426
},
{
58
,
0.911249203
}};
AnvredCorrection
::
AnvredCorrection
()
:
API
::
Algorithm
(),
m_smu
(
0.
),
m_amu
(
0.
),
m_radius
(
0.
),
m_power_th
(
0.
),
...
...
@@ -134,8 +142,7 @@ void AnvredCorrection::exec() {
m_onlySphericalAbsorption
=
true
;
g_log
.
warning
()
<<
"Lorentz Correction was already done for this "
"workspace. OnlySphericalAbsorption was changed to "
"true."
<<
std
::
endl
;
"true."
<<
std
::
endl
;
}
}
}
...
...
Framework/Crystal/src/PeakHKLErrors.cpp
View file @
f04f58dd
...
...
@@ -403,8 +403,7 @@ void PeakHKLErrors::function1D(double *out, const double *xValues,
}
g_log
.
debug
()
<<
"------------------------Function---------------------------"
"--------------------"
<<
std
::
endl
;
"--------------------"
<<
std
::
endl
;
for
(
size_t
p
=
0
;
p
<
nParams
();
p
++
)
{
g_log
.
debug
()
<<
parameterName
(
p
)
<<
"("
<<
getParameter
(
p
)
<<
"),"
;
if
((
p
+
1
)
%
6
==
0
)
...
...
Framework/Crystal/src/SaveIsawPeaks.cpp
View file @
f04f58dd
...
...
@@ -164,8 +164,7 @@ void SaveIsawPeaks::exec() {
if
(
true
)
{
out
<<
"4 DETNUM NROWS NCOLS WIDTH HEIGHT DEPTH DETD CenterX "
" CenterY CenterZ BaseX BaseY BaseZ UpX UpY "
" UpZ"
<<
std
::
endl
;
" UpZ"
<<
std
::
endl
;
// Here would save each detector...
for
(
auto
it
=
uniqueBanks
.
begin
();
it
!=
uniqueBanks
.
end
();
++
it
)
{
// Build up the bank name
...
...
Framework/Crystal/test/IntegratePeaksUsingClustersTest.h
View file @
f04f58dd
...
...
@@ -288,8 +288,8 @@ public:
//=====================================================================================
// clang-format off
class
IntegratePeaksUsingClustersTestPerformance
:
public
CxxTest
::
TestSuite
,
public
ClusterIntegrationBaseTest
// clang-format on
{
// clang-format on
{
private:
// Input data
...
...
Framework/CurveFitting/src/Algorithms/LeBailFit.cpp
View file @
f04f58dd
...
...
@@ -420,8 +420,7 @@ void LeBailFit::processInputBackground() {
}
g_log
.
information
()
<<
"[Input] Use background specified with vector with "
"input vector sized "
<<
numparams
<<
".
\n
"
;
"input vector sized "
<<
numparams
<<
".
\n
"
;
}
else
{
g_log
.
information
()
<<
"[Input] Use background specified by table workspace.
\n
"
;
...
...
@@ -980,11 +979,10 @@ void LeBailFit::parseInstrumentParametersTable() {
// string data
g_log
.
debug
()
<<
"Col-name = "
<<
colname
<<
", "
;
trow
>>
strvalue
;
strvalue
.
erase
(
std
::
find_if
(
strvalue
.
rbegin
(),
strvalue
.
rend
(),
std
::
not1
(
std
::
ptr_fun
<
int
,
int
>
(
std
::
isspace
)))
.
base
(),
strvalue
.
end
());
strvalue
.
erase
(
std
::
find_if
(
strvalue
.
rbegin
(),
strvalue
.
rend
(),
std
::
not1
(
std
::
ptr_fun
<
int
,
int
>
(
std
::
isspace
))).
base
(),
strvalue
.
end
());
g_log
.
debug
()
<<
"Value = "
<<
strvalue
<<
".
\n
"
;
tempstrmap
.
emplace
(
colname
,
strvalue
);
...
...
Framework/CurveFitting/test/Algorithms/LeBailFitTest.h
View file @
f04f58dd
...
...
@@ -948,8 +948,7 @@ public:
// 0. Check
if
(
hkls
.
size
()
!=
heights
.
size
())
{
std
::
cout
<<
"createInputHKLWorkspace: input two vectors have different "
"sizes. It is not supported."
<<
std
::
endl
;
"sizes. It is not supported."
<<
std
::
endl
;
throw
std
::
invalid_argument
(
"Vectors for HKL and heights are of different sizes."
);
}
...
...
Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h
View file @
f04f58dd
...
...
@@ -331,17 +331,23 @@ public:
// Add peak parameters
map
<
string
,
double
>
parammap
{{
"Dtt1"
,
16370.650
},
{
"Dtt2"
,
0.10
},
{{
"Dtt1"
,
16370.650
},
{
"Dtt2"
,
0.10
},
{
"Zero"
,
0.0
},
{
"Alph0"
,
1.0
},
{
"Alph1"
,
0.0
},
{
"Beta0"
,
0.109036
},
{
"Beta1"
,
0.009834
},
{
"Alph0"
,
1.0
},
{
"Alph1"
,
0.0
},
{
"Beta0"
,
0.109036
},
{
"Beta1"
,
0.009834
},
{
"Sig2"
,
sqrt
(
91.127
)},
{
"Sig1"
,
sqrt
(
1119.230
)},
{
"Sig2"
,
sqrt
(
91.127
)},
{
"Sig1"
,
sqrt
(
1119.230
)},
{
"Sig0"
,
sqrt
(
0.0
)},
{
"Gam0"
,
0.0
},
{
"Gam1"
,
7.688
},
{
"Gam2"
,
0.0
},
{
"LatticeConstant"
,
5.431363
}};
{
"Gam0"
,
0.0
},
{
"Gam1"
,
7.688
},
{
"Gam2"
,
0.0
},
{
"LatticeConstant"
,
5.431363
}};
lebailfunction
.
setProfileParameterValues
(
parammap
);
...
...
Framework/DataHandling/inc/MantidDataHandling/LoadEventNexus.h
View file @
f04f58dd
...
...
@@ -241,8 +241,8 @@ public:
bool
m_haveWeights
;
/// Pointer to the vector of weighted events
typedef
std
::
vector
<
Mantid
::
DataObjects
::
WeightedEvent
>
*
WeightedEventVector_pt
;
typedef
std
::
vector
<
Mantid
::
DataObjects
::
WeightedEvent
>
*
WeightedEventVector_pt
;
/// Vector where index = event_id; value = ptr to std::vector<WeightedEvent>
/// in the event list.
...
...
Framework/DataHandling/src/DownloadInstrument.cpp
View file @
f04f58dd
...
...
@@ -92,8 +92,7 @@ void DownloadInstrument::exec() {
}
else
{
// log the failure at Notice Level
g_log
.
notice
()
<<
"Internet Connection Failed - cannot update instrument "
"definitions."
<<
std
::
endl
;
"definitions."
<<
std
::
endl
;
// log this error at information level
g_log
.
information
()
<<
errorText
<<
std
::
endl
;
}
...
...
@@ -284,8 +283,7 @@ size_t DownloadInstrument::removeOrphanedFiles(
if
(
filenamesToKeep
.
find
(
entryPath
.
getFileName
())
==
filenamesToKeep
.
end
())
{
g_log
.
debug
()
<<
"File not found in remote instrument repository, will "
"be deleted: "
<<
entryPath
.
getFileName
()
<<
std
::
endl
;
"be deleted: "
<<
entryPath
.
getFileName
()
<<
std
::
endl
;
filesToDelete
.
push_back
(
it
->
path
());
}
}
...
...
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