]> git.treefish.org Git - phys/latlib.git/blobdiff - writeout.h
dynamically allocating manymeans in jackknife methods to allow for large number of...
[phys/latlib.git] / writeout.h
index 48057d4d506e3b355a7e849440be6cfd615e2488..67c07c8d35a6e1c1fe48d832b7e395bc29ac2c73 100644 (file)
@@ -3,25 +3,33 @@
 
 #include <ostream>
 #include <fstream>
+#include <map>
 
 using namespace std;
-
 class writeout
 {
  public:
   writeout(const string& wdir, const string& signature, 
-          const int& rank, const int& procs);
-  ostream *out;
+          const int& rank, const int& procs, const long& timestamp=0);
+  void newsub(string subname);
+  map<string,ostream*> out;
+  ostream *log;
   ~writeout();
 
  private:
-  ofstream of;
-  streambuf *buf;
+  map<string,ofstream*> of;
+  map<string,streambuf*> buf;
+  ofstream logf;
+  streambuf *logbuf;
   string fulldir;
   char cRank[20];
-  string tstamp();
+  int rank;
+  string tstamp(const long& timestamp);
   int numprocs;
-  string getdatfile();
+  string getdatfile(string subname);
+  string timestring();
+  string signature;
 };
 
 #endif