X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/e46233799c25067188549528947ae980579a5e8c..3c0ea1a85b09df3bb85839ba92831fca9e10a82f:/o815/o815.cpp?ds=sidebyside diff --git a/o815/o815.cpp b/o815/o815.cpp index ff0b1ae..5271370 100644 --- a/o815/o815.cpp +++ b/o815/o815.cpp @@ -135,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; @@ -148,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;