Index: trunk/SophyaPI/PI/Makefile
===================================================================
--- trunk/SophyaPI/PI/Makefile	(revision 150)
+++ trunk/SophyaPI/PI/Makefile	(revision 151)
@@ -4,5 +4,5 @@
  
 all: $(LIB)libPI.a
-$(LIB)libPI.a : $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)piinit.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)pipodrw.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o
+$(LIB)libPI.a : $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigfd1.o $(OBJ)pigfd2.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)piinit.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)pipodrw.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o
 	$(AR) $(ARFLAGS)  $@ $? 
 ifeq ($(CXX),cxx)
@@ -12,21 +12,22 @@
  
 clean:
-	rm -f $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)piinit.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)pipodrw.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o
+	rm -f $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigfd1.o $(OBJ)pigfd2.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)piinit.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintup3d.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)pipodrw.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o
 ifeq ($(CXX),cxx)
 	cd $(REPM); rm -f *.o
 endif 
  
-$(OBJ)lut.o: lut.cc $(INC)defs.h lut.h
+$(OBJ)lut.o: lut.cc $(INC)defs.h \
+ lut.h
 $(OBJ)parradapter.o: parradapter.cc parradapter.h \
- $(INC)defs.h $(INC)machine.h \
- lut.h
+ $(INC)defs.h \
+ $(INC)machine.h lut.h
 $(OBJ)pi3ddrw.o: pi3ddrw.cc pi3ddrw.h pisysdep.h pidrawer.h pibwdggen.h \
  piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \
  pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraph3d.h pibwdgx.h pigraphps.h \
- pidrwtools.h pistdwdgx.h pistdwdggen.h pioptmenux.h pioptmenugen.h \
- pimenux.h pimenugen.h piwindowx.h piwindowgen.h picontainerx.h \
- picontainergen.h piapplx.h piapplgen.h pimenubarx.h pimenubargen.h \
- picons.h
+ $(INC)defs.h pigraph3d.h \
+ pibwdgx.h pigraphps.h pidrwtools.h pistdwdgx.h pistdwdggen.h \
+ pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h piwindowx.h \
+ piwindowgen.h picontainerx.h picontainergen.h piapplx.h piapplgen.h \
+ pimenubarx.h pimenubargen.h picons.h
 $(OBJ)piapplgen.o: piapplgen.cc piapplgen.h pimsghandler.h pisysdep.h \
  picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimenubarx.h \
@@ -43,5 +44,6 @@
 $(OBJ)pibwdggen.o: pibwdggen.cc pibwdggen.h pisysdep.h piwdgx.h piwdggen.h \
  pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \
- pigraphuc.h psfile.h $(INC)defs.h pidrawer.h \
+ pigraphuc.h psfile.h \
+ $(INC)defs.h pidrawer.h \
  pigraphps.h pidrwtools.h pistdwdgx.h pistdwdggen.h pioptmenux.h \
  pioptmenugen.h pimenux.h pimenugen.h piwindowx.h piwindowgen.h \
@@ -51,5 +53,6 @@
  piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \
  pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraphps.h pixtbase.h
+ $(INC)defs.h pigraphps.h \
+ pixtbase.h
 $(OBJ)picmap.o: picmap.cc picmap.h pisysdep.h picmapx.h picmapgen.h
 $(OBJ)picmapgen.o: picmapgen.cc picmapgen.h pisysdep.h picmapx.h picmap.h
@@ -71,11 +74,12 @@
 $(OBJ)pidrawer.o: pidrawer.cc pidrawer.h pibwdggen.h pisysdep.h piwdgx.h \
  piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h \
- pigraphgen.h pigraphuc.h psfile.h $(INC)defs.h
+ pigraphgen.h pigraphuc.h psfile.h \
+ $(INC)defs.h
 $(OBJ)pidrawwin.o: pidrawwin.cc pidrawwin.h pisysdep.h piwindowx.h \
  piwindowgen.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \
  pimsghandler.h piscdrawwdg.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
  picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraphps.h pistdwdgx.h \
- pistdwdggen.h pidrawer.h
+ $(INC)defs.h pigraphps.h \
+ pistdwdgx.h pistdwdggen.h pidrawer.h
 $(OBJ)pidrwtools.o: pidrwtools.cc pidrwtools.h pisysdep.h pistdwdgx.h \
  pistdwdggen.h piwdgx.h piwdggen.h pimsghandler.h pioptmenux.h \
