From: Alex Schmidt Date: Wed, 17 Apr 2013 21:28:53 +0000 (+0200) Subject: ... X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/commitdiff_plain/1a5483766d4056eec087099f2e411aef51b63cf5 ... --- diff --git a/o815/o815.cpp b/o815/o815.cpp index cf461ba..9cd3f7b 100644 --- a/o815/o815.cpp +++ b/o815/o815.cpp @@ -53,12 +53,11 @@ o815::o815(int argc, char **argv, const string& _programid) { void o815::mainLoop() { *out->log << "OBS: Starting main loop." << endl; - for (vector::iterator obsit = observables.begin(); obsit != observables.end(); ++obsit) { + for (vector::iterator obsit = observables.begin(); obsit != observables.end(); ++obsit) (*obsit)->start(); - } - //while( nextParas() ) { - //} + while( nextParas() ) { + } /* for (int i=0; i<100; i++) { @@ -68,9 +67,8 @@ void o815::mainLoop() { } */ - for (vector::iterator obsit = observables.begin(); obsit != observables.end(); ++obsit) { + for (vector::iterator obsit = observables.begin(); obsit != observables.end(); ++obsit) (*obsit)->finish(); - } } void o815::parseArgs(int argc, char **argv) { @@ -157,14 +155,8 @@ o815::~o815() { int o815::nextParas() { if( paraQ->nextParas() ) { - /* - setB( (*paraQ)["beta"] ); - setK( (*paraQ)["kappa"] ); - setL( (*paraQ)["lambda"] ); - setM1( (*paraQ)["mu1"] ); - setM2( (*paraQ)["mu2"] ); - */ - + for (vector::iterator parait = paraQ->allParaIds.begin(); parait != paraQ->allParaIds.end(); ++parait) + hypercache::setPara(*parait, (*paraQ)[*parait]); return 1; } else diff --git a/o815/o815.h b/o815/o815.h index 2f12fc5..33693b0 100644 --- a/o815/o815.h +++ b/o815/o815.h @@ -8,6 +8,7 @@ #include "latlib/paraq.h" #include "latlib/writeout.h" +#include "latlib/hypercache.h" using namespace std; diff --git a/paraq.h b/paraq.h index fbb6dab..6aba45b 100644 --- a/paraq.h +++ b/paraq.h @@ -18,7 +18,7 @@ class paraq { void setDefault(const string& paraid, double value) { defaultPara[paraid] = value; uniqueAllParaIdsAdd(paraid); } int getTotalJobs(); string rangeString(); - //map* getAllParas() {}; + vector allParaIds; private: int nprocs, rank; @@ -31,7 +31,6 @@ class paraq { bool inParas(vector& paraVec, double& tofind); double masterdefault; bool jobListInitialized; - vector allParaIds; void uniqueAllParaIdsAdd(const string& paraid); };