| 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 | 
|---|
| [1793] | 7 | // $Id: fitstoirdr.h,v 1.10 2001-11-27 12:13:41 aubourg 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: | 
|---|
| [1717] | 23 | FITSTOIReader(string fn,int buff_sz=1000); | 
|---|
| [1365] | 24 | ~FITSTOIReader(); | 
|---|
| [1480] | 25 |  | 
|---|
| [1725] | 26 | void         setImplicitSN(int snStart=0); | 
|---|
|  | 27 |  | 
|---|
| [1480] | 28 | virtual void addFile(string fn); | 
|---|
|  | 29 |  | 
|---|
| [1365] | 30 | virtual void init(); | 
|---|
| [1629] | 31 | virtual void run(); | 
|---|
|  | 32 |  | 
|---|
|  | 33 | inline int_8  ProcessedSampleCount() const { return totnscount; } | 
|---|
| [1365] | 34 |  | 
|---|
|  | 35 | protected: | 
|---|
|  | 36 | virtual int   calcMinOut(); | 
|---|
|  | 37 | virtual int   calcMaxOut(); | 
|---|
|  | 38 |  | 
|---|
| [1480] | 39 | virtual void run1(); | 
|---|
| [1717] | 40 | virtual void run2(); | 
|---|
| [1480] | 41 | virtual void openFile(string fn); | 
|---|
|  | 42 |  | 
|---|
| [1365] | 43 | private: | 
|---|
| [1480] | 44 | fitsfile* fptr; | 
|---|
|  | 45 | int       fstatus; | 
|---|
|  | 46 | string    fname;   // current file | 
|---|
|  | 47 | long      nrows;   // current file | 
|---|
|  | 48 | int       firstSn; // current file | 
|---|
| [1717] | 49 | int       Buff_Sz; // buffer size | 
|---|
| [1480] | 50 |  | 
|---|
| [1527] | 51 | int       ncols;   // including flags. getNOut() is # of tois. | 
|---|
| [1480] | 52 | int       snBegin; // first file | 
|---|
|  | 53 | int       snEnd;   // last file | 
|---|
| [1725] | 54 |  | 
|---|
|  | 55 | bool      implicitSN; | 
|---|
|  | 56 | int       implicitSNStart; | 
|---|
| [1480] | 57 |  | 
|---|
|  | 58 | vector<string> allfn; | 
|---|
| [1527] | 59 | map<int,pair<int, bool> > colsinput; // iTOI -> (colonne, hasflag) | 
|---|
|  | 60 | // le flag est alors en colonne+1 | 
|---|
| [1480] | 61 |  | 
|---|
| [1629] | 62 | int_8 totnscount;   // Nombre total d'echantillon processe | 
|---|
|  | 63 |  | 
|---|
| [1365] | 64 | }; | 
|---|
|  | 65 |  | 
|---|
|  | 66 | #endif | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.