Ignore:
Timestamp:
Aug 8, 2002, 7:48:02 PM (23 years ago)
Author:
cmv
Message:

long long gestion cfistio>2.4 (compat <2.4) cmv 8/8/2002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fabtwriter.cc

    r1822 r2169  
    179179          if BINARY_TBL and tform="" or tform=NULL)
    180180  \param tunit : fits tunit definition (optional)
    181   \param datatype : TBYTE TSHORT TLONG (TINT32BIT) TFLOAT TDOUBLE
     181  \param datatype : TBYTE TSHORT TLONG (TINT32BIT) TLONGLONG TFLOAT TDOUBLE
    182182                    TUSHORT TULONG. That parameter is only use in case
    183183                    of a BINARY_TBL table when tform is not defined).
     
    201201   if(datatype==TBYTE)          strcpy(str,"1B");
    202202   else if(datatype==TSHORT)    strcpy(str,"1I");
    203    //CMV$CHECK Commentaire temporaire (il faut au moins cfitsio 2204)
    204    //else if(datatype==TINT32BIT) strcpy(str,"1J");
    205203   else if(datatype==TLONG)     strcpy(str,"1J");
     204#ifdef TINT32BIT
     205   else if(datatype==TINT32BIT) strcpy(str,"1J");
     206#endif
     207#ifdef TLONGLONG
     208   else if(datatype==TLONGLONG) strcpy(str,"1K");
     209#endif
    206210   else if(datatype==TFLOAT)    strcpy(str,"1E");
    207211   else if(datatype==TDOUBLE)   strcpy(str,"1D");
     
    310314}
    311315
    312 /*! Write long data to FITS file (see below) */
     316/*! Write long (4 Bytes) data to FITS file (see below) */
    313317void FitsABTWriter::Write(int col,long row,int_4 val)
    314318{
     
    319323  if(fits_write_col(FitsPtr,T,col+1,row+1,1,1,&val,&sta))
    320324    printerrorwrite("long",col,row,sta);
     325}
     326
     327/*! Write long long (8 Bytes) data to FITS file (see below) */
     328void FitsABTWriter::Write(int col,long row,int_8 val)
     329{
     330#ifdef TLONGLONG
     331  if(FirstTime) createtbl();
     332  int sta=0;
     333  if(fits_write_col(FitsPtr,TLONGLONG,col+1,row+1,1,1,&val,&sta))
     334    printerrorwrite("long long",col,row,sta);
     335#else
     336  throw PException("FitsABTWriter::Write(..,int_8) Not in that cfitsio version");
     337#endif
    321338}
    322339
     
    348365      that is "N-1" is the number of the last row written.
    349366*/
    350 /*! Write a vector of long data to FITS file (see below) */
     367/*! Write a vector of long (4 Bytes) data to FITS file (see below) */
    351368long FitsABTWriter::Write(int col,long row,TVector<int_4>& val)
    352369{
     
    359376    printerrorwrite("long",col,row,sta);
    360377  return row+nel;
     378}
     379
     380/*! Write a vector of long long (8 Bytes) data to FITS file (see below) */
     381long FitsABTWriter::Write(int col,long row,TVector<int_8>& val)
     382{
     383#ifdef TLONGLONG
     384  if(FirstTime) createtbl();
     385  long nel = val.Size();
     386  int sta=0;
     387  if(fits_write_col(FitsPtr,TLONGLONG,col+1,row+1,1,nel,val.Data(),&sta))
     388    printerrorwrite("long long",col,row,sta);
     389  return row+nel;
     390#else
     391  throw PException("FitsABTWriter::Write(..,TVector<int_8>&) Not in that cfitio version");
     392#endif
    361393}
    362394
Note: See TracChangeset for help on using the changeset viewer.