Index: /trunk/SophyaLib/SkyT/blackbody.cc
===================================================================
--- /trunk/SophyaLib/SkyT/blackbody.cc	(revision 668)
+++ /trunk/SophyaLib/SkyT/blackbody.cc	(revision 669)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: blackbody.cc,v 1.3 1999-11-29 14:16:03 ansari Exp $
+//      $Id: blackbody.cc,v 1.4 1999-11-29 16:59:09 ansari Exp $
 //
 // Description:
@@ -57,4 +57,16 @@
 }
 
+
+void
+BlackBody::Print(ostream& os) const
+{
+  os << "BlackBody::Print Temp= " << getTemperature() 
+     << " - Fmin,Fmax= " << minFreq() << "," << maxFreq() << endl;
+  os << "MeanFreq= " << meanFreq() << "  Emission= " << flux(meanFreq()) << endl;
+  os << "PeakFreq= " << peakFreq() << "  Emission= " << flux(peakFreq()) << endl;
+
+}
+
+/*
 void 
 BlackBody::WriteSelf(POutPersist& s)  
@@ -75,12 +87,3 @@
 }
 
-
-void
-BlackBody::Print(ostream& os) const
-{
-  os << "BlackBody::Print Temp= " << getTemperature() 
-     << " - Fmin,Fmax= " << minFreq() << "," << maxFreq() << endl;
-  os << "MeanFreq= " << meanFreq() << "  Emission= " << flux(meanFreq()) << endl;
-  os << "PeakFreq= " << peakFreq() << "  Emission= " << flux(peakFreq()) << endl;
-
-}
+*/
Index: /trunk/SophyaLib/SkyT/blackbody.h
===================================================================
--- /trunk/SophyaLib/SkyT/blackbody.h	(revision 668)
+++ /trunk/SophyaLib/SkyT/blackbody.h	(revision 669)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: blackbody.h,v 1.3 1999-11-29 14:16:03 ansari Exp $
+//      $Id: blackbody.h,v 1.4 1999-11-29 16:59:10 ansari Exp $
 //
 // Description:
@@ -33,6 +33,4 @@
   inline void setTemperature(double newtemp) { _temperature = newtemp; }
 
-  virtual void ReadSelf(PInPersist& s);
-  virtual void WriteSelf(POutPersist& s);
   // Redefintion of the Print function
   virtual void      Print(ostream& os)  const;
Index: /trunk/SophyaLib/SkyT/easyTest.cc
===================================================================
--- /trunk/SophyaLib/SkyT/easyTest.cc	(revision 668)
+++ /trunk/SophyaLib/SkyT/easyTest.cc	(revision 669)
@@ -5,7 +5,7 @@
 #include "tvector.h"
 #include "squarefilt.h"
+#include "gaussfilt.h"
 #include "trianglefilt.h"
 
-#include "iobjspecresp.cc"
 
 int
@@ -15,8 +15,4 @@
 //   SR_ReadSelf(in);
 //   cout << " " << endl;
-
-    PInPersist in2("outTF");
-    SR_ReadSelf(in2);
-    cout << " " << endl;
 
   cout << "BlackBody!" << endl;
@@ -92,4 +88,19 @@
   freqmax = vecOfNuRSV(SRVmaxVal-1);
   SpecRespVec mySRV(vecOfNuRSV, vecOfFDeNuRSV);
+
+// Test ecriture en PPF 
+  {
+  cout << " Writing mySRV (RadSpecVec to PPF " << endl;
+  POutPersist s("srvec.ppf");
+  s << mySRV;
+  }
+  {
+  cout << " Reading  mySRV from PPF " << endl;
+  PInPersist s("srvec.ppf");
+  SpecRespVec srv;
+  s >> srv;
+  cout << srv;
+  }
+
   double SRV    = mySRV.IntegratedSpect(freqmin,freqmax);
   double logSRV = mySRV.logIntegratedSpect(freqmin,freqmax);
