Changeset 2353 in Sophya for trunk/ArchTOIPipe/Kernel


Ignore:
Timestamp:
Mar 26, 2003, 10:18:44 AM (23 years ago)
Author:
cecile
Message:

* empty log message *

Location:
trunk/ArchTOIPipe/Kernel
Files:
2 edited

Legend:

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

    r2351 r2353  
    22//                               Christophe Magneville
    33//                               Reza Ansari
    4 // $Id: fitsringrdr.cc,v 1.1 2003-03-24 10:59:45 cecile Exp $
     4// $Id: fitsringrdr.cc,v 1.2 2003-03-26 09:18:44 cecile Exp $
    55
    66#include "fitsringrdr.h"
     
    1515  allfn.push_back(fn);
    1616  cout<<"FITSRingReader::FITSRingReader"<<endl;
     17  cout<<"FITSTOIReader::inited "<<inited<<" bsz="<<Buff_Sz<<endl;
    1718  name = "rdr";
    1819  fptr = NULL;
     20  totnscount = 0;
    1921}
    2022
     
    2325
    2426
     27void FITSRingReader::setBufferSize(int buffsz)
     28{
     29  Buff_Sz = (buffsz>0) ? buffsz: 1024;
     30  return;
     31}
     32
    2533void FITSRingReader::openFile(string fn) {
     34  cout << "(((((((((((((((((((((((((((((((((((((((((((" << endl;
     35 
    2636  fits_lock();
    2737  if (fptr) {
     
    6575
    6676}
     77
     78int FITSRingReader::calcMinOut() {
     79  chkinit();
     80  TOIManager* mgr = TOIManager::getManager();
     81  int firstReq = mgr->getRequestedBegin();
     82  return snBegin > firstReq ? snBegin : firstReq;
     83}
     84
     85int FITSRingReader::calcMaxOut() {
     86  chkinit();
     87  TOIManager* mgr = TOIManager::getManager();
     88  int lastReq = mgr->getRequestedEnd();
     89  return snEnd < lastReq ? snEnd : lastReq;
     90}
     91
     92
     93// ajout vf 31/07/2002
     94bool FITSRingReader::checkSampleLimits(long& min, long& max, int pass)
     95{
     96  bool sample_ok=true;
     97  chkinit();
     98  return TOIProcessor::checkSampleLimits(min, max, pass);
     99}
     100
     101void FITSRingReader::calcSampleLimits(long& min, long& max)
     102{
     103  chkinit();
     104  cout << "calc  " << name << " in  " << min << " - " << max << " ; " << snBegin << " - " << snEnd << endl;
     105 
     106  min=min<snMin?snMin:min;
     107  max=max>snMax?snMax:max;
     108  snBegin=snMin;
     109  snEnd=snMax;
     110  cout << "calc  " << name << " out " << min << " - " << max << " ; " << snBegin << " - " << snEnd << endl;
     111  //cout << "fitstoirdr : limites temporaires calculees : " << snBegin << " , " << snEnd << endl;
     112
     113}
     114// fin ajout vf
     115
     116
     117
    67118void FITSRingReader::run() {
    68119
     
    108159  fits_unlock();
    109160}
     161
     162
     163// affichage des limites
     164void FITSRingReader::printLimits()
     165{
     166  cout << "fitsringrdr " << name <<" : limites calculees : " << snBegin << " , " << snEnd << endl;
     167}
     168
  • trunk/ArchTOIPipe/Kernel/fitsringrdr.h

    r2351 r2353  
    66//                               Christophe Magneville
    77//                               Reza Ansari
    8 // $Id: fitsringrdr.h,v 1.1 2003-03-24 10:59:45 cecile Exp $
     8// $Id: fitsringrdr.h,v 1.2 2003-03-26 09:18:44 cecile Exp $
    99
    1010#ifndef FITSRINGRDR_H
    1111#define FITSRINGRDR_H
    1212
    13 #include "toi.h"
     13#include "config.h"
    1414#include "toiprocessor.h"
     15#include <string>
     16#include <vector>
     17#include <map>
    1518#include "fitsio.h"
     19#include "flagtoidef.h"
    1620
    1721class FITSRingReader : public TOIProcessor {
     
    2630  void  init();
    2731  void  run();
     32
     33  inline int_8  ProcessedSampleCount() const { return totnscount; }
     34  virtual void printLimits();
     35
     36protected:
     37  virtual int   calcMinOut();
     38  virtual int   calcMaxOut();
    2839 
    29 protected:
     40  // ajout vf 31/07/2002
     41  virtual bool checkSampleLimits(long& min, long& max, int pass);
     42  virtual void calcSampleLimits(long& min, long& max);
     43  virtual bool checkSampleLimits(int pass) {return TOIProcessor::checkSampleLimits(pass);}
     44
    3045  virtual void openFile(string fn);
     46
     47private:
    3148  int nSamples;
    3249  long nRings;
     
    3754  int Buff_Sz; // buffer size = nSamples
    3855  vector<string> allfn;
     56  int_8 totnscount;   // Nombre total d'echantillon processe
    3957};
    4058
Note: See TracChangeset for help on using the changeset viewer.