X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/ad54f29de351976a096b4991fe426ffc30332df2..91d6de08138eacd2098cc662a4ebceea4a07b280:/hypercache.h?ds=sidebyside diff --git a/hypercache.h b/hypercache.h index a30e28e..c5f548a 100644 --- a/hypercache.h +++ b/hypercache.h @@ -19,22 +19,24 @@ class hypercache { static void initC(const string& cacheid, const int& nequi, const int& nskip, const string& datadir, char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, ostream *_log=NULL) { initCache(&C, cacheid, nequi, nskip, datadir, configmem, configMemSize, cachemode, _log); + mostEquilibratedConfig.second = new char[configMemSize]; } + + static int getNEquiLeft() { return nequileft; } static void addPara(const string& parid, const double& val=0); static void setPara(const string& parid, const double& value); - static int readO(int obsid); - static int readC(); + static void readO(int obsid, bool *readNewObsConfig, int *nequiObsLeft); + static bool readC(); static void writeO(int obsid); static void writeC(); - static void writeHeaderO(int obsid, const string& headerid, char *header, long unsigned int size) { Os[obsid]->writeHeader(headerid, header, size); } + static void writeHeaderO(int obsid, const string& headerid, char *header, long unsigned int size, int actnequi) { Os[obsid]->writeHeader(headerid, header, size, actnequi); } static void *getHeaderO(int obsid, const string& headerid) { Os[obsid]->getHeader(headerid); } - static void writeHeaderC(const string& headerid, char *header, long unsigned int size) { C->writeHeader(headerid, header, size); } + static void writeHeaderC(const string& headerid, char *header, long unsigned int size, int actnequi) { C->writeHeader(headerid, header, size, actnequi); } static void *getHeaderC(const string& headerid) { C->getHeader(headerid); } static void finalize(); - static int read1CForEqui(); static int CFilesLeft() { return C->inFilesLeft(); } private: @@ -60,6 +62,14 @@ class hypercache { static vector parentConfigs; static void addParentConfig(const unsigned long *parentconfig); static ostream* log; + + static int NEQUI; + static int NSKIP; + static int nequileft; + + static pair mostEquilibratedConfig; + + static int lastWrittenObsEquis; }; #endif