9 #include <boost/iostreams/filtering_streambuf.hpp>
10 #include <boost/iostreams/stream.hpp>
11 #include <boost/iostreams/filter/bzip2.hpp>
12 #include <boost/iostreams/device/array.hpp>
13 #include <boost/iostreams/copy.hpp>
17 #define CACHE_MODE_DISABLED 0
18 #define CACHE_MODE_READ 1
19 #define CACHE_MODE_FULL 2
32 bool doVirtualEquilibration;
39 configcache(const string& cacheid, const int& nequi, const int& nskip, const string& datadir, char **configmem, const int& configMemSize,
40 const int& cachemode=CACHE_MODE_FULL, writeout *out_a=NULL);
41 bool readConfig(vector<string> *excludefiles=NULL);
43 void addPara(const string& parid, const double& val=0);
44 void setPara(const string& parid, const double& value);
45 void writeHeader(const string& headerid, const char *header, long unsigned int size);
46 void * getHeader(const string& headerid);
47 string getOutFileName() { return outFileName.str(); }
48 string getInFileName() { return DATADIR + "/" + openFileDesc.filename; }
49 static unsigned long hash(const string& str);
52 infiledesc openFileDesc;
54 int getParIndex(const string& parid);
60 string getFileId(const bool& shortid=false);
67 stringstream outFileName;
71 boost::iostreams::filtering_istreambuf *inBuffer;
72 boost::iostreams::filtering_ostreambuf *outBuffer;
80 bool refetchDataFiles;
82 void fetchDataFiles();
84 bool isValidInFile(const string& infile, infiledesc *filedesc);
86 vector<infiledesc> inFiles;
88 vector<parameter> Paras;
90 int readDataToMem(char *tmpData, long unsigned int dataSize);
98 int readFullBlock(char *tmpData, long unsigned int dataSize);
100 vector< pair<unsigned long, void *> > headerStore;
102 void deleteHeaderStore();
104 bool readAllHeaders();