| Rev | Line |   | 
|---|
| [350] | 1 | // archtoi.h
 | 
|---|
 | 2 | // Eric Aubourg         CEA/DAPNIA/SPP   juillet 1999
 | 
|---|
 | 3 | 
 | 
|---|
| [342] | 4 | #ifndef ARCHTOI_H
 | 
|---|
 | 5 | #define ARCHTOI_H
 | 
|---|
 | 6 | 
 | 
|---|
 | 7 | #include <iostream.h>
 | 
|---|
 | 8 | #include <string>
 | 
|---|
 | 9 | #include <list>
 | 
|---|
 | 10 | #include <vector>
 | 
|---|
| [534] | 11 | #include "toiiter.h"
 | 
|---|
| [352] | 12 | #include "fitsio.h"
 | 
|---|
| [342] | 13 | 
 | 
|---|
 | 14 | using namespace std; 
 | 
|---|
 | 15 | 
 | 
|---|
| [407] | 16 | class ArchTOI : public RequestHandler {
 | 
|---|
| [342] | 17 | public:
 | 
|---|
 | 18 |   ArchTOI(istream& str);
 | 
|---|
 | 19 |   ArchTOI(string const& filename);
 | 
|---|
 | 20 | 
 | 
|---|
| [352] | 21 |   void run(string const& outfilename);
 | 
|---|
| [342] | 22 |   
 | 
|---|
| [350] | 23 |   enum fmt {ascii_fmt, fits_fmt};
 | 
|---|
| [342] | 24 |   enum flg {hasflag = 1,
 | 
|---|
 | 25 |             useNA   = 2};
 | 
|---|
| [407] | 26 |             
 | 
|---|
| [534] | 27 |   virtual bool processTOIReq(TOI const& toi, string line);
 | 
|---|
| [407] | 28 |   virtual bool processOption(string keyw, string args);
 | 
|---|
| [342] | 29 |   
 | 
|---|
 | 30 | protected:
 | 
|---|
 | 31 |   void init();
 | 
|---|
| [534] | 32 |   TOIIter iter;
 | 
|---|
| [342] | 33 |   list<string> headertoi;
 | 
|---|
 | 34 |   list<string> headeropt;
 | 
|---|
| [534] | 35 |   list<TOI> tois;
 | 
|---|
| [342] | 36 |   fmt format;
 | 
|---|
 | 37 |   string undef;
 | 
|---|
| [432] | 38 |   double undefV;
 | 
|---|
| [342] | 39 |   bool allBolos; // tous les bolos dans le header. Sinon seulement bolos transmis.
 | 
|---|
| [352] | 40 |   
 | 
|---|
 | 41 |   void (ArchTOI::*openFile)(string const& filename);
 | 
|---|
 | 42 |   void (ArchTOI::*outHeader)(TOIIter& iter);
 | 
|---|
 | 43 |   void (ArchTOI::*outValue)(int icolumn, double value, bool notdef=false);
 | 
|---|
 | 44 |   void (ArchTOI::*endLine)();
 | 
|---|
 | 45 |   void (ArchTOI::*closeFile)();
 | 
|---|
 | 46 |   
 | 
|---|
| [534] | 47 |   list<string> buildNames();
 | 
|---|
 | 48 |   
 | 
|---|
| [352] | 49 |   void openFile_A(string const& filename);
 | 
|---|
 | 50 |   void outHeader_A(TOIIter& iter);
 | 
|---|
 | 51 |   void outValue_A(int icolumn, double value, bool notdef=false);
 | 
|---|
 | 52 |   void endLine_A();
 | 
|---|
 | 53 |   void closeFile_A();
 | 
|---|
 | 54 | 
 | 
|---|
 | 55 |   void openFile_F(string const& filename);
 | 
|---|
 | 56 |   void outHeader_F(TOIIter& iter);
 | 
|---|
 | 57 |   void outValue_F(int icolumn, double value, bool notdef=false);
 | 
|---|
 | 58 |   void endLine_F();
 | 
|---|
 | 59 |   void closeFile_F();
 | 
|---|
 | 60 |   
 | 
|---|
 | 61 |   fitsfile* fptr;
 | 
|---|
 | 62 |   int fitsStatus;
 | 
|---|
 | 63 |   int fitsLine;
 | 
|---|
| [359] | 64 |   ostream* ostr;
 | 
|---|
| [407] | 65 |   
 | 
|---|
 | 66 |   string requestVersion;
 | 
|---|
 | 67 |   list<string> comments;
 | 
|---|
| [342] | 68 | };
 | 
|---|
 | 69 | 
 | 
|---|
 | 70 | #endif
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.