Index: /trunk/SophyaLib/SkyT/blackbody.cc
===================================================================
--- /trunk/SophyaLib/SkyT/blackbody.cc	(revision 667)
+++ /trunk/SophyaLib/SkyT/blackbody.cc	(revision 668)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: blackbody.cc,v 1.2 1999-11-20 21:00:47 ansari Exp $
+//      $Id: blackbody.cc,v 1.3 1999-11-29 14:16:03 ansari Exp $
 //
 // Description:
@@ -24,5 +24,5 @@
 //----------------
 BlackBody::BlackBody(double temperature)
-  : RadSpectra(0., 10000.)
+  : RadSpectra(10., 10000.)
 {
   _temperature = temperature;
@@ -57,4 +57,23 @@
 }
 
+void 
+BlackBody::WriteSelf(POutPersist& s)  
+{
+  s.PutR8(this->getTemperature());
+  s.PutR8(this->minFreq());
+  s.PutR8(this->maxFreq());
+}
+
+void
+BlackBody::ReadSelf(PInPersist& s)  
+{
+  s.GetR8(_temperature);
+  s.GetR8(_numin);
+  s.GetR8(_numax);
+  cout << " Temperature - minFreq - maxFreq " << endl; 
+  cout << _temperature << "-" << _numin << "-" << _numax << endl;
+}
+
+
 void
 BlackBody::Print(ostream& os) const
Index: /trunk/SophyaLib/SkyT/blackbody.h
===================================================================
--- /trunk/SophyaLib/SkyT/blackbody.h	(revision 667)
+++ /trunk/SophyaLib/SkyT/blackbody.h	(revision 668)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: blackbody.h,v 1.2 1999-11-20 21:00:47 ansari Exp $
+//      $Id: blackbody.h,v 1.3 1999-11-29 14:16:03 ansari Exp $
 //
 // Description:
@@ -33,4 +33,6 @@
   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 667)
+++ /trunk/SophyaLib/SkyT/easyTest.cc	(revision 668)
@@ -4,14 +4,24 @@
 #include "specrespvector.h"
 #include "tvector.h"
-// #include "szsource.h"
 #include "squarefilt.h"
 #include "trianglefilt.h"
