}
bool hypercache::readC() {
- bool readnewconfig_nonex;
- int nequileftReadConfig_nonex;
- bool readAtLeastOneConfig = false;
+ bool readAtLeastOneConfig;
- C->readConfig(readnewconfig_nonex, nequileftReadConfig_nonex, &parentConfigs);
+ C->readConfig(&readAtLeastOneConfig, &nequileft, &parentConfigs);
- if (readnewconfig_nonex) {
- nequileft = nequileftReadConfig_nonex;
- readAtLeastOneConfig = true;
- }
-
- if ( nequileft < 0 && readnewconfig_nonex )
+ if ( nequileft < 0 && readAtLeastOneConfig )
activeCFile = fileOfPath(C->getInFileName());
else
activeCFile = "";
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;
/* 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());
}
*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;
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);