// 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: fitstoiwtr.h,v 1.14 2002-10-07 14:23:02 aubourg Exp $ #ifndef FITSTOIWTR_H #define FITSTOIWTR_H #include "toi.h" #include "toiprocessor.h" #include #include #include "fitsio.h" class FITSTOIWriter : public TOIProcessor { public: FITSTOIWriter(string fn); ~FITSTOIWriter(); void setImplicitSN(); virtual void afterinit(); virtual void addInput(string name, TOI* toi) {addInput(name,toi,false);} virtual void addInput(string name, TOI* toi, bool withFlag); virtual void run(); inline void setLongFlagPrefix(bool fg = true) { longfgprefix = fg; } inline int_8 ProcessedSampleCount() const { return totnscount; } protected: virtual bool checkSampleLimits(long &min, long &max, int pass); virtual bool checkSampleLimits(int pass) {return TOIProcessor::checkSampleLimits(pass);} private: bool implicitSN; string fname; fitsfile *fptr; int fstatus; vector fwinputs; int nCols; map > colsinput; // iTOI -> (colonne, hasflag) // le flag est alors en colonne+1 int_8 totnscount; // Nombre total d'echantillon processe bool longfgprefix; // if true ---> FLAG_ / sinon fg_ }; #endif