Changeset 2897 in Sophya for trunk/SophyaExt/FitsIOServer/fitslocalmap.cc
- Timestamp:
- Jan 13, 2006, 11:05:52 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fitslocalmap.cc
r2874 r2897 68 68 ownobj_ = false; 69 69 } 70 71 template <class T> 72 int FITS_LocalMap<T>::CheckHandling(AnyDataObj & o) 73 { 74 if ( typeid(o) == typeid( LocalMap< T > ) ) return 2; 75 LocalMap<T> * po = dynamic_cast< LocalMap<T> * >(&o); 76 if (po == NULL) return 0; 77 else return 1; 78 } 79 80 template <class T> 81 int FITS_LocalMap<T>::CheckReadability(FitsInOutFile& is) 82 { 83 if (is.CurrentHDUType() != BINARY_TBL ) return 0; 84 string key; 85 key = "Content"; 86 string clsnm = is.KeyValue(key); 87 if (clsnm != "LocalMap") return 0; 88 89 vector<string> colnames; 90 vector<int> coltypes; 91 vector<long> repcnt; 92 vector<long> width; 93 long ncols = is.GetColInfo(colnames, coltypes, repcnt, width); 94 if (ncols < 1) return 0; 95 T x; 96 if (coltypes[0] == FitsTypes::DataType(x)) return 2 ; 97 else return 1; 98 } 99 100 template <class T> 101 FitsHandlerInterface* FITS_LocalMap<T>::Clone() 102 { 103 return new FITS_LocalMap<T>() ; 104 } 70 105 71 106 template <class T> … … 195 230 dvl["Content"]= "LocalMap"; 196 231 dvl.SetComment("Content", "name of SOPHYA object"); 232 dvl["SOPCLSNM"]= "SOPHYA::LocalMap<T>"; 233 dvl.SetComment("SOPCLSNM", "SOPHYA class name"); 197 234 // On ecrit les dataBlocks 198 235 vector<string> Noms; 199 236 Noms.push_back(dvl.GetS("Content")); 200 string extname("SIMULATION"); 237 // string extname("SIMULATION"); 238 string extname = os.NextExtensionName(); 201 239 202 240 // sortie sur image fits
Note:
See TracChangeset
for help on using the changeset viewer.