@@ -84,6 +88,6 @@
  pimenubargen.h picons.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
  picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraphps.h piscdrawwdg.h pidrawer.h \
- pi3ddrw.h pigraph3d.h
+ $(INC)defs.h pigraphps.h \
+ piscdrawwdg.h pidrawer.h pi3ddrw.h pigraph3d.h
 $(OBJ)pifilechogen.o: pifilechogen.cc pifilechogen.h pisysdep.h piwdgx.h \
  piwdggen.h pimsghandler.h
@@ -93,6 +97,41 @@
  pistdwdgx.h pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
  picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraphps.h pifilechox.h \
- pifilechogen.h piwindowx.h piwindowgen.h
+ $(INC)defs.h pigraphps.h \
+ pifilechox.h pifilechogen.h piwindowx.h piwindowgen.h
+$(OBJ)pigfd1.o: pigfd1.cc pigfd1.h \
+ $(INC)generaldata.h \
+ $(INC)exceptions.h \
+ $(INC)defs.h \
+ $(INC)peidainit.h \
+ $(INC)ppersist.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)pclassids.h \
+ $(INC)poly.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)fmath.h \
+ $(INC)cvector.h \
+ $(INC)matrix.h pidrawer.h \
+ pibwdggen.h pisysdep.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
+ picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h
+$(OBJ)pigfd2.o: pigfd2.cc pigfd2.h \
+ $(INC)generaldata.h \
+ $(INC)exceptions.h \
+ $(INC)defs.h \
+ $(INC)peidainit.h \
+ $(INC)ppersist.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)pclassids.h \
+ $(INC)poly.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)fmath.h \
+ $(INC)cvector.h \
+ $(INC)matrix.h pi3ddrw.h \
+ pisysdep.h pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h \
+ picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h \
+ psfile.h pigraph3d.h pibwdgx.h pigraphps.h
 $(OBJ)pigraph3d.o: pigraph3d.cc pigraph3d.h pisysdep.h pigraphuc.h \
  pigraphgen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
@@ -107,40 +146,50 @@
 $(OBJ)pigraphx.o: pigraphx.cc pigraphx.h pisysdep.h pigraphgen.h piwdgx.h \
  piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h
-$(OBJ)pihisto.o: pihisto.cc pihisto.h $(INC)histos.h \
- $(INC)peida.h $(INC)defs.h \
- $(INC)utils.h $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)exceptions.h \
- $(INC)peidainit.h \
- $(INC)fmath.h $(INC)cvector.h \
+$(OBJ)pihisto.o: pihisto.cc pihisto.h \
+ $(INC)histos.h \
+ $(INC)peida.h \
+ $(INC)defs.h \
+ $(INC)utils.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)exceptions.h \
+ $(INC)peidainit.h \
+ $(INC)fmath.h \
+ $(INC)cvector.h \
  $(INC)matrix.h \
  $(INC)ppersist.h \
- $(INC)pclassids.h pidrawer.h pibwdggen.h \
- pisysdep.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h
-$(OBJ)pihisto2d.o: pihisto2d.cc pihisto2d.h pisysdep.h pimenux.h pimenugen.h \
- piwdgx.h piwdggen.h pimsghandler.h pimenubarx.h pimenubargen.h \
- pioptmenux.h pioptmenugen.h pistdwdgx.h pistdwdggen.h \
- $(INC)histos2.h $(INC)peida.h \
- $(INC)defs.h $(INC)utils.h \
- $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)exceptions.h \
- $(INC)peidainit.h \
- $(INC)fmath.h $(INC)histos.h \
+ $(INC)pclassids.h pidrawer.h \
+ pibwdggen.h pisysdep.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
+ picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
+ $(INC)hisprof.h
+$(OBJ)pihisto2d.o: pihisto2d.cc piapplgen.h pimsghandler.h pisysdep.h \
+ picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimenubarx.h \
+ pimenubargen.h pimenux.h pimenugen.h picons.h pistdwdgx.h \
+ pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
+ pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
+ $(INC)defs.h pigraphps.h \
+ pihisto2d.h pioptmenux.h pioptmenugen.h \
+ $(INC)histos2.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)exceptions.h \
+ $(INC)peidainit.h \
+ $(INC)fmath.h \
+ $(INC)histos.h \
  $(INC)cvector.h \
  $(INC)matrix.h \
  $(INC)ppersist.h \
- $(INC)pclassids.h piscdrawwdg.h pibwdgx.h \
- pibwdggen.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \
- pigraphuc.h psfile.h pigraphps.h piwindowx.h piwindowgen.h \
- picontainerx.h picontainergen.h pidrawer.h \
+ $(INC)pclassids.h \
+ piscdrawwdg.h piwindowx.h piwindowgen.h pidrawer.h \
  $(INC)nbrandom.h
 $(OBJ)piimage.o: piimage.cc piimage.h parradapter.h \
- $(INC)defs.h $(INC)machine.h \
- lut.h pisysdep.h pidrawer.h pibwdggen.h piwdgx.h piwdggen.h \
- pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \
- pigraphuc.h psfile.h pipixmapx.h pipixmapgen.h pibwdgx.h pigraphps.h \
- pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \
+ $(INC)defs.h \
+ $(INC)machine.h lut.h \
+ pisysdep.h pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h \
+ picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h \
+ psfile.h pipixmapx.h pipixmapgen.h pibwdgx.h pigraphps.h pistdwdgx.h \
+ pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \
  picontainergen.h picmapview.h piimgtools.h pioptmenux.h \
  pioptmenugen.h pimenux.h pimenugen.h piapplx.h piapplgen.h \
@@ -152,8 +201,10 @@
  pimenubargen.h picons.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
  picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraphps.h piimage.h parradapter.h \
- $(INC)machine.h lut.h pidrawer.h pipixmapx.h \
- pipixmapgen.h picmapview.h
-$(OBJ)piinit.o: piinit.cc $(INC)defs.h piinit.h \
+ $(INC)defs.h pigraphps.h \
+ piimage.h parradapter.h \
+ $(INC)machine.h lut.h \
+ pidrawer.h pipixmapx.h pipixmapgen.h picmapview.h
+$(OBJ)piinit.o: piinit.cc \
+ $(INC)defs.h piinit.h \
  $(INC)strecinit.h \
  $(INC)imaginit.h \
@@ -180,25 +231,29 @@
  pimenugen.h piwdgx.h piwdggen.h pimsghandler.h
 $(OBJ)pimsghandler.o: pimsghandler.cc pimsghandler.h
-$(OBJ)pintup3d.o: pintup3d.cc pintup3d.h $(INC)ntuple.h \
- $(INC)ppersist.h $(INC)defs.h \
- $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)exceptions.h \
- $(INC)peidainit.h \
- $(INC)pclassids.h \
- $(INC)dvlist.h pi3ddrw.h pisysdep.h pidrawer.h \
- pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h pigraph3d.h \
- pibwdgx.h pigraphps.h
-$(OBJ)pintuple.o: pintuple.cc pintuple.h $(INC)ntuple.h \
- $(INC)ppersist.h $(INC)defs.h \
- $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)exceptions.h \
- $(INC)peidainit.h \
- $(INC)pclassids.h \
- $(INC)dvlist.h pidrawer.h pibwdggen.h pisysdep.h \
- piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \
- pigraphx.h pigraphgen.h pigraphuc.h psfile.h
+$(OBJ)pintup3d.o: pintup3d.cc pintup3d.h \
+ $(INC)ntuple.h \
+ $(INC)ppersist.h \
+ $(INC)defs.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)exceptions.h \
+ $(INC)peidainit.h \
+ $(INC)pclassids.h \
+ $(INC)dvlist.h pi3ddrw.h \
+ pisysdep.h pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h \
+ picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h \
+ psfile.h pigraph3d.h pibwdgx.h pigraphps.h
+$(OBJ)pintuple.o: pintuple.cc pintuple.h \
+ $(INC)ntuple.h \
+ $(INC)ppersist.h \
+ $(INC)defs.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)exceptions.h \
+ $(INC)peidainit.h \
+ $(INC)pclassids.h \
+ $(INC)dvlist.h pidrawer.h \
+ pibwdggen.h pisysdep.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
+ picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h
 $(OBJ)pioptmenugen.o: pioptmenugen.cc pioptmenugen.h pisysdep.h pimenux.h \
  pimenugen.h piwdgx.h piwdggen.h pimsghandler.h
@@ -226,6 +281,8 @@
  $(INC)machine.h lut.h \
  $(INC)cvector.h \
