From 34e462e05ff9299e65697e66cd1ebaf84fb4b7ca Mon Sep 17 00:00:00 2001 From: "Bastian M. Wojek" Date: Thu, 3 Mar 2011 13:49:22 +0000 Subject: [PATCH] Put in line the time-resolution output of single-histogram and asymmetry data. Now both have a line break at the end--before this has only been true for the asymmetry data. (If the line break is not needed it should be consistently removed and replaced by a cout.flush() followed by a line break when musrview is terminated.) --- src/classes/PRunMuMinus.cpp | 2 +- src/classes/PRunSingleHisto.cpp | 2 +- src/musrview.cpp | 22 +++++++++++----------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/classes/PRunMuMinus.cpp b/src/classes/PRunMuMinus.cpp index e8f14726..15df0dfe 100644 --- a/src/classes/PRunMuMinus.cpp +++ b/src/classes/PRunMuMinus.cpp @@ -151,7 +151,7 @@ Bool_t PRunMuMinus::PrepareData() { Bool_t success = true; - cout << endl << "in PRunMuMinus::PrepareData(): will feed fData"; + cout << endl << "in PRunMuMinus::PrepareData(): will feed fData" << endl; return success; } diff --git a/src/classes/PRunSingleHisto.cpp b/src/classes/PRunSingleHisto.cpp index ff70aaf2..281891b8 100644 --- a/src/classes/PRunSingleHisto.cpp +++ b/src/classes/PRunSingleHisto.cpp @@ -513,7 +513,7 @@ Bool_t PRunSingleHisto::PrepareData() // keep the time resolution in (us) fTimeResolution = runData->GetTimeResolution()/1.0e3; cout.precision(8); - cout << endl << ">> PRunSingleHisto::PrepareData(): time resolution=" << fixed << runData->GetTimeResolution() << "(ns)"; + cout << endl << ">> PRunSingleHisto::PrepareData(): time resolution=" << fixed << runData->GetTimeResolution() << "(ns)" << endl; if (fHandleTag == kFit) success = PrepareFitData(runData, histoNo[0]); diff --git a/src/musrview.cpp b/src/musrview.cpp index 677e684f..b6df2fcc 100644 --- a/src/musrview.cpp +++ b/src/musrview.cpp @@ -112,7 +112,7 @@ int main(int argc, char *argv[]) } else { // check if filename has extension msr or mlog if (!strstr(argv[1], ".msr") && !strstr(argv[1], ".mlog")) { - cout << endl << "**ERROR** " << argv[1] << " is not a msr/mlog-file, nor is it a supported graphics extension." << endl; + cerr << endl << "**ERROR** " << argv[1] << " is not a msr/mlog-file, nor is it a supported graphics extension." << endl; show_syntax = true; } else { strcpy(fileName, argv[1]); @@ -127,7 +127,7 @@ int main(int argc, char *argv[]) strcpy(graphicsExtension, argv[1]+2); // check if filename has extension msr or mlog if (!strstr(argv[2], ".msr") && !strstr(argv[2], ".mlog")) { - cout << endl << "**ERROR** " << argv[2] << " is not a msr/mlog-file, nor is it a supported graphics extension." << endl; + cerr << endl << "**ERROR** " << argv[2] << " is not a msr/mlog-file, nor is it a supported graphics extension." << endl; show_syntax = true; } else { strcpy(fileName, argv[2]); @@ -139,7 +139,7 @@ int main(int argc, char *argv[]) strcpy(graphicsExtension, argv[2]+2); // check if filename has extension msr or mlog if (!strstr(argv[1], ".msr") && !strstr(argv[1], ".mlog")) { - cout << endl << "**ERROR** " << argv[1] << " is not a msr/mlog-file, nor is it a supported graphics extension." << endl; + cerr << endl << "**ERROR** " << argv[1] << " is not a msr/mlog-file, nor is it a supported graphics extension." << endl; show_syntax = true; } else { strcpy(fileName, argv[1]); @@ -200,13 +200,13 @@ int main(int argc, char *argv[]) if (status != PMUSR_SUCCESS) { switch (status) { case PMUSR_MSR_FILE_NOT_FOUND: - cout << endl << "**ERROR** couldn't find '" << fileName << "'" << endl << endl; + cerr << endl << "**ERROR** couldn't find '" << fileName << "'" << endl << endl; break; case PMUSR_MSR_SYNTAX_ERROR: - cout << endl << "**SYNTAX ERROR** in file " << fileName << ", full stop here." << endl << endl; + cerr << endl << "**SYNTAX ERROR** in file " << fileName << ", full stop here." << endl << endl; break; default: - cout << endl << "**UNKNOWN ERROR** when trying to read the msr-file" << endl << endl; + cerr << endl << "**UNKNOWN ERROR** when trying to read the msr-file" << endl << endl; break; } return status; @@ -240,7 +240,7 @@ int main(int argc, char *argv[]) success = dataHandler->IsAllDataAvailable(); if (!success) { - cout << endl << "**ERROR** Couldn't read all data files, will quit ..." << endl; + cerr << endl << "**ERROR** Couldn't read all data files, will quit ..." << endl; } // generate the necessary histogramms for the view @@ -260,8 +260,8 @@ int main(int argc, char *argv[]) if (runPresent) { success = runListCollection->Add(i, kView); if (!success) { - cout << endl << "**ERROR** Couldn't handle run no " << i << " "; - cout << (*msrHandler->GetMsrRunList())[i].GetRunName()->Data(); + cerr << endl << "**ERROR** Couldn't handle run no " << i << " "; + cerr << (*msrHandler->GetMsrRunList())[i].GetRunName()->Data(); break; } } @@ -295,8 +295,8 @@ int main(int argc, char *argv[]) 10+i*100, 10+i*100, 800, 600, graphicsOutput); if (!musrCanvas->IsValid()) { - cout << endl << "**SEVERE ERROR** Couldn't invoke all necessary objects, will quit."; - cout << endl; + cerr << endl << "**SEVERE ERROR** Couldn't invoke all necessary objects, will quit."; + cerr << endl; ok = false; break; }