@@ -158,9 +169,20 @@
   cout << "read and write things in file...ppersist!" << endl;
   TriangleFilter myTF2(10,200,20,40);
-  POutPersist outTF("outTF");
-  myTF2.WriteSelf(outTF);
 //   PInPersist inTF("outTF");
 //   myTF2.ReadSelf(inTF);
-  
+
+  {  // Test IO PPF GaussianFilter
+  cout << " Writing  GaussianFilter gf(276., 39.6, 0.794, 27., 690.) to PPF " << endl;
+  GaussianFilter gf(276., 39.6, 0.794, 27., 690.);
+  POutPersist s("fgauss.ppf");
+  s << gf ;
+  }
+  {
+  cout << " Reading  GaussianFilter from PPF " << endl;
+  PInPersist s("fgauss.ppf");
+  GaussianFilter gf2;
+  s >> gf2;
+  cout << gf2 << endl;
+  }
 
 } 
Index: /trunk/SophyaLib/SkyT/nupower.cc
===================================================================
--- /trunk/SophyaLib/SkyT/nupower.cc	(revision 668)
+++ /trunk/SophyaLib/SkyT/nupower.cc	(revision 669)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: nupower.cc,v 1.4 1999-11-29 14:16:05 ansari Exp $
+//      $Id: nupower.cc,v 1.5 1999-11-29 16:59:10 ansari Exp $
 //
 // Description:
@@ -52,4 +52,18 @@
 
 
+
+void
+PowerLawSpectra::Print(ostream& os) const
+{
+  os << "PowerLawSpectra::Print f = a ((nu-nu0)/dnu)^b " << _a << "((nu-" << _nu0 
+     << ") / " << _dnu << ") ^ " << _b << endl;
+  os << " - Fmin,Fmax= " << minFreq() << "," << maxFreq() << endl;
+  os << "MeanFreq= " << meanFreq() << "  Emission= " << flux(meanFreq()) << endl;
+  os << "PeakFreq= " << peakFreq() << "  Emission= " << flux(peakFreq()) << endl;
+
+}
+
+
+/*
 void 
 PowerLawSpectra::WriteSelf(POutPersist& s)  
@@ -76,13 +90,3 @@
 }
 
-
-void
-PowerLawSpectra::Print(ostream& os) const
-{
-  os << "PowerLawSpectra::Print f = a ((nu-nu0)/dnu)^b " << _a << "((nu-" << _nu0 
-     << ") / " << _dnu << ") ^ " << _b << endl;
-  os << " - Fmin,Fmax= " << minFreq() << "," << maxFreq() << endl;
-  os << "MeanFreq= " << meanFreq() << "  Emission= " << flux(meanFreq()) << endl;
-  os << "PeakFreq= " << peakFreq() << "  Emission= " << flux(peakFreq()) << endl;
-
-}
+*/
Index: /trunk/SophyaLib/SkyT/nupower.h
===================================================================
--- /trunk/SophyaLib/SkyT/nupower.h	(revision 668)
+++ /trunk/SophyaLib/SkyT/nupower.h	(revision 669)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: nupower.h,v 1.4 1999-11-29 14:16:05 ansari Exp $
+//      $Id: nupower.h,v 1.5 1999-11-29 16:59:10 ansari Exp $
 //
 // Description:
@@ -37,7 +37,4 @@
   virtual inline double giveExp() const {return _b;};
   
-  virtual void WriteSelf(POutPersist& s) ;
-  virtual void ReadSelf(PInPersist& s) ;
- 
 
 protected:
Index: /trunk/SophyaLib/SkyT/radspec.h
===================================================================
--- /trunk/SophyaLib/SkyT/radspec.h	(revision 668)
+++ /trunk/SophyaLib/SkyT/radspec.h	(revision 669)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: radspec.h,v 1.3 1999-11-29 14:16:06 ansari Exp $
+//      $Id: radspec.h,v 1.4 1999-11-29 16:59:11 ansari Exp $
 //
 // Description:
@@ -76,6 +76,4 @@
 
   virtual void      Print(ostream& os)  const;
-  virtual void ReadSelf(PInPersist& s) = 0;
-  virtual void WriteSelf(POutPersist& s) = 0;
 
 protected:
Index: /trunk/SophyaLib/SkyT/radspecvector.cc
===================================================================
--- /trunk/SophyaLib/SkyT/radspecvector.cc	(revision 668)
+++ /trunk/SophyaLib/SkyT/radspecvector.cc	(revision 669)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: radspecvector.cc,v 1.4 1999-11-29 14:16:06 ansari Exp $
+//      $Id: radspecvector.cc,v 1.5 1999-11-29 16:59:11 ansari Exp $
 //
 // Description:
@@ -39,6 +39,4 @@
   _numin = nu(0);
   _numax = nu(nu.NElts()-1);
-  _size = nu.NElts();
-  if(_vecOfNu.NElts() != _vecOfFDeNu.NElts()) cout << "vectors are not compatible" << exit;
 }
 
@@ -83,4 +81,18 @@
 }
 
+
+
+void
+RadSpectraVec::Print(ostream& os) const
+{
+  //  os << "RadSpectraVec::Print (" << typeid(*this).name() 
+  //     << ") - Fmin,Fmax= " << minFreq() << "," << maxFreq() << endl;
+  os << "RadSpectraVec::Print  - Fmin,Fmax= " << minFreq() << "," << maxFreq() << endl;
+  os << "MeanFreq= " << meanFreq() << "  Emission= " << flux(meanFreq()) << endl;
+  os << "PeakFreq= " << peakFreq() << "  Emission= " << flux(peakFreq()) << endl;
+
+}
+
+/*
 void
 RadSpectraVec::WriteSelf(POutPersist& s) 
@@ -114,17 +126,5 @@
   cout <<    _numin<< "-" <<  _numax << endl;
 }
+*/
 
 
-
-void
-RadSpectraVec::Print(ostream& os) const
-{
-  //  os << "RadSpectraVec::Print (" << typeid(*this).name() 
-  //     << ") - Fmin,Fmax= " << minFreq() << "," << maxFreq() << endl;
-  os << "RadSpectraVec::Print  - Fmin,Fmax= " << minFreq() << "," << maxFreq() << endl;
-  os << "MeanFreq= " << meanFreq() << "  Emission= " << flux(meanFreq()) << endl;
-  os << "PeakFreq= " << peakFreq() << "  Emission= " << flux(peakFreq()) << endl;
-
-}
-
-
Index: /trunk/SophyaLib/SkyT/radspecvector.h
===================================================================
--- /trunk/SophyaLib/SkyT/radspecvector.h	(revision 668)
+++ /trunk/SophyaLib/SkyT/radspecvector.h	(revision 669)
@@ -50,7 +50,4 @@
   inline double getNuVec(int i) const { return _vecOfNu(i); }
   inline double getFNuVec(int i) const { return _vecOfFDeNu(i); }
-  inline int NbElts() const { return _size;}
-  virtual void ReadSelf(PInPersist& s);
-  virtual void WriteSelf(POutPersist& s);
 
   virtual void   Print(ostream& os)  const;
@@ -59,5 +56,4 @@
   Vector _vecOfNu;
   Vector _vecOfFDeNu;
-  int _size;
 };
 
Index: /trunk/SophyaLib/SkyT/skyinit.cc
===================================================================
--- /trunk/SophyaLib/SkyT/skyinit.cc	(revision 668)
+++ /trunk/SophyaLib/SkyT/skyinit.cc	(revision 669)
@@ -2,9 +2,9 @@
 #include <unistd.h>
 
-#include "sambainit.h"
+#include "skyinit.h"
 #include "ppersist.h"
 #include "objfio.h"
 #include "specrespvector.h"
-#include "gaussianfilter.h"
+#include "gaussfilt.h"
 
 int SkyTInitiator::FgInit = 0;
