]> git.treefish.org Git - phys/latlib.git/blobdiff - o815/o815.cpp
...
[phys/latlib.git] / o815 / o815.cpp
index ff0b1ae08d60be1e27aba4e5c5c5e83d9441ba9d..5271370da3c865f56f6568472cc6908b0cc2bdf6 100644 (file)
@@ -135,12 +135,18 @@ void o815::mainLoop() {
       *out->log << " " << (*obsit)->obsid;
     *out->log << endl << flush;
 
-    Sim->toEquilibrate = true;
-
     for( int imeas=0; imeas<comargs.nmeas; imeas++ ) {
       bool nextAlready = false;
       for (vector<obs*>::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;