Ignore:
Timestamp:
Mar 28, 2002, 2:10:57 PM (24 years ago)
Author:
ansari
Message:

protection/lancement exception ds HEALPix::xxx et FIO_SphereHEALPix<T>::SetDataObj() - Reza 28/3/2002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SkyMap/fiospherehealpix.cc

    r1624 r1954  
    44#include "pexceptions.h"
    55#include "fiondblock.h"
     6#include "datatype.h"
     7#include <typeinfo>
    68
    79//*******************************************************************
     
    5557{
    5658  SphereHEALPix<T> * po = dynamic_cast< SphereHEALPix<T> * >(&o);
    57   if (po == NULL) return;
     59  if (po == NULL) {
     60    char buff[160];
     61    sprintf(buff,"FIO_SphereHEALPix<%s>::SetDataObj(%s) - Object type error ! ",
     62            DataTypeInfo<T>::getTypeName().c_str(), typeid(o).name());
     63    throw TypeMismatchExc(PExcLongMessage(buff));
     64  }
    5865  if (ownobj && dobj_) delete dobj_;
    5966  dobj_ = po; ownobj = false;
     
    93100  is.GetR8(Omega);
    94101  dobj_->setParameters(nSide,nPix, Omega);
    95 
     102  cout << " DBG-FIO_SphereHEALPix<T> nSide=" << nSide << " nPix=" << nPix << endl;
    96103// On lit les DataBlocks;
    97104  FIO_NDataBlock<T> fio_nd(&dobj_->pixels_);
     
    101108  FIO_NDataBlock<int_4> fio_ndi2(&dobj_->sliceLenght_);
    102109  fio_ndi2.Read(is);
     110
     111  cout << " DBG-2 SizeIndex()= " << dobj_->SizeIndex()
     112       << " NbPixels()= " << dobj_->NbPixels() << endl;
    103113}
    104114 
Note: See TracChangeset for help on using the changeset viewer.