Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3017)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3018)
@@ -5,4 +5,20 @@
                                                  -*-*- END OF LINE -*-*-
 
+ 2004/02/04: Thomas Bretz
+ 
+   * manalysis/MExtractSignal2.cc:
+     - don't allow odd numbers for the window size
+
+   * mfilter/MFilterList.cc:
+     - corrected a wrong logging message
+
+   * mmain/MBrowser.cc:
+     - added '/data/MAGIC' as shortcut in the combo box
+     
+   * mraw/MRawEvtPixelIter.cc:
+     - optimized calculation of MaxIdx
+
+
+
  2004/02/03: Abelardo Moralejo
 
@@ -10,11 +26,11 @@
     - removed unnecessary variables BinsHigh, BinsLow
 
+
+
  2004/02/03: Markus Gaug
 
-  * manalysis/MPedestalCam.[h,cc]
-  * manalysis/MPedestalPix.[h,cc]
-  * manalysis/MPedCalcPedRun.[h,cc]
-  * manalysis/MHPedestalPixel.[h,cc]
-  * macros/calibration.C
+  * manalysis/MPedestalCam.[h,cc], manalysis/MPedestalPix.[h,cc],
+    manalysis/MPedCalcPedRun.[h,cc], manalysis/MHPedestalPixel.[h,cc],
+    macros/calibration.C:
     - histograms are now filled with MFillH as proposed and coded by 
       Thomas Bretz. Some modifications had to be done, however. 
@@ -34,11 +50,10 @@
        remove MHPedestalPixel
 
-   * manalysis/MCalibrationPix.[h,cc]
-   * manalysis/MHCalibrationPixel.[h,cc]
-   * manalysis/MCalibrationCam.cc
-   * macros/calibration.C
+   * manalysis/MCalibrationPix.[h,cc], manalysis/MHCalibrationPixel.[h,cc],
+     manalysis/MCalibrationCam.cc, macros/calibration.C:
      - now split completely absolute and relative times. Absolute 
        times are not fitted, but their histogram mean and rms are 
        returned.
+
 
 
Index: trunk/MagicSoft/Mars/manalysis/MExtractSignal2.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MExtractSignal2.cc	(revision 3017)
+++ trunk/MagicSoft/Mars/manalysis/MExtractSignal2.cc	(revision 3018)
@@ -85,7 +85,11 @@
     fLoGainFirst = first;
 
-    fWindow = window;
-
+    fWindow     = window & ~1;
     fWindowSqrt = TMath::Sqrt((Float_t)fWindow);
+
+    if (fWindow==window)
+        return;
+
+    *fLog << warn << "MExtractSignal2::SetRange - Window size set to even " << fWindow << endl;
 }
 
Index: trunk/MagicSoft/Mars/mfilter/MFilterList.cc
===================================================================
--- trunk/MagicSoft/Mars/mfilter/MFilterList.cc	(revision 3017)
+++ trunk/MagicSoft/Mars/mfilter/MFilterList.cc	(revision 3018)
@@ -188,5 +188,5 @@
 
     if (fFilters.FindObject(name))
-        *fLog << warn << dbginf << "'" << name << "' exists in List already... skipped." << endl;
+        *fLog << warn << "MFilterList::AddToList - '" << name << "' exists in List already..." << endl;
 
     *fLog << inf << "Adding " << name << " to " << GetName() << "... " << flush;
Index: trunk/MagicSoft/Mars/mmain/MBrowser.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MBrowser.cc	(revision 3017)
+++ trunk/MagicSoft/Mars/mmain/MBrowser.cc	(revision 3018)
@@ -136,4 +136,13 @@
     frame->AddFrame(dir, laydir);
 
+    const TGPicture *pic0 = fList->GetPicture("magic_t.xpm");
+    TGTReeLBEntry *entry = new TGTreeLBEntry(dir->GetListBox()->GetContainer(),
+                                             new TGString("/data/MAGIC"), pic0, 6000,
+                                             new TGString("/data/MAGIC"));
+    TGLayoutHints *laylb = new TGLayoutHints(kLHintsLeft|kLHintsTop, 14, 0, 0, 0);
+    dir->AddEntry(entry, laylb);
+    fList->Add(laylb);
+    fList->Add(entry);
+
     //
     // Get the three picturs from the system (must be deleted by FreePicture)
Index: trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc	(revision 3017)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc	(revision 3018)
@@ -217,15 +217,12 @@
 Byte_t MRawEvtPixelIter::GetIdxMaxHiGainSample() const
 {
-    Byte_t max  = 0;
-    Byte_t maxi = 0;
-
-    for (int i=0; i<fNumHiGainSamples; i++)
-        if (fHiGainPos[i]>max)
-        {
-            max = fHiGainPos[i];
-            maxi = i;
-        }
-
-    return maxi;
+    Byte_t *ptr = fHiGainPos+1;
+    Byte_t *max = fHiGainPos;
+    const Byte_t *end = ptr + fNumHiGainSamples;
+
+    do if (*ptr>*max) max = ptr;
+    while (++ptr != end);
+
+    return max-fHiGainPos;
 }
 
@@ -241,15 +238,12 @@
         return -1; // means: not found
 
-    Byte_t max  = 0;
-    Byte_t maxi = 0;
-
-    for (int i=fNumLoGainSamples-1; i>=0; i--)
-        if (fLoGainPos[i]>max)
-        {
-            max = fLoGainPos[i];
-            maxi = i;
-        }
-
-    return maxi;
+    Byte_t *ptr = fLoGainPos+1;
+    Byte_t *max = fLoGainPos;
+    const Byte_t *end = ptr + fNumLoGainSamples;
+
+    do if (*ptr>*max) max = ptr;
+    while (++ptr != end);
+
+    return max-fLoGainPos;
 }
 
