Index: trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 2230)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 2236)
@@ -224,11 +224,12 @@
 
     TString str(opt);
+    str.ToLower();
 
     UInt_t id = 0;
 
-    if (str.BeginsWith("GRAPH", TString::kIgnoreCase))
+    if (str.BeginsWith("graph"))
         if (str.Length()>5)
             sscanf(&str[5], "%d", &id);
-    if (str.BeginsWith("HIST", TString::kIgnoreCase))
+    if (str.BeginsWith("hist"))
         if (str.Length()>4)
             sscanf(&str[4], "%d", &id);
@@ -250,7 +251,7 @@
     name += pix.GetPixelId();
 
-    Bool_t same = str.Contains("same", TString::kIgnoreCase);
-
-    if (str.BeginsWith("GRAPH", TString::kIgnoreCase))
+    Bool_t same = str.Contains("same");
+
+    if (str.BeginsWith("graph"))
     {
         *fLog << inf << "Drawing Graph: Pixel Idx #" << pix.GetPixelId();
@@ -276,5 +277,5 @@
     }
 
-    if (str.BeginsWith("HIST", TString::kIgnoreCase))
+    if (str.BeginsWith("hist"))
     {
         // FIXME: Add Legend
Index: trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc	(revision 2230)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc	(revision 2236)
@@ -228,4 +228,23 @@
 // --------------------------------------------------------------------------
 //
+// Returns the index of the FADC slice the maximum signal in
+//
+Byte_t MRawEvtPixelIter::GetNumMaxLoGainSample() const
+{
+    Byte_t max  = 0;
+    Byte_t maxi = 0;
+
+    for (int i=0; i<fNumLoGainSamples; i++)
+        if (fLoGainPos[i]>max)
+        {
+            max = fLoGainPos[i];
+            maxi = i;
+        }
+
+    return maxi;
+}
+
+// --------------------------------------------------------------------------
+//
 // returns the sum of all lo gain fadc samples of the actual pixel.
 // if no lo gain information is available 0 is returned.
Index: trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.h
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.h	(revision 2230)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.h	(revision 2236)
@@ -82,4 +82,5 @@
 
     Byte_t GetNumMaxHiGainSample() const;
+    Byte_t GetNumMaxLoGainSample() const;
 
     Bool_t HasLoGain() const
