Ignore:
Timestamp:
Jan 13, 2006, 11:05:52 AM (20 years ago)
Author:
ansari
Message:

Mise en place de l heritage FitsIOHandler (ancien) de FitsHandlerInterface pour une gestion commune - a partir de FitsManager - Reza 13/01/2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fitsspherethetaphi.cc

    r2874 r2897  
    6868  ownobj_ = false;
    6969}
     70
     71template <class T>
     72int FITS_SphereThetaPhi<T>::CheckHandling(AnyDataObj & o)
     73{
     74  if ( typeid(o) == typeid( SphereThetaPhi< T > ) ) return 2;
     75  SphereThetaPhi<T> * po = dynamic_cast< SphereThetaPhi<T> * >(&o);
     76  if (po == NULL) return 0;
     77  else return 1;
     78}
     79
     80template <class T>
     81int FITS_SphereThetaPhi<T>::CheckReadability(FitsInOutFile& is)
     82{
     83  if (is.CurrentHDUType() !=  BINARY_TBL ) return 0;
     84  string key;
     85  key = "PIXTYPE";
     86  if ( is.KeyValue(key) != "TETAFI")  return 0;
     87  key = "Content";
     88  if ( is.KeyValue(key) != "SphereThetaPhi")  return 0;
     89 
     90  vector<string> colnames;
     91  vector<int> coltypes;
     92  vector<long> repcnt;
     93  vector<long> width;
     94  long ncols = is.GetColInfo(colnames, coltypes, repcnt, width);
     95  if (ncols < 1) return 0;
     96  T x;
     97  if (coltypes[0] == FitsTypes::DataType(x)) return 2 ;
     98  else return 1;
     99}
     100
     101template <class T>
     102FitsHandlerInterface* FITS_SphereThetaPhi<T>::Clone()
     103{
     104  return new FITS_SphereThetaPhi<T>() ;
     105}
     106
    70107
    71108template <class T>
     
    100137  dvl["Content"]= "SphereThetaPhi";
    101138  dvl.SetComment("Content", "name of SOPHYA object");
     139  dvl["SOPCLSNM"]= "SOPHYA::SphereThetaPhi<T>";
     140  dvl.SetComment("SOPCLSNM", "SOPHYA class name");
    102141 
    103142  // On ecrit les dataBlocks
     
    116155  Noms[2] = "CumulPixParBande";
    117156  Noms[3] = "ThetaBande";
    118   string extname("SIMULATION");
    119 
     157  //string extname("SIMULATION");
     158  string extname = os.NextExtensionName();
    120159
    121160  string Type;
Note: See TracChangeset for help on using the changeset viewer.