- $(INC)matrix.h $(INC)peida.h \
- $(INC)utils.h $(INC)perrors.h \
+ $(INC)matrix.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)perrors.h \
  $(INC)exceptions.h \
  $(INC)peidainit.h \
@@ -235,10 +292,12 @@
  $(INC)histos2.h \
  $(INC)histos.h \
- $(INC)generalfit.h
+ $(INC)generalfit.h \
+ $(INC)generaldata.h \
+ $(INC)poly.h
 $(OBJ)piscdrawwdg.o: piscdrawwdg.cc piscdrawwdg.h pisysdep.h pibwdgx.h \
  pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
  picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraphps.h pistdwdgx.h \
- pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \
+ $(INC)defs.h pigraphps.h \
+ pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \
  picontainergen.h pidrawer.h pidrwtools.h pioptmenux.h pioptmenugen.h \
  pimenux.h pimenugen.h piapplx.h piapplgen.h pimenubarx.h \
@@ -249,6 +308,8 @@
 $(OBJ)pistdwdgx.o: pistdwdgx.cc pisysdep.h pistdwdgx.h pistdwdggen.h \
  piwdgx.h piwdggen.h pimsghandler.h
-$(OBJ)pistlist.o: pistlist.cc pistlist.h $(INC)stlist.h \
- $(INC)machine.h $(INC)defs.h \
+$(OBJ)pistlist.o: pistlist.cc pistlist.h \
+ $(INC)stlist.h \
+ $(INC)machine.h \
+ $(INC)defs.h \
  $(INC)exceptions.h \
  $(INC)peidainit.h \
@@ -257,9 +318,13 @@
  $(INC)ppersist.h \
  $(INC)pclassids.h \
- $(INC)imaginit.h $(INC)star.h \
+ $(INC)imaginit.h \
+ $(INC)star.h \
  $(INC)strecinit.h \
- $(INC)starmacro.h $(INC)psf.h \
- $(INC)peida.h $(INC)utils.h \
- $(INC)fmath.h $(INC)cimage.h \
+ $(INC)starmacro.h \
+ $(INC)psf.h \
+ $(INC)peida.h \
+ $(INC)utils.h \
+ $(INC)fmath.h \
+ $(INC)cimage.h \
  $(INC)rzimage.h \
  $(INC)rzvect.h \
@@ -270,8 +335,11 @@
  $(INC)matrix.h \
  $(INC)cvector.h \
+ $(INC)generaldata.h \
+ $(INC)poly.h \
  $(INC)fct2dfit.h \
  $(INC)pixelmap.h \
- $(INC)transfo.h $(INC)poly.h \
- $(INC)zfidu.h $(INC)imgalig.h \
+ $(INC)transfo.h \
+ $(INC)zfidu.h \
+ $(INC)imgalig.h \
  $(INC)fitsimage.h \
  $(INC)fitsheader.h \
@@ -287,26 +355,32 @@
  $(INC)erostarfile.h \
  $(INC)xstrstream.h \
- $(INC)dates.h $(INC)tarlib.h \
- pidrawer.h pibwdggen.h pisysdep.h piwdgx.h piwdggen.h pimsghandler.h \
- picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h \
- psfile.h
+ $(INC)dates.h \
+ $(INC)tarlib.h pidrawer.h \
+ pibwdggen.h pisysdep.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
+ picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h
 $(OBJ)pistzwin.o: pistzwin.cc \
- /usr/local/lib/gcc-lib/alpha-dec-osf4.0/2.7.2.1/include/stdio.h \
+ /home/usr203/mnt/gnu/OSF1/lib/gcc-lib/alphaev5-dec-osf4.0d/2.8.1/include/stdio.h \
  pistzwin.h pisysdep.h piwindowx.h piwindowgen.h picontainerx.h \
  picontainergen.h piwdgx.h piwdggen.h pimsghandler.h piperiodx.h \
- $(INC)periodic.h $(INC)defs.h \
- psfile.h pigraphgen.h picmap.h picmapx.h picmapgen.h
+ $(INC)periodic.h \
+ $(INC)defs.h psfile.h \
+ pigraphgen.h picmap.h picmapx.h picmapgen.h
 $(OBJ)pisurfdr.o: pisurfdr.cc pisurfdr.h parradapter.h \
