Changeset 1712 in Sophya for trunk/ArchTOIPipe/Kernel


Ignore:
Timestamp:
Oct 19, 2001, 4:43:25 PM (24 years ago)
Author:
aubourg
Message:

pb flags uint_8/long

Location:
trunk/ArchTOIPipe/Kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/Kernel/fitstoirdr.cc

    r1710 r1712  
    128128       << firstSn << endl;
    129129
     130  double* tabdata = new double[getNOut()];
     131  uint_8* tabflag = new uint_8[getNOut()];
     132
    130133  for (int i=0; i<nrows; i++) {
    131134    int anyNul;
     
    133136    fits_lock();
    134137    fits_read_col_dbl(fptr,1,i+1,1,1,0,&y,&anyNul,&fstatus);
    135     fits_unlock();
     138    //fits_unlock();
    136139    int sn = (int) (y+.1);
    137140    TOIManager* mgr = TOIManager::getManager();
    138     if (sn > mgr->getRequestedEnd()) break;
    139     if (sn < mgr->getRequestedBegin()) continue;
     141    if (sn > mgr->getRequestedEnd()) {fits_unlock(); break;}
     142    if (sn < mgr->getRequestedBegin()) {fits_unlock(); continue;}
    140143    // if (sn < mgr->getRequestedBegin()+10) cout << "rdr out " << sn << endl;
    141144    for (int k=0; k<getNOut(); k++) {
    142145      int j = colsinput[k].first;
    143146      if ( !checkOutputTOIIndex(k) )  continue;  // Reza - Si TOI non connecte
    144       fits_lock();
     147      //fits_lock();
    145148      fits_read_col_dbl(fptr,j+1,i+1,1,1,0,&y,&anyNul,&fstatus);
     149      tabdata[k] = y;
    146150      long flg = 0;
    147151      if (colsinput[k].second) {
    148152        fits_read_col_lng(fptr,j+2,i+1,1,1,0,&flg,&anyNul,&fstatus);
    149153      }
    150       fits_unlock();
    151       putData(k, sn, y, flg);
     154      tabflag[k] = flg;
     155      //      fits_unlock();
     156      //putData(k, sn, y, flg);
    152157    }
    153 /*    if (i%50==0)  {
    154       fits_unlock();
     158    fits_unlock();
     159    for (int k=0; k<getNOut(); k++) {
     160      putData(k, sn, tabdata[k], tabflag[k]);
     161    }
     162    /*     if (i%50==0)  {
     163      // fits_unlock();
    155164      sched_yield();
    156       fits_lock();
    157     }*/
     165      //fits_lock();
     166      }*/
    158167    totnscount++;
    159168  }
  • trunk/ArchTOIPipe/Kernel/fitstoiwtr.cc

    r1696 r1712  
    141141        fits_write_col_dbl(fptr, p.first+1, fitsLine, 1, 1, tabdata+i, &fstatus);
    142142        if (p.second) {
    143           fits_write_col_lng(fptr, p.first+2, fitsLine, 1, 1, tabflagl+i, &fstatus);
     143          long f = tabflag[i];
     144          fits_write_col_lng(fptr, p.first+2, fitsLine, 1, 1, &f, &fstatus);
     145          //      fits_write_col_lng(fptr, p.first+2, fitsLine, 1, 1, tabflagl+i, &fstatus);
    144146        }
    145147        if (fstatus != 0) {
Note: See TracChangeset for help on using the changeset viewer.