]> git.treefish.org Git - phys/latlib.git/blob - writeout.h
...
[phys/latlib.git] / writeout.h
1 #ifndef WRITEOUT_H
2 #define WRITEOUT_H
3
4 #include <ostream>
5 #include <fstream>
6 #include <map>
7
8 using namespace std;
9  
10 class writeout
11 {
12  public:
13   writeout(const string& wdir, const string& signature, 
14            const int& rank, const int& procs, const long& timestamp=0);
15   void newsub(string subname);
16   map<string,ostream*> out;
17   ostream *log;
18   ~writeout();
19
20  private:
21   map<string,ofstream*> of;
22   map<string,streambuf*> buf;
23   ofstream logf;
24   streambuf *logbuf;
25   string fulldir;
26   char cRank[20];
27   int rank;
28   string tstamp(const long& timestamp);
29   int numprocs;
30   string getdatfile(string subname);
31   string timestring();
32   string signature;
33 };
34
35 #endif