From 5dc579f15d0a7c745507d217df42431ddc8d322a Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sun, 18 Jun 2006 20:00:00 +0000 Subject: CarpetIOScalar: Produce fewer comments with IO::out_fileinfo="none" When IO::out_fileinfo="none", avoid all comment lines except for two describing which thorn produced a file. darcs-hash:20060618200009-dae7b-2a2c124cdb17d046d9d9225c6563d836f9e0a88a.gz --- Carpet/CarpetIOScalar/src/ioscalar.cc | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'Carpet/CarpetIOScalar') diff --git a/Carpet/CarpetIOScalar/src/ioscalar.cc b/Carpet/CarpetIOScalar/src/ioscalar.cc index 739360a78..ad5c9a1a4 100644 --- a/Carpet/CarpetIOScalar/src/ioscalar.cc +++ b/Carpet/CarpetIOScalar/src/ioscalar.cc @@ -275,18 +275,20 @@ namespace CarpetIOScalar { if (do_truncate.at(n) and IO_TruncateOutputFiles (cctkGH)) { file.open (filename, ios::out | ios::trunc); { + bool want_labels = false; bool want_date = false; bool want_parfilename = false; bool want_other = false; if (CCTK_EQUALS (out_fileinfo, "none")) { // do nothing } else if (CCTK_EQUALS (out_fileinfo, "axis labels")) { - // do nothing + want_labels = true; } else if (CCTK_EQUALS (out_fileinfo, "creation date")) { want_date = true; } else if (CCTK_EQUALS (out_fileinfo, "parameter filename")) { want_parfilename = true; } else if (CCTK_EQUALS (out_fileinfo, "all")) { + want_labels = true; want_date = true; want_parfilename = true; want_other = true; @@ -330,19 +332,21 @@ namespace CarpetIOScalar { } } file << "#" << endl; - } - file << "# " << varname << " (" << alias << ")" << endl; - file << "# 1:iteration 2:time 3:data" << endl; - int col = 3; - if (one_file_per_group) { - file << "# data columns:"; - int const firstvar = CCTK_FirstVarIndexI(group); - int const numvars = CCTK_NumVarsInGroupI(group); - for (int n=firstvar; n