Index: trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.cc
===================================================================
--- trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.cc	(revision 4918)
+++ trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.cc	(revision 4919)
@@ -317,38 +317,44 @@
 //
 // Interprete the IPR section of the report
-//
+//   sep-04
+//   The IPR are saved as 340 (=number of pixs in trigger area) hex numbers 
+//   and as 397 (= #pixs in inner region) dec numbers.
+//   Only the dec numbers are now saved in the MTriggerIPR container.
+//  
+
 Bool_t MReportTrigger::InterpreteIPR(TString &str)
 {
 
-    // Read Individual pixel rates
-    const char *pos = str.Data();
-    const char *end = str.Data() + 340*8;
- 
-    Int_t i=0,n,len;
-    short dummy;
-    while (pos < end)
-    {
-        const Char_t hex[9] = { pos[0], pos[1], pos[2], pos[3],pos[4],pos[5],pos[6],pos[7],0 };
-        n = sscanf(hex, "%hx", &dummy);
-	pos+=8;
-        if (n!=1)
+  Int_t gsNhexIPR=340; //number of IPR saved in hex format
+  Int_t gsNdecIPR=397; //number of IPR saved in dec format
+  
+  // Read Individual pixel rates in hex format
+  const char *pos = str.Data();
+  const char *end = str.Data() + gsNhexIPR*8;
+  
+  Int_t i=0,n,len;
+  short dummy;
+  while (pos < end)
+    {
+      const Char_t hex[9] = { pos[0], pos[1], pos[2], pos[3],pos[4],pos[5],pos[6],pos[7],0 };
+      n = sscanf(hex, "%hx", &dummy);
+      pos+=8;
+      if (n!=1)
         {
-            *fLog << warn << "WARNING - Rate #" << i << " missing." << endl;
-            return kFALSE;
+	  *fLog << warn << "WARNING - Rate #" << i << " missing." << endl;
+	  return kFALSE;
         }
-	*fLog << warn << " " << hex ;
-    }
-    *fLog <<endl;
-
-
-    str.Remove(0, end-str.Data()); // Remove IPR hex  from report string
-    str.Strip(TString::kBoth);
-
+    }
     
-    *fLog << warn << "string: " << str << " ==== " <<str.Data() << endl;
-
-  for (i=0;i<397;i++)
-    {
-      n = sscanf(str.Data(), " %ld %n", &fIPR->fIPR[i++], &len);
+  str.Remove(0, end-str.Data()); // Remove IPR hex  from report string
+  str.Strip(TString::kBoth);
+  
+  // ------  
+  // Read Individual pixel rates in dec format 
+  // and save them in the MTriggerIPR container
+  
+  for (i=0;i<gsNdecIPR;i++)
+    {
+      n = sscanf(str.Data(), " %ld %n", &fIPR->fIPR[i], &len);
       if (n!=1)
 	{
@@ -356,13 +362,9 @@
 	  return kCONTINUE;
 	}
-      str.Remove(0, len); // Remove IPR dec from report string
-
-      *fLog << warn<< " - " << dummy ;
-    }
-
+      str.Remove(0, len); // Remove IPR dec from report string      
+    }
+  
   str=str.Strip(TString::kLeading);  
-    
-
-  *fLog << warn << "IPR ok!" <<endl;
+
   return kTRUE;
 }
