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
868fca56
Commit
868fca56
authored
Jun 07, 2016
by
Hahn, Steven
Browse files
clang-format
parent
256f387f
Changes
50
Hide whitespace changes
Inline
Side-by-side
Framework/API/src/MatrixWorkspace.cpp
View file @
868fca56
...
...
@@ -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.
\n
"
;
}
else
// Save it at that point.
...
...
Framework/Algorithms/src/ApplyDeadTimeCorr.cpp
View file @
868fca56
...
...
@@ -96,8 +96,8 @@ void ApplyDeadTimeCorr::exec() {
outputWs
->
dataY
(
index
)[
j
]
=
inputWs
->
dataY
(
index
)[
j
]
/
temp
;
}
else
{
g_log
.
error
()
<<
"1 - MeasuredCount * (Deadtime/TimeBin width "
"is currently ("
<<
temp
<<
"). Can't divide by this amount.
\n
"
;
"is currently ("
<<
temp
<<
"). Can't divide by this amount.
\n
"
;
throw
std
::
invalid_argument
(
"Can't divide by 0"
);
}
...
...
Framework/Algorithms/src/CorrectKiKf.cpp
View file @
868fca56
...
...
@@ -299,9 +299,8 @@ void CorrectKiKf::execEvent() {
if
(
inputWS
->
getNumberEvents
()
!=
outputWS
->
getNumberEvents
())
{
g_log
.
information
()
<<
"Ef <= 0 or Ei <= 0 for "
<<
inputWS
->
getNumberEvents
()
-
outputWS
->
getNumberEvents
()
<<
" events, out of "
<<
inputWS
->
getNumberEvents
()
<<
'\n'
;
outputWS
->
getNumberEvents
()
<<
" events, out of "
<<
inputWS
->
getNumberEvents
()
<<
'\n'
;
if
(
efixedProp
==
EMPTY_DBL
())
g_log
.
information
()
<<
"Try to set fixed energy
\n
"
;
}
...
...
Framework/Algorithms/src/CreateSampleWorkspace.cpp
View file @
868fca56
...
...
@@ -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
<<
'\n'
;
"bin - it has been changed to "
<<
binWidth
<<
'\n'
;
}
std
::
string
functionString
=
""
;
...
...
Framework/Algorithms/src/GetAllEi.cpp
View file @
868fca56
...
...
@@ -562,8 +562,7 @@ bool GetAllEi::peakGuess(const API::MatrixWorkspace_sptr &inputWS, size_t index,
boost
::
lexical_cast
<
std
::
string
>
(
stay_still_count
)
+
" Wrong energy or noisy peak at Ei="
+
boost
::
lexical_cast
<
std
::
string
>
(
Ei
)
<<
'\n'
;
boost
::
lexical_cast
<
std
::
string
>
(
Ei
)
<<
'\n'
;
}
g_log
.
debug
()
<<
"*Performed: "
+
boost
::
lexical_cast
<
std
::
string
>
(
ic
)
+
" averages for spectra "
+
...
...
@@ -661,8 +660,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
)
<<
'\n'
;
boost
::
lexical_cast
<
std
::
string
>
(
peak1Height
)
<<
'\n'
;
return
false
;
}
...
...
Framework/Algorithms/src/GetDetOffsetsMultiPeaks.cpp
View file @
868fca56
...
...
@@ -1328,8 +1328,7 @@ void GetDetOffsetsMultiPeaks::makeFitSummary() {
if
(
0
==
numunmasked
)
{
g_log
.
warning
()
<<
"Found 0 unmasked rows in the spectra info table. "
"Cannot calculate Chi-sq sensibly. it's value will be NaN"
<<
'\n'
;
"Cannot calculate Chi-sq sensibly. it's value will be NaN"
<<
'\n'
;
avgchi2
=
NAN
;
}
else
{
avgchi2
=
sumchi2
/
static_cast
<
double
>
(
numunmasked
);
...
...
Framework/Algorithms/src/GetEi.cpp
View file @
868fca56
...
...
@@ -226,24 +226,20 @@ std::vector<size_t> GetEi::getMonitorWsIndexs(
auto
wsInds
=
WS
->
getIndicesFromSpectra
(
specNumTemp
);
if
(
wsInds
.
size
()
!=
1
)
{
// the monitor spectrum isn't present in the
// workspace, we can't continue from here
g_log
.
error
()
<<
"Couldn't find the first monitor "
"spectrum, number "
<<
specNum1
<<
'\n'
;
throw
Exception
::
NotFoundError
(
"GetEi::getMonitorWsIndexs()"
,
specNum1
);
// workspace, we can't continue from here
g_log
.
error
()
<<
"Couldn't find the first monitor "
"spectrum, number "
<<
specNum1
<<
'\n'
;
throw
Exception
::
NotFoundError
(
"GetEi::getMonitorWsIndexs()"
,
specNum1
);
}
// nowe the second monitor
specNumTemp
[
0
]
=
specNum2
;
auto
wsIndexTemp
=
WS
->
getIndicesFromSpectra
(
specNumTemp
);
if
(
wsIndexTemp
.
size
()
!=
1
)
{
// the monitor spectrum isn't present in the
// workspace, we can't continue from here
g_log
.
error
()
<<
"Couldn't find the second "
"monitor spectrum, number "
<<
specNum2
<<
'\n'
;
throw
Exception
::
NotFoundError
(
"GetEi::getMonitorWsIndexs()"
,
specNum2
);
// workspace, we can't continue from here
g_log
.
error
()
<<
"Couldn't find the second "
"monitor spectrum, number "
<<
specNum2
<<
'\n'
;
throw
Exception
::
NotFoundError
(
"GetEi::getMonitorWsIndexs()"
,
specNum2
);
}
wsInds
.
push_back
(
wsIndexTemp
[
0
]);
...
...
Framework/Algorithms/src/RadiusSum.cpp
View file @
868fca56
...
...
@@ -532,8 +532,7 @@ void RadiusSum::numBinsIsReasonable() {
"resolution (detector size). "
<<
"A resonable number is smaller than "
<<
static_cast
<
int
>
((
max_radius
-
min_radius
)
/
min_bin_size
)
<<
'\n'
;
min_bin_size
)
<<
'\n'
;
}
double
RadiusSum
::
getMinBinSizeForInstrument
(
API
::
MatrixWorkspace_sptr
inWS
)
{
...
...
Framework/Algorithms/src/ReflectometryReductionOneAuto.cpp
View file @
868fca56
...
...
@@ -447,8 +447,7 @@ void ReflectometryReductionOneAuto::exec() {
}
catch
(
std
::
runtime_error
&
e
)
{
g_log
.
warning
()
<<
"Could not autodetect polynomial correction method. "
"Polynomial correction will not be performed. "
"Reason for failure: "
<<
e
.
what
()
<<
'\n'
;
"Reason for failure: "
<<
e
.
what
()
<<
'\n'
;
refRedOne
->
setProperty
(
"CorrectionAlgorithm"
,
"None"
);
}
...
...
Framework/Algorithms/src/TOFSANSResolutionByPixel.cpp
View file @
868fca56
...
...
@@ -127,8 +127,8 @@ void TOFSANSResolutionByPixel::exec() {
auto
collimationLengthEstimator
=
SANSCollimationLengthEstimator
();
LCollim
=
collimationLengthEstimator
.
provideCollimationLength
(
inWS
);
g_log
.
information
()
<<
"No collimation length was specified. A default "
"collimation length was estimated to be "
<<
LCollim
<<
'\n'
;
"collimation length was estimated to be "
<<
LCollim
<<
'\n'
;
}
else
{
g_log
.
information
()
<<
"The collimation length is "
<<
LCollim
<<
'\n'
;
}
...
...
Framework/Crystal/src/IntegratePeakTimeSlices.cpp
View file @
868fca56
...
...
@@ -2259,8 +2259,7 @@ bool IntegratePeakTimeSlices::isGoodFit(std::vector<double> const ¶ms,
g_log
.
debug
()
<<
" Bad Slice. Negative Counts= "
<<
m_AttributeValues
->
StatBaseVals
(
IIntensities
)
-
params
[
Ibk
]
*
ncells
<<
'\n'
;
params
[
Ibk
]
*
ncells
<<
'\n'
;
;
return
false
;
}
...
...
@@ -2275,8 +2274,7 @@ bool IntegratePeakTimeSlices::isGoodFit(std::vector<double> const ¶ms,
// background
{
g_log
.
debug
()
<<
" Bad Slice. Fitted Intensity & Observed "
"Intensity(-back) too different. ratio="
<<
x
<<
'\n'
;
"Intensity(-back) too different. ratio="
<<
x
<<
'\n'
;
return
false
;
}
...
...
Framework/Crystal/src/PredictPeaks.cpp
View file @
868fca56
...
...
@@ -140,8 +140,7 @@ void PredictPeaks::exec() {
}
catch
(
std
::
runtime_error
&
e
)
{
// If there is no goniometer matrix, use identity matrix instead.
g_log
.
error
()
<<
"Error getting the goniometer rotation matrix from the "
"InputWorkspace."
<<
std
::
endl
"InputWorkspace."
<<
std
::
endl
<<
e
.
what
()
<<
'\n'
;
g_log
.
warning
()
<<
"Using identity goniometer rotation matrix instead."
<<
'\n'
;
...
...
@@ -186,8 +185,7 @@ void PredictPeaks::exec() {
g_log
.
error
()
<<
"Error getting the goniometer rotation matrix from the "
"InputWorkspace."
<<
std
::
endl
"InputWorkspace."
<<
std
::
endl
<<
e
.
what
()
<<
'\n'
;
g_log
.
warning
()
<<
"Using identity goniometer rotation matrix instead."
<<
'\n'
;
...
...
Framework/Crystal/src/SaveIsawUB.cpp
View file @
868fca56
...
...
@@ -143,7 +143,8 @@ void SaveIsawUB::exec() {
<<
lattice
.
errorgamma
()
<<
setw
(
12
)
<<
setprecision
(
4
)
<<
ErrorVolume
<<
"
\n
"
;
out
<<
endl
<<
'\n'
;
out
<<
endl
<<
'\n'
;
out
<<
"The above matrix is the Transpose of the UB Matrix. "
;
out
<<
"The UB matrix maps the column
\n
"
;
...
...
Framework/CurveFitting/src/Algorithms/FitPowderDiffPeaks.cpp
View file @
868fca56
...
...
@@ -1743,7 +1743,8 @@ bool FitPowderDiffPeaks::doFit1PeakSimple(
// Debug information output
API
::
ITableWorkspace_sptr
paramws
=
fitalg
->
getProperty
(
"OutputParameters"
);
std
::
string
infofit
=
parseFitParameterWorkspace
(
paramws
);
g_log
.
information
()
<<
"Fitted Parameters: "
<<
endl
<<
infofit
<<
'\n'
;
g_log
.
information
()
<<
"Fitted Parameters: "
<<
endl
<<
infofit
<<
'\n'
;
}
else
{
g_log
.
error
()
<<
"[DBx128B] Failed to execute fitting peak @ "
<<
peakfunction
->
centre
()
<<
'\n'
;
...
...
@@ -1880,8 +1881,7 @@ bool FitPowderDiffPeaks::doFitGaussianPeak(DataObjects::Workspace2D_sptr dataws,
bool
fitsuccess
;
std
::
string
fitresult
=
parseFitResult
(
fitalg
,
chi2
,
fitsuccess
);
g_log
.
information
()
<<
"[Fit Gaussian Peak] Successful = "
<<
fitsuccess
<<
", Result:
\n
"
<<
fitresult
<<
'\n'
;
<<
", Result:
\n
"
<<
fitresult
<<
'\n'
;
// 4. Get result
center
=
gaussianpeak
->
centre
();
...
...
Framework/CurveFitting/src/FuncMinimizers/DampingMinimizer.cpp
View file @
868fca56
...
...
@@ -90,7 +90,8 @@ bool DampingMinimizer::iterate(size_t) {
for
(
size_t
j
=
0
;
j
<
n
;
++
j
)
{
std
::
cerr
<<
dx
.
get
(
j
)
<<
' '
;
}
std
::
cerr
<<
std
::
endl
<<
'\n'
;
std
::
cerr
<<
std
::
endl
<<
'\n'
;
}
// Update the parameters of the cost function.
...
...
Framework/CurveFitting/src/FuncMinimizers/LevenbergMarquardtMDMinimizer.cpp
View file @
868fca56
...
...
@@ -94,7 +94,8 @@ bool LevenbergMarquardtMDMinimizer::iterate(size_t) {
g_log
.
warning
()
<<
"==========================================================="
<<
'\n'
;
g_log
.
warning
()
<<
"mu="
<<
m_mu
<<
std
::
endl
<<
'\n'
;
g_log
.
warning
()
<<
"mu="
<<
m_mu
<<
std
::
endl
<<
'\n'
;
}
if
(
m_D
.
empty
())
{
...
...
@@ -164,7 +165,8 @@ bool LevenbergMarquardtMDMinimizer::iterate(size_t) {
for
(
size_t
j
=
0
;
j
<
n
;
++
j
)
{
g_log
.
warning
()
<<
dx
.
get
(
j
)
<<
' '
;
}
g_log
.
warning
()
<<
std
::
endl
<<
'\n'
;
g_log
.
warning
()
<<
std
::
endl
<<
'\n'
;
}
// restore scaling
...
...
Framework/CurveFitting/src/Functions/BivariateNormal.cpp
View file @
868fca56
...
...
@@ -154,7 +154,8 @@ void BivariateNormal::function1D(double *out, const double *xValues,
inf
<<
i
<<
"="
<<
constr
->
check
()
<<
";"
;
}
inf
<<
'\n'
;
inf
<<
std
::
endl
<<
" chiSq ="
<<
chiSq
<<
" nData "
<<
nData
<<
'\n'
;
inf
<<
std
::
endl
<<
" chiSq ="
<<
chiSq
<<
" nData "
<<
nData
<<
'\n'
;
g_log
.
debug
(
inf
.
str
());
}
...
...
Framework/DataHandling/src/CheckMantidVersion.cpp
View file @
868fca56
...
...
@@ -113,8 +113,8 @@ void CheckMantidVersion::exec() {
// formatting issues like missing quotes or brackets.
g_log
.
warning
()
<<
"Error found when parsing version information "
"retrieved from GitHub as a JSON string. "
"Error trying to parse this JSON string: "
<<
json
<<
std
::
endl
"Error trying to parse this JSON string: "
<<
json
<<
std
::
endl
<<
". Parsing error details: "
<<
r
.
getFormattedErrorMessages
()
<<
'\n'
;
}
...
...
Framework/DataHandling/src/DownloadInstrument.cpp
View file @
868fca56
...
...
@@ -282,8 +282,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
()
<<
'\n'
;
"be deleted: "
<<
entryPath
.
getFileName
()
<<
'\n'
;
filesToDelete
.
push_back
(
it
->
path
());
}
}
...
...
Framework/DataHandling/src/FindDetectorsPar.cpp
View file @
868fca56
...
...
@@ -347,8 +347,7 @@ void FindDetectorsPar::calcDetPar(const Geometry::IDetector_const_sptr &spDet,
boost
::
dynamic_pointer_cast
<
const
Geometry
::
DetectorGroup
>
(
spDet
);
if
(
!
spDetGroup
)
{
g_log
.
error
()
<<
"calc_cylDetPar: can not downcast IDetector_sptr to "
"detector group for det->ID: "
<<
spDet
->
getID
()
<<
'\n'
;
"detector group for det->ID: "
<<
spDet
->
getID
()
<<
'\n'
;
throw
(
std
::
bad_cast
());
}
auto
detectors
=
spDetGroup
->
getDetectors
();
...
...
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