X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/594f56b186b5d2f5e25293d6952c9325576aa080..061e6469f58f3e3e892f1cd1f6fdd2aad9c644e8:/configcache.h diff --git a/configcache.h b/configcache.h index 6054198..74998c7 100644 --- a/configcache.h +++ b/configcache.h @@ -7,6 +7,8 @@ #include #include +#include "datread.h" + #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; + bool superextended; }; 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); - void closeInFile() { inFile.close(); } + void closeInFile() { dataReader->closeFile(); } 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 getFileId(int actnequi, const bool& shortid=false); + string getFileId(int actnequi, const bool& superextended=true, const bool& shortid=false); ofstream outFile; - ifstream inFile; stringstream outFileName; @@ -84,20 +86,12 @@ class configcache{ vector Paras; - int readDataToMem(char *tmpData, long unsigned int dataSize); - void openOutFile(int actnequi); int readHeader(); bool headerWritten; - int readFullBlock(char *tmpData, long unsigned int dataSize); - - vector< pair > headerStore; - - void deleteHeaderStore(); - bool readAllHeaders(); vector::iterator getNextInfile(vector *excludeFileHashes); @@ -105,6 +99,10 @@ class configcache{ int nequileft_internal; bool doVirtualEquilibration, firstUsedConfig; + + string paraString(); + + datread *dataReader; }; #endif