Index: trunk/SophyaExt/FitsIOServer/Makefile
===================================================================
--- trunk/SophyaExt/FitsIOServer/Makefile	(revision 3047)
+++ trunk/SophyaExt/FitsIOServer/Makefile	(revision 3049)
@@ -1,16 +1,18 @@
 include ../BuildMgr/sophyamake.inc
+
  
 all: $(SOPHYALIBP)libFitsIOServer.a
  
 clean:
-	 rm -f $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
+	 rm -f $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
 	rm -f $(SOPHYALIBP)libFitsIOServer.a
  
-$(SOPHYALIBP)libFitsIOServer.a : $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
+$(SOPHYALIBP)libFitsIOServer.a : $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
 	$(AR) $(ARFLAGS) $@ $? 
 	touch $(SOPHYAINCP)/SophyaConfInfo/libextsophya.objlist
  
 $(SOPHYAOBJP)datacirclefits.o: datacirclefits.cc \
-  $(SOPHYAINCP)sopnamsp.h datacirclefits.h \
+  $(SOPHYAINCP)sopnamsp.h \
+  datacirclefits.h \
   $(SOPHYAINCP)datacirclebase.h \
   $(SOPHYAINCP)circle.h \
@@ -29,16 +31,14 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fabtcolread.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)tvector.h \
-  $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
+  fabtcolread.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -58,16 +58,14 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fabtwriter.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)tvector.h \
-  $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
+  fabtwriter.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -87,25 +85,24 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fboloread.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)tvector.h \
-  $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)utilarr.h \
-  $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fabtcolread.h \
+  fboloread.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fabtcolread.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h
@@ -116,5 +113,5 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fbtntintf.h \
+  fbtntintf.h \
   $(SOPHYAINCP)anydataobj.h \
   $(SOPHYAINCP)ntupintf.h \
@@ -125,25 +122,25 @@
 $(SOPHYAOBJP)fiosinit.o: fiosinit.cc \
   $(SOPHYAINCP)sopnamsp.h \
-  $(SOPHYAINCP)machdefs.h fiosinit.h \
+  $(SOPHYAINCP)machdefs.h \
+  fiosinit.h \
   $(SOPHYAINCP)sophyainit.h \
-  $(SOPHYAINCP)machdefs.h fitsmanager.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h \
-  fitshdtable.h $(SOPHYAINCP)datatable.h \
+  fitsmanager.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshdtable.h \
+  $(SOPHYAINCP)datatable.h \
   $(SOPHYAINCP)basedtable.h \
   $(SOPHYAINCP)ntupintf.h \
-  $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)segdatablock.h \
   $(SOPHYAINCP)tvector.h \
@@ -154,11 +151,7 @@
   $(SOPHYAINCP)utilarr.h \
   $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fitshandler.h \
-  fitsarrhand.h $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)tvector.h fitsblkrw.h \
-  fitsntuple.h $(SOPHYAINCP)ntuple.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fitshandler.h fitsarrhand.h fitsblkrw.h fitsntuple.h \
+  $(SOPHYAINCP)ntuple.h fitsfile.h \
   fitsspherehealpix.h \
   $(SOPHYAINCP)spherehealpix.h \
@@ -175,5 +168,6 @@
   fitsspherethetaphi.h \
   $(SOPHYAINCP)spherethetaphi.h \
-  fitslocalmap.h $(SOPHYAINCP)localmap.h
+  fitslocalmap.h \
+  $(SOPHYAINCP)localmap.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fiosinit.cc
  
@@ -181,19 +175,19 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsautoreader.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)anydataobj.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h fitsinoutfile.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitsautoreader.h \
+  $(SOPHYAINCP)anydataobj.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -201,7 +195,6 @@
   $(SOPHYAINCP)tarray.h \
   $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)utilarr.h fitsspherehealpix.h \
+  $(SOPHYAINCP)utilarr.h \
+  fitsspherehealpix.h \
   $(SOPHYAINCP)spherehealpix.h \
   $(SOPHYAINCP)sphericalmap.h \
@@ -216,14 +209,15 @@
   $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h \
-  $(SOPHYAINCP)HEALPixUtils.h fitsntuple.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  $(SOPHYAINCP)HEALPixUtils.h \
+  fitsntuple.h \
   $(SOPHYAINCP)ntuple.h \
   $(SOPHYAINCP)ntupintf.h \
-  $(SOPHYAINCP)ppersist.h fitsxntuple.h \
-  $(SOPHYAINCP)xntuple.h fitslocalmap.h \
-  $(SOPHYAINCP)localmap.h fbtntintf.h \
-  $(SOPHYAINCP)ntupintf.h
+  fitsxntuple.h \
+  $(SOPHYAINCP)xntuple.h \
+  fitslocalmap.h \
+  $(SOPHYAINCP)localmap.h \
+  fbtntintf.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsautoreader.cc
  
@@ -231,44 +225,46 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsbntbllineRW.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h fitsinoutfile.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h \
-  fitshandler.h $(SOPHYAINCP)utils.h
+  $(SOPHYAINCP)machdefs.h \
+  fitsbntbllineRW.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h \
+  $(SOPHYAINCP)utils.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsbntbllineRW.cc
  
 $(SOPHYAOBJP)fitsfile.o: fitsfile.cc \
   $(SOPHYAINCP)sopnamsp.h \
-  $(SOPHYAINCP)machdefs.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h fitsinoutfile.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h \
-  fitshandler.h $(SOPHYAINCP)strutil.h \
-  $(SOPHYAINCP)anydataobj.h
+  $(SOPHYAINCP)machdefs.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h \
+  $(SOPHYAINCP)strutil.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsfile.cc
  
@@ -278,5 +274,4 @@
   $(SOPHYAINCP)datatable.h \
   $(SOPHYAINCP)basedtable.h \
-  $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)ntupintf.h \
   $(SOPHYAINCP)dvlist.h \
@@ -299,25 +294,59 @@
   $(SOPHYAINCP)utilarr.h \
   $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fitsblkrw.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fitsblkrw.h fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
   fitshandler.h swfitsdtable.h \
-  $(SOPHYAINCP)basedtable.h \
-  $(SOPHYAINCP)swsegdb.h fitsswapper.h
+  $(SOPHYAINCP)swsegdb.h \
+  fitsswapper.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitshdtable.cc
  
+$(SOPHYAOBJP)fitshistos.o: fitshistos.cc \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)sopnamsp.h \
+  $(SOPHYAINCP)histos.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)peida.h \
+  $(SOPHYAINCP)utils.h \
+  $(SOPHYAINCP)perrors.h \
+  $(SOPHYAINCP)fmath.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  $(SOPHYAINCP)hisprof.h \
+  $(SOPHYAINCP)histerr.h \
+  $(SOPHYAINCP)histos2.h \
+  fitsblkrw.h fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitshistos.cc
+ 
 $(SOPHYAOBJP)fitsinoutfile.o: fitsinoutfile.cc \
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)segdatablock.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)anydataobj.h fitsinoutfile.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)anydataobj.h \
+  fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -333,11 +362,10 @@
 $(SOPHYAOBJP)fitslocalmap.o: fitslocalmap.cc \
   $(SOPHYAINCP)sopnamsp.h \
-  $(SOPHYAINCP)machdefs.h fitslocalmap.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitslocalmap.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)localmap.h \
   $(SOPHYAINCP)pixelmap.h \
   $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -364,7 +392,6 @@
   $(SOPHYAINCP)utilarr.h \
   $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fitsfile.h fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -374,12 +401,11 @@
 $(SOPHYAOBJP)fitsmanager.o: fitsmanager.cc \
   $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)sopnamsp.h fitsmanager.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)sopnamsp.h \
+  fitsmanager.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -396,11 +422,10 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsntuple.h \
-  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitsntuple.h \
   $(SOPHYAINCP)ntuple.h \
   $(SOPHYAINCP)objfio.h \
   $(SOPHYAINCP)anydataobj.h \
   $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -411,8 +436,7 @@
   $(SOPHYAINCP)mutyv.h \
   $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -430,5 +454,4 @@
   $(SOPHYAINCP)pixelmap.h \
   $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -455,12 +478,8 @@
   $(SOPHYAINCP)tvector_tsnl.h \
   $(SOPHYAINCP)HEALPixUtils.h \
-  $(SOPHYAINCP)anydataobj.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h \
-  fitshandler.h $(SOPHYAINCP)tarray.h \
-  fitstarray.h
+  fitsfile.h fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h fitstarray.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsspherehealpix.cc
  
@@ -475,5 +494,4 @@
   $(SOPHYAINCP)pixelmap.h \
   $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -499,12 +517,8 @@
   $(SOPHYAINCP)tmatrix_tsnl.h \
   $(SOPHYAINCP)tvector_tsnl.h \
-  $(SOPHYAINCP)anydataobj.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h \
-  fitshandler.h $(SOPHYAINCP)tarray.h \
-  fitstarray.h
+  fitsfile.h fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h fitstarray.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsspherethetaphi.cc
  
@@ -513,22 +527,20 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitstarray.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)utilarr.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  fitstarray.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  fitsfile.h fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -539,23 +551,21 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsxntuple.h \
-  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitsxntuple.h \
   $(SOPHYAINCP)xntuple.h \
   $(SOPHYAINCP)ntupintf.h \
   $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -587,12 +597,11 @@
   $(SOPHYAINCP)tmatrix_tsnl.h \
   $(SOPHYAINCP)tvector_tsnl.h \
-  $(SOPHYAINCP)swsegdb.h fitsswapper.h \
-  $(SOPHYAINCP)machdefs.h fitsinoutfile.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h fitsblkrw.h \
-  fitshdtable.h $(SOPHYAINCP)datatable.h \
-  $(SOPHYAINCP)basedtable.h fitshandler.h \
+  $(SOPHYAINCP)swsegdb.h \
+  fitsswapper.h fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitsblkrw.h fitshdtable.h \
+  $(SOPHYAINCP)datatable.h \
+  fitshandler.h \
   $(SOPHYAINCP)sopnamsp.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  swfitsdtable.cc
Index: trunk/SophyaExt/FitsIOServer/fiosinit.cc
===================================================================
--- trunk/SophyaExt/FitsIOServer/fiosinit.cc	(revision 3047)
+++ trunk/SophyaExt/FitsIOServer/fiosinit.cc	(revision 3049)
@@ -12,4 +12,5 @@
 #include "fitsspherethetaphi.h"
 #include "fitslocalmap.h"
+#include "fitshistos.h"
 
 
@@ -44,4 +45,6 @@
   // Enregistrement des classes heritant de FitsIOHandler
   FitsManager::RegisterHandler(new FITS_NTuple, 0, "NTuple");