- $(INC)defs.h $(INC)machine.h \
- lut.h pi3ddrw.h pisysdep.h pidrawer.h pibwdggen.h piwdgx.h piwdggen.h \
+ $(INC)defs.h \
+ $(INC)machine.h lut.h \
+ pi3ddrw.h pisysdep.h pidrawer.h pibwdggen.h piwdgx.h piwdggen.h \
  pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \
  pigraphuc.h psfile.h pigraph3d.h pibwdgx.h pigraphps.h
-$(OBJ)piup.o: piup.cc $(INC)ctimer.h \
- $(INC)peida.h $(INC)defs.h \
- $(INC)utils.h $(INC)machine.h \
- $(INC)perrors.h \
- $(INC)exceptions.h \
- $(INC)peidainit.h \
- $(INC)fmath.h $(INC)imageop.h \
+$(OBJ)piup.o: piup.cc \
+ $(INC)ctimer.h \
+ $(INC)peida.h \
+ $(INC)defs.h \
+ $(INC)utils.h \
+ $(INC)machine.h \
+ $(INC)perrors.h \
+ $(INC)exceptions.h \
+ $(INC)peidainit.h \
+ $(INC)fmath.h \
+ $(INC)imageop.h \
  $(INC)cimage.h \
  $(INC)rzimage.h \
@@ -333,15 +407,16 @@
  $(INC)erostarfile.h \
  $(INC)xstrstream.h \
- $(INC)dates.h $(INC)tarlib.h \
- piup.h
+ $(INC)dates.h \
+ $(INC)tarlib.h piup.h
 $(OBJ)piwdggen.o: piwdggen.cc piwdggen.h pimsghandler.h picontainergen.h \
- pisysdep.h piwdgx.h psfile.h $(INC)defs.h \
- pigraphgen.h picmap.h picmapx.h picmapgen.h
+ pisysdep.h piwdgx.h psfile.h \
+ $(INC)defs.h pigraphgen.h \
+ picmap.h picmapx.h picmapgen.h
 $(OBJ)piwdgx.o: piwdgx.cc piwdgx.h piwdggen.h pimsghandler.h picontainerx.h \
  pisysdep.h picontainergen.h
 $(OBJ)piwindowgen.o: piwindowgen.cc piwindowgen.h pisysdep.h picontainerx.h \
  picontainergen.h piwdgx.h piwdggen.h pimsghandler.h psfile.h \
- $(INC)defs.h pigraphgen.h picmap.h picmapx.h \
- picmapgen.h
+ $(INC)defs.h pigraphgen.h \
+ picmap.h picmapx.h picmapgen.h
 $(OBJ)piwindowx.o: piwindowx.cc piwindowx.h piwindowgen.h pisysdep.h \
  picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h
@@ -349,6 +424,8 @@
  piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \
  pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
