static int initO(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) {
static int initO(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) {
- Os.push_back(NULL);
- initCache(&Os.back(), cacheid, nequi, nskip, datadir, configmem, configMemSize, cachemode, _log);
+ observable newobs;
+
+ newobs.c = NULL;
+ newobs.lastWrittenObsEquis = 0;
+ Os.push_back(newobs);
+
+ initCache(&Os.back().c, cacheid, nequi, nskip, datadir, configmem, configMemSize, cachemode, _log);
return Os.size()-1;
}
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);
return Os.size()-1;
}
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);
}
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 getNEquiLeft() { return nequileft; }
static void addPara(const string& parid, const double& val=0);
static void setPara(const string& parid, const double& value);
- 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 writeHeaderO(int obsid, const string& headerid, char *header, long unsigned int size, int actnequi) { Os[obsid].c->writeHeader(headerid, header, size, actnequi); }
+ static void *getHeaderO(int obsid, const string& headerid) { Os[obsid].c->getHeader(headerid); }
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 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); }
const string& cacheid, char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL);
static configcache *C;
const string& cacheid, char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL);
static configcache *C;