+  FitsManager::RegisterHandler(new FitsHandler<Histo>, 0, "Histo");
+  FitsManager::RegisterHandler(new FitsHandler<Histo2D>, 0, "Histo2D");
   
   FitsManager::RegisterHandler(new FITS_SphereHEALPix<r_4> , 0, "SphereHEALPix<r_4>");
Index: trunk/SophyaExt/FitsIOServer/fitsautoreader.cc
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitsautoreader.cc	(revision 3047)
+++ trunk/SophyaExt/FitsIOServer/fitsautoreader.cc	(revision 3049)
@@ -192,5 +192,5 @@
 	    return sphptr;
 	  }
-        //CMV: Bon c'est quand meme sympa de pouvoir re-lire ce
+        //cmv: Bon c'est quand meme sympa de pouvoir re-lire ce
 	// qu'on a ecrit !! Je fais cette modif mais a priori
 	// ce n'est que du sparadra car ca devrait planter
Index: trunk/SophyaExt/FitsIOServer/fitshistos.cc
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitshistos.cc	(revision 3049)
+++ trunk/SophyaExt/FitsIOServer/fitshistos.cc	(revision 3049)
@@ -0,0 +1,398 @@
+#include "machdefs.h"
+#include "sopnamsp.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <iostream>
+#include <typeinfo>
+
+#include "histos.h"
+#include "hisprof.h"
+#include "histerr.h"
+#include "histos2.h"
+#include "fitsblkrw.h"
+#include "fitshandler.h"
+
+
+///////////////////////////////////////////////////////////////////////////
+///////////////////////// Histo , HProf , HistoErr ////////////////////////
+///////////////////////////////////////////////////////////////////////////
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+int FitsHandler<Histo>::CheckReadability(FitsInOutFile& is)
+{
+  if (is.CurrentHDUType() == IMAGE_HDU ) return 0;
+  string key = "SOPCLSNM";
+  string clsnm = is.KeyValue(key);
+  if ( (clsnm == "SOPHYA::Histo")
+     || (clsnm == "SOPHYA::HProf")
+     || (clsnm == "SOPHYA::HistoErr") ) return 2;
+  return 0;
+}
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+int FitsHandler<Histo>::CheckHandling(AnyDataObj & o) 
+{  
+ if (typeid(o) == typeid(Histo)) return 2;
+ Histo * po = dynamic_cast< Histo * >(& o); 
+ if (po != NULL) return 2;
+ return 0;
+}
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+void FitsHandler<Histo>::Write(FitsInOutFile& os)
+{
+  if(dobj==NULL)   
+    throw NullPtrError("FitsHandler<Histo>::Write() NULL dobj pointer ");
+
+  //--- Le type d'objet et son pointeur
+  Histo*    h  = dynamic_cast< Histo *> (dobj);
+  HProf*    hp = dynamic_cast< HProf *> (dobj);
+  HistoErr* he = dynamic_cast< HistoErr *> (dobj);
+
+  //--- Les noms de colonnes
+  int tbltyp = os.GetDef_TableType();
+  vector<string> colnames, tform, tunit;
+  // les valeurs du bin
+  if(tbltyp==ASCII_TBL) tform.push_back("D15.8"); else tform.push_back("D");
+  colnames.push_back("val");
+  tunit.push_back("");
+  // Les erreurs
+  if(h->mErr2) {
+    if(tbltyp==ASCII_TBL) tform.push_back("D15.8"); else tform.push_back("D");
+    colnames.push_back("e2");
+    tunit.push_back("");
+  }
+  // Le nombre d'entrees dans le bin
+  if(he!=NULL) {
+    if(tbltyp==ASCII_TBL) tform.push_back("D15.8"); else tform.push_back("D");
+    colnames.push_back("nb");
+    tunit.push_back("");
+  }
+
+  //--- On cree la table  
+  string extname = os.NextExtensionName();
+  os.CreateTable(os.GetDef_TableType(),extname,colnames,tform, tunit);
+
+  // Ecriture des donnees des colonnes
+  int n = h->NBins();
+  if(n>0) {
+    FitsBlockRW<r_8>::WriteColumnData(os,1,1,1,h->mData,n);
+    if(h->mErr2) FitsBlockRW<r_8>::WriteColumnData(os,2,1,1,h->mErr2,n);
+    if(he!=NULL) FitsBlockRW<r_8>::WriteColumnData(os,3,1,1,he->mNData,n);
+  }
+
+  // Ecriture des clefs fits
+  MuTyV mtv;
+
+  mtv = "SOPHYA::Histo";
+  if(hp) mtv = "SOPHYA::HProf";
+  else if(he) mtv = "SOPHYA::HistoErr";
+  os.WriteKey("SOPCLSNM",mtv," SOPHYA class name");
+
+  mtv = "Histo";
+  if(hp) mtv = "HProf";
+  else if(he) mtv = "HistoErr";
+  os.WriteKey("CONTENT",mtv," name of SOPHYA object");
+
+  mtv = h->mBins;
+  os.WriteKey("NBIN",mtv," number of bins");
+
+  mtv = h->mMin;
+  os.WriteKey("XMIN",mtv," absc of beginning of 1srt bin");
+
+  mtv = h->mMax;
+  os.WriteKey("XMAX",mtv," absc of end of last bin");
+
+  mtv = h->binWidth;
+  os.WriteKey("WBIN",mtv," bin width");
+
+  mtv = h->mUnder;
+  os.WriteKey("UNDER",mtv," number of bins");
+
+  mtv = h->mOver;
+  os.WriteKey("OVER",mtv," underflow");
+
+  mtv = h->nHist;
+  os.WriteKey("NHIST",mtv," entries weighted somme");
+
+  double x = h->nEntries; mtv = x;
+  os.WriteKey("NENTRIES",mtv," number of entries");
+
+  int_4 haserr =(h->mErr2) ? 1: 0;
+  mtv = haserr;
+  os.WriteKey("HASERR2",mtv," square errors associated");
+
+  if(hp) {
+    int_4 ok = (hp->Ok)? 1: 0;
+    mtv = ok;
+    os.WriteKey("UPDOK",mtv," update status flag");
+
+    mtv = hp->YMin;
+    os.WriteKey("YMIN",mtv," sum low limit");
+
+    mtv = hp->YMax;
+    os.WriteKey("YMAX",mtv," sum high limit");
+  }
+  
+  if(he) {
+    mtv = he->mCorrel;
+    os.WriteKey("NCORREL",mtv," number of Correl calls");
+  }
+
+}
+
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+void FitsHandler<Histo>::Read(FitsInOutFile& is)
+{
+ int hdutyp = is.CurrentHDUType();
+ if( (hdutyp != BINARY_TBL ) && (hdutyp != ASCII_TBL) )
+    throw FitsIOException("FitsHandler<Histo>::Read() Not a binary or ascii table HDU");
+
+  //--- Nb de lignes et de colonnes 
+  vector<string> colnames;
+  vector<int> coltypes;
+  vector<long> repcnt, width;
+  is.GetColInfo(colnames,coltypes,repcnt,width);
+  long ncol = colnames.size();
+  if(ncol<=0)
+    throw FitsIOException("FitsHandler<Histo>::Read() bad number of table columns");
+  long nbrows = is.GetNbRows();
+  if(nbrows<=0)
+    throw FitsIOException("FitsHandler<Histo>::Read() number of rows is zero, no reading");
+
+  //--- Lecture entete FITS
+  string key = "SOPCLSNM"; string clsnm = is.KeyValue(key);
+  if(  (clsnm != "SOPHYA::Histo")
+    && (clsnm != "SOPHYA::HProf")
+    && (clsnm != "SOPHYA::HistoErr") )
+    throw FitsIOException("FitsHandler<Histo>::Read() bad value for key SOPCLSNM");
+
+  DVList dvl;
+  is.GetHeaderRecords(dvl,true,false);
+
+  int_4 nbin = dvl.GetI("NBIN",-1);
+  if(nbin<=0 && nbin!=nbrows)
+    throw FitsIOException("FitsHandler<Histo>::Read() number of bins is zero or bad, no reading");
+
+  r_8 xmin = dvl.GetD("XMIN",-1.);
+  r_8 xmax = dvl.GetD("XMAX",+1.);
+
+  //--- Creation de l'objet
+  if (dobj != NULL) delete dobj;  // destruction si existe
+  if( clsnm == "SOPHYA::Histo" ) {
+    dobj = new Histo(xmin,xmax,nbin);
+    int_4 haserr2 = dvl.GetI("HASERR2",0);
+    if(ncol>1 && haserr2>0) dobj->Errors();
+  } else if( clsnm == "SOPHYA::HProf" ) {
+    if(ncol<2)
+      throw FitsIOException("FitsHandler<Histo>::Read() wrong number of columns for HProf");
+    r_8 ymin = dvl.GetD("YMIN",1.);
+    r_8 ymax = dvl.GetD("YMAX",-1.);
+    dobj = new HProf(xmin,xmax,nbin,ymin,ymax);
+  } else if( clsnm == "SOPHYA::HistoErr" ) {
+    if(ncol<3)
+      throw FitsIOException("FitsHandler<Histo>::Read() wrong number of columns for HistoErr");
+    dobj = new HistoErr(xmin,xmax,nbin);
+  } else {
+    throw FitsIOException("FitsHandler<Histo>::Read() Not a Histo or HProf or HistoErr");
+  }
+
+  //--- Type de l'histo
+  Histo*    h  = dynamic_cast< Histo *> (dobj);
+  HProf*    hp = dynamic_cast< HProf *> (dobj);
+  HistoErr* he = dynamic_cast< HistoErr *> (dobj);
+
+  //--- remplissage des variables d'entete
+  h->mUnder = dvl.GetD("UNDER",0.);
+  h->mOver = dvl.GetD("OVER",0.);
+  h->nHist = dvl.GetD("NHIST",0.);
+  double x = dvl.GetD("NENTRIES",0.); h->nEntries = uint_8(x);
+
+  if(hp) {
+    int_4 ok = dvl.GetI("UPDOK",0); hp->Ok = (ok)? true : false;
+    hp->YMin = dvl.GetD("YMIN",1.);
+    hp->YMax = dvl.GetD("YMAX",-1.);
+  }
+
+  if(he) he->mCorrel = dvl.GetI("NCORREL",0);
+
+  //--- remplissage de l'histo
+  FitsBlockRW<r_8>::ReadColumnData(is,1,1,1,h->mData,nbin);
+  if(h->mErr2) FitsBlockRW<r_8>::ReadColumnData(is,2,1,1,h->mErr2,nbin);
+  if(he) FitsBlockRW<r_8>::ReadColumnData(is,3,1,1,he->mNData,nbin);
+
+}
+
+
+///////////////////////////////////////////////////////////////////////////
+///////////////////////////////// Histo2D  ////////////////////////////////
+///////////////////////////////////////////////////////////////////////////
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+int FitsHandler<Histo2D>::CheckReadability(FitsInOutFile& is)
+{
+  if (is.CurrentHDUType() != IMAGE_HDU ) return 0;
+  string key = "SOPCLSNM"; 
+  string clsnm = is.KeyValue(key);
+  if( clsnm == "SOPHYA::Histo2D" ) return 2;
+  return 0;
+}
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+int FitsHandler<Histo2D>::CheckHandling(AnyDataObj & o) 
+{  
+ if (typeid(o) == typeid(Histo2D)) return 2;
+ Histo2D * po = dynamic_cast< Histo2D * >(& o); 
+ if (po != NULL) return 2;
+ return 0;
+}
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+void FitsHandler<Histo2D>::Write(FitsInOutFile& os)
+{
+  if(dobj==NULL)   
+    throw NullPtrError("FitsHandler<Histo2D>::Write() NULL dobj pointer ");
+
+  //--- Le type d'objet et son pointeur
+  Histo2D* h = dynamic_cast< Histo2D *> (dobj);
+
+  //--- Les noms de colonnes
+  int tbltyp = os.GetDef_TableType();
+  vector<string> colnames, tform, tunit;
+  // les valeurs du bin
+  if(tbltyp==ASCII_TBL) tform.push_back("D15.8"); else tform.push_back("D");
+  colnames.push_back("val");
+  tunit.push_back("");
+  // Les erreurs
+  if(h->mErr2) {
+    if(tbltyp==ASCII_TBL) tform.push_back("D15.8"); else tform.push_back("D");
+    colnames.push_back("e2");
+    tunit.push_back("");
+  }
+
+  //--- On cree la table  
+  string extname = os.NextExtensionName();
+  os.CreateTable(os.GetDef_TableType(),extname,colnames,tform, tunit);
+
+  // Ecriture des donnees des colonnes
+  long n = h->mNxy;
+  if(n>0) {
+    FitsBlockRW<r_8>::WriteColumnData(os,1,1,1,h->mData,n);
+    if(h->mErr2) FitsBlockRW<r_8>::WriteColumnData(os,2,1,1,h->mErr2,n);
+  }
+
+  // Ecriture des clefs fits
+  MuTyV mtv;
+
+  mtv = "SOPHYA::Histo2D";
+  os.WriteKey("SOPCLSNM",mtv," SOPHYA class name");
+
+  mtv = "Histo2D";
+  os.WriteKey("CONTENT",mtv," name of SOPHYA object");
+
+  mtv = h->mNx;
+  os.WriteKey("NBINX",mtv," number of bins in X");
+  mtv = h->mNy;
+  os.WriteKey("NBINY",mtv," number of bins in Y");
+  mtv = h->mNxy;
+  os.WriteKey("NBINXY",mtv," number of elements");
+
+  mtv = h->mXmin;
+  os.WriteKey("XMIN",mtv," absc of beginning of 1srt bin in X");
+  mtv = h->mXmax;
+  os.WriteKey("XMAX",mtv," absc of end of last bin in X");
+  mtv = h->mYmin;
+  os.WriteKey("YMIN",mtv," absc of beginning of 1srt bin in Y");
+  mtv = h->mYmax;
+  os.WriteKey("YMAX",mtv," absc of end of last bin in Y");
+
+  mtv = h->mWBinx;
+  os.WriteKey("WBINX",mtv," bin width in X");
+  mtv = h->mWBiny;
+  os.WriteKey("WBINY",mtv," bin width in Y");
+
+  for(int i=0;i<3;i++) for(int j=0;j<3;j++) {
+    char str[16]; sprintf(str,"OUT%1d%1d",i,j);
+    mtv = h->mOver[i][j];
+    os.WriteKey(str,mtv," under/over X/Y");
+  }
+
+  mtv = h->nHist;
+  os.WriteKey("NHIST",mtv," entries weighted somme");
+
+  mtv = h->nEntries;
+  os.WriteKey("NENTRIES",mtv," number of entries");
+
+  int_4 haserr =(h->mErr2) ? 1: 0;
+  mtv = haserr;
+  os.WriteKey("HASERR2",mtv," square errors associated");
+
+}
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+void FitsHandler<Histo2D>::Read(FitsInOutFile& is)
+{
+ int hdutyp = is.CurrentHDUType();
+ if( (hdutyp != BINARY_TBL ) && (hdutyp != ASCII_TBL) )
+    throw FitsIOException("FitsHandler<Histo2D>::Read() Not a binary or ascii table HDU");
+
+  //--- Nb de lignes et de colonnes 
+  vector<string> colnames;
+  vector<int> coltypes;
+  vector<long> repcnt, width;
+  is.GetColInfo(colnames,coltypes,repcnt,width);
+  long ncol = colnames.size();
+  if(ncol<=0)
+    throw FitsIOException("FitsHandler<Histo2D>::Read() bad number of table columns");
+  long nbrows = is.GetNbRows();
+  if(nbrows<=0)
+    throw FitsIOException("FitsHandler<Histo2D>::Read() number of rows is zero, no reading");
+
+  //--- Lecture entete FITS
+  string key = "SOPCLSNM"; string clsnm = is.KeyValue(key);
+  if( clsnm != "SOPHYA::Histo2D" )
+    throw FitsIOException("FitsHandler<Histo2D>::Read() bad value for key SOPCLSNM");
+
+  DVList dvl;
+  is.GetHeaderRecords(dvl,true,false);
+
+  int_4 nbinx = dvl.GetI("NBINX",-1);
+  int_4 nbiny = dvl.GetI("NBINY",-1);
+  int_8 nbinxy = nbinx*nbiny;
+  if(nbinx<=0 || nbiny<=0 || nbinxy!=nbrows)
+    throw FitsIOException("FitsHandler<Histo2D>::Read() number of bins is zero or bad, no reading");
+
+  r_8 xmin = dvl.GetD("XMIN",-1.);
+  r_8 xmax = dvl.GetD("XMAX",1.);
+  r_8 ymin = dvl.GetD("YMIN",-1.);
+  r_8 ymax = dvl.GetD("YMAX",1.);
+
+  //--- Creation de l'objet
+  if (dobj != NULL) delete dobj;  // destruction si existe
+  if( clsnm == "SOPHYA::Histo2D" ) {
+    dobj = new Histo2D(xmin,xmax,nbinx,ymin,ymax,nbiny);
+    int_4 haserr2 = dvl.GetI("HASERR2",0);
+    if(ncol>1 && haserr2>0) dobj->Errors();
+  } else {
+    throw FitsIOException("FitsHandler<Histo2D>::Read() Not a Histo2D");
+  }
+
+  //--- Type de l'histo
+  Histo2D* h  = dynamic_cast< Histo2D *> (dobj);
+
+  //--- remplissage des variables d'entete
+  h->nHist = dvl.GetD("NHIST",0.);
+  h->nEntries = dvl.GetI("NENTRIES",0);
+
+  for(int i=0;i<3;i++) for(int j=0;j<3;j++) {
+    char str[16]; sprintf(str,"OUT%1d%1d",i,j);
+    h->mOver[i][j] = dvl.GetD(str,0.);
+  }
+
+  //--- remplissage de l'histo
+  FitsBlockRW<r_8>::ReadColumnData(is,1,1,1,h->mData,nbinxy);
+  if(h->mErr2) FitsBlockRW<r_8>::ReadColumnData(is,2,1,1,h->mErr2,nbinxy);
+
+}
Index: trunk/SophyaExt/FitsIOServer/fitshistos.h
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitshistos.h	(revision 3049)
+++ trunk/SophyaExt/FitsIOServer/fitshistos.h	(revision 3049)
@@ -0,0 +1,40 @@
+#ifndef FITSHISTOHAND_H
+#define FITSHISTOHAND_H
+
+#include "machdefs.h"
+#include <string>
+#include "histos.h"
+#include "histos2.h"
+
+#include "fitshandler.h"
+
+namespace SOPHYA {
+
+/*! 
+  \ingroup FitsIOServer
+  \brief FITS I/O handler for Histo/HProf and HistErr objects
+*/
+
+inline FitsInOutFile& operator << (FitsInOutFile& os, Histo const & obj)
+{ FitsHandler<Histo> fio(const_cast<Histo &>(obj));  fio.Write(os);  return os; }
+
+inline FitsInOutFile& operator >> (FitsInOutFile& is, Histo & obj)
+  { FitsHandler<Histo> fio(obj); is.SkipEmptyFirstHDU();
+  fio.Read(is); is.MoveToNextHDU(); return(is); }
+
+/*! 
+  \ingroup FitsIOServer
+  \brief FITS I/O handler for Histo2D objects
+*/
+
+inline FitsInOutFile& operator << (FitsInOutFile& os, Histo2D const & obj)
+{ FitsHandler<Histo2D> fio(const_cast<Histo2D &>(obj));  fio.Write(os);  return os; }
+
+inline FitsInOutFile& operator >> (FitsInOutFile& is, Histo2D & obj)
+  { FitsHandler<Histo2D> fio(obj); is.SkipEmptyFirstHDU();
+  fio.Read(is); is.MoveToNextHDU(); return(is); }
+
+
+} // Fin du namespace
+
+#endif
Index: trunk/SophyaExt/FitsIOServer/objlist.list
===================================================================
--- trunk/SophyaExt/FitsIOServer/objlist.list	(revision 3047)
+++ trunk/SophyaExt/FitsIOServer/objlist.list	(revision 3049)
@@ -9,4 +9,5 @@
 fitsfile.o
 fitshdtable.o
