Commit f04f58dd authored by Tom Perkins's avatar Tom Perkins
Browse files

Clang-format patch re #15289

parent bdce1bfe
......@@ -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
......
......@@ -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);
......
......@@ -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
......
......@@ -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;
}
}
......
......@@ -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() {
......
......@@ -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.
......
......@@ -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
......
......@@ -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 = "";
......
......@@ -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,
......
......@@ -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;
}
......
......@@ -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 &centreInd,
"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
......
......@@ -66,10 +66,18 @@ 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},
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()
......@@ -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;
}
}
}
......
......@@ -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)
......
......@@ -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
......
......@@ -288,8 +288,8 @@ public:
//=====================================================================================
// clang-format off
class IntegratePeaksUsingClustersTestPerformance : public CxxTest::TestSuite, public ClusterIntegrationBaseTest
// clang-format on
{
// clang-format on
{
private:
// Input data
......
......@@ -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,10 +979,9 @@ 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.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";
......
......@@ -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.");
}
......
......@@ -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);
......
......@@ -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.
......
......@@ -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());
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment