Changeset 3069 in Sophya for trunk/SophyaExt/FitsIOServer/swfitsdtable.cc
- Timestamp:
- Sep 8, 2006, 4:30:31 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/swfitsdtable.cc
r3032 r3069 70 70 mFgCreate = false; 71 71 } 72 /*! Constructor with the specification of the output swap stream - 73 and optional specification of block (or segment) size 72 /*! 73 \brief Construcor with specification of the \b FitsInOutFile swap stream. 74 if fgcreate == true, creates an empty table (the fits file should then be 75 opened for writing). 76 if fgcreate == false , the table is initialized (read in) from the current HDU. 74 77 */ 75 78 SwFitsDataTable::SwFitsDataTable(FitsInOutFile & os, sa_size_t segsz, bool fgcreate) … … 82 85 } 83 86 } 87 88 /*! 89 \brief Construcor with specification of the FITS file name. 90 if fgcreate == false , the FITS file is opened and the table is 91 initialized (read in) from HDU \b hdunum 92 */ 93 SwFitsDataTable::SwFitsDataTable(string fitsname, int hdunum, sa_size_t segsz) 94 : BaseDataTable(segsz) , 95 mSwF(fitsname, FitsInOutFile::Fits_RO) 96 { 97 // Lecture de la table 98 FitsHandler<BaseDataTable> fio(*this); 99 mSwF.MoveAbsToHDU(hdunum); 100 fio.Read(mSwF); 101 } 102 84 103 //! copy constructor - shares the data 85 104 SwFitsDataTable::SwFitsDataTable(SwFitsDataTable const & a) … … 158 177 void SwFitsDataTable::SwapOutAll() const 159 178 { 179 if (NRows() < 1) return; 160 180 // Et on vide les buffers de swap 161 181 for (size_t kk=0; kk<mNames.size(); kk++) { … … 185 205 break; 186 206 default: 187 throw ForbiddenError("SwFitsDataTable::S hare() : unknown column type ");207 throw ForbiddenError("SwFitsDataTable::SwapOutAll() : unknown column type "); 188 208 break; 189 209 } … … 261 281 { 262 282 ser = mICols.size(); 263 FITSDataSwapper<int_4> ISwapper(mSwF, colidx );283 FITSDataSwapper<int_4> ISwapper(mSwF, colidx, this); 264 284 if (swpos) 265 285 mICols.push_back(SwSegDataBlock<int_4>(ISwapper, *swpos, mSegSz)); … … 275 295 { 276 296 ser = mLCols.size(); 277 FITSDataSwapper<int_8> LSwapper(mSwF, colidx );297 FITSDataSwapper<int_8> LSwapper(mSwF, colidx, this); 278 298 if (swpos) 279 299 mLCols.push_back(SwSegDataBlock<int_8>(LSwapper, *swpos, mSegSz)); … … 289 309 { 290 310 ser = mFCols.size(); 291 FITSDataSwapper<r_4> FSwapper(mSwF, colidx );311 FITSDataSwapper<r_4> FSwapper(mSwF, colidx, this); 292 312 if (swpos) 293 313 mFCols.push_back(SwSegDataBlock<r_4>(FSwapper, *swpos, mSegSz)); … … 304 324 { 305 325 ser = mDCols.size(); 306 FITSDataSwapper<r_8> DSwapper(mSwF, colidx );326 FITSDataSwapper<r_8> DSwapper(mSwF, colidx, this); 307 327 if (swpos) 308 328 mDCols.push_back(SwSegDataBlock<r_8>(DSwapper, *swpos, mSegSz)); … … 318 338 { 319 339 ser = mYCols.size(); 320 FITSDataSwapper< complex<r_4> > YSwapper(mSwF, colidx );340 FITSDataSwapper< complex<r_4> > YSwapper(mSwF, colidx, this); 321 341 if (swpos) 322 342 mYCols.push_back(SwSegDataBlock< complex<r_4> >(YSwapper, *swpos, mSegSz)); … … 332 352 { 333 353 ser = mZCols.size(); 334 FITSDataSwapper< complex<r_8> > ZSwapper(mSwF, colidx );354 FITSDataSwapper< complex<r_8> > ZSwapper(mSwF, colidx, this); 335 355 if (swpos) 336 356 mZCols.push_back(SwSegDataBlock< complex<r_8> >(ZSwapper, *swpos, mSegSz)); … … 346 366 { 347 367 ser = mSCols.size(); 348 FITSDataSwapper< string > SSwapper(mSwF, colidx );368 FITSDataSwapper< string > SSwapper(mSwF, colidx, this); 349 369 if (swpos) 350 370 mSCols.push_back(SwSegDataBlock< string >(SSwapper, *swpos, mSegSz));
Note:
See TracChangeset
for help on using the changeset viewer.