Ignore:
Timestamp:
Aug 9, 2002, 3:03:41 PM (23 years ago)
Author:
cmv
Message:

long long et uint_2 cmv 9/8/02

File:
1 edited

Legend:

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

    r2169 r2170  
    203203
    204204 // Get column type
    205  int ColTypeCode;
    206205 if(fits_get_coltype(FitsPtr,ColNum+1,&ColTypeCode,NULL,NULL,&sta)) {
    207206   printerror(sta); Delete();
     
    441440}
    442441
    443 /*! idem before but for TVector of int_4 */
    444 long FitsABTColRead::Read(long n1,long n2,TVector<int_4>& data)
     442/*! idem before but for TVector of unsigned short */
     443long FitsABTColRead::Read(long n1,long n2,TVector<uint_2>& data)
    445444{
    446445 if(n1<0 || n1>=NBline)
     
    454453 if(data.Size()<nread) data.SetSize(nread);
    455454
     455 int sta=0;
     456 fits_read_col(FitsPtr,TUSHORT,ColNum+1,n1+1,1,nread,NULL,data.Data(),NULL,&sta);
     457 if(sta) {
     458   printerror(sta);
     459   throw NotAvailableOperation("FitsABTColRead::Read_TVector<uint_2>: Error Reading Fits file\n");
     460 }
     461
     462 return nread;
     463}
     464
     465/*! idem before but for TVector of int_4 */
     466long FitsABTColRead::Read(long n1,long n2,TVector<int_4>& data)
     467{
     468 if(n1<0 || n1>=NBline)
     469   throw RangeCheckError("FitsABTColRead::Read TVector bad requested 1srt line \n");
     470 if(data.Size()<=0 && n2<n1)
     471   throw RangeCheckError("FitsABTColRead::Read TVector bad requested 2sd line \n");
     472 if(n2<0) n2 = n1 + data.Size()-1;
     473 if(n2>=NBline) n2 = NBline-1;
     474
     475 sa_size_t nread = n2-n1+1;
     476 if(data.Size()<nread) data.SetSize(nread);
     477
    456478 //for(long i=n1;i<=n2;i++) data(i-n1) = Read(i);
    457479 int sta=0;
     
    460482 if(sta) {
    461483   printerror(sta);
    462    throw NotAvailableOperation("FitsABTColRead::Read_TVector<float>: Error Reading Fits file\n");
     484   throw NotAvailableOperation("FitsABTColRead::Read_TVector<int_4>: Error Reading Fits file\n");
    463485 }
    464486
     
    484506 if(sta) {
    485507   printerror(sta);
    486    throw NotAvailableOperation("FitsABTColRead::Read_TVector<float>: Error Reading Fits file\n");
     508   throw NotAvailableOperation("FitsABTColRead::Read_TVector<int_8>: Error Reading Fits file\n");
    487509 }
    488510
Note: See TracChangeset for help on using the changeset viewer.