| 1 | 
gezelter | 
2 | 
#ifndef _ZCONSREADER_H_
 | 
| 2 | 
  | 
  | 
#define _ZCONSREADER_H_
 | 
| 3 | 
  | 
  | 
 | 
| 4 | 
  | 
  | 
#include <fstream>
 | 
| 5 | 
  | 
  | 
#include <string>
 | 
| 6 | 
  | 
  | 
#include <vector>
 | 
| 7 | 
  | 
  | 
 | 
| 8 | 
  | 
  | 
#include "Integrator.hpp"
 | 
| 9 | 
  | 
  | 
#include "SimInfo.hpp"
 | 
| 10 | 
  | 
  | 
 | 
| 11 | 
  | 
  | 
using namespace std;
 | 
| 12 | 
  | 
  | 
 | 
| 13 | 
  | 
  | 
class ZConsReader{
 | 
| 14 | 
  | 
  | 
  public:
 | 
| 15 | 
  | 
  | 
    
 | 
| 16 | 
  | 
  | 
    ZConsReader(SimInfo* info);
 | 
| 17 | 
  | 
  | 
    ZConsReader(const string& filename);
 | 
| 18 | 
  | 
  | 
    ~ZConsReader();
 | 
| 19 | 
  | 
  | 
    
 | 
| 20 | 
  | 
  | 
    void readHeader();
 | 
| 21 | 
  | 
  | 
    void readNextFrame();
 | 
| 22 | 
  | 
  | 
    bool hasNextFrame();
 | 
| 23 | 
  | 
  | 
    int getNumZMol();
 | 
| 24 | 
  | 
  | 
    vector<int> getZConsIndex();
 | 
| 25 | 
  | 
  | 
    vector<double> getZConsPos();
 | 
| 26 | 
  | 
  | 
    //vector<double> getKRatio();
 | 
| 27 | 
  | 
  | 
    
 | 
| 28 | 
  | 
  | 
    vector<double> getCurZPos(); 
 | 
| 29 | 
  | 
  | 
    vector<double> getCurFZ();
 | 
| 30 | 
  | 
  | 
    double getCurTime();
 | 
| 31 | 
  | 
  | 
 | 
| 32 | 
  | 
  | 
  private:
 | 
| 33 | 
  | 
  | 
    ifstream* istream;    
 | 
| 34 | 
  | 
  | 
    SimInfo* info;
 | 
| 35 | 
  | 
  | 
    string zconsFileName;
 | 
| 36 | 
  | 
  | 
 | 
| 37 | 
  | 
  | 
    int nZMol;
 | 
| 38 | 
  | 
  | 
    vector<int> index;
 | 
| 39 | 
  | 
  | 
    vector<double> zconsPos;
 | 
| 40 | 
  | 
  | 
    //vector<double> kRatio;
 | 
| 41 | 
  | 
  | 
 | 
| 42 | 
  | 
  | 
    double curTime;    
 | 
| 43 | 
  | 
  | 
    vector<double> curFZ;
 | 
| 44 | 
  | 
  | 
    vector<double> curZPos;
 | 
| 45 | 
  | 
  | 
 | 
| 46 | 
  | 
  | 
};
 | 
| 47 | 
  | 
  | 
 | 
| 48 | 
  | 
  | 
#endif
 |