+fitshistos.o
 fitsinoutfile.o
 fitslocalmap.o
Index: trunk/SophyaExt/FitsIOServer/smakefile
===================================================================
--- trunk/SophyaExt/FitsIOServer/smakefile	(revision 3047)
+++ trunk/SophyaExt/FitsIOServer/smakefile	(revision 3049)
@@ -4,13 +4,14 @@
  
 clean:
-	 rm -f $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
+	 rm -f $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
 	rm -f $(SOPHYALIBP)libFitsIOServer.a
  
-$(SOPHYALIBP)libFitsIOServer.a : $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
+$(SOPHYALIBP)libFitsIOServer.a : $(SOPHYAOBJP)datacirclefits.o $(SOPHYAOBJP)fabtcolread.o $(SOPHYAOBJP)fabtwriter.o $(SOPHYAOBJP)fboloread.o $(SOPHYAOBJP)fbtntintf.o $(SOPHYAOBJP)fiosinit.o $(SOPHYAOBJP)fitsautoreader.o $(SOPHYAOBJP)fitsbntbllineRW.o $(SOPHYAOBJP)fitsfile.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshistos.o $(SOPHYAOBJP)fitsinoutfile.o $(SOPHYAOBJP)fitslocalmap.o $(SOPHYAOBJP)fitsmanager.o $(SOPHYAOBJP)fitsntuple.o $(SOPHYAOBJP)fitsspherehealpix.o $(SOPHYAOBJP)fitsspherethetaphi.o $(SOPHYAOBJP)fitstarray.o $(SOPHYAOBJP)fitsxntuple.o $(SOPHYAOBJP)swfitsdtable.o
 	$(AR) $(ARFLAGS) $@ $? 
 	touch $(SOPHYAINCP)/SophyaConfInfo/libextsophya.objlist
  
 $(SOPHYAOBJP)datacirclefits.o: datacirclefits.cc \
-  $(SOPHYAINCP)sopnamsp.h datacirclefits.h \
+  $(SOPHYAINCP)sopnamsp.h \
+  datacirclefits.h \
   $(SOPHYAINCP)datacirclebase.h \
   $(SOPHYAINCP)circle.h \
@@ -29,16 +30,14 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fabtcolread.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)tvector.h \
-  $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
+  fabtcolread.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -58,16 +57,14 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fabtwriter.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)tvector.h \
-  $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
+  fabtwriter.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -87,25 +84,24 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fboloread.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)tvector.h \
-  $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)utilarr.h \
-  $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fabtcolread.h \
+  fboloread.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fabtcolread.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h
@@ -116,5 +112,5 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fbtntintf.h \
+  fbtntintf.h \
   $(SOPHYAINCP)anydataobj.h \
   $(SOPHYAINCP)ntupintf.h \
@@ -125,25 +121,25 @@
 $(SOPHYAOBJP)fiosinit.o: fiosinit.cc \
   $(SOPHYAINCP)sopnamsp.h \
-  $(SOPHYAINCP)machdefs.h fiosinit.h \
+  $(SOPHYAINCP)machdefs.h \
+  fiosinit.h \
   $(SOPHYAINCP)sophyainit.h \
-  $(SOPHYAINCP)machdefs.h fitsmanager.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h \
-  fitshdtable.h $(SOPHYAINCP)datatable.h \
+  fitsmanager.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshdtable.h \
+  $(SOPHYAINCP)datatable.h \
   $(SOPHYAINCP)basedtable.h \
   $(SOPHYAINCP)ntupintf.h \
