Index: trunk/SophyaLib/SkyMap/sphereecp.cc
===================================================================
--- trunk/SophyaLib/SkyMap/sphereecp.cc	(revision 2988)
+++ trunk/SophyaLib/SkyMap/sphereecp.cc	(revision 2990)
@@ -167,5 +167,5 @@
 string SphereECP<T>::TypeOfMap() const
 {
-  return string("TETAFI");
+  return string("ECP");
 }
 
@@ -370,4 +370,14 @@
   return;
 
+}
+
+template <class T>
+T*  SphereECP<T>::GetThetaSliceDataPtr(int_4 index)
+{
+  if( (index < 0) || (index >= _pixels.SizeY()) )  
+    throw RangeCheckError("SphereECP::GetThetaSliceDataPtr() index out of range");
+  int_4 ioff = _phi1/_dphi;
+  if (ioff != 0) return NULL;
+  return _pixels.Data() + index*_pixels.SizeX();
 }
 
Index: trunk/SophyaLib/SkyMap/sphereecp.h
===================================================================
--- trunk/SophyaLib/SkyMap/sphereecp.h	(revision 2988)
+++ trunk/SophyaLib/SkyMap/sphereecp.h	(revision 2990)
@@ -109,4 +109,5 @@
   virtual void		GetThetaSlice(int_4 sliceIndex, r_8& theta, r_8& phi0, 
 				      TVector<int_4>& pixelIndices,TVector<T>& value) const ;
+  virtual T*            GetThetaSliceDataPtr(int_4 index);
 
   // Valeur de pixel hors carte
Index: trunk/SophyaLib/SkyMap/spherehealpix.cc
===================================================================
--- trunk/SophyaLib/SkyMap/spherehealpix.cc	(revision 2988)
+++ trunk/SophyaLib/SkyMap/spherehealpix.cc	(revision 2990)
@@ -340,8 +340,6 @@
 void SphereHEALPix<T>::GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const 
 {
-  if (index<0 || index >= NbThetaSlices())  {
-      cout << " SphereHEALPix::GetThetaSlice : Pixel index out of range" <<endl;
-      throw RangeCheckError(" SphereHEALPix::GetThetaSlice()  index out of range");
-  }
+  if (index<0 || index >= NbThetaSlices()) 
+    throw RangeCheckError(" SphereHEALPix::GetThetaSlice()  index out of range");
 
   int_4 iring= sliceBeginIndex_(index);
@@ -388,13 +386,11 @@
 
 template<class T>
-void SphereHEALPix<T>::GetThetaSlice(int_4 sliceIndex,r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const 
+void SphereHEALPix<T>::GetThetaSlice(int_4 sliceIndex,r_8& theta, r_8& phi0, 
+				     TVector<int_4>& pixelIndices,TVector<T>& value) const 
 
 {
 
   if (sliceIndex<0 || sliceIndex >= NbThetaSlices()) 
-    {
-      cout << " SphereHEALPix::GetThetaSlice : Pixel index out of range" <<endl;
-      throw RangeCheckError(" SphereHEALPix::GetThetaSlice : Pixel index out of range");
-    }
+    throw RangeCheckError(" SphereHEALPix::GetThetaSlice() index out of range");
   int_4 iring= sliceBeginIndex_(sliceIndex);
   int_4 lring  =  sliceLenght_(sliceIndex);
@@ -417,4 +413,16 @@
     PixThetaPhi(ring2nest(nSide_,iring), theta, phi0);    
   }
+}
+
+//! return a pointer to the specified slice pixel data in RING ordering, NULL in NESTED
+template<class T>
+T* SphereHEALPix<T>::GetThetaSliceDataPtr(int_4 sliceIndex) 
+
+{
+  if (sliceIndex<0 || sliceIndex >= NbThetaSlices()) 
+    throw RangeCheckError(" SphereHEALPix::GetThetaSliceDataPtr(): index out of range");
+  if (fgring_) 
+    return pixels_.Begin()+sliceBeginIndex_(sliceIndex);
+  else return NULL;
 }
 
Index: trunk/SophyaLib/SkyMap/spherehealpix.h
===================================================================
--- trunk/SophyaLib/SkyMap/spherehealpix.h	(revision 2988)
+++ trunk/SophyaLib/SkyMap/spherehealpix.h	(revision 2990)
@@ -91,4 +91,5 @@
 virtual void GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const;
 virtual void GetThetaSlice(int_4 sliceIndex,r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const ;
+virtual T*   GetThetaSliceDataPtr(int_4 sliceIndex);
 
 virtual bool ContainsSph(double theta, double phi) const;
Index: trunk/SophyaLib/SkyMap/spherethetaphi.cc
===================================================================
--- trunk/SophyaLib/SkyMap/spherethetaphi.cc	(revision 2988)
+++ trunk/SophyaLib/SkyMap/spherethetaphi.cc	(revision 2990)
@@ -192,5 +192,5 @@
   NPix_  = a.NPix_;
   Omega_ = a.Omega_;
-  int k;
+  int_4 k;
   for (k=0; k< NPix_; k++) pixels_(k) = a.pixels_(k);
   for (k=0; k< a.NPhi_.Size(); k++) NPhi_(k) = a.NPhi_(k);
@@ -246,5 +246,5 @@
 {
   double dphi;
-  int i,k;
+  int_4 i,k;
   bool fgzn = false;
 
@@ -270,5 +270,5 @@
 void SphereThetaPhi<T>::PixThetaPhi(int_4 k,double& theta,double& phi) const
 {
-  int i; 
+  int_4 i; 
   bool fgzn = false;
   
@@ -316,5 +316,5 @@
 void SphereThetaPhi<T>::Limits(int_4 k,double& tetMin,double& tetMax,double& phiMin,double& phiMax) 
   {
-  int j;
+  int_4 j;
   double dphi;
   bool fgzn= false;
@@ -335,5 +335,5 @@
   
   // on recupere l'indice i de la tranche qui contient le pixel k
-  int i;
+  int_4 i;
   for( i=0; i< NTheta_; i++ ) 
     if(k < TNphi_(i+1)) break;
@@ -378,5 +378,5 @@
 int_4 SphereThetaPhi<T>::NPhi(int_4 kt) const
 {
-  int nbpix;  
+  int_4 nbpix;  
   // verification
   if((kt < 0) || (kt >= 2*NTheta_)) return(-1);
@@ -455,5 +455,5 @@
 int_4 SphereThetaPhi<T>::Index(int_4 kt,int_4 jp) const
 {
-  int k;
+  int_4 k;
   bool fgzn= false;
   
@@ -494,5 +494,5 @@
   
   // on recupere l'indice kt de la tranche qui contient le pixel k
-  int i;
+  int_4 i;
   for(i = 0; i < NTheta_; i++) 
     if(k < TNphi_(i+1)) break;
@@ -523,5 +523,5 @@
 //--
 {
-  int ntotpix,j;
+  int_4 ntotpix,j;
   
   // Decodage et controle des arguments d'appel :
@@ -634,6 +634,6 @@
     
 
-  int iring= Index(index,0);
-  int lring  = NPhi(index);
+  int_4 iring= Index(index,0);
+  int_4 lring  = NPhi(index);
 
   phi.ReSize(lring);
@@ -643,5 +643,5 @@
   PixThetaPhi(iring,Te,Fi);
   double DFi = DeuxPi/(double)NPhi(index);
-  for(int kk = 0; kk < lring; kk++)   {
+  for(int_4 kk = 0; kk < lring; kk++)   {
     value(kk)= pixels_(kk+iring);
     phi(kk)= Fi;
@@ -668,6 +668,6 @@
     throw RangeCheckError("SphereThetaPhi::GetThetaSlice(idx...)  idx out of range"); 
 
-  int iring= Index(index,0);
-  int lring  = NPhi(index);
+  int_4 iring= Index(index,0);
+  int_4 lring  = NPhi(index);
 
   pixelIndices.ReSize(lring);
@@ -675,5 +675,5 @@
   double Te= 0.;
   double Fi= 0.;
-  for(int kk = 0; kk < lring; kk++)  {
+  for(int_4 kk = 0; kk < lring; kk++)  {
     pixelIndices(kk)=kk+iring ;
     value(kk)= pixels_(kk+iring);
@@ -682,5 +682,12 @@
 }
 
-
+//! return a pointer to the specified slice pixel data
+template <class T>
+T* SphereThetaPhi<T>::GetThetaSliceDataPtr(int_4 index)
+{
+  if(index < 0 || index >= NbThetaSlices()) 
+    throw RangeCheckError("SphereThetaPhi::GetThetaSliceDataPtr(idx)  idx out of range"); 
+  return pixels_.Begin()+Index(index,0);
+}
 
 
@@ -694,5 +701,5 @@
 
   os << "... NPhi_ Values : ";
-  int i;
+  int_4 i;
   for(i=0; i < NTheta_; i++)
     {
Index: trunk/SophyaLib/SkyMap/spherethetaphi.h
===================================================================
--- trunk/SophyaLib/SkyMap/spherethetaphi.h	(revision 2988)
+++ trunk/SophyaLib/SkyMap/spherethetaphi.h	(revision 2990)
@@ -132,4 +132,5 @@
 virtual void GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const; 
 virtual void GetThetaSlice(int_4 index, r_8& theta, r_8& phi0,TVector<int_4>& pixelIndices, TVector<T>& value) const ;
+virtual T*   GetThetaSliceDataPtr(int_4 sliceIndex);
 
 
Index: trunk/SophyaLib/SkyMap/sphericalmap.h
===================================================================
--- trunk/SophyaLib/SkyMap/sphericalmap.h	(revision 2988)
+++ trunk/SophyaLib/SkyMap/sphericalmap.h	(revision 2990)
@@ -60,4 +60,8 @@
 virtual void GetThetaSlice(int_4 index,r_8& theta, TVector<r_8>& phi, TVector<T>& value) const=0; 
 virtual void GetThetaSlice(int_4 sliceIndex, r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const=0 ;
+/*!
+  If possible return a pointer to the slice pixel data. return NULL otherwise 
+*/
+virtual T*   GetThetaSliceDataPtr(int_4 sliceIndex) { return NULL; }
 };
 
