Ignore:
Timestamp:
Sep 29, 2000, 6:19:40 PM (25 years ago)
Author:
ansari
Message:

ecriture ligne a ligne

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fitsfile.h

    r1193 r1209  
    1818   {
    1919    int nbcols = dc + fc + ic + cc;
     20    int maxName = names.size();
     21    if (nbcols != maxName)
     22      {
     23        cout << " WARNING: BnTblLine:: length of vector of column names not equal to total number of columns" << endl;
     24        maxName = nbcols < maxName ? nbcols : maxName;
     25      }
    2026    ColName_ = vector<string>(nbcols);
    21      for (int k=0; k < nbcols; k++) ColName_ = names;
     27     for (int k=0; k < maxName; k++) ColName_[k] = names[k];
    2228    if (dc >0) ddata_ = vector<double>(dc);
    2329    if (fc >0) fdata_ = vector<float>(fc);
     
    2531    if (cc >0) cdata_ = vector<string>(fc);
    2632   }
    27    void Print()
     33
     34bool sameFormat(const BnTblLine& btl) const
     35   {
     36     if (btl.ddata_.size() == ddata_.size() && btl.fdata_.size() == fdata_.size() && btl.idata_.size() == idata_.size() && btl.cdata_.size() == cdata_.size()) return true;
     37     else return false;
     38   }
     39
     40void Print()
    2841   {
    2942     int k;
    30      int compt = 0;
    3143     cout << " ********* ligne ************* " << endl;
    3244     cout << " *** noms de variables  " << endl;
    33      for (k=0; k < compt + ColName_.size(); k++) cout << ColName_[k] << " ";
     45     for (k=0; k < ColName_.size(); k++) cout << ColName_[k] << " ";
    3446     cout << endl;
    3547     cout << " *** variables doubles  " << endl;
     
    162174  virtual ~FitsFile();
    163175
    164   static string getErrStatus(int status);
     176  static string GetErrStatus(int status);
    165177
    166178
     
    210222
    211223  static int NbBlocks(char flnm[]);
    212   static void getBlockType(char flnm[], int hdunum, string& typeOfExtension, int& naxis, vector<int>& naxisn, string& dataType, DVList& dvl  );
     224  static void GetBlockType(char flnm[], int hdunum, string& typeOfExtension, int& naxis, vector<int>& naxisn, string& dataType, DVList& dvl  );
    213225
    214226
     
    298310
    299311  /*!
    300 get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
     312Get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
    301313  */
    302314  void GetBinTabLine(int NoLine, double* ddata, float* fdata, int* idata, char
    303315** cdata) ;
    304316  /*!
    305 get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
     317Get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
    306318  */
    307319  void GetBinTabLine(long NoLine, BnTblLine& ligne) ;
    308320
    309321  /*!
    310 get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
     322Get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
    311323  */
    312324  void GetBinTabLine(int NoLine, float* fdata) ;
     
    438450
    439451   */
    440   void putImageToFits( int nbData, double* map) const;
     452  void PutImageToFits( int nbData, double* map) const;
    441453
    442454  /*! same as previous method with float data */
    443   void putImageToFits(int nbData, float* map ) const;
     455  void PutImageToFits(int nbData, float* map ) const;
    444456
    445457  /*! same as previous method with int data */
    446   void putImageToFits(int nbData, int* map) const;
     458  void PutImageToFits(int nbData, int* map) const;
    447459
    448460
     
    470482
    471483   */
    472   void putColToFits(int nocol, int nentries, double* donnees) const;
     484  void PutColToFits(int nocol, int nentries, double* donnees) const;
    473485
    474486  /*! same as previous method with float data */
    475   void putColToFits(int nocol, int nentries, float* donnees) const;
     487  void PutColToFits(int nocol, int nentries, float* donnees) const;
    476488
    477489  /*! same as previous method with int data */
    478   void putColToFits(int nocol, int nentries, int* donnees) const;
     490  void PutColToFits(int nocol, int nentries, int* donnees) const;
    479491
    480492  /*! same as previous method with char* data */
    481   void putColToFits(int nocol, int nentries, char** donnees) const;
    482 
    483   void putBinTabLine(int NoLine, double* ddata, float* fdata, int* idata, char ** cdata) const;
     493  void PutColToFits(int nocol, int nentries, char** donnees) const;
     494
     495  void PutBinTabLine(long NoLine,  BnTblLine& ligne) const;
    484496
    485497
     
    489501
    490502
    491 /* put keywords from a DVList into the primary header of the fits-file */
     503/* Put keywords from a DVList into the primary header of the fits-file */
    492504void  DVListIntoPrimaryHeader(DVList& dvl) const;
    493505
Note: See TracChangeset for help on using the changeset viewer.