Changeset 2360 in Sophya for trunk/ArchTOIPipe


Ignore:
Timestamp:
Apr 4, 2003, 4:17:37 PM (22 years ago)
Author:
cecile
Message:

OK

Location:
trunk/ArchTOIPipe
Files:
2 edited

Legend:

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

    r2359 r2360  
    22//                               Christophe Magneville
    33//                               Reza Ansari
    4 // $Id: fitsringrdr.cc,v 1.3 2003-04-01 13:27:48 aubourg Exp $
     4// $Id: fitsringrdr.cc,v 1.4 2003-04-04 14:17:03 cecile Exp $
    55
    66#include "fitsringrdr.h"
     
    2929  Buff_Sz = (buffsz>0) ? buffsz: 1024;
    3030  return;
     31}
     32
     33void FITSRingReader::setNRings(long n) {
     34  nRings = n;
    3135}
    3236
     
    131135    sprintf(xname, "CRing_%d", ring);
    132136
    133 
    134137    fits_lock();
    135138    fits_movabs_hdu(fptr, ring+2, NULL, &fstatus);
     
    141144    fits_read_key(fptr, TLONG, "NSAMPLES", &nSamples, commt, &fstatus);
    142145    fits_unlock();
    143 
     146    wontNeedBefore(ring*nSamples);
     147    cout << "!!!!!!! RING " << ring << endl;
     148   
    144149    for (int i=0; i<nSamples; i++) {
    145150      double data;
     
    154159 
    155160  fits_lock();
    156   if (fptr) {
    157     fits_close_file(fptr,&fstatus);
    158     fptr = NULL;
    159   }
     161  fits_report_error(stderr, fstatus);
     162  fits_close_file(fptr,&fstatus);
    160163  fits_unlock();
    161164}
  • trunk/ArchTOIPipe/ProcWSophya/ring2cout.cc

    r2359 r2360  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: ring2cout.cc,v 1.3 2003-04-01 13:27:48 aubourg Exp $
     5// $Id: ring2cout.cc,v 1.4 2003-04-04 14:17:37 cecile Exp $
    66
    77#include "toimanager.h"
     
    1313
    1414////////////////////////////////////////////////////////////////////////
    15 Ring2cout::Ring2cout(long n)
    16   :totnscount(0), nRings(1)
     15Ring2cout::Ring2cout(long ns, long nr)
     16  :totnscount(0)
    1717{
    18   setNSamples(n);
     18  setNSamples(ns);
     19  setNRings(nr);
    1920}
    2021
     
    4041void Ring2cout::run() {
    4142
    42   cout << "///////////////////////////////// coucou !" << endl;
    43  
    44  
    45 
    4643//---------------------------------------------------------
    4744try {
    4845  uint_4 mSnRead=0, mSnFilled=0, BadCoorRange=0;
     46
     47  cout << " ring " << Nrings << " ns " << Nsamples<< endl;
    4948  double ctheta[Nsamples],cphi[Nsamples],val[Nsamples];
    50 
    51   for (int k=0; k<nRings; k++) {
     49  for (int k=0; k<Nrings; k++) {
    5250   
    5351    getData(0,k*Nsamples,Nsamples,ctheta);
     
    5553    getData(2,k*Nsamples,Nsamples,val);
    5654    mSnRead ++;
    57     wontNeedBefore(k*Nsamples);
    5855   
    59     cout << " ring " << k << endl;
    60     for (int i=i; i< Nsamples;i++)
    61       cout << ctheta[i] << " " << cphi[i]<< " " << val[i]<< endl;
    62     totnscount++;
     56    for (int i=0; i< Nsamples;i++)
     57      cout << Nrings << " " << k <<" " << i <<" " << ctheta[i] << " " << cphi[i]<< " " << val[i]<< endl;
     58    totnscount+=Nsamples;
    6359   
    6460  }
    65   
    66   cout<<"RING2Toi::run: Samples Read "<<mSnRead
     61 
     62  cout<<"RING2cout::run: Samples Read "<<mSnRead
    6763      <<" Filled "<<mSnFilled
    6864      <<" BadCoorRange="<<BadCoorRange<<endl;
Note: See TracChangeset for help on using the changeset viewer.