]> git.treefish.org Git - phys/latlib.git/blobdiff - writeout.h
added o815
[phys/latlib.git] / writeout.h
index 6c04ace3d0b653383fec54fb408572631a8ed24b..67c07c8d35a6e1c1fe48d832b7e395bc29ac2c73 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <ostream>
 #include <fstream>
 
 #include <ostream>
 #include <fstream>
+#include <map>
 
 using namespace std;
  
 
 using namespace std;
  
@@ -11,22 +12,24 @@ class writeout
  public:
   writeout(const string& wdir, const string& signature, 
           const int& rank, const int& procs, const long& timestamp=0);
  public:
   writeout(const string& wdir, const string& signature, 
           const int& rank, const int& procs, const long& timestamp=0);
-  ostream *out;
+  void newsub(string subname);
+  map<string,ostream*> out;
   ostream *log;
   ~writeout();
 
  private:
   ostream *log;
   ~writeout();
 
  private:
-  ofstream of;
+  map<string,ofstream*> of;
+  map<string,streambuf*> buf;
   ofstream logf;
   ofstream logf;
-  streambuf *buf;
   streambuf *logbuf;
   string fulldir;
   char cRank[20];
   streambuf *logbuf;
   string fulldir;
   char cRank[20];
+  int rank;
   string tstamp(const long& timestamp);
   int numprocs;
   string tstamp(const long& timestamp);
   int numprocs;
-  string getdatfile();
+  string getdatfile(string subname);
   string timestring();
   string timestring();
-  static bool DirectoryExists(const char* pzPath);
+  string signature;
 };
 
 #endif
 };
 
 #endif