]> git.treefish.org Git - phys/latlib.git/blobdiff - o815/o815.h
Added resetconfig routine.
[phys/latlib.git] / o815 / o815.h
index 9f980f7996a790c1236a89d87dcd961baa18bebc..05053871c1ca302e58625c46639b10e34d8fb4c0 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <string>
 #include <vector>
-#include <mpi.h>
 #include <stdlib.h>
 #include <getopt.h>
 
@@ -20,15 +19,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 +45,14 @@ class o815 {
     void nextConfig();
     char *confMem;
     virtual void _newParas()=0;
+    virtual void _resetConfig()=0;
+    int nequi, nskip;
   private:
     virtual void _makeSweep()=0;
   protected:
     o815 *O815;
     ostream *log;
-    int nequi, nskip, confmemSize;
+    int confmemSize;
   };
 
   struct {
@@ -63,6 +65,7 @@ class o815 {
     string outdir;
     int idonly;
     int showjobnum;
+    string startconfig;
   } comargs;
 
   struct comoption {
@@ -82,7 +85,7 @@ class o815 {
   vector<obs*> observables;
   sim* Sim;
   void mainLoop();
-  string headMaster();
+  string headMaster( bool hashedrange=false );
   void addPara(const string& paraid, const double& paraDefault);
   void addComOption(const char* name, int has_arg, int *flag, int val, const char* optdesc, const char* argdesc);
   vector< pair<int,char*> > parsedSpecOps;
@@ -90,13 +93,14 @@ class o815 {
 
 private:
   vector<comoption> comOptions;
-  MPI_Status mpiStatus;
   int numprocs, rank;
   static void listArg(int *target, int tlen, char *listarg);
   void parseArgs(int argc, char **argv, comoption specOps[]);
   string programid;
   int nextParas();
   comoption* getOptionByVal(int val);
+  static void readCacheArgs(const string& arg, string& cachedir, int& cachemode);
+  unsigned long hash(const string& str);
 };
 
 #endif