Index: trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.cc
===================================================================
--- trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.cc	(revision 4187)
+++ trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.cc	(revision 4195)
@@ -97,13 +97,10 @@
 Bool_t MReportTrigger::InterpreteCell(TString &str)
 {
-  Int_t len, n, i=0;
+  Int_t len=0, n, i=0;
   Int_t gsNCells=32;
 
-  const char *pos = str.Data();
-  const char *end = str.Data() + gsNCells;
-
-  while (pos < end)
-    {
-      n = sscanf(pos, " %f %n", &fCell->fCellRate[i++], &len);
+  for (i=0;i<gsNCells;i++)
+    {
+      n = sscanf(str.Data(), " %f %n", &fCell->fCellRate[i], &len);
       if (n!=1)
 	{
@@ -111,7 +108,88 @@
 	  return kCONTINUE;
 	}
+      str.Remove(0, len); // Remove cell rates from report string
+    }
+
+  str=str.Strip(TString::kLeading);  
+
+      *fLog << warn << "Cell ok!" <<endl;
+  return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Interprete the Prescaling factors part of the report
+//
+Bool_t MReportTrigger::InterpretePrescFact(TString &str)
+{
+  Int_t len=0, n, i=0;
+  Int_t gsNPrescFacts=8;
+  
+      *fLog << warn << "Presca"<<endl;
+  for (i=0;i<gsNPrescFacts;i++)
+    {
+    const Int_t ws = str.First(' ');
+    *fLog << str << endl;
+
+    if (ws<=0)
+       {
+        *fLog << warn << "WARNING - Cannot determine name of L1 trigger table." << endl;
+        return kCONTINUE;
+       }
+    
+    TString L1tablename = str(0, ws);
+    *fLog << "Presc " <<L1tablename <<endl;
+    str.Remove(0, ws);
+      
+      n = sscanf(str.Data(), " %li %n", &fPrescFactor->fPrescFact[i], &len);
+      if (n!=2)
+	{
+	  *fLog << warn << "WARNING - prescaler factor " << i << " missing." << endl;
+	  return kCONTINUE;
+	}
+      str.Remove(0, len); // Remove Prescal. factors from report string
+      *fLog << warn << fPrescFactor->fPrescFact[i]<<endl;
+    }
+  str=str.Strip(TString::kLeading);  
+  
+  *fLog << warn << "PrescFact ok!" <<endl;
+  return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Interprete the Scaler with Live-Deadtime part of the report
+//  Read 4x5 integers separated with a blank
+//
+Bool_t MReportTrigger::InterpreteLiveTime(TString &str)
+{
+  Int_t len, n, i=0;
+  Int_t gsNScalers=5;
+  Int_t D_LSB, D_MSB,L_LSB, L_MSB;
+
+  const char *pos = str.Data();
+  const char *end = str.Data() + gsNScalers;
+
+  while (pos < end)
+    {
+      i++;
+      n = sscanf(pos, " %d %d %d %d %n", &L_LSB, &L_MSB,&D_LSB, &D_MSB, &len);
+      if (n!=4)
+	{
+	  *fLog << warn << "WARNING - Live-Deadtime Scaler Value #" << i << " missing." << endl;
+	  return kCONTINUE;
+	}
       pos += len;
-    }
-
+
+      //convert to seconds and fill container
+      // (FIXME! only the MSB (seconds is now considered)
+      fLiveTime->fLiveTime[i] = L_MSB;
+      fLiveTime->fDeadTime[i] = D_MSB;      
+    }
+
+  str.Remove(0, end-str.Data()); // Remove Live-Deadtimes from report string
+  str=str.Strip(TString::kLeading);  
+
+  *fLog << warn << "LiveTime ok!" <<endl;
   return kTRUE;
 }
@@ -120,8 +198,107 @@
 //
 // Interprete the Bit rates part of the report
+// 20 integers. First and last two are not used
 //
 Bool_t MReportTrigger::InterpreteBit(TString &str)
 {
-
+  Int_t len, n, i=0;
+  Int_t gsNBits=20;
+  
+  const char *pos = str.Data();
+  const char *end = str.Data() + gsNBits;
+
+  while (pos < end)
+    {
+      n = sscanf(pos, " %f %n", &fBit->fBit[i++], &len);
+      if (n!=1)
+	{
+	  *fLog << warn << "WARNING - Bit rate #" << i << " missing." << endl;
+	  return kCONTINUE;
+	}
+      pos += len;
+    }
+
+  str.Remove(0, end-str.Data()); // Remove output bit rates from report string
+  str=str.Strip(TString::kLeading);  
+
+  *fLog << warn << "Bit ok!" <<endl;
+  return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Interprete the L1 and L2 table names
+// 1String + 1Int +1 String
+//
+Bool_t MReportTrigger::InterpreteL1L2Table(TString &str)
+{
+    const Int_t wsL1 = str.First(' ');
+ 
+    if (wsL1<=0)
+       {
+        *fLog << warn << "WARNING - Cannot determine name of L1 trigger table." << endl;
+        return kCONTINUE;
+       }
+    
+    TString L1tablename = str(0, wsL1);
+    *fLog << "L1: " <<L1tablename <<endl;
+    str.Remove(0, wsL1);
+
+    // remove an integer between names
+    Int_t len;
+    Int_t mi;
+    Int_t n=sscanf(str.Data(), "%d %n", &mi, &len);
+    if (n!=1)
+      {
+        *fLog << warn << "WARNING - Not enough arguments." << endl;
+        return kCONTINUE;
+    }
+    str.Remove(0, len);
+
+    // L2 tablename
+    const Int_t wsL2 = str.First(' ');
+ 
+    if (wsL2<=0)
+      {
+        *fLog << warn << "WARNING - Cannot determine name of L2 trigger table." << endl;
+        return kCONTINUE;
+      }    
+    TString L2tablename = str(0, wsL2);
+    *fLog << "L2: " <<L2tablename <<endl;
+    str.Remove(0,wsL2);
+    str.Strip(TString::kBoth);
+    
+    return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Interprete a part of the report without meaning by this time
+// 18 integers
+//
+Bool_t MReportTrigger::InterpreteDummy(TString &str)
+{
+  Int_t len, n, i=0;
+  Int_t gsNDummies=18;
+  Int_t dummy;  
+
+  const char *pos = str.Data();
+  const char *end = str.Data() + gsNDummies;
+
+  while (pos < end)
+    {
+      n = sscanf(pos, " %d %n", &dummy, &len);
+      if (n!=1)
+	{
+	  *fLog << warn << "WARNING - Dummy #" << i << " missing." << endl;
+	  return kCONTINUE;
+	}
+      pos += len;
+    }
+
+  str.Remove(0, end-str.Data()); // Remove dummies from report string
+  str=str.Strip(TString::kLeading);  
+
+  *fLog << warn << "Dummy ok!" <<endl;
   return kTRUE;
 }
@@ -134,16 +311,9 @@
 {
 
-  return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-// Interprete the Prescaling factors part of the report
-//
-Bool_t MReportTrigger::InterpretePrescFact(TString &str)
-{
-
-  return kTRUE;
-}
+
+  *fLog << warn << "IPR ok!" <<endl;
+  return kTRUE;
+}
+
 
 // --------------------------------------------------------------------------
@@ -172,16 +342,7 @@
       return kCONTINUE;
 
-
-    /*
-    const char *pos = str.Data();
-
-    const Char_t pro[4] = {pos[0],pos[1],pos[2],pos[3]};
-    *fLog << warn << pro[0] <<" " <<pro[1] <<" " <<pro[2] <<" " <<pro[3]<<endl;
-    
-    Int_t len, n;
-    Float_t dummy;
-    */
-
     // Read L1 and L2 table name (2 fields)
+    if (!InterpreteL1L2Table(str))
+      return kCONTINUE;    
 
     // Read prescaling factors  (2x8 fields)
@@ -190,4 +351,6 @@
     
     // Read livetime and deadtime (5x4 fields)
+    if (!InterpreteLiveTime(str))
+      return kCONTINUE;
 
     // Read L2 outout bit rates
@@ -196,9 +359,20 @@
 
     // Read global rates (before and after prescaling)
+    Int_t len, n;
+    n = sscanf(str.Data(), " %f %f %n", &fL2BeforePrescaler, &fL2AfterPrescaler, &len);
+    if (n!=2)
+    {
+         *fLog << warn << "WARNING - Couldn't read Trigger rates." << endl;
+        return kFALSE;
+    }
+    str.Remove(0,len);
+    str.Strip(TString::kBoth);
 
     // Read 18 dummy fields
+    if (!InterpreteDummy(str))
+      return kCONTINUE;
 
     // Read IPR
-    if (!InterpreteBit(str))
+    if (!InterpreteIPR(str))
       return kCONTINUE;
 
@@ -226,6 +400,6 @@
     // Read Individual pixel rates
     pos = str.Data();
-    end = str.Data() + 344;
-
+     end = str.Data() + 344;
+ 
     Int_t i=0;
     while (pos < end)
@@ -243,5 +417,4 @@
 			   */
 
-    Int_t len=1;
     str.Remove(0,len);
     str.Strip(TString::kBoth);
Index: trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.h
===================================================================
--- trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.h	(revision 4187)
+++ trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.h	(revision 4195)
@@ -37,4 +37,7 @@
   Bool_t InterpreteBit(TString &str);
   Bool_t InterpretePrescFact(TString &str);
+  Bool_t InterpreteLiveTime(TString &str);
+  Bool_t InterpreteDummy(TString &str);
+  Bool_t InterpreteL1L2Table(TString &str);
 
   Int_t InterpreteBody(TString &str);
Index: trunk/MagicSoft/Mars/mtemp/mpisa/classes/mtrigger/MTriggerBit.h
===================================================================
--- trunk/MagicSoft/Mars/mtemp/mpisa/classes/mtrigger/MTriggerBit.h	(revision 4187)
+++ trunk/MagicSoft/Mars/mtemp/mpisa/classes/mtrigger/MTriggerBit.h	(revision 4195)
@@ -9,6 +9,6 @@
 #endif 
 
-#ifndef ROOT_TArrayL
-#include <TArrayL.h>
+#ifndef ROOT_TArrayF
+#include <TArrayF.h>
 #endif
 
@@ -20,7 +20,7 @@
     Byte_t  fStatus;        // Monitor of the L2T status
     
-    static const Int_t gsNBits=16;        // number of output bits
+    static const Int_t gsNBits=20;        // number of output bits
 
-    TArrayL fBit; // Array with the prescaling factors
+    TArrayF fBit; // Array with the output bit rates
 
 public:
