X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/20acc11c8054200c02794f58e3cc63851b5627ff..94af0f788c0a84b3494723adfa3e5ce55edc1b43:/hypercache.cpp?ds=inline diff --git a/hypercache.cpp b/hypercache.cpp index 4ec6339..fd2bbcb 100644 --- a/hypercache.cpp +++ b/hypercache.cpp @@ -74,7 +74,7 @@ string hypercache::fileOfPath(const string& dressedfile) { bool hypercache::readC() { bool readAtLeastOneConfig; - C->readConfig(readAtLeastOneConfig, nequileft, &parentConfigs); + C->readConfig(&readAtLeastOneConfig, &nequileft, &parentConfigs); if ( nequileft < 0 && readAtLeastOneConfig ) activeCFile = fileOfPath(C->getInFileName()); @@ -93,7 +93,7 @@ bool hypercache::readC() { int nequileftReadConfig_ex; memcpy (tmpconfig, C->getConfigMem(), C->getConfigSize()); - C->readConfig(readnewconfig_ex, nequileftReadConfig_ex, NULL); + C->readConfig(&readnewconfig_ex, &nequileftReadConfig_ex, NULL); if (! readnewconfig_ex) { *log << "HYPERCACHE: No more excluded config-files for possible equilibration available." << endl << flush; @@ -118,7 +118,6 @@ bool hypercache::readC() { /* storing most equilibrated config */ if ( nequileft < mostEquilibratedConfig.first && readAtLeastOneConfig ) { - //*log << "HYPERCACHE: Storing a copy of so far most equilibrated config with nequileft = " << nequileft << endl << flush; mostEquilibratedConfig.first = nequileft; memcpy(mostEquilibratedConfig.second, C->getConfigMem(), C->getConfigSize()); } @@ -128,7 +127,6 @@ bool hypercache::readC() { *log << "HYPERCACHE: Injecting back most equilibrated stored config with nequileft = " << mostEquilibratedConfig.first << endl << flush; nequileft = mostEquilibratedConfig.first; memcpy(C->getConfigMem(), mostEquilibratedConfig.second, C->getConfigSize()); - //readAtLeastOneConfig = false; } return readAtLeastOneConfig; @@ -157,10 +155,10 @@ void hypercache::writeO(int obsid) { lastWrittenObsEquis = NEQUI-nequileft-NSKIP; } -void hypercache::readO(int obsid, bool& readnewconfig, int& nequileft) { - Os[obsid]->readConfig(readnewconfig, nequileft); +void hypercache::readO(int obsid, bool *readNewObsConfig, int *nequiObsLeft) { + Os[obsid]->readConfig(readNewObsConfig, nequiObsLeft); - if ( nequileft < 0 ) { + if ( *readNewObsConfig && *nequiObsLeft < 0 ) { unsigned long *parentconfig = (unsigned long*)Os[obsid]->getHeader("concurrent_cfile"); if ( parentconfig != NULL ) addParentConfig(parentconfig);