| 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: fitstoiwtr.h,v 1.14 2002-10-07 14:23:02 aubourg Exp $
 | 
|---|
| 8 | 
 | 
|---|
| 9 | 
 | 
|---|
| 10 | #ifndef FITSTOIWTR_H
 | 
|---|
| 11 | #define FITSTOIWTR_H
 | 
|---|
| 12 | 
 | 
|---|
| 13 | #include "toi.h"
 | 
|---|
| 14 | #include "toiprocessor.h"
 | 
|---|
| 15 | #include <string>
 | 
|---|
| 16 | #include <map>
 | 
|---|
| 17 | #include "fitsio.h"
 | 
|---|
| 18 | 
 | 
|---|
| 19 | 
 | 
|---|
| 20 | class FITSTOIWriter : public TOIProcessor {
 | 
|---|
| 21 | public:
 | 
|---|
| 22 |   FITSTOIWriter(string fn);
 | 
|---|
| 23 |   ~FITSTOIWriter();
 | 
|---|
| 24 |   
 | 
|---|
| 25 |   void         setImplicitSN();
 | 
|---|
| 26 |   virtual void afterinit();
 | 
|---|
| 27 | 
 | 
|---|
| 28 |   virtual void  addInput(string name, TOI* toi)
 | 
|---|
| 29 |     {addInput(name,toi,false);}
 | 
|---|
| 30 |   virtual void  addInput(string name, TOI* toi, bool withFlag);
 | 
|---|
| 31 | 
 | 
|---|
| 32 |   virtual void  run(); 
 | 
|---|
| 33 | 
 | 
|---|
| 34 |   inline void   setLongFlagPrefix(bool fg = true) { longfgprefix = fg; }
 | 
|---|
| 35 |   inline int_8  ProcessedSampleCount() const { return totnscount; }
 | 
|---|
| 36 | 
 | 
|---|
| 37 | protected:
 | 
|---|
| 38 |   virtual bool checkSampleLimits(long &min, long &max, int pass);
 | 
|---|
| 39 |   virtual bool checkSampleLimits(int pass) {return TOIProcessor::checkSampleLimits(pass);}
 | 
|---|
| 40 |   
 | 
|---|
| 41 | private:
 | 
|---|
| 42 |   bool      implicitSN;
 | 
|---|
| 43 |   string fname;
 | 
|---|
| 44 |   fitsfile *fptr;
 | 
|---|
| 45 |   int fstatus;
 | 
|---|
| 46 |   vector<TOI*> fwinputs;
 | 
|---|
| 47 |   int nCols;
 | 
|---|
| 48 |   map<int,pair<int, bool> > colsinput; // iTOI -> (colonne, hasflag)
 | 
|---|
| 49 |   // le flag est alors en colonne+1
 | 
|---|
| 50 | 
 | 
|---|
| 51 |   int_8 totnscount;   // Nombre total d'echantillon processe
 | 
|---|
| 52 |   bool longfgprefix;  // if true ---> FLAG_ / sinon fg_ 
 | 
|---|
| 53 | };
 | 
|---|
| 54 | 
 | 
|---|
| 55 | #endif
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.