-  $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)segdatablock.h \
   $(SOPHYAINCP)tvector.h \
@@ -154,11 +150,7 @@
   $(SOPHYAINCP)utilarr.h \
   $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fitshandler.h \
-  fitsarrhand.h $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)tvector.h fitsblkrw.h \
-  fitsntuple.h $(SOPHYAINCP)ntuple.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fitshandler.h fitsarrhand.h fitsblkrw.h fitsntuple.h \
+  $(SOPHYAINCP)ntuple.h fitsfile.h \
   fitsspherehealpix.h \
   $(SOPHYAINCP)spherehealpix.h \
@@ -175,5 +167,6 @@
   fitsspherethetaphi.h \
   $(SOPHYAINCP)spherethetaphi.h \
-  fitslocalmap.h $(SOPHYAINCP)localmap.h
+  fitslocalmap.h \
+  $(SOPHYAINCP)localmap.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fiosinit.cc
  
@@ -181,19 +174,19 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsautoreader.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)anydataobj.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h fitsinoutfile.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitsautoreader.h \
+  $(SOPHYAINCP)anydataobj.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -201,7 +194,6 @@
   $(SOPHYAINCP)tarray.h \
   $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)utilarr.h fitsspherehealpix.h \
+  $(SOPHYAINCP)utilarr.h \
+  fitsspherehealpix.h \
   $(SOPHYAINCP)spherehealpix.h \
   $(SOPHYAINCP)sphericalmap.h \
