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 void addPara(const string& parid, const double& val=0);
25 static void setPara(const string& parid, const double& value);
26 static int readO(int obsid);
28 static void writeO(int obsid);
30 static void writeHeaderO(int obsid, const string& headerid, char *header, long unsigned int size) { Os[obsid]->writeHeader(headerid, header, size); }
31 static void *getHeaderO(int obsid, const string& headerid) { Os[obsid]->getHeader(headerid); }
32 static void writeHeaderC(const string& headerid, char *header, long unsigned int size) { C->writeHeader(headerid, header, size); }
33 static void *getHeaderC(const string& headerid) { C->getHeader(headerid); }
35 static void finalize();
43 static void initCache(configcache **cache,
44 const string& cacheid, const int& nequi, const int& nskip, const string& datadir,
45 char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL, ostream* _log=NULL);
47 static void initCache( configcache **cache,
48 const string& cacheid, char **configmem, const int& configMemSize, const int& cachemode=CACHE_MODE_FULL);
50 static configcache *C;
51 static vector<configcache*> Os;
52 static vector<para> delayedParaAdd;
53 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);