6 #include "configcache.h"
12 static int initO(const string& cacheid, const int& nequi, const int& nskip, const string& datadir,
13 char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, writeout *out_a=NULL) {
15 initCache(&Os.back(), cacheid, nequi, nskip, datadir, configmem, configMemSize, cachemode, out_a);
18 static void initC(const string& cacheid, const int& nequi, const int& nskip, const string& datadir,
19 char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, writeout *out_a=NULL) {
20 initCache(&C, cacheid, nequi, nskip, datadir, configmem, configMemSize, cachemode, out_a);
23 static void addPara(const string& parid, const double& val=0);
24 static void setPara(const string& parid, const double& value);
25 static int readO(int obsid);
27 static void writeO(int obsid);
29 static void writeHeaderO(int obsid, const string& headerid, char *header, long unsigned int size) { Os[obsid]->writeHeader(headerid, header, size); }
30 static void *getHeaderO(int obsid, const string& headerid) { Os[obsid]->getHeader(headerid); }
31 static void writeHeaderC(const string& headerid, char *header, long unsigned int size) { C->writeHeader(headerid, header, size); }
32 static void *getHeaderC(const string& headerid) { C->getHeader(headerid); }
34 static void finalize();
42 static void initCache(configcache **cache,
43 const string& cacheid, const int& nequi, const int& nskip, const string& datadir,
44 char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, writeout *out_a=NULL);
46 static void initCache( configcache **cache,
47 const string& cacheid, char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL);
49 static configcache *C;
50 static vector<configcache*> Os;
51 static vector<para> delayedParaAdd;
52 static vector<para> delayedParaSet;
55 static string fileOfPath(const string& dressedfile);
56 static string activeCFile;
57 static vector<unsigned long> parentConfigs;
58 static void addParentConfig(const unsigned long *parentconfig);