X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/594f56b186b5d2f5e25293d6952c9325576aa080..894e6b60d1de6307a72b03d0027f71962bc2e282:/configcache.cpp?ds=inline diff --git a/configcache.cpp b/configcache.cpp index 34789ee..bdc593e 100644 --- a/configcache.cpp +++ b/configcache.cpp @@ -4,6 +4,9 @@ #include #include #include +#include +#include +#include #include #include @@ -50,13 +53,22 @@ configcache::configcache(const string& cacheid, const int& nequi, const int& nsk refetchDataFiles = false; } +string configcache::paraString() { + stringstream parastring; + + for(int ipara=0; ipara 0 ) { + string inFileParaString; + openFileDesc = *inFileIt; if (openFileDesc.nequi < NEQUI) @@ -222,6 +236,12 @@ void configcache::readConfig(bool *readnewconfig, int *nequileft, vectorfilename << endl << flush; inFile.open( (DATADIR + "/" + inFileIt->filename).c_str(), std::ios::binary ); + getline( inFile, inFileParaString ); + if( inFileParaString != paraString() ) { + if(log) *log << "CCACHE: Parastring does not match. Closing dat-file..." << endl << flush; + inFile.close(); + } + inFiles.erase(inFileIt); if( !inFile.is_open() ) continue; @@ -274,12 +294,30 @@ void configcache::readConfig(bool *readnewconfig, int *nequileft, vectorout = new boost::iostreams::filtering_ostreambuf; ioBuffers->out->push(boost::iostreams::bzip2_compressor()); ioBuffers->out->push(outFile);