@@ -216,14 +208,15 @@
   $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h \
-  $(SOPHYAINCP)HEALPixUtils.h fitsntuple.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  $(SOPHYAINCP)HEALPixUtils.h \
+  fitsntuple.h \
   $(SOPHYAINCP)ntuple.h \
   $(SOPHYAINCP)ntupintf.h \
-  $(SOPHYAINCP)ppersist.h fitsxntuple.h \
-  $(SOPHYAINCP)xntuple.h fitslocalmap.h \
-  $(SOPHYAINCP)localmap.h fbtntintf.h \
-  $(SOPHYAINCP)ntupintf.h
+  fitsxntuple.h \
+  $(SOPHYAINCP)xntuple.h \
+  fitslocalmap.h \
+  $(SOPHYAINCP)localmap.h \
+  fbtntintf.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsautoreader.cc
  
@@ -231,44 +224,46 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsbntbllineRW.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h fitsinoutfile.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h \
-  fitshandler.h $(SOPHYAINCP)utils.h
+  $(SOPHYAINCP)machdefs.h \
+  fitsbntbllineRW.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h \
+  $(SOPHYAINCP)utils.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsbntbllineRW.cc
  
 $(SOPHYAOBJP)fitsfile.o: fitsfile.cc \
   $(SOPHYAINCP)sopnamsp.h \
-  $(SOPHYAINCP)machdefs.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h fitsinoutfile.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h \
-  fitshandler.h $(SOPHYAINCP)strutil.h \
-  $(SOPHYAINCP)anydataobj.h
+  $(SOPHYAINCP)machdefs.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h \
+  $(SOPHYAINCP)strutil.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsfile.cc
  
