| Last change
 on this file since 2044 was             1994, checked in by ansari, 23 years ago | 
        
          | 
1/ Ajout classe CGT (Compagnie Generale des Tuyaux) - Assistance a l'assemblagedes TOIProcessors .
 2/ Corrections mineures ds FitsTOIReader, correction de smkmflib
 
 
Reza 13/5/2002
 | 
        
          | File size:
            1.6 KB | 
      
      
| Line |  | 
|---|
| 1 | // This may look like C code, but it is really -*- C++ -*- | 
|---|
| 2 |  | 
|---|
| 3 | // ArchTOIPipe           (C)     CEA/DAPNIA/SPP IN2P3/LAL | 
|---|
| 4 | //                               Eric Aubourg | 
|---|
| 5 | //                               Christophe Magneville | 
|---|
| 6 | //                               Reza Ansari | 
|---|
| 7 | // $Id: fitstoirdr.h,v 1.11 2002-05-13 13:11:32 ansari Exp $ | 
|---|
| 8 |  | 
|---|
| 9 |  | 
|---|
| 10 | #ifndef FITSTOIRDR_H | 
|---|
| 11 | #define FITSTOIRDR_H | 
|---|
| 12 |  | 
|---|
| 13 | #include "config.h" | 
|---|
| 14 | #include "toiprocessor.h" | 
|---|
| 15 | #include <string> | 
|---|
| 16 | #include <vector> | 
|---|
| 17 | #include <map> | 
|---|
| 18 | #include "fitsio.h" | 
|---|
| 19 |  | 
|---|
| 20 |  | 
|---|
| 21 | class FITSTOIReader : public TOIProcessor { | 
|---|
| 22 | public: | 
|---|
| 23 | FITSTOIReader(string fn,int buff_sz=1024); | 
|---|
| 24 | ~FITSTOIReader(); | 
|---|
| 25 |  | 
|---|
| 26 | void         setImplicitSN(long snStart=0); | 
|---|
| 27 |  | 
|---|
| 28 | void         setBufferSize(int buffsz=1024); | 
|---|
| 29 | inline int   getBufferSize() { return Buff_Sz; } | 
|---|
| 30 |  | 
|---|
| 31 | virtual void addFile(string fn); | 
|---|
| 32 |  | 
|---|
| 33 | virtual void init(); | 
|---|
| 34 | virtual void run(); | 
|---|
| 35 |  | 
|---|
| 36 | inline int_8  ProcessedSampleCount() const { return totnscount; } | 
|---|
| 37 |  | 
|---|
| 38 | protected: | 
|---|
| 39 | virtual int   calcMinOut(); | 
|---|
| 40 | virtual int   calcMaxOut(); | 
|---|
| 41 |  | 
|---|
| 42 | virtual void run1(); | 
|---|
| 43 | virtual void run2(); | 
|---|
| 44 | virtual void openFile(string fn); | 
|---|
| 45 |  | 
|---|
| 46 | private: | 
|---|
| 47 | fitsfile* fptr; | 
|---|
| 48 | int       fstatus; | 
|---|
| 49 | string    fname;   // current file | 
|---|
| 50 | long      nrows;   // current file | 
|---|
| 51 | int       firstSn; // current file | 
|---|
| 52 | int       Buff_Sz; // buffer size | 
|---|
| 53 |  | 
|---|
| 54 | int       ncols;   // including flags. getNOut() is # of tois. | 
|---|
| 55 | int       snBegin; // first file | 
|---|
| 56 | int       snEnd;   // last file | 
|---|
| 57 |  | 
|---|
| 58 | bool      implicitSN; | 
|---|
| 59 | long      implicitSNStart; | 
|---|
| 60 |  | 
|---|
| 61 | vector<string> allfn; | 
|---|
| 62 | map<int,pair<int, bool> > colsinput; // iTOI -> (colonne, hasflag) | 
|---|
| 63 | // le flag est alors en colonne+1 | 
|---|
| 64 |  | 
|---|
| 65 | int_8 totnscount;   // Nombre total d'echantillon processe | 
|---|
| 66 |  | 
|---|
| 67 | }; | 
|---|
| 68 |  | 
|---|
| 69 | #endif | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.