Index: /trunk/SophyaLib/SkyT/specrespvector.cc
===================================================================
--- /trunk/SophyaLib/SkyT/specrespvector.cc	(revision 668)
+++ /trunk/SophyaLib/SkyT/specrespvector.cc	(revision 669)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: specrespvector.cc,v 1.4 1999-11-29 14:16:09 ansari Exp $
+//      $Id: specrespvector.cc,v 1.5 1999-11-29 16:59:12 ansari Exp $
 //
 // Description:
@@ -32,4 +32,15 @@
 SpecRespVec::SpecRespVec(Vector const & nu, Vector const & fdenu, double numin, double numax)
         : SpectralResponse(numin, numax)
+{
+  if(nu.NElts() != fdenu.NElts())  
+    throw SzMismatchError("SpecRespVec::SpecRespVec() - Non equal vector sizes");
+  _vecOfNu = nu;
+  _vecOfFDeNu = fdenu;
+  _size = nu.NElts();
+  if(_vecOfNu.NElts() != _vecOfFDeNu.NElts()) cout << "vectors are not compatible" << exit;
+}
+
+SpecRespVec::SpecRespVec(Vector const & nu, Vector const & fdenu)
+        : SpectralResponse()
 {
   if(nu.NElts() != fdenu.NElts())  
@@ -116,7 +127,12 @@
   s.PutR8(dobj->maxFreq());
 
-  // TVector<T> has Persistence Manager 
-  s <<  dobj->getNuVec();
-  s <<  dobj->getTNuVec();
+  // TVector<T> has Persistence Manager
+  s << dobj->getNuVec();
+  {
+  Vector& xv2 = dobj->getTNuVec();
+  cout << xv2 ;
+  FIO_TVector<double> vio2(&xv2);
+  vio2.Write(s);
+  }
 }
 
@@ -132,10 +148,7 @@
   if(dobj == NULL)
     {
-      Vector v1(10);
-      Vector v2(10);
-      dobj= new SpecRespVec();
-      ownobj= true;
+    dobj= new SpecRespVec();
+    ownobj= true;
     }
-  
   r_8 minf, maxf;
   s.GetR8(minf);
@@ -143,6 +156,8 @@
   dobj->setMinMaxFreq(minf, maxf);
   // TVector<T> has Persistence Manager 
-  s >>  dobj->getNuVec();
-  s >>  dobj->getTNuVec();
+  FIO_TVector<double> vio(&(dobj->getNuVec()));
+  vio.Read(s);
+  FIO_TVector<double> vio2(&(dobj->getTNuVec()));
+  vio2.Read(s);
 }
 
Index: /trunk/SophyaLib/SkyT/specrespvector.h
===================================================================
--- /trunk/SophyaLib/SkyT/specrespvector.h	(revision 668)
+++ /trunk/SophyaLib/SkyT/specrespvector.h	(revision 669)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: specrespvector.h,v 1.3 1999-11-29 14:16:09 ansari Exp $
+//      $Id: specrespvector.h,v 1.4 1999-11-29 16:59:12 ansari Exp $
 //
 // Description:
@@ -38,5 +38,6 @@
   //Constructor
   SpecRespVec();
-  SpecRespVec(Vector const & nu, Vector const & fdenu, double numin=0., double numax=1.);
+  SpecRespVec(Vector const & nu, Vector const & fdenu, double numin, double numax);
+  SpecRespVec(Vector const & nu, Vector const & fdenu);
 
   // destructor
Index: /trunk/SophyaLib/SkyT/squarefilt.cc
===================================================================
--- /trunk/SophyaLib/SkyT/squarefilt.cc	(revision 668)
+++ /trunk/SophyaLib/SkyT/squarefilt.cc	(revision 669)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: squarefilt.cc,v 1.3 1999-11-29 14:16:09 ansari Exp $
+//      $Id: squarefilt.cc,v 1.4 1999-11-29 16:59:12 ansari Exp $
 //
 // Description:
@@ -68,4 +68,5 @@
 }
 
