Changeset 1136 in Sophya for trunk/SophyaExt/FitsIOServer/fitsbntbllinereader.cc
- Timestamp:
- Aug 24, 2000, 12:18:02 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fitsbntbllinereader.cc
r1048 r1136 20 20 21 21 // FitsFile* fn=ReadFInit(inputfile,hdunum); 22 ReadFInit(inputfile,hdunum); 23 22 // ReadFInit(inputfile,hdunum); 23 inFits_ = new FitsInFile (inputfile); 24 inFits_->ReadFInit(hdunum); 24 25 25 26 // if (!fn->IsFitsTable()) 26 if (! IsFitsTable())27 if (!inFits_->IsFitsTable()) 27 28 { 28 29 throw PException("FITS_BntblLineReader: the fits file seems not to be a bintable nor ASCII table"); … … 32 33 int nbcols, nbentries; 33 34 // nbcols = fn->NbColsFromFits(); 34 nbcols = NbColsFromFits();35 nbcols = inFits_->NbColsFromFits(); 35 36 nbentries = 0; 36 37 int k; 37 38 // for (k=0; k<nbcols; k++) nbentries=max( nbentries, fn->NentriesFromFits(k) ); 38 for (k=0; k<nbcols; k++) nbentries=max( nbentries, NentriesFromFits(k) );39 for (k=0; k<nbcols; k++) nbentries=max( nbentries, inFits_->NentriesFromFits(k) ); 39 40 40 41 // … … 53 54 { 54 55 // char ss= fn->ColTypeFromFits(k); 55 char ss= ColTypeFromFits(k);56 char ss= inFits_->ColTypeFromFits(k); 56 57 if (ss == 'D') DfitsCol.push_back(k); 57 58 else if (ss == 'E') FfitsCol.push_back(k); … … 69 70 ColName_[compt] = new char[LONNOM+1]; 70 71 // strncpy(ColName_[compt], fn->ColNameFromFits(DfitsCol[k]).c_str(), LONNOM); 71 strncpy(ColName_[compt], ColNameFromFits(DfitsCol[k]).c_str(), LONNOM);72 strncpy(ColName_[compt], inFits_->ColNameFromFits(DfitsCol[k]).c_str(), LONNOM); 72 73 ColName_[compt++][ LONNOM] = '\0'; 73 74 } … … 76 77 ColName_[compt] = new char[LONNOM+1]; 77 78 // strncpy(ColName_[compt], fn->ColNameFromFits(FfitsCol[k]).c_str(), LONNOM); 78 strncpy(ColName_[compt], ColNameFromFits(FfitsCol[k]).c_str(), LONNOM);79 strncpy(ColName_[compt], inFits_->ColNameFromFits(FfitsCol[k]).c_str(), LONNOM); 79 80 ColName_[compt++][ LONNOM] = '\0'; 80 81 } … … 83 84 ColName_[compt] = new char[LONNOM+1]; 84 85 // strncpy(ColName_[compt], fn->ColNameFromFits(IfitsCol[k]).c_str(), LONNOM); 85 strncpy(ColName_[compt], ColNameFromFits(IfitsCol[k]).c_str(), LONNOM);86 strncpy(ColName_[compt], inFits_->ColNameFromFits(IfitsCol[k]).c_str(), LONNOM); 86 87 ColName_[compt++][ LONNOM] = '\0'; 87 88 } … … 90 91 ColName_[compt] = new char[LONNOM+1]; 91 92 // strncpy(ColName_[compt], fn->ColNameFromFits(SfitsCol[k]).c_str(), LONNOM); 92 strncpy(ColName_[compt], ColNameFromFits(SfitsCol[k]).c_str(), LONNOM);93 strncpy(ColName_[compt], inFits_->ColNameFromFits(SfitsCol[k]).c_str(), LONNOM); 93 94 ColName_[compt++][LONNOM] = '\0'; 94 95 } … … 115 116 taille_des_chaines_ = 0; 116 117 // for (k=0; k< ccount_; k++) taille_des_chaines_ = max( taille_des_chaines_, fn->ColStringLengthFromFits(SfitsCol[k]) ); 117 for (k=0; k< ccount_; k++) taille_des_chaines_ = max( taille_des_chaines_, ColStringLengthFromFits(SfitsCol[k]) );118 for (k=0; k< ccount_; k++) taille_des_chaines_ = max( taille_des_chaines_, inFits_->ColStringLengthFromFits(SfitsCol[k]) ); 118 119 for (k=0; k<ccount_; k++) cdata_[k]=new char[taille_des_chaines_+1]; 119 120 } … … 123 124 FITS_BntblLineReader::~FITS_BntblLineReader() 124 125 { 126 if (inFits_ != NULL) delete inFits_; 125 127 if (ddata_ != NULL) delete [] ddata_; 126 128 if (fdata_ != NULL) delete [] fdata_; … … 147 149 XNTuple FITS_BntblLineReader::ReadNextLine() 148 150 { 149 GetBinTabLine(nextLineToBeRead_++, ddata_, fdata_, idata_, cdata_ );151 inFits_->GetBinTabLine(nextLineToBeRead_++, ddata_, fdata_, idata_, cdata_ ); 150 152 XNTuple xnt(dcount_, fcount_, icount_,ccount_, ColName_); 151 153 xnt.Fill(ddata_, fdata_, idata_, cdata_); … … 153 155 } 154 156 155 void FITS_BntblLineReader::ReadFromFits( )157 void FITS_BntblLineReader::ReadFromFits(FitsInFile&) 156 158 { 157 159 } 158 160 159 void FITS_BntblLineReader::WriteToFits( )161 void FITS_BntblLineReader::WriteToFits(FitsOutFile&) 160 162 { 161 163 }
Note:
See TracChangeset
for help on using the changeset viewer.