]> git.treefish.org Git - phys/latlib.git/blobdiff - writeout.h
Added writeoutdir sequencing for equal timestamps.
[phys/latlib.git] / writeout.h
index 4df290d78f5c119c4ee0b4092d23656b61eec1d5..fc48c16ae8ec48b6d4a0210c733b7b07bd487b8a 100644 (file)
@@ -3,25 +3,33 @@
 
 #include <ostream>
 #include <fstream>
 
 #include <ostream>
 #include <fstream>
+#include <map>
 
 using namespace std;
 
 using namespace std;
-
 class writeout
 {
  public:
   writeout(const string& wdir, const string& signature, 
 class writeout
 {
  public:
   writeout(const string& wdir, const string& signature, 
-          const int& rank, const int& procs, const long& timestamp=0);
-  ostream *out;
+          const int& rank, const int& procs);
+  void newsub(string subname);
+  map<string,ostream*> out;
+  ostream *log;
   ~writeout();
 
  private:
   ~writeout();
 
  private:
-  ofstream of;
-  streambuf *buf;
+  map<string,ofstream*> of;
+  map<string,streambuf*> buf;
+  ofstream logf;
+  streambuf *logbuf;
   string fulldir;
   char cRank[20];
   string fulldir;
   char cRank[20];
-  string tstamp(const long& timestamp);
+  int rank;
   int numprocs;
   int numprocs;
-  string getdatfile();
+  string getdatfile(string subname);
+  string timestring();
+  string signature;
+  static string longToStr (long arg);
 };
 
 #endif
 };
 
 #endif