+/*
 void 
 SquareFilter::WriteSelf(POutPersist& s) 
@@ -83,2 +84,3 @@
   cout << "minFreq - maxFreq " <<  _numin << "-" << _numax  << endl;
 }
+*/
Index: /trunk/SophyaLib/SkyT/squarefilt.h
===================================================================
--- /trunk/SophyaLib/SkyT/squarefilt.h	(revision 668)
+++ /trunk/SophyaLib/SkyT/squarefilt.h	(revision 669)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: squarefilt.h,v 1.3 1999-11-29 14:16:09 ansari Exp $
+//      $Id: squarefilt.h,v 1.4 1999-11-29 16:59:13 ansari Exp $
 //
 // Description:
@@ -47,8 +47,4 @@
   virtual double peakTransmission() const;
   
-  virtual void WriteSelf(POutPersist& s) ;
-  virtual void ReadSelf(PInPersist& s) ;
-  
- 
 
 protected:
Index: /trunk/SophyaLib/SkyT/tgrsr.cc
===================================================================
--- /trunk/SophyaLib/SkyT/tgrsr.cc	(revision 668)
+++ /trunk/SophyaLib/SkyT/tgrsr.cc	(revision 669)
@@ -29,5 +29,5 @@
   if ((narg < 5) || ((narg>1) && (strcmp(arg[1],"-h") == 0)) )  {
     cout << " tgrsr : Generation of RadSpectraVec and SpecRespVec in FITS  " << endl;
-    cout << " Usage: tgrsr 0/1 Params NPoints FitsFileName [ImageR4FITSName]" << endl;
+    cout << " Usage: tgrsr 0/1 Params NPoints FitsFileName [ImageR4FITSName] [ppfname] " << endl;
     cout << " 0 -> GaussianFilter  T = A exp(((nu-nu0)/dnu)^2" << endl;
     cout << " Params : A,Nu0,DNu,MinFreq,MaxFreq " << endl;
@@ -82,4 +82,16 @@
       img(k,1) = tnu(k);
     }
+    if ((typ == 0) && (narg > 6)) { // Writing to ppf  file
+      cout << "writing SpecRespVec(" << npt << ") to PPF file: " 
+           << (string)(arg[6]) << endl;
+      cout << sr ; 
+      cout << srv ; 
+      {
+        POutPersist pos(arg[6]);
+        pos << srv;
+      }
+      PrtTim("End of ImageR4->PPF ");
+    }
+
   }
   else { // Generation de RadSpectraVec from PowerLawSpectra
Index: /trunk/SophyaLib/SkyT/trianglefilt.cc
===================================================================
--- /trunk/SophyaLib/SkyT/trianglefilt.cc	(revision 668)
+++ /trunk/SophyaLib/SkyT/trianglefilt.cc	(revision 669)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: trianglefilt.cc,v 1.3 1999-11-29 14:16:10 ansari Exp $
+//      $Id: trianglefilt.cc,v 1.4 1999-11-29 16:59:13 ansari Exp $
 //
 // Description:
@@ -67,4 +67,5 @@
 }
 
+/*
 void
 TriangleFilter::WriteSelf(POutPersist& s) 
@@ -89,2 +90,4 @@
 
 }
+
+*/
Index: /trunk/SophyaLib/SkyT/trianglefilt.h
===================================================================
--- /trunk/SophyaLib/SkyT/trianglefilt.h	(revision 668)
+++ /trunk/SophyaLib/SkyT/trianglefilt.h	(revision 669)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: trianglefilt.h,v 1.3 1999-11-29 14:16:10 ansari Exp $
+//      $Id: trianglefilt.h,v 1.4 1999-11-29 16:59:13 ansari Exp $
 //
 // Description:
@@ -43,6 +43,4 @@
   virtual double peakFreq() const; 
   virtual double peakTransmission() const;
-  virtual void WriteSelf(POutPersist& s) ;
-  virtual void ReadSelf(PInPersist& s)  ;
 
 protected:
