Changeset 495 in Sophya for trunk/SophyaPI/PIext/servnobjm.cc


Ignore:
Timestamp:
Oct 21, 1999, 8:58:45 PM (26 years ago)
Author:
ercodmgr
Message:

Portage -> DPPlanck , Reza+cmv 21/10/99

File:
1 edited

Legend:

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

    r466 r495  
    2323#include "ntuple.h"
    2424#include "cimage.h"
    25 #include "fitsimage.h"
    2625
    2726#include "histos.h"
     
    6261ObjAdaptList::iterator it;
    6362for(it = objadaplist.begin(); it != objadaplist.end(); it++)
     63#ifdef SANS_EVOLPLANCK
    6464    if (typeid(*o) == typeid(*((*it).obj)))  THROW(dupIdErr);
    65 
     65#else
     66    if (typeid(*o) == typeid(*((*it).obj))) 
     67     throw(DuplicateIdExc("Services2NObjMgr::RegisterClass() - Duplicate class"));
     68#endif
    6669dataobj_adapter oba;
    6770oba.obj = o;
     
    182185double xx;
    183186double dx = (xmax-xmin)/np;
     187#ifdef SANS_EVOLPLANCK
    184188TRY {
    185189  for(k=0; k<np; k++) { xx = xmin+dx*k; (*vpy)(k) = f(xx); }
     
    193197  vpy = NULL;
    194198  } ENDTRY;
    195 
     199#else
     200try {
     201  for(k=0; k<np; k++) { xx = xmin+dx*k; (*vpy)(k) = f(xx); }
     202}
     203catch ( PException exc ) {
     204  fflush(stdout);
     205  cout << endl;
     206  cerr << endl;
     207  cerr << "Services2NObjMgr::PlotFunc()  Exception :"  << exc.Msg() << endl;
     208  delete vpy;
     209  vpy = NULL;
     210}
     211#endif
    196212
    197213if (vpy) {
     
    240256double dy = (ymax-ymin)/npy;
    241257// printf(" -- DBG -- %d %d , %g %g , %g %g \n", npx, npy, xmin, xmax, ymin, ymax);
     258#ifdef SANS_EVOLPLANCK
    242259TRY {
    243260  for(j=0; j<npy; j++) {
     
    256273  delete mtx;  mtx = NULL;
    257274  } ENDTRY;
     275#else
     276try {
     277  for(j=0; j<npy; j++) {
     278    yy = ymin+dy*j;
     279    for(i=0; i<npx; i++) {
     280      xx = xmin+dx*i;
     281      (*mtx)(j, i) = f(xx, yy);
     282    }
     283  }
     284}
     285catch ( PException exc ) {
     286  fflush(stdout);
     287  cout << endl;
     288  cerr << endl;
     289  cerr << "Services2NObjMgr::PlotFunc2D()  Exception :"  << exc.Msg() << endl;
     290  delete mtx;  mtx = NULL;
     291}
     292#endif
    258293
    259294if (mtx) {
Note: See TracChangeset for help on using the changeset viewer.