Changeset 709 in Sophya for trunk/SophyaPI


Ignore:
Timestamp:
Jan 21, 2000, 5:59:42 PM (26 years ago)
Author:
ercodmgr
Message:

petites Corrections diverses - Reza 21/01/2000

Location:
trunk/SophyaPI/PIext
Files:
3 edited

Legend:

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

    r558 r709  
    943943kw = "projprof";
    944944usage = "Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a profile histogram ";
    945 usage += "\n Usage: projh2d nameprof nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]";
     945usage += "\n Usage: projprof nameprof nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]";
    946946usage += "\n   HProf nameprof is created if necessary ";
    947947usage += "\n  Related commands: projh1d projh2d ObjectExpressions ...";
  • trunk/SophyaPI/PIext/nobjmgr.cc

    r685 r709  
    2121#ifdef SANS_EVOLPLANCK
    2222#include "fitsimage.h" 
     23#else
     24#include "fitsioserver.h" 
    2325#endif
    2426
     
    840842void NamedObjMgr::ReadFits(string const & flnm, string & nobj)
    841843{
    842 bool ok = true;
     844bool ok = false;
     845
    843846#ifdef SANS_EVOLPLANCK
    844 RzImage* obj;
    845 #else
    846 //CMV_A_FAIRE RzImage* obj;
    847 #endif
    848 
    849 //  obj = RzReadFits((char*)flnm.c_str(), ImgOffX, ImgOffY, ImgSizX, ImgSizY, ImgBitSgn);
    850 #ifdef SANS_EVOLPLANCK
     847RzImage* obj=NULL;
    851848TRY{
    852849  obj = RzReadFits((char*)flnm.c_str());
    853850  if (obj == NULL)   ok = false;
     851  else ok = true;
    854852}  CATCH(merr) {
    855853  printf("NamedObjMgr::ReadFITS(_Error Exception= %ld (%s) \n", (long)merr, PeidaExc(merr));
    856854  ok = false;
    857855} ENDTRY;
    858 if (ok) {
     856
     857#else
     858
     859 AnyDataObj * obj=NULL;
     860 FitsIoServer fios;
     861 char fitsfile[512];
     862 strncpy(fitsfile, flnm.c_str(), 512); fitsfile[511] = '\0';
     863 int hdu = 1;
     864 // Nous essayons de lire jusqu'a l'entete numero 3
     865 while (hdu < 4) {
     866   try {
     867     cout << "NamedObjMgr::ReadFITS() - Trying to read " << flnm
     868          << " HDU= " << hdu << endl;
     869     obj = fios.loadobj(fitsfile, hdu);
     870     if(obj) {
     871       ok = true;
     872       hdu = 9999;
     873     }
     874   }
     875   catch(IOExc exc) {
     876     cerr << "NamedObjMgr::ReadFITS() - IOExc " << exc.Msg() << endl;
     877     hdu++;
     878   }
     879   catch(...) {
     880     cerr << "NamedObjMgr::ReadFITS() - Error reading " << flnm << endl;
     881     hdu++;
     882     //     ok = false;
     883     // hdu = 99999;
     884   }
     885 }
     886#endif
     887if (ok && (obj != NULL)) {
    859888  if (nobj.length()<1)  nobj = servnobjm->FileName2Name(flnm);
    860889  AddObj((AnyDataObj*)obj, nobj);
    861890}
    862 #else
    863   printf("NamedObjMgr::ReadFITS( NON-Disponible EVOL-PLANCK) \n");
    864 #endif
    865891return;
    866892}
  • trunk/SophyaPI/PIext/pistdimgapp.cc

    r692 r709  
    377377    mCmd->Interpret(s);
    378378    } 
    379   catch ( PException exc ) {
    380     fflush(stdout);
     379  catch ( PThrowable exc ) {
    381380    cout << endl;
    382381    cerr << endl;
    383     cerr << "PIStdImgApp::Process()/ Cmd->Interpret()  Exception :" << exc.Msg() << endl;
     382    cerr << "PIStdImgApp::Process()/ Cmd->Interpret() Exception :" << exc.Msg() << endl;
    384383  }
    385384#endif
Note: See TracChangeset for help on using the changeset viewer.