Index: trunk/SophyaExt/FitsIOServer/Makefile
===================================================================
--- trunk/SophyaExt/FitsIOServer/Makefile	(revision 3114)
+++ trunk/SophyaExt/FitsIOServer/Makefile	(revision 3123)
@@ -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)fitsgenedata.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 $(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)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.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)fitsgenedata.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
+$(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)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.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,5 +30,6 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fabtcolread.h \
+  $(SOPHYAINCP)machdefs.h \
+  fabtcolread.h \
   $(SOPHYAINCP)anydataobj.h \
   $(SOPHYAINCP)tvector.h \
@@ -58,5 +60,6 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fabtwriter.h \
+  $(SOPHYAINCP)machdefs.h \
+  fabtwriter.h \
   $(SOPHYAINCP)anydataobj.h \
   $(SOPHYAINCP)tvector.h \
@@ -87,25 +90,27 @@
   $(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 \
+  $(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 \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h
@@ -116,5 +121,6 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fbtntintf.h \
+  $(SOPHYAINCP)machdefs.h \
+  fbtntintf.h \
   $(SOPHYAINCP)anydataobj.h \
   $(SOPHYAINCP)ntupintf.h \
@@ -125,22 +131,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 \
+  $(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 \
   $(SOPHYAINCP)basedtable.h \
   $(SOPHYAINCP)ntupintf.h \
@@ -154,10 +163,13 @@
   $(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)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 \
   fitsspherehealpix.h \
@@ -175,6 +187,8 @@
   fitsspherethetaphi.h \
   $(SOPHYAINCP)spherethetaphi.h \
-  fitslocalmap.h $(SOPHYAINCP)localmap.h \
-  fitshistos.h $(SOPHYAINCP)histos.h \
+  fitslocalmap.h \
+  $(SOPHYAINCP)localmap.h \
+  fitshistos.h \
+  $(SOPHYAINCP)histos.h \
   $(SOPHYAINCP)peida.h \
   $(SOPHYAINCP)utils.h \
@@ -182,5 +196,6 @@
   $(SOPHYAINCP)fmath.h \
   $(SOPHYAINCP)histos2.h \
-  $(SOPHYAINCP)histos.h fitsgenedata.h \
+  $(SOPHYAINCP)histos.h \
+  fitsgenedata.h \
   $(SOPHYAINCP)generaldata.h \
   $(SOPHYAINCP)poly.h
@@ -190,19 +205,22 @@
   $(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)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)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -212,5 +230,6 @@
   $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)utilarr.h fitsspherehealpix.h \
+  $(SOPHYAINCP)utilarr.h \
+  fitsspherehealpix.h \
   $(SOPHYAINCP)spherehealpix.h \
   $(SOPHYAINCP)sphericalmap.h \
@@ -228,10 +247,14 @@
   $(SOPHYAINCP)tmatrix_tsnl.h \
   $(SOPHYAINCP)tvector_tsnl.h \
-  $(SOPHYAINCP)HEALPixUtils.h fitsntuple.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)ppersist.h \
+  fitsxntuple.h \
+  $(SOPHYAINCP)xntuple.h \
+  fitslocalmap.h \
+  $(SOPHYAINCP)localmap.h \
+  fbtntintf.h \
   $(SOPHYAINCP)ntupintf.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsautoreader.cc
@@ -240,43 +263,50 @@
   $(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)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
 	$(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)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
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsfile.cc
@@ -311,6 +341,7 @@
   $(SOPHYAINCP)utilarr.h \
   $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fitsblkrw.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fitsblkrw.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
@@ -345,6 +376,7 @@
   $(SOPHYAINCP)utilarr.h \
   $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fitsblkrw.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fitsblkrw.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
@@ -352,6 +384,40 @@
   fitshandler.h swfitsdtable.h \
   $(SOPHYAINCP)basedtable.h \
