Index: trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc	(revision 4385)
+++ trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc	(revision 4386)
@@ -81,5 +81,5 @@
 // - fNSBFilterLimit to fgNSBFilterLimit
 // - fResolution to fgResolution
-// - fExtractionType to kAmplitude
+// - fExtractionType to 0.
 //
 // Calls:
@@ -103,6 +103,4 @@
   SetFirst();
   SetLast();
-
-  SetExtractionType();
 
   Clear();
@@ -138,4 +136,5 @@
 // - fModified to kFALSE
 // - fBlindPixelIdx to 0
+// - fExtractionType to 0
 // 
 // Calls:
@@ -150,5 +149,6 @@
 {
 
-  fModified = kFALSE;
+  fModified       = kFALSE;
+  fExtractionType = 0;
 
   fBlindPixelIdx.Set(0);
@@ -245,4 +245,5 @@
   {
       fModified = kTRUE;
+      SetExtractionType(kAmplitude);
       SetRange(fFirst,fLast);
       for (Int_t i=0;i<3;i++)
@@ -256,8 +257,9 @@
       fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(0));
       SetExtractionType(kIntegral);
+      SetExtractionType(kFilter);
   }
 
-  fBlindPixel->SetUsedFADCSlices(fHiGainFirst, fHiGainLast);
-  
+  fBlindPixel->SetExtractionType(fExtractionType);
+
   for (Int_t i=0;i<fBlindPixelIdx.GetSize();i++)
   {
@@ -293,6 +295,5 @@
     }
 
-  Int_t lastdesired   = (Int_t)fHiGainLast;
-  lastavailable = (Int_t)fRunHeader->GetNumSamplesHiGain()-1;
+  const Int_t lastdesired   = (Int_t)fHiGainLast;
   
   if (lastdesired > lastavailable)
@@ -311,8 +312,8 @@
                 << Form("%s%2i",": Will reduce upper limit by ",diff)
                 << endl;
-          fHiGainLast = (Int_t)fRunHeader->GetNumSamplesLoGain() - 1;
-          diff        = (Int_t)fRunHeader->GetNumSamplesLoGain() - 1;
+          diff        = (Int_t)fRunHeader->GetNumSamplesLoGain();
         }
 
+      fHiGainLast = (Int_t)fRunHeader->GetNumSamplesHiGain() - 1;
       fHiLoLast = diff;
     }
@@ -334,6 +335,9 @@
         << " to (including)  " 
         << Form("%s%2i",fHiLoLast ? "Low Gain slice " : " High Gain slice ",
-                fHiLoLast ?  (Int_t)fHiLoLast : (Int_t)fHiGainLast ) 
+                fHiLoLast ?  (Int_t)fHiLoLast-1 : (Int_t)fHiGainLast ) 
         << endl;
+
+
+  fBlindPixel->SetUsedFADCSlices(fHiGainFirst, range);
 
   return kTRUE;
@@ -380,4 +384,5 @@
             sat++;
     }
+
   sum = (Float_t)summ;
 }
@@ -437,5 +442,5 @@
       
       p    = logain + fHiLoFirst;
-      end  = logain + fHiLoLast + 1;
+      end  = logain + fHiLoLast;
       
       while (p<end)
@@ -700,24 +705,22 @@
 }
 
+// ------------------------------------------------------------------------------------
+//
+// Returns true if the extraction type. Available are: kAmplitude, kIntegral and kFilter
+// The flags kIntegral and kFilter may be set both. 
+//
+Bool_t MExtractBlindPixel::IsExtractionType( const ExtractionType_t typ )
+{
+  
+  return TESTBIT( fExtractionType, typ );
+
+}
+
 // --------------------------------------------------------------------------
 //
 // Sets the extraction type. Available are: kAmplitude and kIntegral
 //
-Bool_t MExtractBlindPixel::IsExtractionType( const ExtractionType_t typ )
-{
-  
-  return TESTBIT( fExtractionType, typ );
-
-}
-
-// --------------------------------------------------------------------------
-//
-// Sets the extraction type. Available are: kAmplitude and kIntegral
-//
 void MExtractBlindPixel::SetExtractionType( const ExtractionType_t typ )
 {
-  
-  fExtractionType = 0;
   SETBIT( fExtractionType, typ );
-
-}
+}
Index: trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h	(revision 4385)
+++ trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h	(revision 4386)
@@ -46,5 +46,5 @@
 
 public:
-  enum ExtractionType_t { kAmplitude, kIntegral };
+  enum ExtractionType_t { kAmplitude, kIntegral, kFilter };
 
 
Index: trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.cc
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.cc	(revision 4385)
+++ trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.cc	(revision 4386)
@@ -44,6 +44,5 @@
 using namespace std;
 
-static const Int_t gkSignalInitializer = 99999;
-
+const Int_t MExtractedSignalBlindPixel::gkSignalInitializer = 99999;
 // ------------------------------------------------------------------------
 //
@@ -54,5 +53,5 @@
 // - the dimenstion of fNumSaturated to 1
 // - the dimenstion of fPed. to 1;      
