X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/2c7e8d0d8fdb233087376cc62752fdc45646c8c8..14fcee6c0462369b1e4db58c4b6eb073a464d8cc:/o815/o815.cpp diff --git a/o815/o815.cpp b/o815/o815.cpp index 8700f67..5271370 100644 --- a/o815/o815.cpp +++ b/o815/o815.cpp @@ -125,6 +125,8 @@ void o815::mainLoop() { for (vector::iterator parait = paraQ->allParaIds.begin(); parait != paraQ->allParaIds.end(); ++parait) *out->log << *parait << "=" << (*paraQ)[*parait] << " "; *out->log << ">" << endl << flush; + + Sim->_newParas(); progress measProg(comargs.nmeas); @@ -133,12 +135,18 @@ void o815::mainLoop() { *out->log << " " << (*obsit)->obsid; *out->log << endl << flush; - Sim->toEquilibrate = true; - for( int imeas=0; imeas::iterator obsit = observables.begin(); obsit != observables.end(); ++obsit) { - if( hypercache::readO( (*obsit)->ocid ) != -1 ) { + bool readnewObs; + int nequileftNewObs; + + hypercache::readO( (*obsit)->ocid, &readnewObs, &nequileftNewObs ); + + if ( readnewObs && nequileftNewObs < 0 ) { + (*obsit)->meas(true); + } + else { if (!nextAlready) { Sim->nextConfig(); nextAlready = true; @@ -146,8 +154,7 @@ void o815::mainLoop() { (*obsit)->meas(false); hypercache::writeO( (*obsit)->ocid ); } - else - (*obsit)->meas(true); + } while( measProg.madeStep(imeas) ) *out->log << "O815: " << measProg.done()*100 << "% of measurements done." << endl << flush;