Changeset 2897 in Sophya for trunk/SophyaExt/FitsIOServer/fitsspherehealpix.cc
- Timestamp:
- Jan 13, 2006, 11:05:52 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fitsspherehealpix.cc
r2874 r2897 71 71 } 72 72 73 template <class T> 74 int FITS_SphereHEALPix<T>::CheckHandling(AnyDataObj & o) 75 { 76 if ( typeid(o) == typeid( SphereHEALPix< T > ) ) return 2; 77 SphereHEALPix<T> * po = dynamic_cast< SphereHEALPix<T> * >(&o); 78 if (po == NULL) return 0; 79 else return 1; 80 } 81 82 template <class T> 83 int FITS_SphereHEALPix<T>::CheckReadability(FitsInOutFile& is) 84 { 85 if (is.CurrentHDUType() != BINARY_TBL ) return 0; 86 string key; 87 key = "PIXTYPE"; 88 if ( is.KeyValue(key) != "HEALPIX") return 0; 89 90 bool nosk = false; 91 key = "ORDERING"; 92 is.KeyValue(key, nosk); 93 bool nosk2 = false; 94 key = "NSIDE"; 95 is.KeyValue(key, nosk2); 96 if (nosk || nosk2) return 0; 97 98 vector<string> colnames; 99 vector<int> coltypes; 100 vector<long> repcnt; 101 vector<long> width; 102 long ncols = is.GetColInfo(colnames, coltypes, repcnt, width); 103 if (ncols < 1) return 0; 104 T x; 105 if (coltypes[0] == FitsTypes::DataType(x)) return 2 ; 106 else return 1; 107 } 108 109 template <class T> 110 FitsHandlerInterface* FITS_SphereHEALPix<T>::Clone() 111 { 112 return new FITS_SphereHEALPix<T>() ; 113 } 73 114 74 115 … … 104 145 dvl["Content"]= "SphereHEALPix"; 105 146 dvl.SetComment("Content", "name of SOPHYA object"); 147 dvl["SOPCLSNM"]= "SOPHYA::SphereHEALPix<T>"; 148 dvl.SetComment("SOPCLSNM", "SOPHYA class name"); 106 149 107 150 // On ecrit les dataBlocks 108 151 vector<string> Noms; 109 152 Noms.push_back(dvl.GetS("Content")); 110 string extname("SIMULATION"); 153 // string extname("SIMULATION"); 154 string extname = os.NextExtensionName(); 111 155 112 156 string Type;
Note:
See TracChangeset
for help on using the changeset viewer.