@@ -278,5 +273,4 @@
   $(SOPHYAINCP)datatable.h \
   $(SOPHYAINCP)basedtable.h \
-  $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)ntupintf.h \
   $(SOPHYAINCP)dvlist.h \
@@ -299,25 +293,59 @@
   $(SOPHYAINCP)utilarr.h \
   $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fitsblkrw.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fitsblkrw.h fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
   fitshandler.h swfitsdtable.h \
-  $(SOPHYAINCP)basedtable.h \
-  $(SOPHYAINCP)swsegdb.h fitsswapper.h
+  $(SOPHYAINCP)swsegdb.h \
+  fitsswapper.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitshdtable.cc
  
+$(SOPHYAOBJP)fitshistos.o: fitshistos.cc \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)sopnamsp.h \
+  $(SOPHYAINCP)histos.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)peida.h \
+  $(SOPHYAINCP)utils.h \
+  $(SOPHYAINCP)perrors.h \
+  $(SOPHYAINCP)fmath.h \
+  $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  $(SOPHYAINCP)hisprof.h \
+  $(SOPHYAINCP)histerr.h \
+  $(SOPHYAINCP)histos2.h \
+  fitsblkrw.h fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitshistos.cc
+ 
 $(SOPHYAOBJP)fitsinoutfile.o: fitsinoutfile.cc \
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)segdatablock.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)anydataobj.h fitsinoutfile.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)anydataobj.h \
+  fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -333,11 +361,10 @@
 $(SOPHYAOBJP)fitslocalmap.o: fitslocalmap.cc \
   $(SOPHYAINCP)sopnamsp.h \
-  $(SOPHYAINCP)machdefs.h fitslocalmap.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitslocalmap.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)localmap.h \
   $(SOPHYAINCP)pixelmap.h \
   $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -364,7 +391,6 @@
   $(SOPHYAINCP)utilarr.h \
   $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fitsfile.h fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -374,12 +400,11 @@
 $(SOPHYAOBJP)fitsmanager.o: fitsmanager.cc \
   $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)sopnamsp.h fitsmanager.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)sopnamsp.h \
+  fitsmanager.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -396,11 +421,10 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsntuple.h \
-  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitsntuple.h \
   $(SOPHYAINCP)ntuple.h \
   $(SOPHYAINCP)objfio.h \
   $(SOPHYAINCP)anydataobj.h \
   $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -411,8 +435,7 @@
   $(SOPHYAINCP)mutyv.h \
   $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -430,5 +453,4 @@
   $(SOPHYAINCP)pixelmap.h \
   $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -455,12 +477,8 @@
   $(SOPHYAINCP)tvector_tsnl.h \
   $(SOPHYAINCP)HEALPixUtils.h \
-  $(SOPHYAINCP)anydataobj.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h \
-  fitshandler.h $(SOPHYAINCP)tarray.h \
-  fitstarray.h
+  fitsfile.h fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h fitstarray.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsspherehealpix.cc
  
@@ -475,5 +493,4 @@
   $(SOPHYAINCP)pixelmap.h \
   $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)gnumd5.h \
   $(SOPHYAINCP)ppfbinstream.h \
@@ -499,12 +516,8 @@
   $(SOPHYAINCP)tmatrix_tsnl.h \
   $(SOPHYAINCP)tvector_tsnl.h \
-  $(SOPHYAINCP)anydataobj.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
-  $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h \
-  fitshandler.h $(SOPHYAINCP)tarray.h \
-  fitstarray.h
+  fitsfile.h fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h fitstarray.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsspherethetaphi.cc
  
@@ -513,22 +526,20 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitstarray.h \
-  $(SOPHYAINCP)tarray.h \
-  $(SOPHYAINCP)basarr.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)utilarr.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  fitstarray.h \
+  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  fitsfile.h fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -539,23 +550,21 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsxntuple.h \
-  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitsxntuple.h \
   $(SOPHYAINCP)xntuple.h \
   $(SOPHYAINCP)ntupintf.h \
   $(SOPHYAINCP)ppersist.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)gnumd5.h \
-  $(SOPHYAINCP)ppfbinstream.h \
-  $(SOPHYAINCP)rawstream.h \
-  $(SOPHYAINCP)ppfnametag.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)objfio.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)mutyv.h \
-  $(SOPHYAINCP)timestamp.h \
-  $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)timestamp.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -587,12 +596,11 @@
   $(SOPHYAINCP)tmatrix_tsnl.h \
   $(SOPHYAINCP)tvector_tsnl.h \
-  $(SOPHYAINCP)swsegdb.h fitsswapper.h \
-  $(SOPHYAINCP)machdefs.h fitsinoutfile.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)dvlist.h \
-  $(SOPHYAINCP)FitsIO/fitsio.h \
-  $(SOPHYAINCP)FitsIO/longnam.h fitsblkrw.h \
-  fitshdtable.h $(SOPHYAINCP)datatable.h \
-  $(SOPHYAINCP)basedtable.h fitshandler.h \
+  $(SOPHYAINCP)swsegdb.h \
+  fitsswapper.h fitsinoutfile.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitsblkrw.h fitshdtable.h \
+  $(SOPHYAINCP)datatable.h \
+  fitshandler.h \
   $(SOPHYAINCP)sopnamsp.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  swfitsdtable.cc
