Coverity fix restoring cout formatting flags
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jan 2013 10:52:04 +0000 (10:52 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jan 2013 10:52:04 +0000 (10:52 +0000)
ANALYSIS/AliAnalysisDataContainer.cxx

index 2c38d1e..4e36367 100644 (file)
@@ -626,12 +626,13 @@ void AliAnalysisFileDescriptor::SavePrimitive(std::ostream &out, Option_t *)
    out << "image        " << fImage << endl;
    out << "nreplicas    " << fNreplicas << endl;
    out << "openstamp    " << fOpenedAt << endl;
+   std::ios_base::fmtflags original_flags = out.flags();
    out << setiosflags(std::ios::fixed) << std::setprecision(3);
    out << "opentime     " << fOpenTime << endl;
    out << "runtime      " << fProcessingTime << endl;
    out << "filesize     " << fSize/megabyte << endl;
    out << "readsize     " << fReadBytes/megabyte << endl;
    out << "throughput   " << fThroughput << endl;
-   out << resetiosflags(std::ios::fixed);
+   out.flags(original_flags);
 }