-  $(SOPHYAINCP)swsegdb.h fitsswapper.h
+  $(SOPHYAINCP)swsegdb.h \
+  fitsswapper.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitshdtable.cc
+ 
+$(SOPHYAOBJP)fitshisterr.o: fitshisterr.cc \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)sopnamsp.h \
+  $(SOPHYAINCP)histerr.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.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)hist2err.h \
+  fitsblkrw.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitshisterr.cc
  
 $(SOPHYAOBJP)fitshistos.o: fitshistos.cc \
@@ -385,7 +451,7 @@
   $(SOPHYAINCP)hisprof.h \
   $(SOPHYAINCP)histos.h \
-  $(SOPHYAINCP)histerr.h \
-  $(SOPHYAINCP)histos2.h fitsblkrw.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)histos2.h \
+  fitsblkrw.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
@@ -399,5 +465,6 @@
   $(SOPHYAINCP)segdatablock.h \
   $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)anydataobj.h fitsinoutfile.h \
+  $(SOPHYAINCP)anydataobj.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)dvlist.h \
@@ -418,5 +485,6 @@
 $(SOPHYAOBJP)fitslocalmap.o: fitslocalmap.cc \
   $(SOPHYAINCP)sopnamsp.h \
-  $(SOPHYAINCP)machdefs.h fitslocalmap.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitslocalmap.h \
   $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)machdefs.h \
@@ -449,7 +517,9 @@
   $(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 \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)dvlist.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -459,6 +529,7 @@
 $(SOPHYAOBJP)fitsmanager.o: fitsmanager.cc \
   $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)sopnamsp.h fitsmanager.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)sopnamsp.h \
