Changeset 326 in Sophya for trunk/SophyaPI/PIext/basexecut.cc


Ignore:
Timestamp:
Jun 23, 1999, 4:41:47 PM (26 years ago)
Author:
ercodmgr
Message:

1/ NTupleInterface mis ds Outils++ et complete -
2/ Les PINtuple et PINtup3D utilisent maintenant NTupleInterface
3/ Debut modification interface NObjMgr - Reza 23/6/99

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/basexecut.cc

    r312 r326  
    1313#include "pistdimgapp.h"
    1414#include "nobjmgr.h"
     15#include "servnobjm.h"
    1516
    1617#include "histos.h"
     
    252253  np = atoi(tokens[3].c_str());
    253254  xmin = atof(tokens[1].c_str());   xmax = atof(tokens[2].c_str());
    254   mObjMgr->PlotFunc(tokens[0], xmin, xmax, np, opt);
     255  mObjMgr->GetServiceObj()->PlotFunc(tokens[0], xmin, xmax, np, opt);
     256  }
     257else if ( (kw == "funcff") ) {
     258  if (tokens.size() < 5) { cout << "Usage: funcff C-filename f(x)-name xmin xmax npt [opt]" << endl; return(0); }
     259  string opt = "n";
     260  if (tokens.size() > 5)  opt = tokens[5];
     261  int np;
     262  float xmin, xmax;
     263  np = 100;
     264  xmin = 0.;  xmax = 1.;
     265  np = atoi(tokens[4].c_str());
     266  xmin = atof(tokens[2].c_str());   xmax = atof(tokens[3].c_str());
     267  mObjMgr->GetServiceObj()->PlotFuncFrCFile(tokens[0], tokens[1], xmin, xmax, np, opt);
    255268  }
    256269else if ( (kw == "func2d") ) {
     
    271284  string opt = "n";
    272285  if (tokens.size() > 7)  opt = tokens[7];
    273   mObjMgr->PlotFunc2D(tokens[0], xmin, xmax, ymin, ymax, npx, npy, opt);
     286  mObjMgr->GetServiceObj()->PlotFunc2D(tokens[0], xmin, xmax, ymin, ymax, npx, npy, opt);
     287  }
     288else if ( (kw == "func2dff") ) {
     289  if (tokens.size() < 8) {
     290    cout << "Usage: func2d C-filename F(x,y)-name xmax nptx ymin ymax npty opt" << endl;
     291    return(0);
     292    }
     293  int npx, npy;
     294  float xmin, xmax;
     295  float ymin, ymax;
     296  npx = npy = 50;
     297  xmin = 0.;  xmax = 1.;
     298  ymin = 0.;  ymax = 1.;
     299  npx = atoi(tokens[4].c_str());
     300  npy = atoi(tokens[7].c_str());
     301  xmin = atof(tokens[2].c_str());   xmax = atof(tokens[3].c_str());
     302  ymin = atof(tokens[5].c_str());   ymax = atof(tokens[6].c_str());
     303  string opt = "n";
     304  if (tokens.size() > 8)  opt = tokens[8];
     305  mObjMgr->GetServiceObj()->PlotFunc2DFrCFile(tokens[0], tokens[1], xmin, xmax, ymin, ymax, npx, npy, opt);
    274306  }
    275307
     
    551583usage = "Displays a function y=f(x) (Fills a vector with function values)";
    552584usage += "\n Usage: func f(x) xmin xmax npt [graphic_attributes]";
    553 usage += "\n  Related commands: func2d "; 
     585usage += "\n  Related commands: funcff func2d func2dff "; 
     586mpiac->RegisterCommand(kw, usage, this);
     587kw = "funcff";
     588usage = "Displays a function y=f(x) from a C-file (Fills a vector with function values)";
     589usage += "\n Usage: funcff C-FileName FunctionName xmin xmax npt [graphic_attributes]";
     590usage += "\n  Related commands: func func2d func2dff "; 
    554591mpiac->RegisterCommand(kw, usage, this);
    555592kw = "func2d";
     
    557594usage += "\n Usage: func2d f(x,y) xmin xmax nptx ymin ymax npty [graphic_attributes]";
    558595usage += "\n  Related commands: func"; 
     596mpiac->RegisterCommand(kw, usage, this);
     597kw = "func2dff";
     598usage = "Displays a function z=f(x,y) from a C-file (Fills a matrix with function values)";
     599usage += "\n Usage: func2dff C-FileName FunctionName xmin xmax nptx ymin ymax npty [graphic_attributes]";
     600usage += "\n  Related commands: func funcff func2d "; 
    559601mpiac->RegisterCommand(kw, usage, this);
    560602
Note: See TracChangeset for help on using the changeset viewer.