|
[yoda-svn] r454 - trunk/srcblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed May 2 14:09:12 BST 2012
Author: hoeth Date: Wed May 2 14:09:12 2012 New Revision: 454 Log: use scientific notation in AIDA files Modified: trunk/src/WriterAIDA.cc Modified: trunk/src/WriterAIDA.cc ============================================================================== --- trunk/src/WriterAIDA.cc Wed May 2 13:57:48 2012 (r453) +++ trunk/src/WriterAIDA.cc Wed May 2 14:09:12 2012 (r454) @@ -7,6 +7,8 @@ #include "YODA/Utils/StringUtils.h" #include <iostream> +#include <iomanip> + using namespace std; namespace YODA { @@ -40,6 +42,10 @@ void WriterAIDA::writeScatter2D(std::ostream& os, const Scatter2D& s) { + ios_base::fmtflags oldflags = os.flags(); + const int precision = 7; + os << scientific << showpoint << setprecision(precision); + string name = ""; string path = "/"; const size_t slashpos = s.path().rfind("/"); @@ -72,6 +78,8 @@ } os << " </dataPointSet>\n"; os << flush; + + os.flags(oldflags); }
More information about the yoda-svn mailing list |