+  fitsmanager.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)dvlist.h \
@@ -481,5 +552,6 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsntuple.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitsntuple.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)ntuple.h \
@@ -497,7 +569,9 @@
   $(SOPHYAINCP)timestamp.h \
   $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  $(SOPHYAINCP)ppersist.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)dvlist.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -540,11 +614,14 @@
   $(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 \
+  $(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
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsspherehealpix.cc
@@ -584,11 +661,14 @@
   $(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 \
+  $(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
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsspherethetaphi.cc
@@ -598,22 +678,25 @@
   $(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 \
+  $(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 \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -624,5 +707,6 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsxntuple.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitsxntuple.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)xntuple.h \
@@ -640,7 +724,9 @@
   $(SOPHYAINCP)timestamp.h \
   $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  $(SOPHYAINCP)ppersist.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)dvlist.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -672,12 +758,15 @@
   $(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 \
+  $(SOPHYAINCP)machdefs.h \
+  fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitsblkrw.h fitshandler.h fitshdtable.h \
+  $(SOPHYAINCP)datatable.h \
+  $(SOPHYAINCP)basedtable.h \
   $(SOPHYAINCP)sopnamsp.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  swfitsdtable.cc
Index: trunk/SophyaExt/FitsIOServer/fitshisterr.cc
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitshisterr.cc	(revision 3123)
+++ trunk/SophyaExt/FitsIOServer/fitshisterr.cc	(revision 3123)
@@ -0,0 +1,303 @@
+#include "machdefs.h"
+#include "sopnamsp.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <iostream>
+#include <typeinfo>
+
+#include "histerr.h"
+#include "hist2err.h"
+
+#include "fitsblkrw.h"
+#include "fitshandler.h"
+
+
+///////////////////////////////////////////////////////////////////////////
+///////////////////////// Histo , HProf , HistoErr ////////////////////////
+///////////////////////////////////////////////////////////////////////////
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+int FitsHandler<HistoErr>::CheckReadability(FitsInOutFile& is)
+{
+  if (is.CurrentHDUType() == IMAGE_HDU ) return 0;
+  string key = "SOPCLSNM";
+  string clsnm = is.KeyValue(key);
+  if(clsnm == "SOPHYA::HistoErr") return 2;
+  return 0;
+}
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+int FitsHandler<HistoErr>::CheckHandling(AnyDataObj & o) 
+{  
+ if (typeid(o) == typeid(HistoErr)) return 2;
+ HistoErr * po = dynamic_cast< HistoErr * >(& o); 
+ if (po != NULL) return 2;
+ return 0;
+}
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+void FitsHandler<HistoErr>::Write(FitsInOutFile& os)
+{
+  if(dobj==NULL)   
+    throw NullPtrError("FitsHandler<HistoErr>::Write() NULL dobj pointer ");
+
+  //--- Le type d'objet et son pointeur
+  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(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(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 = he->NBins();
+  if(n>0) {
+    FitsBlockRW<r_8>::WriteColumnData(os,1,1,1,&(he->data_(0)),n);
+    FitsBlockRW<r_8>::WriteColumnData(os,2,1,1,&(he->err2_(0)),n);
+    FitsBlockRW<r_8>::WriteColumnData(os,3,1,1,&(he->ndata_(0)),n);
+  }
+
+  // Ecriture des clefs fits
+  MuTyV mtv;
+
+  mtv = "SOPHYA::HistoErr";
+  os.WriteKey("SOPCLSNM",mtv," SOPHYA class name");
+
+  mtv = "HistoErr";
+  os.WriteKey("CONTENT",mtv," name of SOPHYA object");
+
+  mtv = he->NBins();
+  os.WriteKey("NBIN",mtv," number of bins");
+
+  mtv = he->XMin();
+  os.WriteKey("XMIN",mtv," absc of beginning of 1srt bin");
+
+  mtv = he->XMax();
+  os.WriteKey("XMAX",mtv," absc of end of last bin");
+
+  mtv = he->BinWidth();
+  os.WriteKey("WBIN",mtv," bin width");
+  
+  mtv = he->mCorrel;
+  os.WriteKey("NCORREL",mtv," number of Correl calls");
+
+  return;
+}
+
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+void FitsHandler<HistoErr>::Read(FitsInOutFile& is)
+{
+ int hdutyp = is.CurrentHDUType();
+ if( (hdutyp != BINARY_TBL ) && (hdutyp != ASCII_TBL) )
+    throw FitsIOException("FitsHandler<HistoErr>::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<HistoErr>::Read() bad number of table columns");
+  long nbrows = is.GetNbRows();
+  if(nbrows<=0)
+    throw FitsIOException("FitsHandler<HistoErr>::Read() number of rows is zero, no reading");
+
+  //--- Lecture entete FITS
+  string key = "SOPCLSNM"; string clsnm = is.KeyValue(key);
+  DVList dvl; is.GetHeaderRecords(dvl,true,false);
+
+  int_4 nbin = dvl.GetI("NBIN",-1);
+  if(nbin<=0 && nbin!=nbrows)
+    throw FitsIOException("FitsHandler<HistoErr>::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 si necessaire
+  if(dobj == NULL) {
+    if(clsnm == "SOPHYA::HistoErr") dobj = new HistoErr;
+  }
+
+  //--- Type de l'histo
+  HistoErr* he = dynamic_cast< HistoErr *> (dobj);
+
+  //--- Allocation pour histo
+  if(he && (clsnm=="SOPHYA::HistoErr")) {
+    if(ncol<3)
+      throw FitsIOException("FitsHandler<HistoErr>::Read() wrong number of columns for HistoErr");
+    he->CreateOrResize(xmin,xmax,nbin);
+  } else {
+    throw FitsIOException("FitsHandler<HistoErr>::Read() No assocaition classe/fits_header");
+  }
+
+  //--- remplissage des variables d'entete
+  he->mCorrel = dvl.GetI("NCORREL",0);
+
+  //--- remplissage de l'histo
+  FitsBlockRW<r_8>::ReadColumnData(is,1,1,1,&(he->data_(0)),nbin);
+  FitsBlockRW<r_8>::ReadColumnData(is,2,1,1,&(he->err2_(0)),nbin);
+  FitsBlockRW<r_8>::ReadColumnData(is,3,1,1,&(he->ndata_(0)),nbin);
+
+  return;
+}
+
+
+///////////////////////////////////////////////////////////////////////////
+/////////////////////////////// Histo2DErr ////////////////////////////////
+///////////////////////////////////////////////////////////////////////////
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+int FitsHandler<Histo2DErr>::CheckReadability(FitsInOutFile& is)
+{
+  if (is.CurrentHDUType() == IMAGE_HDU ) return 0;
+  string key = "SOPCLSNM"; 
+  string clsnm = is.KeyValue(key);
+  if( clsnm == "SOPHYA::Histo2DErr") return 2;
+  return 0;
+}
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+int FitsHandler<Histo2DErr>::CheckHandling(AnyDataObj & o) 
+{  
+ if (typeid(o) == typeid(Histo2DErr)) return 2;
+ Histo2DErr * po = dynamic_cast< Histo2DErr * >(& o); 
+ if (po != NULL) return 2;
+ return 0;
+}
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+void FitsHandler<Histo2DErr>::Write(FitsInOutFile& os)
+{
+  if(dobj==NULL)   
+    throw NullPtrError("FitsHandler<Histo2DErr>::Write() NULL dobj pointer ");
+
+  //--- Le type d'objet et son pointeur
+  Histo2DErr* he2 = dynamic_cast< Histo2DErr *> (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(tbltyp==ASCII_TBL) tform.push_back("D15.8"); else tform.push_back("D");
+  colnames.push_back("e2");
+  tunit.push_back("");
+  // Les nombres d'entrees
+  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
+  long n = he2->NBinX()*he2->NBinY();
+  if(n>0) {
+    FitsBlockRW<r_8>::WriteColumnData(os,1,1,1,&(he2->data_(0,0)),n);
+    FitsBlockRW<r_8>::WriteColumnData(os,2,1,1,&(he2->err2_(0,0)),n);
+    FitsBlockRW<r_8>::WriteColumnData(os,3,1,1,&(he2->ndata_(0,0)),n);
+  }
+
+  // Ecriture des clefs fits
+  MuTyV mtv;
+
+  mtv = "SOPHYA::Histo2DErr";
+  os.WriteKey("SOPCLSNM",mtv," SOPHYA class name");
+
+  mtv = "Histo2DErr";
+  os.WriteKey("CONTENT",mtv," name of SOPHYA object");
+
+  mtv = he2->NBinX();
+  os.WriteKey("NBINX",mtv," number of bins in X");
+  mtv = he2->NBinY();
+  os.WriteKey("NBINY",mtv," number of bins in Y");
+  mtv = he2->NBinX()*he2->NBinY();
+  os.WriteKey("NBINXY",mtv," number of elements");
+
+  mtv = he2->XMin();
+  os.WriteKey("XMIN",mtv," absc of beginning of 1srt bin in X");
+  mtv = he2->XMax();
+  os.WriteKey("XMAX",mtv," absc of end of last bin in X");
+  mtv = he2->YMin();
+  os.WriteKey("YMIN",mtv," absc of beginning of 1srt bin in Y");
+  mtv = he2->YMax();
+  os.WriteKey("YMAX",mtv," absc of end of last bin in Y");
+
+  mtv = he2->WBinX();
+  os.WriteKey("WBINX",mtv," bin width in X");
+  mtv = he2->WBinY();
+  os.WriteKey("WBINY",mtv," bin width in Y");
+  
+  mtv = he2->mCorrel;
+  os.WriteKey("NCORREL",mtv," number of Correl calls");
+
+  return;
+}
+
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+void FitsHandler<Histo2DErr>::Read(FitsInOutFile& is)
+{
+ int hdutyp = is.CurrentHDUType();
+ if( (hdutyp != BINARY_TBL ) && (hdutyp != ASCII_TBL) )
+    throw FitsIOException("FitsHandler<Histo2DErr>::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<Histo2DErr>::Read() bad number of table columns");
+  long nbrows = is.GetNbRows();
+  if(nbrows<=0)
+    throw FitsIOException("FitsHandler<Histo2DErr>::Read() number of rows is zero, no reading");
+
+  //--- Lecture entete FITS
+  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<Histo2DErr>::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) dobj = new Histo2DErr;
+  dobj->CreateOrResize(xmin,xmax,nbinx,ymin,ymax,nbiny);
+
+  //--- remplissage des variables d'entete
+  dobj->mCorrel = dvl.GetI("NCORREL",0);
+
+  //--- remplissage de l'histo
+  FitsBlockRW<r_8>::ReadColumnData(is,1,1,1,&(dobj->data_(0,0)),nbinxy);
+  FitsBlockRW<r_8>::ReadColumnData(is,2,1,1,&(dobj->err2_(0,0)),nbinxy);
+  FitsBlockRW<r_8>::ReadColumnData(is,3,1,1,&(dobj->ndata_(0,0)),nbinxy);
+
+  return;
+}
Index: trunk/SophyaExt/FitsIOServer/fitshisterr.h
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitshisterr.h	(revision 3123)
+++ trunk/SophyaExt/FitsIOServer/fitshisterr.h	(revision 3123)
@@ -0,0 +1,40 @@
+#ifndef FITSHISTERRHAND_H
+#define FITSHISTERRHAND_H
+
+#include "machdefs.h"
+#include <string>
+
+#include "histerr.h"
+#include "hist2err.h"
+#include "fitshandler.h"
+
+namespace SOPHYA {
+
+/*! 
+  \ingroup FitsIOServer
+  \brief FITS I/O handler for HistErr objects
+*/
+
+inline FitsInOutFile& operator << (FitsInOutFile& os, HistoErr const & obj)
+{ FitsHandler<HistoErr> fio(const_cast<HistoErr &>(obj));  fio.Write(os);  return os; }
+
+inline FitsInOutFile& operator >> (FitsInOutFile& is, HistoErr & obj)
+  { FitsHandler<HistoErr> fio(obj); is.SkipEmptyFirstHDU();
+  fio.Read(is); is.MoveToNextHDU(); return(is); }
+
+/*! 
+  \ingroup FitsIOServer
+  \brief FITS I/O handler for Histo2DErr objects
+*/
+
+inline FitsInOutFile& operator << (FitsInOutFile& os, Histo2DErr const & obj)
+{ FitsHandler<Histo2DErr> fio(const_cast<Histo2DErr &>(obj));  fio.Write(os);  return os; }
+
+inline FitsInOutFile& operator >> (FitsInOutFile& is, Histo2DErr & obj)
+  { FitsHandler<Histo2DErr> fio(obj); is.SkipEmptyFirstHDU();
+  fio.Read(is); is.MoveToNextHDU(); return(is); }
+
+
+} // Fin du namespace
+
+#endif
Index: trunk/SophyaExt/FitsIOServer/fitshistos.cc
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitshistos.cc	(revision 3114)
+++ trunk/SophyaExt/FitsIOServer/fitshistos.cc	(revision 3123)
@@ -9,5 +9,4 @@
 #include "histos.h"
 #include "hisprof.h"
-#include "histerr.h"
 #include "histos2.h"
 
@@ -16,7 +15,7 @@
 
 
-///////////////////////////////////////////////////////////////////////////
-///////////////////////// Histo , HProf , HistoErr ////////////////////////
-///////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////
+///////////////////////// Histo , HProf ////////////////////////
+////////////////////////////////////////////////////////////////
 
 DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
@@ -27,6 +26,5 @@
   string clsnm = is.KeyValue(key);
   if ( (clsnm == "SOPHYA::Histo")
-     || (clsnm == "SOPHYA::HProf")
-     || (clsnm == "SOPHYA::HistoErr") ) return 2;
+     || (clsnm == "SOPHYA::HProf") ) return 2;
   return 0;
 }
@@ -50,5 +48,4 @@
   Histo*    h  = dynamic_cast< Histo *> (dobj);
   HProf*    hp = dynamic_cast< HProf *> (dobj);
-  HistoErr* he = dynamic_cast< HistoErr *> (dobj);
 
   //--- Les noms de colonnes
@@ -66,5 +63,5 @@
   }
   // Le nombre d'entrees dans le bin
-  if(he!=NULL || hp!=NULL) {
+  if(hp!=NULL) {
     if(tbltyp==ASCII_TBL) tform.push_back("D15.8"); else tform.push_back("D");
     colnames.push_back("nb");
@@ -83,5 +80,4 @@
     if(h->mErr2) FitsBlockRW<r_8>::WriteColumnData(os,2,1,1,h->mErr2,n);
     if(hp!=NULL) FitsBlockRW<r_8>::WriteColumnData(os,3,1,1,hp->mSumW,n);
-    if(he!=NULL) FitsBlockRW<r_8>::WriteColumnData(os,3,1,1,he->mNData,n);
   }
 
@@ -91,10 +87,8 @@
   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");
 
@@ -142,9 +136,4 @@
   }
   
-  if(he) {
-    mtv = he->mCorrel;
-    os.WriteKey("NCORREL",mtv," number of Correl calls");
-  }
-
   return;
 }
@@ -185,5 +174,4 @@
     if(clsnm == "SOPHYA::Histo") dobj = new Histo;
     else if(clsnm == "SOPHYA::HProf") dobj = new HProf;
-    else if(clsnm == "SOPHYA::HistoErr") dobj = new HistoErr;
   }
 
@@ -191,12 +179,7 @@
   Histo*    h  = dynamic_cast< Histo *> (dobj);
   HProf*    hp = dynamic_cast< HProf *> (dobj);
-  HistoErr* he = dynamic_cast< HistoErr *> (dobj);
 
   //--- Allocation pour histo
-  if(he && (clsnm=="SOPHYA::HistoErr")) {
-    if(ncol<3)
-      throw FitsIOException("FitsHandler<Histo>::Read() wrong number of columns for HistoErr");
-    he->CreateOrResize(xmin,xmax,nbin);
-  } else if(hp&& (clsnm=="SOPHYA::HProf")) {
+  if(hp&& (clsnm=="SOPHYA::HProf")) {
     if(ncol<3)
       throw FitsIOException("FitsHandler<Histo>::Read() wrong number of columns for HProf");
@@ -225,11 +208,8 @@
   }
 
-  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(hp) FitsBlockRW<r_8>::ReadColumnData(is,3,1,1,hp->mSumW,nbin);
-  if(he) FitsBlockRW<r_8>::ReadColumnData(is,3,1,1,he->mNData,nbin);
 
   return;
Index: trunk/SophyaExt/FitsIOServer/fitshistos.h
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitshistos.h	(revision 3114)
+++ trunk/SophyaExt/FitsIOServer/fitshistos.h	(revision 3123)
@@ -13,5 +13,5 @@
 /*! 
   \ingroup FitsIOServer
-  \brief FITS I/O handler for Histo/HProf and HistErr objects
+  \brief FITS I/O handler for Histo/HProf objects
 */
 
Index: trunk/SophyaExt/FitsIOServer/objlist.list
===================================================================
--- trunk/SophyaExt/FitsIOServer/objlist.list	(revision 3114)
+++ trunk/SophyaExt/FitsIOServer/objlist.list	(revision 3123)
@@ -10,4 +10,5 @@
 fitsgenedata.o
 fitshdtable.o
+fitshisterr.o
 fitshistos.o
 fitsinoutfile.o
Index: trunk/SophyaExt/FitsIOServer/smakefile
===================================================================
--- trunk/SophyaExt/FitsIOServer/smakefile	(revision 3114)
+++ trunk/SophyaExt/FitsIOServer/smakefile	(revision 3123)
@@ -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)fitsgenedata.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 $(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)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.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)fitsgenedata.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
+$(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)fitsgenedata.o $(SOPHYAOBJP)fitshdtable.o $(SOPHYAOBJP)fitshisterr.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,5 +30,6 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fabtcolread.h \
+  $(SOPHYAINCP)machdefs.h \
+  fabtcolread.h \
   $(SOPHYAINCP)anydataobj.h \
   $(SOPHYAINCP)tvector.h \
@@ -58,5 +60,6 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fabtwriter.h \
+  $(SOPHYAINCP)machdefs.h \
+  fabtwriter.h \
   $(SOPHYAINCP)anydataobj.h \
   $(SOPHYAINCP)tvector.h \
@@ -87,25 +90,27 @@
   $(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 \
+  $(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 \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h
@@ -116,5 +121,6 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fbtntintf.h \
+  $(SOPHYAINCP)machdefs.h \
+  fbtntintf.h \
   $(SOPHYAINCP)anydataobj.h \
   $(SOPHYAINCP)ntupintf.h \
@@ -125,22 +131,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 \
+  $(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 \
   $(SOPHYAINCP)basedtable.h \
   $(SOPHYAINCP)ntupintf.h \
@@ -154,10 +163,13 @@
   $(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)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 \
   fitsspherehealpix.h \
@@ -175,6 +187,8 @@
   fitsspherethetaphi.h \
   $(SOPHYAINCP)spherethetaphi.h \
-  fitslocalmap.h $(SOPHYAINCP)localmap.h \
-  fitshistos.h $(SOPHYAINCP)histos.h \
+  fitslocalmap.h \
+  $(SOPHYAINCP)localmap.h \
+  fitshistos.h \
+  $(SOPHYAINCP)histos.h \
   $(SOPHYAINCP)peida.h \
   $(SOPHYAINCP)utils.h \
@@ -182,5 +196,6 @@
   $(SOPHYAINCP)fmath.h \
   $(SOPHYAINCP)histos2.h \
-  $(SOPHYAINCP)histos.h fitsgenedata.h \
+  $(SOPHYAINCP)histos.h \
+  fitsgenedata.h \
   $(SOPHYAINCP)generaldata.h \
   $(SOPHYAINCP)poly.h
@@ -190,19 +205,22 @@
   $(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)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)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -212,5 +230,6 @@
   $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)utilarr.h fitsspherehealpix.h \
+  $(SOPHYAINCP)utilarr.h \
+  fitsspherehealpix.h \
   $(SOPHYAINCP)spherehealpix.h \
   $(SOPHYAINCP)sphericalmap.h \
@@ -228,10 +247,14 @@
   $(SOPHYAINCP)tmatrix_tsnl.h \
   $(SOPHYAINCP)tvector_tsnl.h \
-  $(SOPHYAINCP)HEALPixUtils.h fitsntuple.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)ppersist.h \
+  fitsxntuple.h \
+  $(SOPHYAINCP)xntuple.h \
+  fitslocalmap.h \
+  $(SOPHYAINCP)localmap.h \
+  fbtntintf.h \
   $(SOPHYAINCP)ntupintf.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsautoreader.cc
@@ -240,43 +263,50 @@
   $(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)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
 	$(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)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
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsfile.cc
@@ -311,6 +341,7 @@
   $(SOPHYAINCP)utilarr.h \
   $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fitsblkrw.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fitsblkrw.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
@@ -345,6 +376,7 @@
   $(SOPHYAINCP)utilarr.h \
   $(SOPHYAINCP)tmatrix_tsnl.h \
-  $(SOPHYAINCP)tvector_tsnl.h fitsblkrw.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)tvector_tsnl.h \
+  fitsblkrw.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
@@ -352,6 +384,40 @@
   fitshandler.h swfitsdtable.h \
   $(SOPHYAINCP)basedtable.h \
-  $(SOPHYAINCP)swsegdb.h fitsswapper.h
+  $(SOPHYAINCP)swsegdb.h \
+  fitsswapper.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitshdtable.cc
+ 
+$(SOPHYAOBJP)fitshisterr.o: fitshisterr.cc \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)sopnamsp.h \
+  $(SOPHYAINCP)histerr.h \
+  $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)ppfnametag.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)hist2err.h \
+  fitsblkrw.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitshandler.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitshisterr.cc
  
 $(SOPHYAOBJP)fitshistos.o: fitshistos.cc \
