Commit 68b7d9b0 authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Append endl to strings

parent 868fca56
......@@ -195,7 +195,7 @@ void AlgorithmHistory::printSelf(std::ostream &os, const int indent) const {
os << std::string(indent, ' ')
<< "Execution Date: " << m_executionDate.toFormattedString() << '\n';
os << std::string(indent, ' ')
<< "Execution Duration: " << m_executionDuration << " seconds" << '\n';
<< "Execution Duration: " << m_executionDuration << " seconds\n";
os << std::string(indent, ' ') << "Parameters:\n";
......
......@@ -814,7 +814,7 @@ ExperimentInfo::getInstrumentFilename(const std::string &instrumentName,
const std::string &date) {
if (date.empty()) {
// Just use the current date
g_log.debug() << "No date specified, using current date and time." << '\n';
g_log.debug() << "No date specified, using current date and time.\n";
const std::string now =
Kernel::DateAndTime::getCurrentTime().toISO8601String();
// Recursively call this method, but with both parameters.
......
......@@ -354,10 +354,10 @@ std::string Expression::GetOp(size_t i) {
void Expression::logPrint(const std::string &pads) const {
std::string myPads = pads + " ";
if (!m_terms.empty()) {
std::cerr << myPads << m_op << '[' << m_funct << ']' << "(" << '\n';
std::cerr << myPads << m_op << '[' << m_funct << ']' << "(\n";
for (const auto &term : m_terms)
term.logPrint(myPads);
std::cerr << myPads << ")" << '\n';
std::cerr << myPads << ")\n";
} else
std::cerr << myPads << m_op << m_funct << '\n';
}
......
......@@ -99,7 +99,7 @@ FileLoaderRegistryImpl::chooseLoader(const std::string &filename) const {
using Kernel::FileDescriptor;
using Kernel::NexusDescriptor;
m_log.debug() << "Trying to find loader for '" << filename << "'" << '\n';
m_log.debug() << "Trying to find loader for '" << filename << "'\n";
IAlgorithm_sptr bestLoader;
if (NexusDescriptor::isHDF(filename)) {
......
......@@ -93,9 +93,8 @@ void FrameworkManagerImpl::AsynchronousStartupTasks() {
if ((retVal == 1) && (updateInstrumentDefinitions == 1)) {
UpdateInstrumentDefinitions();
} else {
g_log.information()
<< "Instrument updates disabled - cannot update instrument definitions."
<< '\n';
g_log.information() << "Instrument updates disabled - cannot update "
"instrument definitions.\n";
}
int checkIfNewerVersionIsAvailable = 0;
......@@ -402,7 +401,7 @@ bool FrameworkManagerImpl::deleteWorkspace(const std::string &wsName) {
retVal = true;
} catch (Kernel::Exception::NotFoundError &) {
// workspace was not found
g_log.error() << "Workspace " << wsName << " could not be found." << '\n';
g_log.error() << "Workspace " << wsName << " could not be found.\n";
retVal = false;
}
return retVal;
......
......@@ -832,7 +832,7 @@ void IFunction::setMatrixWorkspace(
paramValue *= p.Eval();
g_log.debug() << "The FitParameter " << parameterName(i)
<< " = " << paramValue
<< " after result-unit convertion" << '\n';
<< " after result-unit convertion\n";
} catch (mu::Parser::exception_type &e) {
g_log.error()
<< "Cannot convert formula unit to workspace unit"
......
......@@ -148,7 +148,7 @@ double Run::getProtonCharge() const {
charge = m_manager.getProperty(PROTON_CHARGE_LOG_NAME);
} else {
g_log.warning() << PROTON_CHARGE_LOG_NAME
<< " log was not found. Proton Charge set to 0.0" << '\n';
<< " log was not found. Proton Charge set to 0.0\n";
}
return charge;
}
......
......@@ -110,7 +110,7 @@ void WorkspaceGroup::addWorkspace(Workspace_sptr workspace) {
if (it == m_workspaces.end()) {
m_workspaces.push_back(workspace);
} else {
g_log.warning() << "Workspace already exists in a WorkspaceGroup" << '\n';
g_log.warning() << "Workspace already exists in a WorkspaceGroup\n";
;
}
}
......
......@@ -99,7 +99,7 @@ void ApplyTransmissionCorrection::exec() {
det = inputWS->getDetector(i);
} catch (Exception::NotFoundError &) {
g_log.warning() << "Workspace index " << i
<< " has no detector assigned to it - discarding" << '\n';
<< " has no detector assigned to it - discarding'\n";
// Catch if no detector. Next line tests whether this happened - test
// placed
// outside here because Mac Intel compiler doesn't like 'continue' in a
......
......@@ -117,8 +117,7 @@ void AverageLogData::exec() {
if (protoncharge != 0) {
g_log.warning()
<< "Proton charge is 0. Average and standard deviations are NANs"
<< '\n';
<< "Proton charge is 0. Average and standard deviations are NANs\n";
}
g_log.debug() << "Sum = " << average << std::endl
<< "Sum squares = " << error << std::endl
......
......@@ -186,7 +186,7 @@ void ConvertAxesToRealSpace::exec() {
}
g_log.warning() << "Could not find detector for " << failedCount
<< " spectra, see the debug log for more details." << '\n';
<< " spectra, see the debug log for more details.\n";
// set up the axes on the output workspace
MantidVecPtr x, y;
......
......@@ -518,8 +518,8 @@ void ConvertUnits::convertViaTOF(Kernel::Unit_const_sptr fromUnit,
if (failedDetectorCount != 0) {
g_log.information() << "Unable to calculate sample-detector distance for "
<< failedDetectorCount << " spectra. Masking spectrum."
<< '\n';
<< failedDetectorCount
<< " spectra. Masking spectrum.\n";
}
if (m_inputEvents)
eventWS->clearMRU();
......
......@@ -133,8 +133,7 @@ void CopyInstrumentParameters::checkProperties() {
if (baseInstRec != baseInstGiv) {
m_different_instrument_sp = true;
g_log.warning() << "The base instrument in the output workspace is not the "
"same as the base instrument in the input workspace."
<< '\n';
"same as the base instrument in the input workspace.\n";
}
}
......
......@@ -177,8 +177,7 @@ void CorrectKiKf::exec() {
PARALLEL_CHECK_INTERUPT_REGION
if (negativeEnergyWarning)
g_log.information() << "Ef <= 0 or Ei <= 0 in at least one spectrum!!!!"
<< '\n';
g_log.information() << "Ef <= 0 or Ei <= 0 in at least one spectrum!!!!\n";
if ((negativeEnergyWarning) && (efixedProp == EMPTY_DBL()))
g_log.information() << "Try to set fixed energy\n";
this->setProperty("OutputWorkspace", outputWS);
......
......@@ -76,8 +76,7 @@ void CreateFlatEventWorkspace::exec() {
double dataMin, dataMax;
inputWS->getEventXMinMax(dataMin, dataMax);
g_log.debug() << "Data Range (" << dataMin << " < x < " << dataMax << ")"
<< '\n';
g_log.debug() << "Data Range (" << dataMin << " < x < " << dataMax << ")\n";
// How many times do we need to replicate the extracted background region in
// order to fill up
......
......@@ -504,8 +504,7 @@ MatrixWorkspace_sptr DetectorDiagnostic::integrateSpectra(
MatrixWorkspace_sptr finalOutputW = outputW;
if (outputWorkspace2D &&
boost::dynamic_pointer_cast<EventWorkspace>(outputW)) {
g_log.debug() << "Converting output Event Workspace into a Workspace2D."
<< '\n';
g_log.debug() << "Converting output Event Workspace into a Workspace2D.\n";
childAlg = createChildAlgorithm("ConvertToMatrixWorkspace", t0, t1);
childAlg->setProperty("InputWorkspace", outputW);
childAlg->executeAsChildAlg();
......
......@@ -124,7 +124,7 @@ void DiffractionFocussing::exec() {
++discarded;
}
g_log.warning() << "Discarded " << discarded
<< " spectra that were not assigned to any group" << '\n';
<< " spectra that were not assigned to any group\n";
// Running GroupDetectors leads to a load of redundant spectra
// Create a new workspace that's the right size for the meaningful spectra and
......
......@@ -107,8 +107,7 @@ void DiffractionFocussing2::exec() {
Axis *axis = m_matrixInputW->getAxis(0);
std::string unitid = axis->unit()->unitID();
if (unitid != "dSpacing" && unitid != "MomentumTransfer" && unitid != "TOF") {
g_log.error() << "UnitID " << unitid << " is not a supported spacing"
<< '\n';
g_log.error() << "UnitID " << unitid << " is not a supported spacing\n";
throw new std::invalid_argument("Workspace Invalid Spacing/UnitID");
}
// --- Do we need to read the grouping workspace? ----
......
......@@ -137,7 +137,7 @@ void EQSANSTofStructure::execEvent(
det = inputWS->getDetector(ispec);
} catch (Exception::NotFoundError &) {
g_log.warning() << "Workspace index " << ispec
<< " has no detector assigned to it - discarding" << '\n';
<< " has no detector assigned to it - discarding\n";
// 'continue' statement moved outside catch block because Mac Intel
// compiler has a problem with it being here in an openmp block.
}
......@@ -453,8 +453,7 @@ double EQSANSTofStructure::getTofOffset(EventWorkspace_const_sptr inputWS,
frame_tof0 = frame_srcpulse_wl_1 / 3.9560346 * source_to_detector;
g_log.information() << "Frame width " << tmp_frame_width << '\n';
g_log.information() << "TOF offset = " << frame_tof0 << " microseconds"
<< '\n';
g_log.information() << "TOF offset = " << frame_tof0 << " microseconds\n";
g_log.information() << "Band defined by T1-T4 " << frame_wl_1 << " "
<< frame_wl_2;
if (frame_skipping)
......@@ -462,8 +461,7 @@ double EQSANSTofStructure::getTofOffset(EventWorkspace_const_sptr inputWS,
<< '\n';
else
g_log.information() << '\n';
g_log.information() << "Chopper Actual Phase Lambda1 Lambda2"
<< '\n';
g_log.information() << "Chopper Actual Phase Lambda1 Lambda2\n";
for (int i = 0; i < 4; i++)
g_log.information() << i << " " << chopper_actual_phase[i] << " "
<< chopper_wl_1[i] << " " << chopper_wl_2[i] << '\n';
......
......@@ -120,8 +120,7 @@ void FindCenterOfMassPosition::exec() {
det = inputWS->getDetector(i);
} catch (Exception::NotFoundError &) {
g_log.warning() << "Workspace index " << i
<< " has no detector assigned to it - discarding"
<< '\n';
<< " has no detector assigned to it - discarding\n";
continue;
}
// If this detector is masked, skip to the next one
......@@ -164,9 +163,8 @@ void FindCenterOfMassPosition::exec() {
double radius_y = std::min((position_y - ymin0), (ymax0 - position_y));
if (!direct_beam && (radius_x <= beam_radius || radius_y <= beam_radius)) {
g_log.error()
<< "Center of mass falls within the beam center area: stopping here"
<< '\n';
g_log.error() << "Center of mass falls within the beam center area: "
"stopping here\n";
break;
}
......@@ -196,8 +194,7 @@ void FindCenterOfMassPosition::exec() {
// Quit if we haven't converged after the maximum number of iterations.
if (++n_iteration > max_iteration) {
g_log.warning() << "More than " << max_iteration
<< " iteration to find beam center: stopping here"
<< '\n';
<< " iteration to find beam center: stopping here\n";
break;
}
......
Markdown is supported
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