Index: trunk/SophyaExt/FitsIOServer/fabtcolread.h
===================================================================
--- trunk/SophyaExt/FitsIOServer/fabtcolread.h	(revision 3572)
+++ trunk/SophyaExt/FitsIOServer/fabtcolread.h	(revision 3660)
@@ -187,4 +187,103 @@
 
 ///////////////////////////////////////////////////////////////////
+//! Class for reading ALL the columns in a FITS ASCII or BINARY table
+class FitsABTColRd1F : public AnyDataObj {
+public:
+  FitsABTColRd1F(FitsOpenFile* fof,int ihdu=0
+              ,long blen=100,long bsens=1,int lp=0);
+  virtual ~FitsABTColRd1F();
+
+  void ChangeBuffer(long blen=100,long bsens=1);
+
+  double    ReadKey(const char *keyname);
+  long      ReadKeyL(const char *keyname);
+  LONGLONG  ReadKeyLL(const char *keyname);
+  string    ReadKeyS(const char *keyname);
+
+  double Read(int ColNum,LONGLONG n,bool usebuffer=true);
+  int GetColNum(const char *colname);
+
+  //! Set debug level
+  inline void SetDebug(int lp=0) {DbgLevel = (unsigned short) lp;}
+  //! Set null value to be return when reading null data (0=return the data)
+  inline void SetNulVal(double nulval=0.) {NulVal = nulval;}
+  //! Get the FITS file name
+  inline string FileName(void) const
+         {if(FitsOF) return FitsOF->FileName(); else return (string)"";}
+  //! Get the pointer to FitsOpenFile
+  inline FitsOpenFile* GetFitsOpenFile(void) const {return FitsOF;}
+  //! Get the FITS file pointer (cfistio pointer)
+  inline fitsfile* GetFitsPtr(void) const {return FitsOF->GetFitsPtr();}
+  //! Get the number of HDU in the FITS file
+  inline int NHDU(void) const
+         {if(FitsOF) return FitsOF->NHDU(); else return 0;}
+  //! Get the number of the HDU read
+  inline int HDU(void) const
+         {if(FitsOF) return FitsOF->HDU(); else return 0;}
+  //! Get the HDU type
+  inline int HDUType(void) const
+         {if(FitsOF) return FitsOF->HDUType(); else return 0;}
+  //! Get the number of rows in the FITS HDU to be read
+  inline LONGLONG GetNbLine(void) const {return NBline;}
+  //! Get the number of columns in the FITS HDU to be read
+  inline int GetNbCol(void) const {return NBcol;}
+  //! Get the columns label that is read
+  inline string GetColLabel(int ColNum) const
+         {if(ColNum<0 || ColNum>=NBcol) return string(""); else return ColLabel[ColNum];}
+  //! Get the columns type code that is read
+  inline int GetColTypeCode(int ColNum) const
+         {if(ColNum<0 || ColNum>=NBcol) return -999; else return ColTypeCode[ColNum];}
+  //! Get the columns fits tunit that is read
+  inline string GetColTUnit(int ColNum) const
+         {if(ColNum<0 || ColNum>=NBcol) return string(""); else return ColTUnit[ColNum];}
+  //! Get the columns fits tform that is read
+  inline string GetColTForm(int ColNum) const
+         {if(ColNum<0 || ColNum>=NBcol) return string(""); else return ColTForm[ColNum];}
+  //! Get the read requested buffer length
+  inline long GetBLen(void) const {return BuffLen;}
+  //! Get the read buffer direction
+  inline long GetBSens(void) const {return BuffSens;}
+  //! Print to os
+  virtual void Print(ostream& os,int lp=1) const;
+  //! Print to stdout
+  inline  void Print(int lp=1) const {Print(cout,lp);}
+  //! Get the read effective buffer length
+  inline long GetNBuffer(void) const {return NBuffer;}
+  //! Get the read bufferpointer
+  inline double* GetBuffer(int ColNum)
+         {if(ColNum<0 || ColNum>=NBcol) return NULL; else return Buffer[ColNum];}
+
+protected:
+  void Init(FitsOpenFile* fof,int ihdu,long blen,long bsens,int lp);
+  void Delete(void);
+
+  vector<string> ColLabel,ColTUnit,ColTForm;
+  vector<int> ColTypeCode;
+  int NBcol;
+  LONGLONG NBline;
+
+  double NulVal;
+  unsigned short DbgLevel;
+  long BuffLen, BuffSens;
+
+  FitsOpenFile* FitsOF;
+  vector<LONGLONG> LineDeb, LineFin;
+  double **Buffer;
+  long NBuffer;
+};
+
+
+///////////////////////////////////////////////////////////////////
+//! Class for reading ALL the columns in a FITS ASCII or BINARY table with fits file opening
+class FitsABTColRead1F : public FitsABTColRd1F {
+public:
+  FitsABTColRead1F(string fname,int ihdu=0
+                ,long blen=100,long bsens=1,int lp=0);
+  FitsABTColRead1F(const char *cfname,int ihdu=0
+                ,long blen=100,long bsens=1,int lp=0);
+  virtual ~FitsABTColRead1F();
+};
+
+///////////////////////////////////////////////////////////////////
 //! Class for reading a 2D image from a FITS file
 class FitsImg2DRd : public AnyDataObj {