- $(INC)defs.h pigraphps.h pixtbase.h
-$(OBJ)psfile.o: psfile.cc psfile.h $(INC)defs.h \
- pisysdep.h pigraphgen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
- picmapx.h picmapgen.h
+ $(INC)defs.h pigraphps.h \
+ pixtbase.h
+$(OBJ)psfile.o: psfile.cc psfile.h \
+ $(INC)defs.h pisysdep.h \
+ pigraphgen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
+ picmapgen.h
Index: trunk/SophyaPI/PI/pigfd1.cc
===================================================================
--- trunk/SophyaPI/PI/pigfd1.cc	(revision 151)
+++ trunk/SophyaPI/PI/pigfd1.cc	(revision 151)
@@ -0,0 +1,77 @@
+#include <stdio.h>
+#include "pigfd1.h"
+
+ 
+/* --Methode-- */
+PIGenFitDat::PIGenFitDat(GeneralFitData* gfd, bool ad)
+: PIDrawer(), mGFD(gfd), mAdDO(ad), VarX(0), ErrX(false), ErrY(false)
+{
+SelectX(0);
+SelectErrBar(false,false);
+}
+
+PIGenFitDat::~PIGenFitDat()
+{
+if(mAdDO && mGFD)  delete mGFD;
+}
+
+/* --Methode-- */
+void  PIGenFitDat::SelectX(int varx)
+{
+VarX = -1;
+if(mGFD == NULL) return;
+if(varx<0 || varx>=mGFD->NVar()) return;
+VarX = varx;
+}
+
+/* --Methode-- */
+void  PIGenFitDat::SelectErrBar(bool erbx,bool erby)
+{
+ErrX = erbx; ErrY = erby;
+if(mGFD == NULL) {ErrX = ErrY = false; return;}
+if(!mGFD->HasXErrors()) ErrX = false;
+}
+
+/* --Methode-- */
+void PIGenFitDat::UpdateLimits()
+{
+if(!mGFD) return;
+if(mGFD->NData()<=0) return;
+if(VarX<0) return;
+double dx, dy;
+double xmin=9.e19, xmax=-9.e19, ymin=9.e19, ymax=-9.e19;
+mGFD->GetMinMax(10*VarX+2,xmin,xmax);
+mGFD->GetMinMax(0,ymin, ymax);
+if(xmax<=xmin) xmax = xmin+1.;
+if(ymax<=ymin) ymax = ymin+1.;
+dx = 0.02*(xmax-xmin);
+dy = 0.02*(ymax-ymin);
+SetLimits((float)xmin-dx,(float)xmax+dx,(float)ymin-dy,(float)ymax+dy);
+SetAxesFlags(kBoxAxes | kExtTicks | kLabels);
+}
+
+/* --Methode-- */
+void PIGenFitDat::Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax)
+{
+if (!mGFD) return;
+if(mGFD->NData()<=0) return;
+if(VarX<0) return;
+// On plotte les barre d'erreurs ligne demandee explicitement
+if(mLAtt!=PI_NotDefLineAtt) SelectErrBar(true,true);
+float xp,yp,er;
+for (int i=0; i<mGFD->NData(); i++) {
+  xp = mGFD->Absc(VarX,i);
+  yp = mGFD->Val(i);
+  if(xp<xmin || xp>xmax || yp<ymin || yp>ymax)  continue;
+  if(ErrX) {
+    er = mGFD->EAbsc(VarX,i);
+    if(er>0.) g->DrawLine(xp-er,yp,xp+er,yp);
+  }
+  if(ErrY) {
+    er = mGFD->EVal(i);
+    if(er>0.) g->DrawLine(xp,yp-er,xp,yp+er);
+  }
+  g->DrawMarker(xp, yp); 
+}
+return;
+}
Index: trunk/SophyaPI/PI/pigfd1.h
===================================================================
--- trunk/SophyaPI/PI/pigfd1.h	(revision 151)
+++ trunk/SophyaPI/PI/pigfd1.h	(revision 151)
@@ -0,0 +1,25 @@
+#ifndef PIGFD1_H
+#define PIGFD1_H
+
+#include "generaldata.h"
+#include "pidrawer.h"
+
+class PIGenFitDat : public PIDrawer {
+public:
+                     PIGenFitDat(GeneralFitData* gfd, bool ad);
+  virtual           ~PIGenFitDat();
+  
+  virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax);
+  virtual void       UpdateLimits();
+  
+          void       SelectX(int varx);
+          void       SelectErrBar(bool erbx,bool erby);
+       
+protected:
+  GeneralFitData* mGFD;
+  bool mAdDO;
+  int VarX;          // numero de variable X ds le GeneralFitData
+  bool ErrX,ErrY;    // Erreur en X et Y ?
+};
+
+#endif
Index: trunk/SophyaPI/PI/pigfd2.cc
===================================================================
--- trunk/SophyaPI/PI/pigfd2.cc	(revision 151)
+++ trunk/SophyaPI/PI/pigfd2.cc	(revision 151)
@@ -0,0 +1,95 @@
+#include <stdio.h>
+#include "pigfd2.h"
+
+/* --Methode-- */
+PIGenFitDat3D::PIGenFitDat3D(GeneralFitData* gfd, bool ad)
+: PIDrawer3D(), mGFD(gfd), mAdDO(ad)
+, VarX(0), VarY(1), ErrX(false), ErrY(false), ErrZ(false)
+{
+SelectXY(0,1);
+SelectErrBar(false,false,false);
+}
+
+PIGenFitDat3D::~PIGenFitDat3D()
+{
+if(mAdDO && mGFD)  delete mGFD;
+}
+
+/* --Methode-- */
+void  PIGenFitDat3D::SelectXY(int varx,int vary)
+{
+VarX = VarY = -1;
+if(mGFD == NULL) return;
+if(varx<0 || varx>=mGFD->NVar()) return;
+if(vary<0 || vary>=mGFD->NVar()) return;
+VarX = varx; VarY = vary;
+}
+
+/* --Methode-- */
+void  PIGenFitDat3D::SelectErrBar(bool erbx,bool erby,bool erbz)
+{
+ErrX = erbx; ErrY = erby; ErrZ = erbz;
+if(mGFD == NULL) {ErrX = ErrY = ErrZ = false; return;}
+if(!mGFD->HasXErrors()) ErrX = ErrY = false;
+}
+
+/* --Methode-- */
+void PIGenFitDat3D::UpdateLimits()
+{
+if(!mGFD) return;
+if(mGFD->NData()<=0) return;
+if(VarX<0 || VarY<0) return;
+double xmin=9.e19, xmax=-9.e19, ymin=9.e19, ymax=-9.e19, zmin=9.e19, zmax=-9.e19;
+mGFD->GetMinMax(10*VarX+2,xmin,xmax);
+mGFD->GetMinMax(10*VarY+2,ymin,ymax);
+mGFD->GetMinMax(0,zmin, zmax);
+if(xmax<=xmin) xmax = xmin+1.;
+if(ymax<=ymin) ymax = ymin+1.;
+if(zmax<=zmin) zmax = zmin+1.;
+// Voir commentaires pintuple3d.cc
+float D = xmax-xmin;
+if (D < (ymax-ymin))  D = ymax-ymin;
+D *= 1.4;
+Set3DView((xmin+xmax)/2., (ymin+ymax)/2, (zmin+zmax)/2., 
+          (xmin+xmax)/2.+D , (ymin+ymax)/2.+2.*D , zmin+(zmax-zmin)*0.2, 0.3, 0.3);  
+}
+
+/* --Methode-- */
+void PIGenFitDat3D::Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax)
+{
+if (!mGFD) return;
+if(mGFD->NData()<=0) return;
+if(VarX<0 || VarY<0) return;
+// On plotte les barre d'erreurs ligne demandee explicitement
+if(mLAtt!=PI_NotDefLineAtt) SelectErrBar(true,true,true);
+
+#if defined(__GNUC__) && !defined(GCCV28)
+PIGraphic3D* g3 = (PIGraphic3D*)(g);
+#else
+PIGraphic3D* g3 = dynamic_cast<PIGraphic3D*>(g);
+#endif
+
+if (mLAtt == PI_NotDefLineAtt)  g3->SelLine(PI_ThinLine);
+
+float xp,yp,zp,er;
+for (int i=0; i<mGFD->NData(); i++) {
+  xp = mGFD->Absc(VarX,i);
+  yp = mGFD->Absc(VarY,i);
+  zp = mGFD->Val(i);
+  if(ErrX) {
+    er = mGFD->EAbsc(VarX,i);
+    if(er>0.) g3->DrawLine3D(xp-er,yp,zp,xp+er,yp,zp);
+  }
+  if(ErrY) {
+    er = mGFD->EAbsc(VarY,i);
+    g3->DrawLine3D(xp,yp-er,zp,xp,yp+er,zp);
+  }
+  if(ErrZ) {
+    er = mGFD->EVal(i);
+    g3->DrawLine3D(xp,yp,zp-er,xp,yp,zp+er);
+  }
+  g3->DrawMarker3D(xp,yp,zp); 
+}
+
+return;
+}
Index: trunk/SophyaPI/PI/pigfd2.h
===================================================================
--- trunk/SophyaPI/PI/pigfd2.h	(revision 151)
+++ trunk/SophyaPI/PI/pigfd2.h	(revision 151)
@@ -0,0 +1,26 @@
+#ifndef PIGFD2_H
+#define PIGFD2_H
+
+#include "generaldata.h"
+#include "pi3ddrw.h"
+
+class PIGenFitDat3D : public PIDrawer3D {
+public:
+                     PIGenFitDat3D(GeneralFitData* gfd, bool ad);
+  virtual           ~PIGenFitDat3D();
+  
+  virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax);
+  virtual void       UpdateLimits();
+  
+          void       SelectXY(int varx,int vary);
+          void       SelectErrBar(bool erbx,bool erby,bool erbz);
+
+       
+protected:
+  GeneralFitData* mGFD;
+  bool mAdDO;
+  int VarX,VarY;         // numero de variable X,Y ds le GeneralFitData
+  bool ErrX,ErrY,ErrZ;   // Erreur en X,Y et Z?
+};
+
+#endif
