Index: trunk/SophyaLib/Samba/localmap.cc
===================================================================
--- trunk/SophyaLib/Samba/localmap.cc	(revision 700)
+++ trunk/SophyaLib/Samba/localmap.cc	(revision 701)
@@ -636,14 +636,14 @@
   int_4 nSzX;
   is.GetI4(nSzX);
-  dobj->setSize_x(nSzX);
+  //  dobj->setSize_x(nSzX);
 
   int_4 nSzY;
   is.GetI4(nSzY);
-  dobj->setSize_y(nSzY);
+  //  dobj->setSize_y(nSzY);
 
   int_4 nPix;
   is.GetI4(nPix);
-  dobj->setNbPixels(nPix);
-
+  //  dobj->setNbPixels(nPix);
+  dobj->ReSize(nSzX, nSzY); 
   string ss("local mapping is done");
   string sso;
@@ -668,5 +668,6 @@
 
 // On lit le DataBlock;
-  is >> dobj->DataBlock();
+  FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
+  fio_nd.Read(is);
 }
 
@@ -729,5 +730,6 @@
 
 // On ecrit le dataBlock 
-  os << dobj->DataBlock();
+  FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
+  fio_nd.Write(os);
 }
 
Index: trunk/SophyaLib/Samba/localmap.h
===================================================================
--- trunk/SophyaLib/Samba/localmap.h	(revision 700)
+++ trunk/SophyaLib/Samba/localmap.h	(revision 701)
@@ -80,6 +80,5 @@
 /* return/set the number of pixels */
 /*!    Return number of pixels */
-virtual int_4 NbPixels() const;
-inline void setNbPixels(int_4 n) {nPix_= n;}
+virtual int NbPixels() const;
   
 /* return the value of pixel number k */
@@ -143,8 +142,6 @@
 inline int_4 Size_x() const {return nSzX_;}
 inline int_4 XSize() const {return nSzX_;}
-inline void setSize_x(int_4 n) {nSzX_= n;}
 inline int_4 Size_y() const {return nSzY_;}
 inline int_4 YSize() const {return nSzY_;}
-inline void setSize_y(int_4 n) {nSzY_= n;}
 
 inline void Origin(double& theta,double& phi,int_4& x0,int_4& y0,double& angle) const {theta= theta0_; phi= phi0_; x0= x0_; y0= y0_;angle= angle_;}
@@ -152,7 +149,4 @@
 inline void Aperture(double& anglex,double& angley) const {anglex= angleX_; angley= angleY_;}
 
-/* retourne le pointeur vers/remplit  le vecteur des contenus des pixels */ 
-inline const NDataBlock<T>* getDataBlock() const {return (&pixels_);}
-inline void setDataBlock(T* data, int_4 n) {pixels_.FillFrom(n,data);}
 
 /*  Acces to the DataBlock  */
Index: trunk/SophyaLib/Samba/sambainit.cc
===================================================================
--- trunk/SophyaLib/Samba/sambainit.cc	(revision 700)
+++ trunk/SophyaLib/Samba/sambainit.cc	(revision 701)
@@ -19,5 +19,5 @@
 //   Enregistrement des classes PPersist du modules Outils++
   
-  PPRegister(SphereCoordSys);
+  PPRegister(FIO_SphereCoordSys);
 
   PPRegister(FIO_SphereThetaPhi<float>);
Index: trunk/SophyaLib/Samba/scan.cc
===================================================================
--- trunk/SophyaLib/Samba/scan.cc	(revision 700)
+++ trunk/SophyaLib/Samba/scan.cc	(revision 701)
@@ -92,5 +92,5 @@
 
 //++
-Scan::Scan(const Scan& s)
+Scan::Scan(const Scan& s,  bool share) :  sPix_(s.sPix_ , share)
 
 //    copy  constructor
@@ -106,5 +106,4 @@
   TempsInitial_ = s.TempsInitial_;
   PhiZero_      = s.PhiZero_;
-  sPix_=s.sPix_;
   for (int k=0; k<9; k++) Rota_[k]=s. Rota_[k];
 }
@@ -257,5 +256,5 @@
 void Scan::InitNull() {
   //  sPix_=NULL;
-  sPix_.Reset();
+  //  sPix_.Reset(); pas de reset (pour le cas de share)
   mInfo_=NULL;
 }         
@@ -389,8 +388,7 @@
   dobj->SetFloatParams(Ouverture,OmegaTeta,OmegaPhi,OmegaRad,
 		       FrequenceEch,TempsFinal,TempsInitial,PhiZero,Rota);
-  r_8* sPix=new r_8[NmaxPts];
-  PIOSReadArray(is, sPix, NmaxPts);
-  dobj->setDataBlock(sPix, NmaxPts);
-  delete [] sPix;
+// On lit le DataBlock;
+  FIO_NDataBlock<r_8> fio_nd(&dobj->DataBlock());
+  fio_nd.Read(is);
 }
 //++
@@ -438,5 +436,7 @@
   os.PutR8s(Rota, 9);
 
-  PIOSWriteArray(os,(dobj->getDataBlock())->Data(), dobj->NbPoints());
-
-}
+// On ecrit le dataBlock 
+  FIO_NDataBlock<r_8> fio_nd(&dobj->DataBlock());
+  fio_nd.Write(os);
+
+}
Index: trunk/SophyaLib/Samba/scan.h
===================================================================
--- trunk/SophyaLib/Samba/scan.h	(revision 700)
+++ trunk/SophyaLib/Samba/scan.h	(revision 701)
@@ -8,8 +8,11 @@
 #include "dvlist.h"
 #include "ndatablock.h"
+
+class FIO_Scan;
+
 //!   Storage and treatment of data for a scanning of a part of the sky with a set of given values for parameters (see constructor)
 
 class Scan :  public AnyDataObj  {
-  //  friend FIO_Scan;
+    friend class FIO_Scan;
   public  :
     /* 
@@ -38,5 +41,5 @@
     */
 Scan(float,float*,float,float,float,float);
-Scan(const Scan& );
+Scan(const Scan&,  bool share=false );
 Scan() { 
   InitNull();
@@ -94,4 +97,15 @@
 
 
+
+
+  private :
+    
+    //void          Clear();
+void          InitNull();
+
+/*  Acces to the DataBlock  */
+inline       NDataBlock<r_8>& DataBlock()       {return sPix_;}
+inline const NDataBlock<r_8>& DataBlock() const {return sPix_;}
+
 inline  void  SetIntParams(int_4 NmaxPts, int_4 NmaxTrs, int_4 NPts1Tr)
   {
@@ -129,13 +143,4 @@
      for (int k=0; k<9;k++) Rota[k]=Rota_[k];
    }
-
-/* retourne le pointeur vers/remplit  le vecteur des contenus des pixels */ 
-inline const NDataBlock<r_8>* getDataBlock() const {return (&sPix_);}
-inline void setDataBlock(r_8* data, int n) {sPix_.FillFrom(n,data);}
-
-  private :
-    
-    //void          Clear();
-void          InitNull();
 
 
Index: trunk/SophyaLib/Samba/spheregorski.cc
===================================================================
--- trunk/SophyaLib/Samba/spheregorski.cc	(revision 700)
+++ trunk/SophyaLib/Samba/spheregorski.cc	(revision 701)
@@ -219,5 +219,4 @@
 //--
 {
-  cout << " constructeur de recopie " << endl;
   if(s.mInfo_) mInfo_= new DVList(*s.mInfo_);
 
@@ -1116,5 +1115,5 @@
 {
   dobj= new SphereGorski<T>;
-  dobj->DataBlock().SetTemp(true);
+  dobj->pixels_.SetTemp(true);
   ownobj= true;
   Read(filename);
@@ -1125,5 +1124,5 @@
 {
   dobj= new SphereGorski<T>(obj, true);
-  dobj->DataBlock().SetTemp(true);
+  dobj->pixels_.SetTemp(true);
   ownobj= true;
 }
@@ -1155,12 +1154,11 @@
     {
       dobj= new SphereGorski<T>;
-      dobj->DataBlock().SetTemp(true);
+      dobj->pixels_.SetTemp(true);
       ownobj= true;      
     }
 
 // Let's Read the SphereCoordSys object  -- ATTENTIOn - $CHECK$
-  SphereCoordSys* cs = dynamic_cast<SphereCoordSys*>(is.ReadObject());
-  dobj->SetCoordSys(cs);
-
+  FIO_SphereCoordSys fio_scs( dobj->GetCoordSys());
+  fio_scs.Read(is);
   // Pour savoir s'il y avait un DVList Info associe
   char strg[256];
@@ -1175,16 +1173,13 @@
   int_4 nSide;
   is.GetI4(nSide);
-  dobj->setSizeIndex(nSide);
-
   int_4 nPix;
   is.GetI4(nPix);
-  dobj->setNbPixels(nPix);
-
   double Omega;
   is.GetR8(Omega);
-  dobj->setPixSolAngle(Omega);
+  dobj->setParameters(nSide,nPix, Omega);
 
 // On lit le DataBlock;
-  is >> dobj->DataBlock();
+  FIO_NDataBlock<T> fio_nd(&dobj->pixels_);
+  fio_nd.Read(is);
 }
 
@@ -1192,5 +1187,4 @@
 void FIO_SphereGorski<T>::WriteSelf(POutPersist& os) const
 {
-
   if(dobj == NULL) 
     {
@@ -1200,5 +1194,6 @@
 
 // Let's write the SphereCoordSys object
-  dobj->GetCoordSys()->Write(os);
+  FIO_SphereCoordSys fio_scs( dobj->GetCoordSys());
+  fio_scs.Write(os);
 
   char strg[256];
@@ -1220,7 +1215,8 @@
   os.PutI4(nSide);
   os.PutI4(nPix);
-  os.PutR8(dobj->PixSolAngle(0));
+  os.PutR8(dobj->PixSolAngle());
 // On ecrit le dataBlock 
-  os << dobj->DataBlock();
+  FIO_NDataBlock<T> fio_nd(&dobj->pixels_);
+  fio_nd.Write(os);
 }
 
Index: trunk/SophyaLib/Samba/spheregorski.h
===================================================================
--- trunk/SophyaLib/Samba/spheregorski.h	(revision 700)
+++ trunk/SophyaLib/Samba/spheregorski.h	(revision 701)
@@ -51,6 +51,11 @@
 
 template<class T>
+class FIO_SphereGorski;
+
+template<class T>
 class SphereGorski : public SphericalMap<T>
 {
+
+  friend class FIO_SphereGorski<T>;
 
 public :
@@ -74,5 +79,4 @@
 /*!    Return number of  pixels of the  splitting */
 virtual int_4 NbPixels() const;
-inline void setNbPixels(int_4 n) {nPix_= n;}
 
 /* Valeur du contenu du pixel d'indice "RING" k  */
@@ -115,6 +119,5 @@
    fulfil this requirement.
 */
-virtual double PixSolAngle(int_4 dummy) const;
-inline void setPixSolAngle(double x) {omeg_= x;}
+virtual double PixSolAngle(int_4 dummy=0) const;
 
 // --------------- Specific methods 
@@ -160,15 +163,9 @@
 
 
-/* retourne/fixe la valeur du parametre Gorski */
+/* retourne la valeur du parametre Gorski */
 inline virtual int_4 SizeIndex() const {return(nSide_);}
-inline void setSizeIndex(int_4 n) {nSide_= n;}
 
 /* retourne les pointeurs /remplit les tableaux */
-inline const NDataBlock<T>* getDataBlock() const { return (&pixels_); }
-inline void setDataBlock(T* data,int_4 m) { pixels_.FillFrom(m,data); }
-
-/*  Acces to the DataBlock  */
-inline       NDataBlock<T>& DataBlock()       {return pixels_;}
-inline const NDataBlock<T>& DataBlock() const {return pixels_;}
+
 
 
@@ -189,4 +186,10 @@
 void pix2ang_ring(int_4 nside,int_4 ipix,double& theta,double& phi) const;
 void pix2ang_nest(int_4 nside,int_4 ipix,double& theta,double& phi) const;
+inline void setParameters(int_4 nside, int_4 nbpixels, double solangle) 
+  {
+    nSide_= nside;
+    nPix_= nbpixels;
+    omeg_= solangle;
+  }
 
 // ------------- variables internes -----------------------
Index: trunk/SophyaLib/Samba/spherepos.cc
===================================================================
--- trunk/SophyaLib/Samba/spherepos.cc	(revision 700)
+++ trunk/SophyaLib/Samba/spherepos.cc	(revision 701)
@@ -1,5 +1,7 @@
+// 04/01/00 : implantation de la persistance par classe deleguee - Guy Le Meur
+
 #include "spherepos.h"
 
-static char *head_spherepos_cc_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/Samba/spherepos.cc,v 1.3 1999-12-10 16:55:59 ansari Exp $";
+static char *head_spherepos_cc_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/Samba/spherepos.cc,v 1.4 2000-01-04 14:27:15 ansari Exp $";
 
 
@@ -9,4 +11,9 @@
   id_ = SphereCoordSys_NEUTRAL;
   description_ = "NEUTRAL SphereCoordSystem";
+}
+SphereCoordSys::SphereCoordSys(const SphereCoordSys& a )
+{
+  id_ = a.id_;
+  description_ = a.description_;
 }
 
@@ -19,26 +26,71 @@
 {
 }
-
-// Temporary implementation of PPersist::
-// To be changed later ($CHECK$  Reza 26/10/99) 
-void SphereCoordSys::ReadSelf(PInPersist& is)
+SphereCoordSys& SphereCoordSys::operator = (const SphereCoordSys& a)
 {
-uint_8 itab[3];
-is.Get(itab, 3);
-id_ = itab[1];
-is.GetStr(description_);
+  id_ = a.id_;
+  description_ = a.description_;
+  return *this;
 }
 
-void SphereCoordSys::WriteSelf(POutPersist& os) const
+
+////////////////////////////////////////////////////////////////
+// -------------------------------------------------------------------------
+//   Les objets delegues pour la gestion de persistance 
+// -------------------------------------------------------------------------
+
+FIO_SphereCoordSys::FIO_SphereCoordSys()
+  {
+    dobj=new SphereCoordSys;
+    ownobj=true;
+  }
+FIO_SphereCoordSys::FIO_SphereCoordSys(string const & filename)
+  {
+    dobj=new SphereCoordSys;
+    ownobj=true; 
+    Read(filename);
+  }
+FIO_SphereCoordSys::FIO_SphereCoordSys(const SphereCoordSys & obj)
+  {
+    dobj = new SphereCoordSys(obj);
+    ownobj=true; 
+  }
+FIO_SphereCoordSys::FIO_SphereCoordSys(SphereCoordSys * obj)
+  {
+    dobj = obj;
+    ownobj=false; 
+  }
+FIO_SphereCoordSys::~FIO_SphereCoordSys()
+  {
+    if (ownobj && dobj) delete dobj;
+  }
+AnyDataObj* FIO_SphereCoordSys::DataObj()
+  {
+    return(dobj);
+  }
+
+
+void  FIO_SphereCoordSys::ReadSelf(PInPersist& is)
+  {
+uint_8 itab[3];
+ string description;
+is.Get(itab, 3);
+is.GetStr(description);
+if (dobj == NULL) dobj = new SphereCoordSys(itab[1], description);
+ else *dobj= SphereCoordSys(itab[1], description);
+  }           
+void       FIO_SphereCoordSys::WriteSelf(POutPersist& os) const
 {
+if (dobj == NULL)   return;  // Attention - $CHECK$ Guy 04/01/00
 //  On ecrit 3 uint_8 
 //  0 : Numero de version,  1 : Id,  2  reserve a l
 uint_8 itab[3];
 itab[0] = 1;
-itab[1] = id_;
+itab[1] = dobj->Id();
 itab[2] = 0;
 os.Put(itab, 3);
-os.PutStr(description_);
-}
+os.PutStr(dobj->description());
+} 
+
+
 
 //................. SpherePosition class .................
Index: trunk/SophyaLib/Samba/spherepos.h
===================================================================
--- trunk/SophyaLib/Samba/spherepos.h	(revision 700)
+++ trunk/SophyaLib/Samba/spherepos.h	(revision 701)
@@ -7,6 +7,7 @@
 #include <string>
 #include "unitvector.h"
+#include "anydataobj.h"
 
-static char *head_spherepos_h_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/Samba/spherepos.h,v 1.3 1999-11-05 13:10:10 ansari Exp $";
+static char *head_spherepos_h_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/Samba/spherepos.h,v 1.4 2000-01-04 14:27:11 ansari Exp $";
 
 namespace SOPHYA {
@@ -17,13 +18,10 @@
 };
 
-// We make this class a PPersist class, in order
-// to be able to implement easily the persistence 
-// for pixelmaps
-// To be changed later ($CHECK$  Reza 26/10/99) 
  
-class SphereCoordSys : public PPersist {
+class SphereCoordSys : public  AnyDataObj {
 public:
   
-                 SphereCoordSys();
+  SphereCoordSys();
+  SphereCoordSys(const SphereCoordSys& a);
                  SphereCoordSys(int id, const string& description);
   virtual        ~SphereCoordSys();
@@ -31,13 +29,28 @@
   virtual int    Id() const {return id_; }
   virtual string description() const {return description_; }
+  SphereCoordSys& operator = (const SphereCoordSys& a);
 
-    // METHODS FOR PERSISTENCE TO FOLLOW:
-protected:
-  virtual void       ReadSelf(PInPersist&);
-  virtual void       WriteSelf(POutPersist&) const;
 
 private:
   int id_;
   string description_;
+};
+
+// Classe pour la gestion de persistance
+
+class FIO_SphereCoordSys : public  PPersist  {
+public:
+  FIO_SphereCoordSys();
+  FIO_SphereCoordSys(string const & filename);
+  FIO_SphereCoordSys(const SphereCoordSys & obj);
+  FIO_SphereCoordSys(SphereCoordSys * obj);
+  virtual ~FIO_SphereCoordSys();
+  virtual AnyDataObj* DataObj();
+  inline operator SphereCoordSys() { return(*dobj); }
+protected :
+  virtual void       ReadSelf(PInPersist&);
+  virtual void       WriteSelf(POutPersist&) const;  
+  SphereCoordSys * dobj;
+  bool ownobj;
 };
 
Index: trunk/SophyaLib/Samba/spherethetaphi.cc
===================================================================
--- trunk/SophyaLib/Samba/spherethetaphi.cc	(revision 700)
+++ trunk/SophyaLib/Samba/spherethetaphi.cc	(revision 701)
@@ -322,7 +322,5 @@
 //--
 {
-  int nbslices;
-  nbslices= 2*NTheta_;
-  return(nbslices);
+  return( 2*NTheta_);
 }
 
@@ -566,14 +564,13 @@
 {
 
-  if(index < 0 || index > NbThetaSlices()) 
+  if(index < 0 || index >= NbThetaSlices()) 
     {
       // THROW(out_of_range("SphereThetaPhi::PIxVal Pixel index out of range")); 
-      cout << " SphereThetaPhi::GetThetaSlice : exceptions  a mettre en place" <<endl;
+      cout << " SphereThetaPhi::GetThetaSlice : Pixel index out of range" <<endl;
       THROW(rangeCheckErr);
     }
 
   int iring= Index(index,0);
-  int bid  = this->NPhi(index);
-  int lring  = bid;
+  int lring  = NPhi(index);
 
   phi.ReSize(lring);
@@ -617,10 +614,4 @@
 }
 
-template <class T>
-void SphereThetaPhi<T>::setDataBlock(T* data, int_4 m)
-  // remplit  le vecteur des contenus des pixels 
-{
-  pixels_.FillFrom(m,data);
-} 
 
 template <class T>
@@ -684,5 +675,6 @@
 {
   dobj= new SphereThetaPhi<T>;
-  dobj->DataBlock().SetTemp(true);
+  //  dobj->DataBlock().SetTemp(true);
+  dobj->pixels_.SetTemp(true);
   ownobj= true;
   Read(filename);
@@ -693,5 +685,6 @@
 {
   dobj= new SphereThetaPhi<T>(obj, true);
-  dobj->DataBlock().SetTemp(true);
+  //  dobj->DataBlock().SetTemp(true);
+  dobj->pixels_.SetTemp(true);
   ownobj= true;
 }
@@ -723,11 +716,12 @@
     {
       dobj= new SphereThetaPhi<T>;
-      dobj->DataBlock().SetTemp(true);
+      //      dobj->DataBlock().SetTemp(true);
+      dobj->pixels_.SetTemp(true);
       ownobj= true;      
     }
 
 // Let's Read the SphereCoordSys object  -- ATTENTIOn - $CHECK$
-  SphereCoordSys* cs = dynamic_cast<SphereCoordSys*>(is.ReadObject());
-  dobj->SetCoordSys(cs);
+  FIO_SphereCoordSys fio_scs( dobj->GetCoordSys());
+  fio_scs.Read(is);
 
   // Pour savoir s'il y avait un DVList Info associe
@@ -743,13 +737,9 @@
   int_4 mNTheta;
   is.GetI4(mNTheta);  
-  dobj->setSizeIndex(mNTheta);
-
   int_4 mNPix;
   is.GetI4(mNPix);
-  dobj->setNbPixels(mNPix);
-
   double mOmeg;
   is.GetR8(mOmeg);
-  dobj->setPixSolAngle(mOmeg);
+  dobj->setParameters(mNPix, mOmeg, mNTheta); 
 
   int_4* mNphi= new int_4[mNTheta];
@@ -769,5 +759,8 @@
 
 // On lit le DataBlock;
-  is >> dobj->DataBlock();
+  //FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
+FIO_NDataBlock<T> fio_nd(&dobj->pixels_);
+fio_nd.Read(is);
+//  is >> dobj->DataBlock();
 }
 
@@ -783,5 +776,6 @@
 
 // Let's write the SphereCoordSys object
-  dobj->GetCoordSys()->Write(os);
+  FIO_SphereCoordSys fio_scs( dobj->GetCoordSys());
+  fio_scs.Write(os);
   
   char strg[256];
@@ -803,10 +797,13 @@
   os.PutI4(mNTheta);  
   os.PutI4(mNPix);
-  os.PutR8(dobj->PixSolAngle(0));
+  os.PutR8(dobj->PixSolAngle());
   os.PutI4s(dobj->getmNPhi() , mNTheta);
   os.PutI4s(dobj->getmTNphi(), mNTheta+1);
   os.PutR8s(dobj->getmTheta(), mNTheta+1);
 // On ecrit le datablock
-  os << dobj->DataBlock();
+  //FIO_NDataBlock<T> fio_nd(&dobj->DataBlock());
+FIO_NDataBlock<T> fio_nd(&dobj->pixels_);
+fio_nd.Write(os);
+//  os << dobj->DataBlock();
 }
 
Index: trunk/SophyaLib/Samba/spherethetaphi.h
===================================================================
--- trunk/SophyaLib/Samba/spherethetaphi.h	(revision 700)
+++ trunk/SophyaLib/Samba/spherethetaphi.h	(revision 701)
@@ -8,4 +8,8 @@
 #include "anydataobj.h"
 #include "ppersist.h"
+
+template <class T>
+class FIO_SphereThetaPhi;  
+
 
 // ***************** Class SphereThetaPhi *****************************
@@ -24,4 +28,6 @@
 {
 
+  friend class FIO_SphereThetaPhi<T>;
+
 public :
 
@@ -37,8 +43,7 @@
 // ------------ Definition of PixelMap abstract methods -
 
-/* retourne/fixe le nombre de pixels */ 
+/* retourne le nombre de pixels */ 
 /*!    Return total number of pixels  */
 virtual int_4 NbPixels() const;
-inline void setNbPixels(int_4 nbpix) { NPix_= nbpix; }
 
 /* retourne la valeur du pixel d'indice k */ 
@@ -67,10 +72,8 @@
     fulfil this requirement.
 */
-virtual double PixSolAngle(int_4 dummy) const;
-inline void setPixSolAngle(double omega) { Omega_= omega; }
+virtual double PixSolAngle(int_4 dummy=0) const;
  
 /* retourne/fixe la valeur du parametre de decoupage m */ 
 inline virtual int_4 SizeIndex() const { return( NTheta_); }
-inline void setSizeIndex(int_4 nbindex) { NTheta_= nbindex; }
 
 // ------------- Specific methods  ----------------------
@@ -133,23 +136,6 @@
 void GetThetaSlice(int_4 index,double& theta,TVector<double>& phi,TVector<T>& value) const; 
 
-/*retourne le tableau contenant le nombre de pixels en phi de chacune des bandes en theta */
-inline const int_4* getmNPhi() const { return(NPhi_); }
-void setmNPhi(int_4* array, int_4 m);
-
-/* retourne/remplit le tableau contenant le nombre/Deuxpi total des pixels contenus dans les bandes */
-inline const int_4* getmTNphi() const { return(TNphi_); }
-void setmTNphi(int_4* array, int_4 m);
-
-/* retourne/remplit le tableau contenant les valeurs limites de theta */
-inline const double* getmTheta() const { return(Theta_); }
-void setmTheta(double* array, int_4 m);
-
-/* retourne le pointeur vers/remplit  le vecteur des contenus des pixels */ 
-inline const NDataBlock<T>* getDataBlock() const { return (&pixels_); }
-void setDataBlock(T* data, int_4 m);
-
-/*  Acces to the DataBlock  */
-inline       NDataBlock<T>& DataBlock()       {return pixels_;}
-inline const NDataBlock<T>& DataBlock() const {return pixels_;}
+
+
 
 /* impression */ 
@@ -161,10 +147,32 @@
 void InitNul();
 void Clear();
+inline void setParameters(int nbpix, double omega, int nbThetaIndex) 
+  {
+    NPix_= nbpix;
+    Omega_= omega;
+    NTheta_= nbThetaIndex;
+  }
+void setmNPhi(int* array, int m);
+void setmTNphi(int* array, int m);
+void setmTheta(double* array, int m);
+ /*retourne l'adresse du tableau contenant le nombre de pixels en phi de chacune des bandes en theta */
+inline const int* getmNPhi() const { return(NPhi_); }
+
+/* retourne le tableau contenant le nombre/Deuxpi total des pixels contenus dans les bandes */
+inline const int* getmTNphi() const { return(TNphi_); }
+
+/* retourne le tableau contenant les valeurs limites de theta */
+inline const double* getmTheta() const { return(Theta_); }
+
+/*  Acces to the DataBlock  */
+//inline       NDataBlock<T>& DataBlock()       {return pixels_;}
+//inline const NDataBlock<T>& DataBlock() const {return pixels_;}
 
 // ------------- variables internes ---------------------
-int_4 NTheta_;
-int_4 NPix_;
-double Omega_;
-int_4* NPhi_;
+ int_4 NTheta_;   // nombre de tranches en theta, pour une demi-sphere
+ int_4 NPix_;     // nombre total de pixels
+ double Omega_; // angle solide constant pour chaque pixel
+ int_4* NPhi_;    // tableau donnant, pour chaque bande en theta, le nombre de 
+                // pixels selon phi
 int_4* TNphi_;
 double* Theta_;
@@ -185,5 +193,4 @@
 virtual AnyDataObj* DataObj();
 inline operator SphereThetaPhi<T>() { return(*dobj); }
-//inline SphereThetaPhi<T> getObj() { return(*dobj); }
 
 protected :
