Changeset 2897 in Sophya for trunk/SophyaExt/FitsIOServer/fitsspherethetaphi.cc
- Timestamp:
- Jan 13, 2006, 11:05:52 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fitsspherethetaphi.cc
r2874 r2897 68 68 ownobj_ = false; 69 69 } 70 71 template <class T> 72 int 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 80 template <class T> 81 int 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 101 template <class T> 102 FitsHandlerInterface* FITS_SphereThetaPhi<T>::Clone() 103 { 104 return new FITS_SphereThetaPhi<T>() ; 105 } 106 70 107 71 108 template <class T> … … 100 137 dvl["Content"]= "SphereThetaPhi"; 101 138 dvl.SetComment("Content", "name of SOPHYA object"); 139 dvl["SOPCLSNM"]= "SOPHYA::SphereThetaPhi<T>"; 140 dvl.SetComment("SOPCLSNM", "SOPHYA class name"); 102 141 103 142 // On ecrit les dataBlocks … … 116 155 Noms[2] = "CumulPixParBande"; 117 156 Noms[3] = "ThetaBande"; 118 string extname("SIMULATION");119 157 //string extname("SIMULATION"); 158 string extname = os.NextExtensionName(); 120 159 121 160 string Type;
Note:
See TracChangeset
for help on using the changeset viewer.