+
+#include "iobjspecresp.cc"
+
 int
 main() 
 { 
+//   PInPersist in("out");
+//   SR_ReadSelf(in);
+//   cout << " " << endl;
+
+    PInPersist in2("outTF");
+    SR_ReadSelf(in2);
+    cout << " " << endl;
+
   cout << "BlackBody!" << endl;
-  BlackBody myBB;
-  double freqmin =  10.;
-  double freqmax = 100;
+  BlackBody myBB(2.73);
+  double freqmin =  230.;
+  double freqmax = 500;
   double logIF = myBB.logIntegratedFlux(freqmin,freqmax);
   double IF    = myBB.integratedFlux(freqmin,freqmax);
@@ -19,20 +29,11 @@
   cout << "nolog " << IF    << endl;
   cout << "min et max " << myBB.minFreq() << " :: " << myBB.maxFreq() << endl;
-  cout << "full integration no log  " << myBB.integratedFlux() << endl;
-  cout << "full integration log     " << myBB.logIntegratedFlux() << endl;
+  cout << "full integration no log  " << myBB.integratedFlux(freqmin,freqmax) << endl;
+  cout << "full integration log     " << myBB.logIntegratedFlux(freqmin,freqmax) << endl;
+  cout << "full integration no log nolimit " << myBB.integratedFlux() << endl;
+  cout << "full integration log  nolimit  " << myBB.logIntegratedFlux() << endl;
 
-  /*
-  cout << "SZSource " << endl;
-  SzSource mySZ(1);
-  double logSZ = mySZ.logIntegratedFlux(freqmin,freqmax);
-  double SZ    = mySZ.integratedFlux(freqmin,freqmax);
-  cout << "log   " << logSZ << endl;
-  cout << "nolog " << SZ    << endl;
-  cout << "min et max " << mySZ.minFreq() << " :: " << mySZ.maxFreq() << endl;
-  cout << "full integration no log  " << mySZ.integratedFlux() << endl;
-  cout << "full integration log     " << mySZ.logIntegratedFlux() << endl;
-  */
   cout << "squareFilter " << endl;
-  SquareFilter mySF(0,200);
+  SquareFilter mySF(200,600);
   double logSF = mySF.logIntegratedSpect(freqmin,freqmax);
   double SF    = mySF.IntegratedSpect(freqmin,freqmax);
@@ -40,9 +41,12 @@
   cout << "nolog " << SF    << endl;
   cout << "min et max " << mySF.minFreq() << " :: " << mySF.maxFreq() << endl;
-  cout << "full integration no log  " << mySF.IntegratedSpect() << endl;
-  cout << "full integration log     " << mySF.logIntegratedSpect() << endl;
+  cout << "full integration no log  " << mySF.IntegratedSpect(200,700) << endl;
+  cout << "full integration log     " << mySF.logIntegratedSpect(200,700) << endl;
+  cout << "full integration no log nolimit  " << mySF.IntegratedSpect() << endl;
+  cout << "full integration log  nolimit   " << mySF.logIntegratedSpect() << endl;
+
 
   cout << "triangleFilter" << endl;
-  TriangleFilter myTF(10,200,20,40);
+  TriangleFilter myTF(200,500,120,40);
   double logTF = myTF.logIntegratedSpect(10.,freqmax);
   double TF    = myTF.IntegratedSpect(10.,freqmax);
@@ -59,10 +63,10 @@
   for (int i=0; i<maxVal; i++)
     {
-      vecOfNu(i) = (double)i+30.;
+      vecOfNu(i) = (double)i+230.;
       vecOfFDeNu(i) = 1.; //*(double)i+1;
       cout << "entry values  " <<  vecOfNu(i) << " " << vecOfFDeNu(i) << endl;
     }
-  freqmin = 10.;
-  freqmax = 19.;
+  freqmin = 200.;
+  freqmax = 259.;
   RadSpectraVec myRSV(vecOfNu, vecOfFDeNu);
   double RSV    = myRSV.integratedFlux(freqmin,freqmax);
@@ -81,5 +85,5 @@
   for (int i=0; i<SRVmaxVal; i++)
     {
-      vecOfNuRSV(i) = (double)i+30.;
+      vecOfNuRSV(i) = (double)i+130.;
       vecOfFDeNuRSV(i) = 10*(double)i+1;
       //      cout << "entry values  " <<  vecOfNuRSV(i) << " " << vecOfFDeNuRSV(i) << endl;
@@ -99,17 +103,17 @@
   cout << "...Testing filter and integrate !" << endl;
 
-  cout << " BBSF nolog " << myBB.filteredIntegratedFlux(mySF,30.,100.) << endl;
-  cout << " BBSF   log " << myBB.filteredLogIntFlux(mySF,30.,100.) << endl;
-  cout << "full integration no log  " << myBB.integratedFlux(30.,100.) << endl;
-  cout << "full integration log     " << myBB.logIntegratedFlux(30.,100.) << endl;
+  cout << " BBSF nolog " << myBB.filteredIntegratedFlux(mySF,200.,400.) << endl;
+  cout << " BBSF   log " << myBB.filteredLogIntFlux(mySF,200.,400.) << endl;
+  cout << "full integration no log  " << myBB.integratedFlux(200.,400.) << endl;
+  cout << "full integration log     " << myBB.logIntegratedFlux(200.,400.) << endl;
   cout << "SF" << endl;
-  cout << "full integration no log  " << mySF.IntegratedSpect(30.,100.) << endl;
-  cout << "full integration log     " << mySF.logIntegratedSpect(30.,100.) << endl;
+  cout << "full integration no log  " << mySF.IntegratedSpect(200.,400.) << endl;
+  cout << "full integration log     " << mySF.logIntegratedSpect(200.,400.) << endl;
 
-  cout << " BBTF nolog " << myBB.filteredIntegratedFlux(myTF,30.,100.) << endl;
-  cout << " BBTF   log " << myBB.filteredLogIntFlux(myTF,30.,100.) << endl;
+  cout << " BBTF nolog " << myBB.filteredIntegratedFlux(myTF,200.,400.) << endl;
+  cout << " BBTF   log " << myBB.filteredLogIntFlux(myTF,200.,400.) << endl;
   cout << "TF" << endl;
-  cout << "full integration no log  " << myTF.IntegratedSpect(30.,100.) << endl;
-  cout << "full integration log     " << myTF.logIntegratedSpect(30.,100.) << endl;
+  cout << "full integration no log  " << myTF.IntegratedSpect(200.,400.) << endl;
+  cout << "full integration log     " << myTF.logIntegratedSpect(200.,400.) << endl;
 
   /*
@@ -123,13 +127,40 @@
 			   */
   cout << "********" << endl;
-  cout << " RSVSF nolog " << myRSV.filteredIntegratedFlux(mySF,30.,100.) << endl;
-  cout << " RSVSF   log " << myRSV.filteredLogIntFlux(mySF,30.,100.) << endl;
-  cout << "full integration no log  " << myRSV.integratedFlux(30.,100.) << endl;
-  cout << "full integration log     " << myRSV.logIntegratedFlux(30.,100.) << endl;
+  double min, max;
+  min=232;
+  max=235;
 
-  cout << " RSVTF nolog " << myRSV.filteredIntegratedFlux(myTF,30.,100.) << endl;
-  cout << " RSVTF   log " << myRSV.filteredLogIntFlux(myTF,30.,100.) << endl;
+  cout << " RSVSF nolog " << myRSV.filteredIntegratedFlux(mySF,min,max) << endl;
+  cout << " RSVSF   log " << myRSV.filteredLogIntFlux(mySF,min,max) << endl;
+  cout << "full integration no log  " << myRSV.integratedFlux(230.,500.) << endl;
+  cout << "full integration log     " << myRSV.logIntegratedFlux(230.,500.) << endl;
+  cout << "full integration no log min max " << myRSV.integratedFlux(min,max) << endl;
+  cout << "full integration log  min max   " << myRSV.logIntegratedFlux(min,max) << endl;
+
+  cout << " RSVTF nolog " << myRSV.filteredIntegratedFlux(myTF,230.,500.) << endl;
+  cout << " RSVTF   log " << myRSV.filteredLogIntFlux(myTF,230.,500.) << endl;
+  
+//   cout << "New TESTS USING IOBJS!" << endl;
+//   POutPersist out("out");
+//   TriangleFilter* myTF2 = new TriangleFilter(10,200,20,40);
+//   SR_WriteSelf(myTF2,out);
+
+//   POutPersist outV("outV");
+//   cout << "check before anything" << vecOfNu.NElts()<< endl;
+//   SpecRespVec* mySRV2 = new SpecRespVec(vecOfNu, vecOfFDeNu);
+//   SR_WriteSelf(mySRV2,outV);
+  
+//   Vector myVec(10);
+//   myVec.ReSize(10);
+//   cout << myVec.NElts();
+//   return 1;
+
+  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);
   
 
-  return 1;
 } 
