Changeset 2382 in Sophya for trunk/ArchTOIPipe/Kernel


Ignore:
Timestamp:
May 16, 2003, 3:40:09 PM (22 years ago)
Author:
aubourg
Message:

avec flags

Location:
trunk/ArchTOIPipe/Kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/Kernel/Makefile.in

    r2369 r2382  
    6565           fitstoirdr.cc fitstoiwtr.cc asciitoiwtr.cc \
    6666           toisegment.cc toiseqbuff.cc cgt.cc \
     67           ring.cc \
    6768           fitsringwtr.cc fitsringrdr.cc $(PIOFILES)
    6869
  • trunk/ArchTOIPipe/Kernel/piotoirdr.cc

    r2369 r2382  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: piotoirdr.cc,v 1.4 2003-04-24 13:22:26 aubourg Exp $
     5// $Id: piotoirdr.cc,v 1.5 2003-05-16 13:40:09 aubourg Exp $
    66
    77#include "piotoirdr.h"
     
    9292    double* data;
    9393    uint_8*   flags = NULL;
     94    PIOBYTE**  pioflags = NULL;
    9495    fits_lock();
    9596    PIOLONG n = PIOReadTOI((void**) &data,
     
    99100                           pioGroup);
    100101    if (flagdef != "") {
    101       PIOLONG nf = PIOReadFLG((PIOLONG**)&flags,   // dangereux ?
    102                               const_cast<char*>(flagdef.c_str()),
    103                               command,
    104                               pioGroup);
     102      PIOLONG nf = PIOReadFLGObjectMask(pioflags,
     103                                       const_cast<char*>(flagdef.c_str()),
     104                                       command,
     105                                       pioGroup);
    105106      if (nf != n) {
    106         cerr << "*** PIO Error, inconsistent read, data " << n << " flags " << nf << endl;
     107        cerr << "*** PIO Error, inconsistent read, data " << n << " flags "
     108             << nf << endl;
    107109        abort();
    108110      }
     111      flags = new uint_8[nf];
     112      for (int i=0; i<nf; i++) flags[i] = pioflags[i];
     113      PIODeleteFLG(pioflags, pioGroup);
    109114    }
    110115    fits_unlock();
     
    120125    PIODeleteTOI(data, pioGroup);
    121126    //    if (flags != NULL) PIODeleteFLG(flags, pioGroup); // PB !
     127    if (flags != NULL) delete[] flags;
    122128    fits_unlock();
    123129  }
Note: See TracChangeset for help on using the changeset viewer.