7 #include "configcache.h"
13 static int initO(const string& cacheid, const int& nequi, const int& nskip, const string& datadir,
14 char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, ostream *_log=NULL) {
16 initCache(&Os.back(), cacheid, nequi, nskip, datadir, configmem, configMemSize, cachemode, _log);
19 static void initC(const string& cacheid, const int& nequi, const int& nskip, const string& datadir,
20 char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, ostream *_log=NULL) {
21 initCache(&C, cacheid, nequi, nskip, datadir, configmem, configMemSize, cachemode, _log);
24 static int getNEquiLeft() { return nequileft; }
26 static void addPara(const string& parid, const double& val=0);
27 static void setPara(const string& parid, const double& value);
28 static void readO(int obsid, bool& readnewconfig, int& nequileft);
30 static void writeO(int obsid, int actnequi);
32 static void writeHeaderO(int obsid, const string& headerid, char *header, long unsigned int size, int actnequi) { Os[obsid]->writeHeader(headerid, header, size, actnequi); }
33 static void *getHeaderO(int obsid, const string& headerid) { Os[obsid]->getHeader(headerid); }
34 static void writeHeaderC(const string& headerid, char *header, long unsigned int size, int actnequi) { C->writeHeader(headerid, header, size, actnequi); }
35 static void *getHeaderC(const string& headerid) { C->getHeader(headerid); }
37 static void finalize();
39 static int CFilesLeft() { return C->inFilesLeft(); }
47 static void initCache(configcache **cache,
48 const string& cacheid, const int& nequi, const int& nskip, const string& datadir,
49 char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, ostream* _log=NULL);
51 static void initCache( configcache **cache,
52 const string& cacheid, char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL);
54 static configcache *C;
55 static vector<configcache*> Os;
56 static vector<para> delayedParaAdd;
57 static vector<para> delayedParaSet;
59 static string fileOfPath(const string& dressedfile);
60 static string activeCFile;
61 static vector<unsigned long> parentConfigs;
62 static void addParentConfig(const unsigned long *parentconfig);