Index: /trunk/MagicSoft/Mars/msignal/MExtractTime.cc
===================================================================
--- /trunk/MagicSoft/Mars/msignal/MExtractTime.cc	(revision 8357)
+++ /trunk/MagicSoft/Mars/msignal/MExtractTime.cc	(revision 8358)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MExtractTime.cc,v 1.23 2007-02-04 15:30:16 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MExtractTime.cc,v 1.24 2007-03-03 22:48:30 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -135,4 +135,5 @@
 {
     MExtractor::Print(o);
-    *fLog << " Offset Lo-Gain:     " << fOffsetLoGain << endl;
+    if (HasLoGain())
+        *fLog << " Offset Lo-Gain:     " << fOffsetLoGain << endl;
 }
Index: /trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc
===================================================================
--- /trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc	(revision 8357)
+++ /trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc	(revision 8358)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.62 2007-02-03 20:05:35 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.63 2007-03-03 22:46:10 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -84,6 +84,6 @@
 #include "MParList.h"
 
+#include "MRawRunHeader.h"
 #include "MRawEvtPixelIter.h"
-#include "MRawRunHeader.h"
 
 #include "MArrivalTimeCam.h"
@@ -168,4 +168,11 @@
         fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast, fNumHiGainSamples,
                                     fLoGainFirst, fLoGainLast, fNumLoGainSamples);
+
+    if (!HasLoGain())
+    {
+        *fLog << inf << "No lo-gains... resetting lo-gain switch." << endl;
+        fLoGainSwitch=0xff;
+    }
+
     return kTRUE;
 }
@@ -206,6 +213,8 @@
 Int_t MExtractTimeAndCharge::Process()
 {
+    const Int_t numh = fRunHeader->GetNumSamplesHiGain();
+    const Int_t numl = fRunHeader->GetNumSamplesLoGain();
+
     MRawEvtPixelIter pixel(fRawEvt);
-
     while (pixel.Next())
     {
@@ -213,6 +222,4 @@
 
         const Float_t *sig = fSignal->GetSamples(pixidx);
-
-        const Int_t numh = pixel.GetNumHiGainSamples();
 
         Int_t sathi0 = fHiGainFirst;  // First slice to extract and first saturating slice
@@ -286,5 +293,5 @@
 
         // FIXME: What to do with the pixel if it saturates too early???
-        if (pixel.HasLoGain() && maxcont>fLoGainSwitch)
+        if (numl>0 && maxcont>fLoGainSwitch)
         {
             Int_t first = numh+fLoGainFirst;
@@ -424,6 +431,9 @@
     MExtractTime::Print(o);
 
-    *fLog << dec;
-    *fLog << " LoGainStartShift:   " << fLoGainStartShift << endl;
-    *fLog << " LoGainSwitch:       " << (Int_t)fLoGainSwitch << endl;
-}
+    if (HasLoGain())
+    {
+        *fLog << dec;
+        *fLog << " LoGainStartShift:   " << fLoGainStartShift << endl;
+        *fLog << " LoGainSwitch:       " << (Int_t)fLoGainSwitch << endl;
+    }
+}
Index: /trunk/MagicSoft/Mars/msignal/MExtractor.cc
===================================================================
--- /trunk/MagicSoft/Mars/msignal/MExtractor.cc	(revision 8357)
+++ /trunk/MagicSoft/Mars/msignal/MExtractor.cc	(revision 8358)
@@ -251,4 +251,12 @@
         *fLog << err << "ERROR - Last lo-gain slice must not exceed " << num-1 << endl;
         return kFALSE;
+    }
+
+    if (numl==0)
+    {
+        *fLog << inf << "No lo-gains... resetting lo-gain range and saturation limit." << endl;
+        fLoGainFirst=0;
+        fLoGainLast =0;
+        fSaturationLimit=0xff;
     }
 
@@ -455,8 +463,10 @@
 
     *fLog << " Hi Gain Range:      " << Form("%2d %2d", fHiGainFirst, fHiGainLast) << endl;
-    *fLog << " Lo Gain Range:      " << Form("%2d %2d", fLoGainFirst, fLoGainLast) << endl;
-//    *fLog << " Gain Overlap to Lo: " << Form("%2d", fHiLoLast)        << endl;
-    *fLog << " Saturation Lim:     " << Form("%3d", fSaturationLimit) << endl;
-    *fLog << " Num Samples Hi/Lo:  " << Form("%2.1f %2.1f", fNumHiGainSamples, fNumLoGainSamples) << endl;
+    if (HasLoGain())
+    {
+        *fLog << " Lo Gain Range:      " << Form("%2d %2d", fLoGainFirst, fLoGainLast) << endl;
+        *fLog << " Saturation Lim:     " << Form("%3d", fSaturationLimit) << endl;
+        *fLog << " Num Samples Hi/Lo:  " << Form("%2.1f %2.1f", fNumHiGainSamples, fNumLoGainSamples) << endl;
+    }
     if (fPedestals)
         *fLog << " Pedestals:          " << fPedestals->GetName() << ", " << fPedestals << endl;
Index: /trunk/MagicSoft/Mars/msignal/MExtractor.h
===================================================================
--- /trunk/MagicSoft/Mars/msignal/MExtractor.h	(revision 8357)
+++ /trunk/MagicSoft/Mars/msignal/MExtractor.h	(revision 8358)
@@ -96,4 +96,5 @@
   Byte_t  GetSaturationLimit() const { return fSaturationLimit; }
 
+  Bool_t  HasLoGain() const { return fLoGainFirst>0 || fLoGainLast>0; }
   Bool_t  IsNoiseCalculation () const { return fNoiseCalculation; }
 
