]> git.treefish.org Git - phys/latlib.git/blobdiff - configcache.h
...
[phys/latlib.git] / configcache.h
index a7c59740deb44c7ac46589690016df2c8b149f9b..74998c7bf77230f31bec7d4b39fb869407e13293 100644 (file)
@@ -7,6 +7,8 @@
 #include <sstream>
 #include <ostream>
 
 #include <sstream>
 #include <ostream>
 
+#include "datread.h"
+
 #define CACHE_MODE_OO 0
 #define CACHE_MODE_RO 1
 #define CACHE_MODE_WO 2
 #define CACHE_MODE_OO 0
 #define CACHE_MODE_RO 1
 #define CACHE_MODE_WO 2
@@ -24,6 +26,7 @@ struct infiledesc {
   int nequi;
   int nskip;
   bool extended;
   int nequi;
   int nskip;
   bool extended;
+  bool superextended;
 };
 
 class configcache{
 };
 
 class configcache{
@@ -40,7 +43,7 @@ class configcache{
   string getOutFileName() { return outFileName.str(); }
   string getInFileName() { return DATADIR + "/" + openFileDesc.filename; }
   static unsigned long hash(const string& str);
   string getOutFileName() { return outFileName.str(); }
   string getInFileName() { return DATADIR + "/" + openFileDesc.filename; }
   static unsigned long hash(const string& str);
-  void closeInFile() { inFile.close(); }
+  void closeInFile() { dataReader->closeFile(); }
   int inFilesLeft() { return inFiles.size(); }
   char* getConfigMem() { return configMem; }
   int getConfigSize() { return configSize; }
   int inFilesLeft() { return inFiles.size(); }
   char* getConfigMem() { return configMem; }
   int getConfigSize() { return configSize; }
@@ -59,10 +62,9 @@ class configcache{
   string DATADIR;
   string CACHEID;
   int MODE;
   string DATADIR;
   string CACHEID;
   int MODE;
-  string getFileId(int actnequi, const bool& shortid=false);
+  string getFileId(int actnequi, const bool& superextended=true, const bool& shortid=false);
 
   ofstream outFile;
 
   ofstream outFile;
-  ifstream inFile;
 
   stringstream outFileName;
 
 
   stringstream outFileName;
 
@@ -84,20 +86,12 @@ class configcache{
 
   vector<parameter> Paras;
 
 
   vector<parameter> Paras;
 
-  int readDataToMem(char *tmpData, long unsigned int dataSize);
-
   void openOutFile(int actnequi);
 
   int readHeader();
 
   bool headerWritten;
 
   void openOutFile(int actnequi);
 
   int readHeader();
 
   bool headerWritten;
 
-  int readFullBlock(char *tmpData, long unsigned int dataSize);
-
-  vector< pair<unsigned long, void *> > headerStore;
-
-  void deleteHeaderStore();
-
   bool readAllHeaders();
 
   vector<infiledesc>::iterator getNextInfile(vector<unsigned long> *excludeFileHashes);
   bool readAllHeaders();
 
   vector<infiledesc>::iterator getNextInfile(vector<unsigned long> *excludeFileHashes);
@@ -107,6 +101,8 @@ class configcache{
   bool doVirtualEquilibration, firstUsedConfig;
 
   string paraString();
   bool doVirtualEquilibration, firstUsedConfig;
 
   string paraString();
+
+  datread *dataReader;
 };
 
 #endif
 };
 
 #endif