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