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