// This may look like C code, but it is really -*- C++ -*- // ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL // Eric Aubourg // Christophe Magneville // Reza Ansari // $Id: fitstoirdr.h,v 1.11 2002-05-13 13:11:32 ansari Exp $ #ifndef FITSTOIRDR_H #define FITSTOIRDR_H #include "config.h" #include "toiprocessor.h" #include #include #include #include "fitsio.h" class FITSTOIReader : public TOIProcessor { public: FITSTOIReader(string fn,int buff_sz=1024); ~FITSTOIReader(); void setImplicitSN(long snStart=0); void setBufferSize(int buffsz=1024); inline int getBufferSize() { return Buff_Sz; } virtual void addFile(string fn); virtual void init(); virtual void run(); inline int_8 ProcessedSampleCount() const { return totnscount; } protected: virtual int calcMinOut(); virtual int calcMaxOut(); virtual void run1(); virtual void run2(); virtual void openFile(string fn); private: fitsfile* fptr; int fstatus; string fname; // current file long nrows; // current file int firstSn; // current file int Buff_Sz; // buffer size int ncols; // including flags. getNOut() is # of tois. int snBegin; // first file int snEnd; // last file bool implicitSN; long implicitSNStart; vector allfn; map > colsinput; // iTOI -> (colonne, hasflag) // le flag est alors en colonne+1 int_8 totnscount; // Nombre total d'echantillon processe }; #endif