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

Clang-format patch re #15289

parent bdce1bfe
......@@ -359,8 +359,7 @@ void GroupDetectors2::getGroups(API::MatrixWorkspace_const_sptr workspace,
if (*it > maxIn) {
g_log.error() << "Spectra index " << *it
<< " doesn't exist in the input workspace, the highest "
"possible index is "
<< maxIn << std::endl;
"possible index is " << maxIn << std::endl;
throw std::out_of_range("One of the spectra requested to group does "
"not exist in the input workspace");
}
......
......@@ -615,8 +615,7 @@ Load::getOutputWorkspace(const std::string &propName,
g_log.debug() << "Workspace property " << propName
<< " did not return to MatrixWorkspace, EventWorkspace, "
"IMDEventWorkspace, IMDWorkspace"
<< std::endl;
"IMDEventWorkspace, IMDWorkspace" << std::endl;
return Workspace_sptr();
}
......
......@@ -313,9 +313,12 @@ void LoadAscii::init() {
"the read-in data and stored in the [[Analysis Data "
"Service]].");
std::string spacers[6][6] = {{"Automatic", ",\t:; "}, {"CSV", ","},
{"Tab", "\t"}, {"Space", " "},
{"Colon", ":"}, {"SemiColon", ";"}};
std::string spacers[6][6] = {{"Automatic", ",\t:; "},
{"CSV", ","},
{"Tab", "\t"},
{"Space", " "},
{"Colon", ":"},
{"SemiColon", ";"}};
// For the ListValidator
std::vector<std::string> sepOptions;
for (size_t i = 0; i < 5; ++i) {
......
......@@ -673,8 +673,7 @@ void LoadAscii2::exec() {
if (sep.empty()) {
g_log.notice() << "\"UserDefined\" has been selected, but no custom "
"separator has been entered."
" Using default instead."
<< std::endl;
" Using default instead." << std::endl;
sep = ",";
}
m_columnSep = sep;
......
......@@ -1981,13 +1981,11 @@ void LoadEventNexus::loadEvents(API::Progress *const prog,
if (shortest_tof < 0)
g_log.warning() << "The shortest TOF was negative! At least 1 event has an "
"invalid time-of-flight."
<< std::endl;
"invalid time-of-flight." << std::endl;
if (bad_tofs > 0)
g_log.warning() << "Found " << bad_tofs << " events with TOF > 2e8. This "
"may indicate errors in the raw "
"TOF data."
<< std::endl;
"TOF data." << std::endl;
// Use T0 offset from TOPAZ Parameter file if it exists
if (m_ws->getInstrument()->hasParameter("T0")) {
......@@ -2314,8 +2312,7 @@ void LoadEventNexus::runLoadMonitorsAsEvents(API::Progress *const prog) {
if (m_instrument_loaded_correctly) {
m_ws->setInstrument(dataWS->getInstrument());
g_log.information() << "Instrument data copied into monitors workspace "
" from the data workspace."
<< std::endl;
" from the data workspace." << std::endl;
}
// Perform the load (only events from monitor)
......@@ -2337,8 +2334,7 @@ void LoadEventNexus::runLoadMonitorsAsEvents(API::Progress *const prog) {
g_log.error()
<< "Could not copy log data into monitors workspace. Some "
" logs may be wrong and/or missing in the output "
"monitors workspace."
<< std::endl;
"monitors workspace." << std::endl;
}
}
......
......@@ -274,8 +274,7 @@ void LoadMcStas::readEventData(
::NeXus::Info id_info = nxFile.getInfo();
if (id_info.dims.size() != 2) {
g_log.error() << "Event data in McStas nexus file not loaded. Expected "
"event data block to be two dimensional"
<< std::endl;
"event data block to be two dimensional" << std::endl;
return;
}
int64_t nNeutrons = id_info.dims[0];
......
......@@ -572,8 +572,7 @@ void LoadNexusMonitors2::runLoadLogs(const std::string filename,
loadLogs->execute();
} catch (...) {
g_log.error() << "Error while loading Logs from Nexus. Some sample logs "
"may be missing."
<< std::endl;
"may be missing." << std::endl;
}
}
......@@ -625,8 +624,7 @@ void LoadNexusMonitors2::splitMutiPeriodHistrogramData(
<< "Attempted to split multiperiod histogram workspace with "
<< m_workspace->blocksize() << "data entries, into " << numPeriods
<< "periods."
" Aborted."
<< std::endl;
" Aborted." << std::endl;
return;
}
......
......@@ -302,8 +302,7 @@ Workspace_sptr LoadNexusProcessed::doAccelleratedMultiPeriodLoading(
std::stringstream buffer;
buffer << "Group entry " << p - 1 << " has fractional area present. Try "
"reloading with FastMultiPeriod set "
"off."
<< std::endl;
"off." << std::endl;
throw std::runtime_error(buffer.str());
}
......
......@@ -853,8 +853,7 @@ void LoadRawHelper::loadRunParameters(API::MatrixWorkspace_sptr localWorkspace,
DateAndTime(isisDate.substr(7, 4) + "-" +
convertMonthLabelToIntStr(isisDate.substr(3, 3)) + "-" +
isisDate.substr(0, 2) + "T" +
std::string(localISISRaw->hdr.hd_time, 8))
.toISO8601String());
std::string(localISISRaw->hdr.hd_time, 8)).toISO8601String());
}
/// To help transforming date stored in ISIS raw file into iso 8601
......
......@@ -316,7 +316,8 @@ public:
}
// 4. End of file
ss << " </group>" << std::endl << "</detector-masking>" << std::endl;
ss << " </group>" << std::endl
<< "</detector-masking>" << std::endl;
return ScopedFileHelper::ScopedFile(ss.str(), maskfilename);
}
......
......@@ -51,8 +51,8 @@ public:
MDBoxBase(Mantid::API::BoxController *const BoxController,
const uint32_t depth, const size_t boxID,
const std::vector<Mantid::Geometry::MDDimensionExtents<coord_t>>
&extentsVector);
const std::vector<Mantid::Geometry::MDDimensionExtents<coord_t>> &
extentsVector);
MDBoxBase(const MDBoxBase<MDE, nd> &box,
Mantid::API::BoxController *const otherBC);
......
......@@ -222,8 +222,8 @@ const std::string ParameterMap::diff(const ParameterMap &rhs,
if (!match) {
// output some information that helps with understanding the mismatch
strOutput << "Parameter mismatch LHS=RHS for LHS parameter in component "
"with name: "
<< fullName << ". Parameter name is: " << (*param).name()
"with name: " << fullName
<< ". Parameter name is: " << (*param).name()
<< " and value: " << (*param).asString() << std::endl;
bool componentWithSameNameRHS = false;
bool parameterWithSameNameRHS = false;
......@@ -384,8 +384,7 @@ void ParameterMap::addPositionCoordinate(
position.setZ(value);
else {
g_log.warning() << "addPositionCoordinate() called with unrecognized "
"coordinate symbol: "
<< name;
"coordinate symbol: " << name;
// set description if one is provided
if (pDescription) {
param->setDescription(*pDescription);
......@@ -824,8 +823,8 @@ Parameter_sptr ParameterMap::getByType(const IComponent *comp,
}
} // found->firdst
} // it_found != m_map.end()
} //! m_map.empty()
} // PARALLEL_CRITICAL(m_map_access)
} //! m_map.empty()
} // PARALLEL_CRITICAL(m_map_access)
return result;
}
......
......@@ -83,8 +83,8 @@ MDGeometryBuilderXML<CheckDimensionPolicy>::MDGeometryBuilderXML(
template <typename CheckDimensionPolicy>
MDGeometryBuilderXML<CheckDimensionPolicy> &
MDGeometryBuilderXML<CheckDimensionPolicy>::
operator=(const MDGeometryBuilderXML<CheckDimensionPolicy> &other) {
MDGeometryBuilderXML<CheckDimensionPolicy>::
operator=(const MDGeometryBuilderXML<CheckDimensionPolicy> &other) {
if (this != &other) {
m_vecDimensions = other.m_vecDimensions;
m_spXDimension = other.m_spXDimension;
......
......@@ -355,8 +355,8 @@ typedef MANTID_KERNEL_DLL Mantid::Kernel::SingletonHolder<ConfigServiceImpl>
typedef Mantid::Kernel::ConfigServiceImpl::ValueChanged
ConfigValChangeNotification;
typedef const Poco::AutoPtr<Mantid::Kernel::ConfigServiceImpl::ValueChanged>
&ConfigValChangeNotification_ptr;
typedef const Poco::AutoPtr<Mantid::Kernel::ConfigServiceImpl::ValueChanged> &
ConfigValChangeNotification_ptr;
} // namespace Kernel
} // namespace Mantid
......
......@@ -81,8 +81,8 @@ public:
*/
virtual void setPropertiesWithSimpleString(
const std::string &propertiesString,
const std::unordered_set<std::string> &ignoreProperties =
std::unordered_set<std::string>()) = 0;
const std::unordered_set<std::string> &
ignoreProperties = std::unordered_set<std::string>()) = 0;
/** Sets all the declared properties from a string.
@param propertiesJson :: A string of name = value pairs formatted
......@@ -92,8 +92,8 @@ public:
*/
virtual void
setProperties(const std::string &propertiesJson,
const std::unordered_set<std::string> &ignoreProperties =
std::unordered_set<std::string>()) = 0;
const std::unordered_set<std::string> &
ignoreProperties = std::unordered_set<std::string>()) = 0;
/** Sets all the declared properties from a json object
@param jsonValue :: A json name value pair collection
......@@ -102,8 +102,8 @@ public:
*/
virtual void
setProperties(const ::Json::Value &jsonValue,
const std::unordered_set<std::string> &ignoreProperties =
std::unordered_set<std::string>()) = 0;
const std::unordered_set<std::string> &
ignoreProperties = std::unordered_set<std::string>()) = 0;
/** Sets property value from a string
@param name :: Property name
......
......@@ -242,8 +242,7 @@ ConfigServiceImpl::ConfigServiceImpl()
<< " revision " << MantidVersion::revision() << std::endl;
g_log.information() << "running on " << getComputerName() << " starting "
<< DateAndTime::getCurrentTime().toFormattedString(
"%Y-%m-%dT%H:%MZ")
<< "\n";
"%Y-%m-%dT%H:%MZ") << "\n";
g_log.information() << "Properties file(s) loaded: " << propertiesFilesList
<< std::endl;
#ifndef MPI_BUILD // There is no logging to file by default in MPI build
......@@ -631,22 +630,18 @@ void ConfigServiceImpl::createUserPropertiesFile() const {
std::fstream::out);
filestr << "# This file can be used to override any properties for this "
"installation."
<< std::endl;
"installation." << std::endl;
filestr << "# Any properties found in this file will override any that are "
"found in the Mantid.Properties file"
<< std::endl;
"found in the Mantid.Properties file" << std::endl;
filestr << "# As this file will not be replaced with futher installations "
"of Mantid it is a safe place to put "
<< std::endl;
"of Mantid it is a safe place to put " << std::endl;
filestr << "# properties that suit your particular installation."
<< std::endl;
filestr << "#" << std::endl;
filestr << "# See here for a list of possible options:" << std::endl;
filestr << "# "
"http://www.mantidproject.org/"
"Properties_File#Mantid.User.Properties"
<< std::endl;
"Properties_File#Mantid.User.Properties" << std::endl;
filestr << std::endl;
filestr << "##" << std::endl;
filestr << "## GENERAL" << std::endl;
......@@ -679,21 +674,18 @@ void ConfigServiceImpl::createUserPropertiesFile() const {
filestr << std::endl;
filestr << "## Sets the Q.convention" << std::endl;
filestr << "## Set to Crystallography for kf-ki instead of default "
"Inelastic which is ki-kf"
<< std::endl;
"Inelastic which is ki-kf" << std::endl;
filestr << "#Q.convention=Crystallography" << std::endl;
filestr << "##" << std::endl;
filestr << "## DIRECTORIES" << std::endl;
filestr << "##" << std::endl;
filestr << std::endl;
filestr << "## Sets a list of directories (separated by semi colons) to "
"search for data"
<< std::endl;
"search for data" << std::endl;
filestr << "#datasearch.directories=../data;../isis/data" << std::endl;
filestr << std::endl;
filestr << "## Set a list (separated by semi colons) of directories to "
"look for additional Python scripts"
<< std::endl;
"look for additional Python scripts" << std::endl;
filestr << "#pythonscripts.directories=../scripts;../docs/MyScripts"
<< std::endl;
filestr << std::endl;
......@@ -734,8 +726,7 @@ void ConfigServiceImpl::createUserPropertiesFile() const {
filestr << "#MantidOptions.ReusePlotInstances=Off" << std::endl;
filestr << std::endl;
filestr << "## Uncomment to disable use of OpenGL to render unwrapped "
"instrument views"
<< std::endl;
"instrument views" << std::endl;
filestr << "#MantidOptions.InstrumentView.UseOpenGL=Off" << std::endl;
filestr.close();
......
......@@ -503,7 +503,7 @@ size_t MemoryStats::getPeakRSS() const {
GetProcessMemoryInfo(GetCurrentProcess(), &info, sizeof(info));
return (size_t)info.PeakWorkingSetSize;
#elif (defined(_AIX) || defined(__TOS__AIX__)) || \
#elif(defined(_AIX) || defined(__TOS__AIX__)) || \
(defined(__sun__) || defined(__sun) || \
defined(sun) && (defined(__SVR4) || defined(__svr4__)))
/* AIX and Solaris ------------------------------------------ */
......
......@@ -1076,14 +1076,12 @@ template <typename TYPE> TYPE TimeSeriesProperty<TYPE>::lastValue() const {
template <typename TYPE> TYPE TimeSeriesProperty<TYPE>::minValue() const {
return std::min_element(m_values.begin(), m_values.end(),
TimeValueUnit<TYPE>::valueCmp)
->value();
TimeValueUnit<TYPE>::valueCmp)->value();
}
template <typename TYPE> TYPE TimeSeriesProperty<TYPE>::maxValue() const {
return std::max_element(m_values.begin(), m_values.end(),
TimeValueUnit<TYPE>::valueCmp)
->value();
TimeValueUnit<TYPE>::valueCmp)->value();
}
/// Returns the number of values at UNIQUE time intervals in the time series
......
......@@ -76,17 +76,15 @@ public:
svc.notificationCenter.removeObserver(observer);
}
void handlePreDeleteNotification(
const Poco::AutoPtr<FakeDataService::PreDeleteNotification>
&notification) {
void handlePreDeleteNotification(const Poco::AutoPtr<
FakeDataService::PreDeleteNotification> &notification) {
TS_ASSERT_EQUALS(notification->objectName(), "one");
TS_ASSERT_EQUALS(*notification->object(), 1);
++notificationFlag;
}
void handlePostDeleteNotification(
const Poco::AutoPtr<FakeDataService::PostDeleteNotification>
&notification) {
void handlePostDeleteNotification(const Poco::AutoPtr<
FakeDataService::PostDeleteNotification> &notification) {
TS_ASSERT_EQUALS(notification->objectName(), "one");
++notificationFlag;
}
......
......@@ -358,8 +358,7 @@ public:
dbuf.toWrite(bigData[indexToRemove[i]]);
}
std::cout << "Finished DiskBuffer inserting/deleting performance test, 1 "
"thread in "
<< clock.elapsed() << " sec\n";
"thread in " << clock.elapsed() << " sec\n";
TS_ASSERT_EQUALS(dbuf.getWriteBufferUsed(), BIG_NUM + DATA_SIZE);
// cleanup memory
......@@ -399,8 +398,7 @@ public:
dbuf.toWrite(bigData[indexToRemove[i]]);
}
std::cout << "Finished DiskBuffer inserting/deleting performance test, "
"multithread in "
<< clock.elapsed() << " sec\n";
"multithread in " << clock.elapsed() << " sec\n";
TS_ASSERT_EQUALS(dbuf.getWriteBufferUsed(), BIG_NUM + DATA_SIZE);
// cleanup memory
......
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