Index: /trunk/SophyaLib/SkyT/gaussfilt.cc
===================================================================
--- /trunk/SophyaLib/SkyT/gaussfilt.cc	(revision 667)
+++ /trunk/SophyaLib/SkyT/gaussfilt.cc	(revision 668)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: gaussfilt.cc,v 1.3 1999-11-21 23:25:45 ansari Exp $
+//      $Id: gaussfilt.cc,v 1.4 1999-11-29 14:16:04 ansari Exp $
 //
 // Description:
@@ -22,11 +22,14 @@
 // Constructor --
 //----------------
+GaussianFilter::GaussianFilter()
+  : SpectralResponse()
+{
+  setParams(100, 10., 1.);
+}
+
 GaussianFilter::GaussianFilter(double nu0, double s, double a, double numin, double numax)
   : SpectralResponse(numin, numax)
 {
-  if (s < 1.e-19) s = 1.e-19;
-  _s = s;
-  _nu0 = nu0;
-  _a = a;
+  setParams(nu0, s, a);
 }
 
@@ -66,4 +69,17 @@
 }
 
+
+
+void 
+GaussianFilter::setParams(double nu0, double s, double a)
+{
+  if (s < 1.e-19) s = 1.e-19;
+  _s = s;
+  _nu0 = nu0;
+  _a = a;
+}
+
+
+
 void 
 GaussianFilter::Print(ostream& os)  const
@@ -76,2 +92,59 @@
 
 }
+
+void
+ObjFileIO<GaussianFilter>::WriteSelf(POutPersist& s) const
+{
+  if(dobj == NULL)
+    {
+      cout << " ObjFileIO<GaussianFilter>::WriteSelf:: dobj= null " << endl;
+      return;
+    }
+  int_4 version, nothing;
+  version = 1;
+  nothing = 0;   // Reserved for future use 
+  s.PutI4(version);
+  s.PutI4(nothing);
+
+  s.PutR8(dobj->minFreq());
+  s.PutR8(dobj->maxFreq());
+  s.PutR8(dobj->giveNorm());
+  s.PutR8(dobj->giveNu0());
+  s.PutR8(dobj->giveDNu());
+}
+
+void
+ObjFileIO<GaussianFilter>::ReadSelf(PInPersist& s)  
+{
+  int_4 version, nothing;
+  version = 1;
+  nothing = 0;   // Reserved for future use 
+  s.GetI4(version);
+  s.GetI4(nothing);
+
+  if(dobj == NULL)
+    {
+      dobj= new GaussianFilter();
+      ownobj= true;
+    }
+
+  r_8 a, nu0, dnu, numin, numax;
+  s.GetR8(numin);
+  s.GetR8(numax);
+  s.GetR8(a);
+  s.GetR8(nu0);
+  s.GetR8(dnu);
+  dobj->setMinMaxFreq(numin, numax);
+  dobj->setParams(nu0, dnu, a);
+  //  cout << " Norm - Nu0 - DNu - minFreq - maxFreq " << endl; 
+  // cout << _a << "-" << _nu0  << "-" << _s << "-" << _numin << "-" << _numax << endl;
+}
+
+
+#ifdef __CXX_PRAGMA_TEMPLATES__
+#pragma define_template ObjFileIO<GaussianFilter>
+#endif
+
+#if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
+template class ObjFileIO<GaussianFilter>;
+#endif
Index: /trunk/SophyaLib/SkyT/gaussfilt.h
===================================================================
--- /trunk/SophyaLib/SkyT/gaussfilt.h	(revision 667)
+++ /trunk/SophyaLib/SkyT/gaussfilt.h	(revision 668)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: gaussfilt.h,v 1.3 1999-11-21 23:25:45 ansari Exp $
+//      $Id: gaussfilt.h,v 1.4 1999-11-29 14:16:05 ansari Exp $
 //
 // Description:
@@ -18,4 +18,5 @@
 //----------------------
 #include "specresp.h"
+#include "objfio.h"
 
 //------------------------------------
@@ -29,8 +30,11 @@
 // Spectral response in the form  A Exp(-((nu-nu0)/s)^2) 
 
+namespace SOPHYA {
+
 class GaussianFilter:public SpectralResponse
 {
 public:
   //Constructors
+  GaussianFilter ();
   GaussianFilter (double nu0, double s, double a=1., double numin=0., double numax= 9.e49); 
   
@@ -49,4 +53,9 @@
   virtual void   Print(ostream& os)  const;
 
+  virtual inline double giveNorm() const {return _a;};
+  virtual inline double giveNu0() const {return _nu0;};
+  virtual inline double giveDNu() const {return _s;};
+  virtual void setParams(double nu0, double s, double a=1.);
+  
 protected:
   double _a, _s, _nu0;
@@ -54,3 +63,12 @@
 
 
+  // ObjFileIO<SpecRespVec> pour les PPersist 
+  inline POutPersist& operator << (POutPersist& os, GaussianFilter & obj)
+    { ObjFileIO<GaussianFilter> fio(&obj); fio.Write(os); return(os);}
+  
+  inline PInPersist& operator >> (PInPersist& os, GaussianFilter & obj)
+    { ObjFileIO<GaussianFilter> fio(&obj); fio.Read(os); return(os);}
+
+};  // End of namespace 
+
 #endif
Index: /trunk/SophyaLib/SkyT/nupower.cc
===================================================================
--- /trunk/SophyaLib/SkyT/nupower.cc	(revision 667)
+++ /trunk/SophyaLib/SkyT/nupower.cc	(revision 668)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: nupower.cc,v 1.3 1999-11-21 23:25:45 ansari Exp $
+//      $Id: nupower.cc,v 1.4 1999-11-29 14:16:05 ansari Exp $
 //
 // Description:
@@ -24,4 +24,8 @@
 // Constructor --
 //----------------
+PowerLawSpectra::PowerLawSpectra()
+{
+}
+
 PowerLawSpectra::PowerLawSpectra(double a, double b, double nu0, double dnu, double numin, double numax)
   : RadSpectra(numin, numax)
@@ -47,4 +51,30 @@
 }
 
