4 |
|
#define _FILE_OFFSET_BITS 64 |
5 |
|
#include <iostream> |
6 |
|
#include <fstream> |
7 |
< |
|
7 |
> |
#include <string> |
8 |
|
#include <string.h> |
9 |
|
#include <stdio.h> |
10 |
|
#include <stdlib.h> |
20 |
|
|
21 |
|
using namespace std; |
22 |
|
|
23 |
– |
class FilePos{ |
24 |
– |
|
25 |
– |
public: |
26 |
– |
FilePos(){ |
27 |
– |
myPos = NULL; |
28 |
– |
next = NULL; |
29 |
– |
} |
30 |
– |
FilePos( fpos_t* thePos ) { |
31 |
– |
myPos = thePos; |
32 |
– |
next = NULL; |
33 |
– |
} |
34 |
– |
~FilePos(){ |
35 |
– |
if( next != NULL ) delete next; |
36 |
– |
if( myPos != NULL ) delete myPos; |
37 |
– |
} |
38 |
– |
|
39 |
– |
void add( fpos_t *thePos ){ |
40 |
– |
if( next != NULL ) |
41 |
– |
next->add( thePos ); |
42 |
– |
else |
43 |
– |
next = new FilePos( thePos ); |
44 |
– |
} |
45 |
– |
|
46 |
– |
FilePos &operator=(fpos_t *thePos){ myPos = thePos; return *this; } |
47 |
– |
|
48 |
– |
void setPos( fpos_t *thePos ){ myPos = thePos; } |
49 |
– |
fpos_t *getPos( void ){ return myPos; } |
50 |
– |
|
51 |
– |
FilePos* getNext( void ) { return next; } |
52 |
– |
private: |
53 |
– |
|
54 |
– |
fpos_t *myPos; |
55 |
– |
FilePos* next; |
56 |
– |
|
57 |
– |
}; |
58 |
– |
|
23 |
|
class DumpWriter{ |
24 |
|
|
25 |
|
public: |
55 |
|
~StatWriter(); |
56 |
|
|
57 |
|
void writeStat( double currentTime ); |
58 |
+ |
void writeRaw( double currentTime ); |
59 |
|
|
60 |
|
private: |
61 |
|
|
62 |
|
SimInfo* entry_plug; |
63 |
|
ofstream outFile; |
64 |
+ |
ofstream rawFile; |
65 |
|
char outName[500]; |
66 |
+ |
char rawName[500]; |
67 |
|
Thermo* tStats; |
68 |
|
|
69 |
|
}; |
96 |
|
void getNextFrame() {} |
97 |
|
void readFrame(SimInfo* the_simnfo, int whichFrame); |
98 |
|
|
99 |
+ |
#ifdef IS_MPI |
100 |
+ |
void anonymousNodeDie( void ); |
101 |
+ |
void nodeZeroError( void ); |
102 |
+ |
#endif |
103 |
|
private: |
104 |
|
|
105 |
|
void readSet( int whichFrame ); |
106 |
< |
char* parseDumpLine(char* line, int atomIndex); |
107 |
< |
char* parseCommentLine(char* line, double &time, double boxMat[9] ); |
106 |
> |
char* parseDumpLine(char* readLine, StuntDouble* sd); |
107 |
> |
char* parseCommentLine(char* readLine, SimInfo* entry_plug); |
108 |
|
FILE *inFile; |
109 |
< |
char inName[500]; |
109 |
> |
string inFileName; |
110 |
|
bool isScanned; |
140 |
– |
int nFrames; |
111 |
|
|
112 |
< |
FilePos** frameStart; |
143 |
< |
FilePos* headFP; |
144 |
< |
|
112 |
> |
vector<fpos_t*> framePos; |
113 |
|
SimInfo *simnfo; |
114 |
|
}; |
115 |
|
|