-// - the dimenstion of fPedErr. to 1;)   
+// - the dimenstion of fPedErr. to 1;
 // - the dimenstion of fPedRms. to 1;   
 // - the dimenstion of fPedRmsErr. to 1;
@@ -131,2 +130,14 @@
     }
 }
+
+// ------------------------------------------------------------------------------------
+//
+// Returns true if the extraction type. Available are: kAmplitude, kIntegral and kFilter
+// The flags kIntegral and kFilter may be set both. 
+//
+Bool_t MExtractedSignalBlindPixel::IsExtractionType( const MExtractBlindPixel::ExtractionType_t typ )
+{
+  
+  return TESTBIT( fExtractionType, typ );
+
+}
Index: trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.h
===================================================================
--- trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.h	(revision 4385)
+++ trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.h	(revision 4386)
@@ -14,22 +14,26 @@
 #endif
 
+#ifndef MARS_MExtractBlindPixel
+#include <MExtractBlindPixel.h>
+#endif
+
 class MExtractedSignalBlindPixel : public MParContainer
 {
 private:
 
-  static const UInt_t gkNumBlindPixels;  //! Current Number of blind pixels in the camera  
-  
-  TArrayI fBlindPixelIdx;                // Array Blind Pixel IDs
-  TArrayF fExtractedSignal;              // Array Extracted signals per Blind Pixel ID
-  TArrayI fNumSaturated;                 // Array Number of saturated slices per Blind Pixel ID 
-  
-  TArrayF fPed;                          // Array Pedestal per Blind Pixel IDs                               
-  TArrayF fPedErr;                       // Array Pedestal Error per Blind Pixel ID          
-  TArrayF fPedRms;                       // Array Pedestal RMS per Blind Pixel ID 
-  TArrayF fPedRmsErr;                    // Array Pedestal RMS Error per Blind Pixel ID 
+  static const Int_t gkSignalInitializer; //! Initializer for variables
 
-  Byte_t  fFirst;                        // First FADC extraction slice
-  Byte_t  fNumFADCSamples;               // Number of summed FADC slices
-
+  TArrayI fBlindPixelIdx;                 // Array Blind Pixel IDs
+  TArrayF fExtractedSignal;               // Array Extracted signals per Blind Pixel ID
+  TArrayI fNumSaturated;                  // Array Number of saturated slices per Blind Pixel ID 
+  					  
+  TArrayF fPed;                           // Array Pedestal per Blind Pixel IDs                               
+  TArrayF fPedErr;                        // Array Pedestal Error per Blind Pixel ID          
+  TArrayF fPedRms;                        // Array Pedestal RMS per Blind Pixel ID 
+  TArrayF fPedRmsErr;                     // Array Pedestal RMS Error per Blind Pixel ID 
+					  
+  Byte_t  fFirst;                         // First FADC extraction slice
+  Byte_t  fNumFADCSamples;                // Number of summed FADC slices
+  Byte_t  fExtractionType;                // What extraction type has been chosen?
   
 public:
@@ -47,14 +51,16 @@
   Byte_t  GetNumFADCSamples  ()                   const { return fNumFADCSamples         ; }
 
-  Float_t GetPed       ( const Int_t i=0 )  const { return fPed.At(i);       }
-  Float_t GetPedErr    ( const Int_t i=0 )  const { return fPedErr.At(i);    }
-  Float_t GetPedRms    ( const Int_t i=0 )  const { return fPedRms.At(i);    }
-  Float_t GetPedRmsErr ( const Int_t i=0 )  const { return fPedRmsErr.At(i); }
+  Float_t GetPed             ( const Int_t i=0 )  const { return fPed.At(i)              ; }
+  Float_t GetPedErr          ( const Int_t i=0 )  const { return fPedErr.At(i)           ; }
+  Float_t GetPedRms          ( const Int_t i=0 )  const { return fPedRms.At(i)           ; }
+  Float_t GetPedRmsErr       ( const Int_t i=0 )  const { return fPedRmsErr.At(i)        ; }
 
-  Bool_t  IsValid      ( const Int_t i=0 )  const;   
+  Bool_t  IsExtractionType   ( const MExtractBlindPixel::ExtractionType_t typ );
+  Bool_t  IsValid            ( const Int_t i=0 )  const;   
 
   // Setter
-  void SetUsedFADCSlices( const Byte_t first, const Byte_t num);
-  void SetNumFADCSamples( const Byte_t num )    { fNumFADCSamples  = num;     }    
+  void SetExtractionType( const Byte_t b=0 )            { fExtractionType  = b           ; }
+  void SetNumFADCSamples( const Byte_t num )            { fNumFADCSamples  = num         ; }    
+  void SetUsedFADCSlices( const Byte_t first, const Byte_t num );
 
   void SetBlindPixelIdx  ( const Int_t i,   const Int_t nr=0)      {
@@ -87,5 +93,5 @@
     fPedRmsErr.AddAt(f,nr); }
 
-  ClassDef(MExtractedSignalBlindPixel, 2)	// Storage Container for extracted signal of Blind Pixel
+  ClassDef(MExtractedSignalBlindPixel, 3)	// Storage Container for extracted signal of Blind Pixel
 };
 