@@ -385,7 +451,7 @@
   $(SOPHYAINCP)hisprof.h \
   $(SOPHYAINCP)histos.h \
-  $(SOPHYAINCP)histerr.h \
-  $(SOPHYAINCP)histos2.h fitsblkrw.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)histos2.h \
+  fitsblkrw.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)dvlist.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
@@ -399,5 +465,6 @@
   $(SOPHYAINCP)segdatablock.h \
   $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)anydataobj.h fitsinoutfile.h \
+  $(SOPHYAINCP)anydataobj.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)dvlist.h \
@@ -418,5 +485,6 @@
 $(SOPHYAOBJP)fitslocalmap.o: fitslocalmap.cc \
   $(SOPHYAINCP)sopnamsp.h \
-  $(SOPHYAINCP)machdefs.h fitslocalmap.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitslocalmap.h \
   $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)machdefs.h \
@@ -449,7 +517,9 @@
   $(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 \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)dvlist.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -459,6 +529,7 @@
 $(SOPHYAOBJP)fitsmanager.o: fitsmanager.cc \
   $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)sopnamsp.h fitsmanager.h \
-  fitsinoutfile.h $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)sopnamsp.h \
+  fitsmanager.h fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)dvlist.h \
@@ -481,5 +552,6 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsntuple.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitsntuple.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)ntuple.h \
@@ -497,7 +569,9 @@
   $(SOPHYAINCP)timestamp.h \
   $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  $(SOPHYAINCP)ppersist.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)dvlist.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -540,11 +614,14 @@
   $(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 \
+  $(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
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsspherehealpix.cc
@@ -584,11 +661,14 @@
   $(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 \
+  $(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
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  fitsspherethetaphi.cc
@@ -598,22 +678,25 @@
   $(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 \
+  $(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 \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -624,5 +707,6 @@
   $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)machdefs.h fitsxntuple.h \
+  $(SOPHYAINCP)machdefs.h \
+  fitsxntuple.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)xntuple.h \
@@ -640,7 +724,9 @@
   $(SOPHYAINCP)timestamp.h \
   $(SOPHYAINCP)anydataobj.h \
-  $(SOPHYAINCP)ppersist.h fitsfile.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)dvlist.h fitsinoutfile.h \
+  $(SOPHYAINCP)ppersist.h \
+  fitsfile.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)dvlist.h \
+  fitsinoutfile.h \
   $(SOPHYAINCP)FitsIO/fitsio.h \
   $(SOPHYAINCP)FitsIO/longnam.h \
@@ -672,12 +758,15 @@
   $(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 \
+  $(SOPHYAINCP)machdefs.h \
+  fitsinoutfile.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)FitsIO/fitsio.h \
+  $(SOPHYAINCP)FitsIO/longnam.h \
+  fitsblkrw.h fitshandler.h fitshdtable.h \
+  $(SOPHYAINCP)datatable.h \
+  $(SOPHYAINCP)basedtable.h \
   $(SOPHYAINCP)sopnamsp.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  swfitsdtable.cc
