]> git.treefish.org Git - phys/latlib.git/blobdiff - o815/o815.cpp
...
[phys/latlib.git] / o815 / o815.cpp
index 4c2b28d8de89c4e72a01ca873e5546a759505086..9afaa0cb7344e66e398beffb51255bed5467985e 100644 (file)
@@ -125,6 +125,8 @@ void o815::mainLoop() {
     for (vector<string>::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,18 +135,21 @@ 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 ) {
          if (!nextAlready) {
            Sim->nextConfig();
            nextAlready = true;
          }
          (*obsit)->meas(false);
-         hypercache::writeO( (*obsit)->ocid );
+         hypercache::writeO( (*obsit)->ocid, comargs.nmeas );
        }
        else
          (*obsit)->meas(true);
@@ -239,7 +244,7 @@ o815::comoption* o815::getOptionByVal(int val) {
   for (vector<comoption>::iterator opit = comOptions.begin(); opit != comOptions.end(); ++opit)
     if ( opit->val == val )
       return &(*opit);
-  return NULL;
+  exit(1);
 }
 
 void o815::listArg(int *target, int tlen, char *listarg) {