diff --git a/FWCore/MessageService/bin/Standalone.cpp b/FWCore/MessageService/bin/Standalone.cpp index 098f795cf2803..cff5c1d538299 100644 --- a/FWCore/MessageService/bin/Standalone.cpp +++ b/FWCore/MessageService/bin/Standalone.cpp @@ -9,6 +9,7 @@ ----------------------------------------------------------------------*/ +#include #include #include #include @@ -41,7 +42,7 @@ void DoMyStuff() { // be substantially more complex. This example is about as simple // as can be. - double d = 3.14159265357989; + double d = M_PI; edm::LogWarning("cat_A") << "Test of std::setprecision(p):" << " Pi with precision 12 is " << std::setprecision(12) << d; diff --git a/FWCore/MessageService/test/UnitTestClient_C.cc b/FWCore/MessageService/test/UnitTestClient_C.cc index d188740577211..f405b68c78688 100644 --- a/FWCore/MessageService/test/UnitTestClient_C.cc +++ b/FWCore/MessageService/test/UnitTestClient_C.cc @@ -1,11 +1,12 @@ +#include +#include + #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/global/EDAnalyzer.h" #include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/global/EDAnalyzer.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Utilities/interface/StreamID.h" -#include - namespace edmtest { class UnitTestClient_C : public edm::global::EDAnalyzer<> { @@ -21,7 +22,7 @@ namespace edmtest { edm::LogWarning("cat_A") << "Test of std::setw(n) and std::setfill('c'):" << "The following should read ++abcdefg $$$12:" << std::setfill('+') << std::setw(9) << "abcdefg" << std::setw(5) << std::setfill('$') << 12; - double d = 3.14159265357989; + double d = M_PI; edm::LogWarning("cat_A") << "Test of std::setprecision(p):" << "Pi with precision 12 is" << std::setprecision(12) << d; edm::LogWarning("cat_A") << "Test of spacing:" diff --git a/FWCore/MessageService/test/UnitTestClient_G.cc b/FWCore/MessageService/test/UnitTestClient_G.cc index 0b54dbd5a7d71..c36d8c0e6419a 100644 --- a/FWCore/MessageService/test/UnitTestClient_G.cc +++ b/FWCore/MessageService/test/UnitTestClient_G.cc @@ -1,12 +1,13 @@ +#include +#include +#include + #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/global/EDAnalyzer.h" #include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/global/EDAnalyzer.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Utilities/interface/StreamID.h" -#include -#include - namespace edmtest { class UnitTestClient_G : public edm::global::EDAnalyzer<> { @@ -21,7 +22,7 @@ namespace edmtest { std::cerr << "??? It appears that Message Processing is not Set Up???\n\n"; } - double d = 3.14159265357989; + double d = M_PI; edm::LogWarning("cat_A") << "Test of std::setprecision(p):" << " Pi with precision 12 is " << std::setprecision(12) << d; diff --git a/FWCore/MessageService/test/unit_test_outputs/infos.log b/FWCore/MessageService/test/unit_test_outputs/infos.log index ad901a6146258..3a90f780effd0 100644 --- a/FWCore/MessageService/test/unit_test_outputs/infos.log +++ b/FWCore/MessageService/test/unit_test_outputs/infos.log @@ -1,6 +1,6 @@ Begin processing the 1st record. Run 1, Event 1, LumiSection 1 on stream 0 at {Timestamp} %MSG-w cat_A: UnitTestClient_G:sendSomeMessages Run: 1 Event: 1 -Test of std::setprecision(p): Pi with precision 12 is 3.14159265358 +Test of std::setprecision(p): Pi with precision 12 is 3.14159265359 %MSG %MSG-i cat_B: UnitTestClient_G:sendSomeMessages Run: 1 Event: 1 Emit Info level message 1 diff --git a/FWCore/MessageService/test/unit_test_outputs/u10_warnings.log b/FWCore/MessageService/test/unit_test_outputs/u10_warnings.log index 5a1ffffbaa77a..ffd51189ddeaa 100644 --- a/FWCore/MessageService/test/unit_test_outputs/u10_warnings.log +++ b/FWCore/MessageService/test/unit_test_outputs/u10_warnings.log @@ -5,7 +5,7 @@ Test of std::hex:145in hex is91 Test of std::setw(n) and std::setfill('c'):The following should read ++abcdefg $$$12:++abcdefg$$$12 %MSG %MSG-w cat_A: UnitTestClient_C:sendSomeMessages Run: 1 Event: 1 -Test of std::setprecision(p):Pi with precision 12 is3.14159265358 +Test of std::setprecision(p):Pi with precision 12 is3.14159265359 %MSG %MSG-w cat_A: UnitTestClient_C:sendSomeMessages Run: 1 Event: 1 Test of spacing:The following should read a b c dd:abcdd @@ -17,7 +17,7 @@ Test of format hex: 145 in hex is 91 Test of format fill and width:The following should read ++abcdefg $$$12: ++abcdefg $$$12 %MSG %MSG-w cat_A: UnitTestClient_C:sendSomeMessages Run: 1 Event: 1 -Test of format precision:Pi with precision 12 is 3.14159265358 +Test of format precision:Pi with precision 12 is 3.14159265359 %MSG %MSG-w cat_A: UnitTestClient_C:sendSomeMessages Run: 1 Event: 1 Test of format spacing: The following should read a b cc: a b cc diff --git a/FWCore/MessageService/test/unit_test_outputs/u20_cerr.log b/FWCore/MessageService/test/unit_test_outputs/u20_cerr.log index d8a139019a5db..b0c67a9be6e9a 100644 --- a/FWCore/MessageService/test/unit_test_outputs/u20_cerr.log +++ b/FWCore/MessageService/test/unit_test_outputs/u20_cerr.log @@ -1,6 +1,6 @@ Begin processing the 1st record. Run 1, Event 1, LumiSection 1 on stream 0 at {Timestamp} %MSG-w cat_A: UnitTestClient_G:sendSomeMessages Run: 1 Event: 1 -Test of std::setprecision(p): Pi with precision 12 is 3.14159265358 +Test of std::setprecision(p): Pi with precision 12 is 3.14159265359 %MSG %MSG-w cat_C: UnitTestClient_G:sendSomeMessages Run: 1 Event: 1 Emit Warning level message 1 diff --git a/FWCore/MessageService/test/unit_test_outputs/u6_warnings.log b/FWCore/MessageService/test/unit_test_outputs/u6_warnings.log index 5a1ffffbaa77a..ffd51189ddeaa 100644 --- a/FWCore/MessageService/test/unit_test_outputs/u6_warnings.log +++ b/FWCore/MessageService/test/unit_test_outputs/u6_warnings.log @@ -5,7 +5,7 @@ Test of std::hex:145in hex is91 Test of std::setw(n) and std::setfill('c'):The following should read ++abcdefg $$$12:++abcdefg$$$12 %MSG %MSG-w cat_A: UnitTestClient_C:sendSomeMessages Run: 1 Event: 1 -Test of std::setprecision(p):Pi with precision 12 is3.14159265358 +Test of std::setprecision(p):Pi with precision 12 is3.14159265359 %MSG %MSG-w cat_A: UnitTestClient_C:sendSomeMessages Run: 1 Event: 1 Test of spacing:The following should read a b c dd:abcdd @@ -17,7 +17,7 @@ Test of format hex: 145 in hex is 91 Test of format fill and width:The following should read ++abcdefg $$$12: ++abcdefg $$$12 %MSG %MSG-w cat_A: UnitTestClient_C:sendSomeMessages Run: 1 Event: 1 -Test of format precision:Pi with precision 12 is 3.14159265358 +Test of format precision:Pi with precision 12 is 3.14159265359 %MSG %MSG-w cat_A: UnitTestClient_C:sendSomeMessages Run: 1 Event: 1 Test of format spacing: The following should read a b cc: a b cc diff --git a/FWCore/MessageService/test/unit_test_outputs/warnings.log b/FWCore/MessageService/test/unit_test_outputs/warnings.log index c2794bebaab60..012fbb6be81bc 100644 --- a/FWCore/MessageService/test/unit_test_outputs/warnings.log +++ b/FWCore/MessageService/test/unit_test_outputs/warnings.log @@ -1,5 +1,5 @@ %MSG-w cat_A: UnitTestClient_G:sendSomeMessages Run: 1 Event: 1 -Test of std::setprecision(p): Pi with precision 12 is 3.14159265358 +Test of std::setprecision(p): Pi with precision 12 is 3.14159265359 %MSG %MSG-w cat_C: UnitTestClient_G:sendSomeMessages Run: 1 Event: 1 Emit Warning level message 1