+
+void 
+PowerLawSpectra::WriteSelf(POutPersist& s)  
+{
+  s.PutR8(this->giveNorm());
+  s.PutR8(this->giveNu0());
+  s.PutR8(this->giveDNu());
+  s.PutR8(this->giveExp());
+  s.PutR8(this->minFreq());
+  s.PutR8(this->maxFreq());
+}
+
+void
+PowerLawSpectra::ReadSelf(PInPersist& s)  
+{
+  s.GetR8(_a);
+  s.GetR8(_nu0);
+  s.GetR8(_dnu);
+  s.GetR8(_b);
+  s.GetR8(_numin);
+  s.GetR8(_numax);
+  cout << " Norm - Nu0 - DNu - Exp - minFreq - maxFreq " << endl; 
+  cout << _a << "-" << _nu0  << "-" << _dnu << "-" << _b << "-" << _numin << "-" << _numax << endl;
+}
+
+
 void
 PowerLawSpectra::Print(ostream& os) const
Index: /trunk/SophyaLib/SkyT/nupower.h
===================================================================
--- /trunk/SophyaLib/SkyT/nupower.h	(revision 667)
+++ /trunk/SophyaLib/SkyT/nupower.h	(revision 668)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: nupower.h,v 1.3 1999-11-21 23:25:46 ansari Exp $
+//      $Id: nupower.h,v 1.4 1999-11-29 14:16:05 ansari Exp $
 //
 // Description:
@@ -22,4 +22,5 @@
 public:   //Constructor
   
+  PowerLawSpectra();
   PowerLawSpectra(double a, double b, double nu0, double dnu, double numin=0., double numax=9.e49);
 
@@ -30,4 +31,13 @@
   // Redefintion of the Print function
   virtual void      Print(ostream& os)  const;
+  
+  virtual inline double giveNorm() const {return _a;};
+  virtual inline double giveNu0() const {return _nu0;};
+  virtual inline double giveDNu() const {return _dnu;};
+  virtual inline double giveExp() const {return _b;};
+  
+  virtual void WriteSelf(POutPersist& s) ;
+  virtual void ReadSelf(PInPersist& s) ;
+ 
 
 protected:
Index: /trunk/SophyaLib/SkyT/radspec.cc
===================================================================
--- /trunk/SophyaLib/SkyT/radspec.cc	(revision 667)
+++ /trunk/SophyaLib/SkyT/radspec.cc	(revision 668)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: radspec.cc,v 1.2 1999-11-20 21:00:50 ansari Exp $
+//      $Id: radspec.cc,v 1.3 1999-11-29 14:16:06 ansari Exp $
 //
 // Description:
@@ -104,14 +104,19 @@
 RadSpectra::integratedFlux(double f1, double f2)  const
 {
-    _raypourfinteg = const_cast<RadSpectra *>(this);
-    TrpzInteg I(RadSpectra_fluxFunction , f1, f2);  
-    double val = (double)I;
-    _raypourfinteg = NULL;  // On ne peut pas faire ca avant la destruction de I
-    return(val);        
+//   cout << endl;
+//   cout <<  this->minFreq() << " = " << this->maxFreq() << endl;
+//   cout <<  f1 << " = " << f2 << endl;
+  if(f1 < this->minFreq()) f1 = this->minFreq();
+  if(f2 > this->maxFreq()) f2 = this->maxFreq();
+  _raypourfinteg = const_cast<RadSpectra *>(this);
+  TrpzInteg I(RadSpectra_fluxFunction , f1, f2);  
+  double val = (double)I;
+  _raypourfinteg = NULL;  // On ne peut pas faire ca avant la destruction de I
+  return(val);        
 }
 double 
 RadSpectra::integratedFlux()  const
 {
-  return integratedFlux(_numin, _numax);
+  return integratedFlux(this->minFreq(),this->maxFreq());
 }
 
@@ -129,4 +134,7 @@
 RadSpectra::logIntegratedFlux(double f1, double f2)  const
 {
+  if(f1 < this->minFreq()) f1 = this->minFreq();
+  if(f2 > this->maxFreq()) f2 = this->maxFreq();
+
   double f1Log = log10(f1);
   double f2Log = log10(f2);
@@ -161,4 +169,7 @@
   _raypourfinteg = const_cast<RadSpectra *>(this);
   _filter = const_cast<SpectralResponse *>(&filter);
+   if(f1 < this->minFreq()) f1 = this->minFreq();
+   if(f2 > this->maxFreq()) f2 = this->maxFreq();
+
   TrpzInteg I(RadSpectra_filteredFlux,f1,f2);
   double val = (double)I;
@@ -185,5 +196,6 @@
   double nu = pow(10,tau);
   double flux = _raypourfinteg->flux(nu)*nu;
-  return(flux * _filter->transmission(nu));
+  double result = flux * _filter->transmission(nu);
+  return(result);
 }
 
@@ -192,17 +204,10 @@
 RadSpectra::filteredLogIntFlux(SpectralResponse const& filter, double f1, double f2) const
 {
-
-//   double f1Log = log10(f1);
-//   double f2Log = log10(f2);
-//   if(f1Log < -1.e99) f1Log = -1.e99;
-//   if(f2Log > 1.e99)  f2Log = 1.e99;
-//   _rayIntLog = const_cast<RadSpectra *>(this);
-//   TrpzInteg I(RadSpectra_logFluxFunction,f1Log,f2Log);
-//   double value = (double)I * log(10.);
-//   return(value);        
-//   _rayIntLog = NULL;
   
    _raypourfinteg = NULL;
    _filter = NULL;
+   if(f1 < this->minFreq()) f1 = this->minFreq();
+   if(f2 > this->maxFreq()) f2 = this->maxFreq();
+   
    double f1Log = log10(f1);
    double f2Log = log10(f2);
@@ -226,4 +231,5 @@
 
 
+
 void
 RadSpectra::Print(ostream& os) const
Index: /trunk/SophyaLib/SkyT/radspec.h
===================================================================
--- /trunk/SophyaLib/SkyT/radspec.h	(revision 667)
+++ /trunk/SophyaLib/SkyT/radspec.h	(revision 668)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: radspec.h,v 1.2 1999-11-20 21:00:50 ansari Exp $
+//      $Id: radspec.h,v 1.3 1999-11-29 14:16:06 ansari Exp $
 //
 // Description:
@@ -18,5 +18,5 @@
 
 #include "specresp.h"
-
+#include "objfio.h"
 //              ---------------------
 //              -- Class Interface --
@@ -76,4 +76,6 @@
 
   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 667)
+++ /trunk/SophyaLib/SkyT/radspecvector.cc	(revision 668)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: radspecvector.cc,v 1.3 1999-11-21 23:25:46 ansari Exp $
+//      $Id: radspecvector.cc,v 1.4 1999-11-29 14:16:06 ansari Exp $
 //
 // Description:
@@ -26,4 +26,8 @@
 // Constructor --
 //----------------
+RadSpectraVec::RadSpectraVec()
+{
+}
+
 RadSpectraVec::RadSpectraVec(Vector const & nu, Vector const & fdenu, double numin, double numax)
         : RadSpectra(numin, numax)
@@ -35,4 +39,5 @@
   _numin = nu(0);
   _numax = nu(nu.NElts()-1);
+  _size = nu.NElts();
   if(_vecOfNu.NElts() != _vecOfFDeNu.NElts()) cout << "vectors are not compatible" << exit;
 }
@@ -78,4 +83,37 @@
 }
 
+void
+RadSpectraVec::WriteSelf(POutPersist& s) 
+{
+  s.PutI4(this->NbElts());
+  for (int i=0; i< this->NbElts(); i++)
+    {
+      s.PutR8(this->getNuVec(i));
+      s.PutR8(this->getFNuVec(i));
+    }
+  s.PutR8(this->minFreq());
+  s.PutR8(this->maxFreq());
+ 
+}
+
+void
+RadSpectraVec::ReadSelf(PInPersist& s) 
+{
+  s.GetI4(_size);
+
+  _vecOfNu.ReSize(_size);
+  _vecOfFDeNu.ReSize(_size);
+  for (int i=0; i< _size; i++)
+    {
+      s.GetR8(_vecOfNu(i));
+      s.GetR8(_vecOfFDeNu(i));
+    } 
+  s.GetR8(_numin);
+  s.GetR8(_numax);
+  cout << "minFreq - maxFreq"<< endl; 
+  cout <<    _numin<< "-" <<  _numax << endl;
+}
+
+
 
 void
Index: /trunk/SophyaLib/SkyT/radspecvector.h
===================================================================
--- /trunk/SophyaLib/SkyT/radspecvector.h	(revision 667)
+++ /trunk/SophyaLib/SkyT/radspecvector.h	(revision 668)
@@ -30,4 +30,5 @@
 public:
   //Constructor
+  RadSpectraVec ();
   RadSpectraVec (Vector const & nu, Vector const & fdenu, double numin=0., double numax=9.e49);
 
@@ -47,4 +48,9 @@
   inline Vector& getNuVec() { return _vecOfNu; }
   inline Vector& getFNuVec() { return _vecOfFDeNu; }
+  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;
@@ -53,5 +59,5 @@
   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 668)
@@ -0,0 +1,34 @@
+// Classe d'initialisation du module Outils++ 
+#include <unistd.h>
+
+#include "sambainit.h"
+#include "ppersist.h"
+#include "objfio.h"
+#include "specrespvector.h"
+#include "gaussianfilter.h"
+
+int SkyTInitiator::FgInit = 0;
+
+SkyTInitiator::SkyTInitiator()
+  : PeidaOutilsInitiator()
+{
+  SkyTInitiator::FgInit++;
+  if (SkyTInitiator::FgInit > 1)  return;
+
+//   Enregistrement des classes PPersist du modules SkyT
+  
+  PPRegister(ObjFileIO<SpecRespVec>);
+  PPRegister(ObjFileIO<GaussianFilter>);
+
+}
+
+SkyTInitiator::~SkyTInitiator()
+{
+  SkyTInitiator::FgInit--;
+}
+
+
+// On met un objet initiator en statique, pour les loaders qui savent 
+// appeler le constructeur des objets statiques   Reza 08/98
+static SkyTInitiator s_skytinit_;
+
Index: /trunk/SophyaLib/SkyT/skyinit.h
===================================================================
--- /trunk/SophyaLib/SkyT/skyinit.h	(revision 668)
+++ /trunk/SophyaLib/SkyT/skyinit.h	(revision 668)
@@ -0,0 +1,23 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Classe d'initialiseur du module Outils++
+
+#ifndef SKYTINIT_H_SEEN
+#define SKYTINIT_H_SEEN
+
+
+// Classe d''initialisation pour les modules de PEIDA++
+#include "outilsinit.h"
+
+class SkyTInitiator : public PeidaOutilsInitiator {
+private:
+  static int FgInit;
+public:
+  			SkyTInitiator();
+  virtual		~SkyTInitiator();
+};
+
+#undef PeidaInit
+#define PeidaInit() SkyTInitiator _skytinitiator_
+
+#endif
+
Index: /trunk/SophyaLib/SkyT/specresp.cc
===================================================================
--- /trunk/SophyaLib/SkyT/specresp.cc	(revision 667)
+++ /trunk/SophyaLib/SkyT/specresp.cc	(revision 668)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: specresp.cc,v 1.2 1999-11-20 21:00:52 ansari Exp $
+//      $Id: specresp.cc,v 1.3 1999-11-29 14:16:08 ansari Exp $
 //
 // Description:
@@ -19,4 +19,5 @@
 #include "specresp.h"
 #include "integ.h"
+#include "tvector.h"
 
 //----------------
@@ -60,4 +61,12 @@
 }
 
+ 
+// To change min-max frequency
+void
+SpectralResponse::setMinMaxFreq(double numin, double numax)
+{
+  _numin = numin;
+  _numax = numax;
+}
  
 
@@ -108,7 +117,9 @@
 SpectralResponse::IntegratedSpect(double numin, double numax) const 
 {
+  if(numin < this->minFreq()) numin = this->minFreq();
+  if(numax > this->maxFreq()) numax = this->maxFreq();
+
+  
   _mySpecResp = const_cast<SpectralResponse *>(this);
-  if(numin <= _numin) numin = _numin;
-  if(numax >= _numax) numax = _numax;
   TrpzInteg I(SpectralResponse_transmission , numin, numax);  
   double val = (double)I;
@@ -129,6 +140,6 @@
 SpectralResponse::logIntegratedSpect(double numin, double numax) const 
 {
-  if(numin <= _numin) numin = _numin;
-  if(numax >= _numax) numax = _numax;
+  if(numin <= this->minFreq()) numin = this->minFreq();
+  if(numax >= this->maxFreq()) numax = this->maxFreq();
   if(numin == 0) numin = 1.e-99;
   double f1Log = log10(numin);
Index: /trunk/SophyaLib/SkyT/specresp.h
===================================================================
--- /trunk/SophyaLib/SkyT/specresp.h	(revision 667)
+++ /trunk/SophyaLib/SkyT/specresp.h	(revision 668)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: specresp.h,v 1.2 1999-11-20 21:00:52 ansari Exp $
+//      $Id: specresp.h,v 1.3 1999-11-29 14:16:08 ansari Exp $
 //
 // Description:
@@ -14,6 +14,6 @@
 
 #include "machdefs.h"
+#include "anydataobj.h"
 #include <iostream.h>
-
 //------------------------------------
 // Collaborating Class Declarations --
@@ -25,46 +25,58 @@
 
 // ***IMPORTANT*** All frequencies are expressed in GHz  (10^9 Hz)
+namespace SOPHYA {
+  
+  class SpectralResponse : public AnyDataObj
+  {
+    
+  public:
+    //Constructor
+    SpectralResponse(double numin=0., double numax=1.);
+    
+    // destructor
+    virtual ~SpectralResponse();
+    
+    //
+    //  Member Functions
+    //
+    
+    //  The transmission() function is virtual: 
+    virtual double transmission(double nu) const =0 ; 
+    
+    inline double operator() (double nu) const { return(transmission(nu)); }
+    
+    virtual void      Print(ostream& os)  const;
+    
+    virtual double minFreq() const;
+    virtual double maxFreq() const;
+    virtual double meanFreq() const;
+    virtual double peakFreq() const;
+    virtual double peakTransmission() const;
 
-class SpectralResponse
-{
+    // For changing the min/max frequency
+    virtual void   setMinMaxFreq(double numin, double numax);
 
-public:
-  //Constructor
-  SpectralResponse(double numin=0., double numax=1.);
-
-  // destructor
-  virtual ~SpectralResponse();
-
-  //
-  //  Member Functions
-  //
-
-  //  The transmission() function is virtual: 
-  virtual double transmission(double nu) const =0 ; 
-
-  inline double operator() (double nu) const { return(transmission(nu)); }
-
-  virtual void      Print(ostream& os)  const;
-
-  virtual double minFreq() const;
-  virtual double maxFreq() const;
-  virtual double meanFreq() const;
-  virtual double peakFreq() const;
-  virtual double peakTransmission() const;
-  virtual double IntegratedSpect(double numin, double numax) const ;
-  virtual double logIntegratedSpect(double numin, double numax) const ;
-  virtual double IntegratedSpect() const ;
-  virtual double logIntegratedSpect() const ;
-
-protected:
-  double _numin;
-  double _numax;
+    virtual double IntegratedSpect(double numin, double numax) const ;
+    virtual double logIntegratedSpect(double numin, double numax) const ;
+    virtual double IntegratedSpect() const ;
+    virtual double logIntegratedSpect() const ;
+    
+  protected:
+    double _numin;
+    double _numax;
+  };
+  
+  
+  // definition of the << operator
+  inline ostream& operator << (ostream& s,  SpectralResponse const & sr)
+    {  sr.Print(s);  return(s);  }
+  
+  
+  
 };
 
-
-// definition of the << operator
-inline ostream& operator << (ostream& s,  SpectralResponse const & sr)
-  {  sr.Print(s);  return(s);  }
+#endif
 
 
-#endif
+
+
Index: /trunk/SophyaLib/SkyT/specrespvector.cc
===================================================================
--- /trunk/SophyaLib/SkyT/specrespvector.cc	(revision 667)
+++ /trunk/SophyaLib/SkyT/specrespvector.cc	(revision 668)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: specrespvector.cc,v 1.3 1999-11-21 23:25:47 ansari Exp $
+//      $Id: specrespvector.cc,v 1.4 1999-11-29 14:16:09 ansari Exp $
 //
 // Description:
@@ -22,8 +22,12 @@
 #include "specrespvector.h"
 #include "pexceptions.h"
-
 //----------------
 // Constructor --
 //----------------
+SpecRespVec::SpecRespVec()
+        : SpectralResponse()
+{
+}
+
 SpecRespVec::SpecRespVec(Vector const & nu, Vector const & fdenu, double numin, double numax)
         : SpectralResponse(numin, numax)
@@ -35,4 +39,5 @@
   _numin = nu(0);
   _numax = nu(nu.NElts()-1);
+  _size = nu.NElts();
   if(_vecOfNu.NElts() != _vecOfFDeNu.NElts()) cout << "vectors are not compatible" << exit;
 }
@@ -91,2 +96,61 @@
 
 }
+
+
+void
+ObjFileIO<SpecRespVec>::WriteSelf(POutPersist& s) const
+{
+  if(dobj == NULL)
+    {
+      cout << " ObjFileIO<SpecRespVec>::WriteSelf:: dobj= null " << endl;
+      return;
+    }
+
+  int_4 version, nothing;
+  version = 1;
+  nothing = 0;   // Reserved for future use 
+  s.PutI4(version);
+  s.PutI4(nothing);
+
+  s.PutR8(dobj->minFreq());
+  s.PutR8(dobj->maxFreq());
+
+  // TVector<T> has Persistence Manager 
+  s <<  dobj->getNuVec();
+  s <<  dobj->getTNuVec();
+}
+
+void 
+ObjFileIO<SpecRespVec>::ReadSelf(PInPersist& s) 
+{
+  int_4 version, nothing;
+  version = 1;
+  nothing = 0;   // Reserved for future use 
+  s.GetI4(version);
+  s.GetI4(nothing);
+
+  if(dobj == NULL)
+    {
+      Vector v1(10);
+      Vector v2(10);
+      dobj= new SpecRespVec();
+      ownobj= true;
+    }
+  
+  r_8 minf, maxf;
+  s.GetR8(minf);
+  s.GetR8(maxf);
+  dobj->setMinMaxFreq(minf, maxf);
+  // TVector<T> has Persistence Manager 
+  s >>  dobj->getNuVec();
+  s >>  dobj->getTNuVec();
+}
+
+
+#ifdef __CXX_PRAGMA_TEMPLATES__
+#pragma define_template ObjFileIO<SpecRespVec>
+#endif
+
+#if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
+template class ObjFileIO<SpecRespVec>;
+#endif
Index: /trunk/SophyaLib/SkyT/specrespvector.h
===================================================================
--- /trunk/SophyaLib/SkyT/specrespvector.h	(revision 667)
+++ /trunk/SophyaLib/SkyT/specrespvector.h	(revision 668)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: specrespvector.h,v 1.2 1999-11-20 21:00:53 ansari Exp $
+//      $Id: specrespvector.h,v 1.3 1999-11-29 14:16:09 ansari Exp $
 //
 // Description:
@@ -18,4 +18,5 @@
 #include "specresp.h"
 #include "tvector.h"
+#include "objfio.h"
 
 //------------------------------------
@@ -29,9 +30,12 @@
 // ***IMPORTANT*** All frequencies are expressed in GHz  (10^9 Hz)
 
-class SpecRespVec :  public SpectralResponse
-{
+namespace SOPHYA {
+  
+  class SpecRespVec :  public SpectralResponse
+  {
 
 public:
   //Constructor
+  SpecRespVec();
   SpecRespVec(Vector const & nu, Vector const & fdenu, double numin=0., double numax=1.);
 
@@ -47,15 +51,25 @@
 
   // Acces to Nu and T(nu) vectors 
-  inline Vector& getNuVec() { return _vecOfNu; }
-  inline Vector& getTNuVec() { return _vecOfFDeNu; }
-
+  inline Vector&  getNuVec()  { return _vecOfNu; } ;
+  inline Vector& getTNuVec()  { return _vecOfFDeNu; }
+  inline double getNuVec(int i) const { return _vecOfNu(i); }
+  inline double getTNuVec(int i) const { return _vecOfFDeNu(i); }
+  inline int NbElts() const { return _size;}
+  
   virtual void      Print(ostream& os)  const;
-
 
 protected:
   Vector _vecOfNu;
   Vector _vecOfFDeNu;
+  int _size;
 };
 
+  // ObjFileIO<SpecRespVec> pour les PPersist 
+  inline POutPersist& operator << (POutPersist& os, SpecRespVec & obj)
+    { ObjFileIO<SpecRespVec> fio(&obj); fio.Write(os); return(os);}
+  
+  inline PInPersist& operator >> (PInPersist& os, SpecRespVec & obj)
+    { ObjFileIO<SpecRespVec> fio(&obj); fio.Read(os); return(os);}
 
+};  // End of namespace 
 #endif
Index: /trunk/SophyaLib/SkyT/squarefilt.cc
===================================================================
--- /trunk/SophyaLib/SkyT/squarefilt.cc	(revision 667)
+++ /trunk/SophyaLib/SkyT/squarefilt.cc	(revision 668)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: squarefilt.cc,v 1.2 1999-11-20 21:00:53 ansari Exp $
+//      $Id: squarefilt.cc,v 1.3 1999-11-29 14:16:09 ansari Exp $
 //
 // Description:
@@ -21,4 +21,9 @@
 // Constructor --
 //----------------
+SquareFilter::SquareFilter()
+  : SpectralResponse()
+{
+}
+
 SquareFilter::SquareFilter(double numin, double numax)
   : SpectralResponse(numin, numax)
@@ -60,4 +65,20 @@
 SquareFilter::peakTransmission() const 
 {
-return _peakTransmission;
+  return _peakTransmission;
 }
+
+void 
+SquareFilter::WriteSelf(POutPersist& s) 
+{
+  s.PutR8(this->minFreq());
+  s.PutR8(this->maxFreq());
+}
+
+void 
+SquareFilter::ReadSelf(PInPersist& s) 
+{
+  double minFreq, maxFreq;
+  s.GetR8(_numin);
+  s.GetR8(_numax);
+  cout << "minFreq - maxFreq " <<  _numin << "-" << _numax  << endl;
+}
Index: /trunk/SophyaLib/SkyT/squarefilt.h
===================================================================
--- /trunk/SophyaLib/SkyT/squarefilt.h	(revision 667)
+++ /trunk/SophyaLib/SkyT/squarefilt.h	(revision 668)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: squarefilt.h,v 1.2 1999-11-20 21:00:54 ansari Exp $
+//      $Id: squarefilt.h,v 1.3 1999-11-29 14:16:09 ansari Exp $
 //
 // Description:
@@ -29,6 +29,8 @@
 class SquareFilter:public SpectralResponse
 {
+
 public:
   //Constructors
+  SquareFilter (); 
   SquareFilter (double numin, double numax); 
   
@@ -45,4 +47,9 @@
   virtual double peakTransmission() const;
   
+  virtual void WriteSelf(POutPersist& s) ;
+  virtual void ReadSelf(PInPersist& s) ;
+  
+ 
+
 protected:
   double _peakTransmission;
Index: /trunk/SophyaLib/SkyT/tgrsr.cc
===================================================================
--- /trunk/SophyaLib/SkyT/tgrsr.cc	(revision 667)
+++ /trunk/SophyaLib/SkyT/tgrsr.cc	(revision 668)
@@ -1,4 +1,5 @@
 #include "machdefs.h"
 #include <iostream.h>
+#include <typeinfo>
 #include <math.h>
 
Index: /trunk/SophyaLib/SkyT/trianglefilt.cc
===================================================================
--- /trunk/SophyaLib/SkyT/trianglefilt.cc	(revision 667)
+++ /trunk/SophyaLib/SkyT/trianglefilt.cc	(revision 668)
@@ -1,5 +1,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: trianglefilt.cc,v 1.2 1999-11-20 21:00:54 ansari Exp $
+//      $Id: trianglefilt.cc,v 1.3 1999-11-29 14:16:10 ansari Exp $
 //
 // Description:
@@ -21,4 +21,9 @@
 // Constructor --
 //----------------
+
+TriangleFilter::TriangleFilter()
+   : SpectralResponse()
+{
+}
 TriangleFilter::TriangleFilter(double numin, double numax,double nupeak, double valueatpeak)
    : SpectralResponse(numin, numax)
@@ -61,2 +66,25 @@
 return _peakTransmission;
 }
+
+void
+TriangleFilter::WriteSelf(POutPersist& s) 
+{
+  s.PutR8(this->peakFreq());
+  s.PutR8(this->peakTransmission());
+  s.PutR8(this->minFreq());
+  s.PutR8(this->maxFreq());
+  
+}
+
+void
+TriangleFilter::ReadSelf(PInPersist& s)   
+{
+  //  double peakFreq, peakTransmission, minFreq,  maxFreq;
+  s.GetR8(_nuPeak);
+  s.GetR8(_peakTransmission);
+  s.GetR8(_numin);
+  s.GetR8(_numax);
+  cout << "peakFreq - peakTransmission - minFreq - maxFreq " << endl; 
+  cout <<  _nuPeak << "-" <<  _peakTransmission<< "-" <<  _numin << "-" <<  _numax << endl;
+
+}
Index: /trunk/SophyaLib/SkyT/trianglefilt.h
===================================================================
--- /trunk/SophyaLib/SkyT/trianglefilt.h	(revision 667)
+++ /trunk/SophyaLib/SkyT/trianglefilt.h	(revision 668)
@@ -2,5 +2,5 @@
 //--------------------------------------------------------------------------
 // File and Version Information:
-//      $Id: trianglefilt.h,v 1.2 1999-11-20 21:00:54 ansari Exp $
+//      $Id: trianglefilt.h,v 1.3 1999-11-29 14:16:10 ansari Exp $
 //
 // Description:
@@ -31,5 +31,5 @@
   //Constructors
   TriangleFilter (double numin, double numax,double nupeak, double valueatpeak); 
-  
+  TriangleFilter ();
 
   // destructor
@@ -43,4 +43,6 @@
   virtual double peakFreq() const; 
   virtual double peakTransmission() const;
+  virtual void WriteSelf(POutPersist& s) ;
+  virtual void ReadSelf(PInPersist& s)  ;
 
 protected:
