Index: trunk/ArchTOIPipe/ProcWSophya/map2toi.cc
===================================================================
--- trunk/ArchTOIPipe/ProcWSophya/map2toi.cc	(revision 1520)
+++ trunk/ArchTOIPipe/ProcWSophya/map2toi.cc	(revision 1530)
@@ -15,4 +15,24 @@
 Map2TOI::~Map2TOI()
 {
+}
+
+////////////////////////////////////////////////////////////////////////
+void Map2TOI::Print(ostream & os)
+{
+  os<<"Map2TOI::Print -- Sphere NLat = "<<mSph.SizeIndex()<<endl
+
+    <<"   - Equinoxe="<<mActualYear<<endl
+
+    <<"   - TypCoorIn: Gal("<<((mTypCoorIn&TypCoordGal)?1:0)
+    <<") Eq("<<((mTypCoorIn&TypCoordEq)?1:0)
+    <<") Deg("<<((mTypCoorIn&TypCoordDD)?1:0)
+    <<") Hour("<<((mTypCoorIn&TypCoordHD)?1:0)
+    <<") Rad("<<((mTypCoorIn&TypCoordRR)?1:0)<<")"<<endl
+
+    <<"   - TypCoorMap: Gal("<<((mTypCoorMap&TypCoordGal)?1:0)
+    <<") Eq("<<((mTypCoorMap&TypCoordEq)?1:0)
+    <<") Deg("<<((mTypCoorMap&TypCoordDD)?1:0)
+    <<") Hour("<<((mTypCoorMap&TypCoordHD)?1:0)
+    <<") Rad("<<((mTypCoorMap&TypCoordRR)?1:0)<<")"<<endl;
 }
 
Index: trunk/ArchTOIPipe/ProcWSophya/map2toi.h
===================================================================
--- trunk/ArchTOIPipe/ProcWSophya/map2toi.h	(revision 1520)
+++ trunk/ArchTOIPipe/ProcWSophya/map2toi.h	(revision 1530)
@@ -42,4 +42,6 @@
   inline void SetCoorMap(TypAstroCoord mfg=TypCoordGalStd)
               {mTypCoorMap = mfg;}
+  // Print
+  void Print(ostream & os);
 
 protected:
Index: trunk/ArchTOIPipe/ProcWSophya/toi2map.cc
===================================================================
--- trunk/ArchTOIPipe/ProcWSophya/toi2map.cc	(revision 1520)
+++ trunk/ArchTOIPipe/ProcWSophya/toi2map.cc	(revision 1530)
@@ -12,4 +12,7 @@
  SetCoorIn();
  SetCoorOut();
+ SetTestFlag();
+ SetTestMin();
+ SetTestMax();
 
  if(mSph->NbPixels()<1) {
@@ -40,4 +43,28 @@
 {
  if(mWSph && !mWSphInternal) delete mWSph;
+}
+
+////////////////////////////////////////////////////////////////////////
+void TOI2Map::Print(ostream & os)
+{
+  os<<"TOI2Map::Print -- Sphere NLat = "<<mSph->SizeIndex()<<endl
+
+    <<"   - Equinoxe="<<mActualYear<<endl
+
+    <<"   - TypCoorIn: Gal("<<((mTypCoorIn&TypCoordGal)?1:0)
+    <<") Eq("<<((mTypCoorIn&TypCoordEq)?1:0)
+    <<") Deg("<<((mTypCoorIn&TypCoordDD)?1:0)
+    <<") Hour("<<((mTypCoorIn&TypCoordHD)?1:0)
+    <<") Rad("<<((mTypCoorIn&TypCoordRR)?1:0)<<")"<<endl
+
+    <<"   - TypCoorOut: Gal("<<((mTypCoorOut&TypCoordGal)?1:0)
+    <<") Eq("<<((mTypCoorOut&TypCoordEq)?1:0)
+    <<") Deg("<<((mTypCoorOut&TypCoordDD)?1:0)
+    <<") Hour("<<((mTypCoorOut&TypCoordHD)?1:0)
+    <<") Rad("<<((mTypCoorOut&TypCoordRR)?1:0)<<")"<<endl
+
+    <<"   - Tests: Flag("<<mTFlag<<") bad="<<mBadFlag
+    <<" / Value Min("<<mTMin<<")="<<mValMin
+    <<" , Max("<<mTMax<<")="<<mValMax<<endl;
 }
 
@@ -92,5 +119,7 @@
 
   getData(2,s,bolo,fgbolo);
-  if(bolo<-32767.) continue; // Bidouille (A CORRIGER QUAND FGBOLO DISPO)
+  if(mTFlag && fgbolo&mBadFlag) continue;
+  if(mTMin && bolo<mValMin) continue;
+  if(mTMax && bolo>mValMax) continue;
 
   // sphere phi   entre [0,2*Pi] en radians
@@ -115,5 +144,5 @@
   int_4 ipix = mSph->PixIndexSph(theta,phi);
   (*mSph)(ipix) += bolo;    
-  ((*mWSph)(ipix))++;
+  ((*mWSph)(ipix)) += 1;
   mNSnFill++;
 }
Index: trunk/ArchTOIPipe/ProcWSophya/toi2map.h
===================================================================
--- trunk/ArchTOIPipe/ProcWSophya/toi2map.h	(revision 1520)
+++ trunk/ArchTOIPipe/ProcWSophya/toi2map.h	(revision 1530)
@@ -3,4 +3,5 @@
 #define TOI2MAP_H
 
+#include "toiprocessor.h"
 #include "toiprocessor.h"
 #include "spherehealpix.h"
@@ -41,4 +42,17 @@
   inline void SetCoorOut(TypAstroCoord mfg=TypCoordGalStd)
               {mTypCoorOut = mfg;}
+  // Test on flag value ? if yes, BAD sample have flag matching mBadFlag
+  inline void SetTestFlag(bool tflg=false, int_8 badflg=0)
+              {mTFlag = tflg; mBadFlag = badflg;}
+  // Test on min value ? if yes, GOOD sample have value >= mValMin
+  // Test on max value ? if yes, GOOD sample have value <= mValMax
+  // Good values are (mValMin <= sample value <= mValMax)
+  //                      bounds are included
+  inline void SetTestMin(bool tmin=false, r_8 vmin=-1.e30)
+              {mTMin = tmin; mValMin = vmin;}
+  inline void SetTestMax(bool tmax=false, r_8 vmax=+1.e30)
+              {mTMax = tmax; mValMax = vmax;}
+  // Print
+  void Print(ostream & os);
 
 protected:
@@ -46,6 +60,11 @@
   SphereHEALPix<r_8>* mWSph;
   bool mWSphInternal;
+
   TypAstroCoord mTypCoorIn, mTypCoorOut;
   double mActualYear;
+
+  bool mTFlag,mTMin,mTMax;
+  int_8 mBadFlag;
+  r_8 mValMin,mValMax;
 };
 
