From: Alexander Schmidt Date: Mon, 18 Nov 2013 15:12:16 +0000 (+0100) Subject: Added obsidprefix. Passing imeas to obs meas function. X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/commitdiff_plain/d09f5f0aeff338a0262c3faf5272b82945a3bf8f Added obsidprefix. Passing imeas to obs meas function. --- diff --git a/o815/o815.cpp b/o815/o815.cpp index 956ad2e..3fe43c8 100644 --- a/o815/o815.cpp +++ b/o815/o815.cpp @@ -149,14 +149,14 @@ void o815::mainLoop() { hypercache::readO( (*obsit)->ocid, &readnewObs, &nequileftNewObs ); if ( readnewObs && nequileftNewObs < 0 ) { - (*obsit)->meas(true); + (*obsit)->meas(true, imeas); } else { if (!nextAlready) { Sim->nextConfig(); nextAlready = true; } - (*obsit)->meas(false); + (*obsit)->meas(false, imeas); hypercache::writeO( (*obsit)->ocid ); } diff --git a/o815/o815.h b/o815/o815.h index 9f980f7..b3ad62a 100644 --- a/o815/o815.h +++ b/o815/o815.h @@ -20,15 +20,16 @@ class o815 { class obs { public: - obs(const string& _obsid, const string& _datadesc, o815 *_O815, const int& _obsmemSize); + obs(const string& _obsid, const string& _datadesc, o815 *_O815, const int& _obsmemSize, const string& _obsidpostfix=""); void finish(); - void meas(bool loadedobs); + void meas(bool loadedobs, const int& nthmeas); void start(); string getDataDesc() { return datadesc; }; int ocid; string obsid; + string obsidpostfix; private: - virtual void _meas(bool loadedobs)=0; + virtual void _meas(bool loadedobs, const int& nthmeas)=0; virtual void _finish()=0; virtual void _start()=0; protected: @@ -45,12 +46,13 @@ class o815 { void nextConfig(); char *confMem; virtual void _newParas()=0; + int nequi, nskip; private: virtual void _makeSweep()=0; protected: o815 *O815; ostream *log; - int nequi, nskip, confmemSize; + int confmemSize; }; struct { diff --git a/o815/obs.cpp b/o815/obs.cpp index 807d4ee..ae97340 100644 --- a/o815/obs.cpp +++ b/o815/obs.cpp @@ -8,8 +8,8 @@ void o815::obs::finish() { void o815::obs::start() { if(O815->rank==0) { - *out << "#" << O815->programid << "-" << obsid << O815->headMaster() << endl << flush; - *out << "#" << O815->programid << "-" << obsid << O815->headMaster() << "-" << datadesc << endl << flush; + *out << "#" << O815->programid << "-" << obsid << obsidpostfix << O815->headMaster() << endl << flush; + *out << "#" << O815->programid << "-" << obsid << obsidpostfix << O815->headMaster() << "-" << datadesc << endl << flush; } if (O815->comargs.outdir=="") @@ -18,17 +18,18 @@ void o815::obs::start() { _start(); } -void o815::obs::meas(bool loadedobs) { - _meas(loadedobs); +void o815::obs::meas(bool loadedobs, const int& nthmeas) { + _meas(loadedobs, nthmeas); } -o815::obs::obs(const string& _obsid, const string& _datadesc, o815 *_O815, const int& obsmemSize) { +o815::obs::obs(const string& _obsid, const string& _datadesc, o815 *_O815, const int& obsmemSize, const string& _obsidpostfix) { obsid = _obsid; + obsidpostfix = _obsidpostfix; O815 = _O815; datadesc = _datadesc; - O815->out->newsub(obsid); + O815->out->newsub(obsid+obsidpostfix); - out = O815->out->out[obsid]; + out = O815->out->out[obsid+obsidpostfix]; log = O815->out->log; paraQ = O815->paraQ;