Index: /trunk/MagicSoft/Mars/mtemp/mpisa/Changelog_pisa
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/Changelog_pisa	(revision 4156)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/Changelog_pisa	(revision 4157)
@@ -18,4 +18,21 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2004/05/24: Antonio Stamerra
+
+   * mpisa/classes/MTriggerCell.[h.cc]
+     - added new class container for the cell rates from report files (.rep)
+
+   * mpisa/classes/MTriggerBit.[h.cc]
+     - added new class container for the L2 bits rates from report files (.rep)
+
+   * mpisa/classes/MTriggerPrescFact.[h.cc]
+     - added new class container for the prescaling factors from 
+	report files (.rep)
+
+   * mpisa/classes/MTriggerReport.[h.cc]
+     - added copy of the mreport/MReportTrigger class to modify to new
+	report file format and to use the trigger class containers
+
+
  2004/05/21: Antonio Stamerra
 
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/Makefile
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/Makefile	(revision 4156)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/Makefile	(revision 4157)
@@ -38,5 +38,9 @@
 
 SRCFILES = \
-        ./classes/MTriggerIPR.cc
+        ./classes/MTriggerIPR.cc \
+        ./classes/MTriggerCell.cc \
+        ./classes/MTriggerBit.cc \
+        ./classes/MTriggerPrescFact.cc \
+        ./classes/MTriggerLiveTime.cc
 
 ############################################################
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/PisaLinkDef.h
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/PisaLinkDef.h	(revision 4156)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/PisaLinkDef.h	(revision 4157)
@@ -6,4 +6,8 @@
 
 #pragma link C++ class MTriggerIPR+;
+#pragma link C++ class MTriggerCell+;
+#pragma link C++ class MTriggerBit+;
+#pragma link C++ class MTriggerPrescFact+;
+#pragma link C++ class MTriggerLiveTime+;
 
 #endif
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.cc
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.cc	(revision 4157)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.cc	(revision 4157)
@@ -0,0 +1,221 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
+!              Antonio Stamerra, 05/2004 <mailto:antonio.stamerra@pi.infn.it>
+! 
+!   Copyright: MAGIC Software Development, 2000-2003
+!
+!
+\* ======================================================================== */
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//  MReportTrigger
+//
+// This is the class interpreting and storing the TRIGGER-REPORT information.
+//  Updated to add IPR; data format follows TDAS 00-07
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MReportTrigger.h"
+
+#include "MLogManip.h"
+#include "MTriggerIPR.h"
+
+ClassImp(MReportTrigger);
+
+using namespace std;
+
+// --------------------------------------------------------------------------
+//
+// Default construtor. Initialize identifier to "TRIGGER-REPORT"
+//
+MReportTrigger::MReportTrigger() : MReport("TRIGGER-REPORT"), fPrescalerRates(19)
+{
+    fName  = "MReportTrigger";
+    fTitle = "Class for TRIGGER-REPORT information";
+}
+
+// --------------------------------------------------------------------------
+//
+// FindCreate the following objects:
+//  - MTriggerIPR
+//  - MTriggerCell
+//  - MTriggerBit
+//  - MTriggerPrescFact
+//
+Bool_t MReportTrigger::SetupReading(MParList &plist)
+{
+  fPixel = (MTriggerIPR*)plist.FindCreateObj("MTriggerIPR");
+  if (!fPixel)
+    return kFALSE;
+
+  fCell = (MTriggerCell*)plist.FindCreateObj("MTriggerCell");
+  if (!fCell)
+    return kFALSE;
+
+  fBit = (MTriggerBit*)plist.FindCreateObj("MTriggerBit");
+  if (!fBit)
+    return kFALSE;
+
+  fPrescFactor = (MTriggerPrescFact*)plist.FindCreateObj("MTriggerPrescFact");
+  if (!fPrescFactor)
+    return kFALSE;
+  
+  return MReport::SetupReading(plist);
+}
+
+// --------------------------------------------------------------------------
+//
+// Interprete the Cell rates part of the report
+//
+Int_t MReportTrigger::InterpreteCell(TString &str)
+{
+
+  return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Interprete the Bit rates part of the report
+//
+Int_t MReportTrigger::InterpreteBit(TString &str)
+{
+
+  return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Interprete the IPR part of the report
+//
+Int_t MReportTrigger::InterpreteIPR(TString &str)
+{
+
+  return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Interprete the Prescaling factors part of the report
+//
+Int_t MReportTrigger::InterpretePrescFact(TString &str)
+{
+
+  return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// Interprete the body of the TRIGGER-REPORT string
+//  Read comments for details
+//
+Int_t MReportTrigger::InterpreteBody(TString &str)
+{
+    str = str.Strip(TString::kLeading);
+ 
+    // Extract trigger table name
+    const Int_t ws = str.First(' ');
+ 
+   if (ws<=0)
+    {
+        *fLog << warn << "WARNING - Cannot determine name of trigger table." << endl;
+        return kCONTINUE;
+    }
+
+    TString tablename = str(0, ws);
+    str.Remove(0, ws);
+
+    // Read the cell rates (32 fields)
+    if (!InterpreteCell(str))
+      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)
+
+    // Read prescaling factors  (2x8 fields)
+    if (!InterpretePrescFact(str))
+      return kCONTINUE;
+    
+    // Read livetime and deadtime (5x4 fields)
+
+    // Read L2 outout bit rates
+    if (!InterpreteBit(str))
+      return kCONTINUE;
+
+    // Read global rates (before and after prescaling)
+
+    // Read 18 dummy fields
+
+    // Read IPR
+    if (!InterpreteBit(str))
+      return kCONTINUE;
+
+    /*
+    for (int i=0; i < 19; i++)
+    {
+        n = sscanf(pos, " %f %n", &fPrescalerRates[i], &len);
+        if (n!=1)
+        {
+            *fLog << warn << "WARNING - Cell Scaler Value #" << i << " missing." << endl;
+            return kCONTINUE;
+        }
+        pos += len;
+    }
+    n = sscanf(pos, " %f %f %n", &fL2BeforePrescaler, &fL2AfterPrescaler, &len);
+    if (n!=2)
+    {
+        *fLog << warn << "WARNING - Couldn't read Trigger rates." << endl;
+        return kFALSE;
+    }
+    pos += len;
+    */
+			   /*
+
+    // Read Individual pixel rates
+    pos = str.Data();
+    end = str.Data() + 344;
+
+    Int_t i=0;
+    while (pos < end)
+    {
+        const Char_t hex[4] = { pos[0], pos[1], pos[2], 0 };
+        n = sscanf(hex, "%hx", &fRates->fRates[i++]);
+	pos++;
+        if (n!=1)
+        {
+            *fLog << warn << "WARNING - Rate #" << i << " missing." << endl;
+            return kFALSE;
+        }
+    }
+
+			   */
+    str.Remove(0, pos-str.Data());
+    str.Strip(TString::kBoth);
+
+    return str==(TString)"OVER" ? kTRUE : kCONTINUE;
+}
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.h
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.h	(revision 4157)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.h	(revision 4157)
@@ -0,0 +1,51 @@
+#ifndef MARS_MReportTrigger
+#define MARS_MReportTrigger
+
+#ifndef MARS_MReport
+#include "MReport.h"
+#endif
+
+#ifndef ROOT_TArrayL
+#include <TArrayL.h>
+#endif
+
+class MTriggerIPR;
+class MTriggerCell;
+class MTriggerBit;
+
+class MReportTrigger : public MReport
+{
+private:
+  Byte_t fStatus;    // Trigger status
+  
+  Float_t fL2BeforePrescaler; // L2 trigger rate before prescaler
+  Float_t fL2AfterPrescaler;  // L2 trigger rate after prescaler
+  
+  MTriggerBit *fBit;        // container of the L2 prescaler rates
+  MTriggerIPR *fPixel;      // container of the IPR
+  //TArrayF fRates;            //[Hz] IPR (Individual Pixel Rates)
+  MTriggerCell *fCell;      // container of the L1 cell trigger rates
+  MTriggerPrescFact *fPrescFactor;   //container of the L2 prescaling factors
+  
+  Bool_t SetupReading(MParList &plist);
+  Bool_t CheckVersion(TString &str) const;
+
+  Bool_t InterpreteIPR(TString &str);
+  Bool_t InterpreteCell(TString &str);
+  Bool_t InterpreteBit(TString &str);
+  Bool_t InterpretePrescFact(TString &str);
+
+  Int_t InterpreteBody(TString &str);
+  
+public:
+    MReportTrigger();
+
+    Byte_t GetStatus() const { return fStatus; }
+
+    Float_t GetL2BeforePrescaler() const { return fL2BeforePrescaler; }
+    Float_t GetL2AfterPrescaler() const { return fL2AfterPrescaler; }
+
+    ClassDef(MReportTrigger, 1) // Class for TRIGGER-REPORT information
+ };
+
+#endif
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerBit.cc
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerBit.cc	(revision 4157)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerBit.cc	(revision 4157)
@@ -0,0 +1,37 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
+!              Antonio Stamerra, 05/2004 <mailto:antonio.stamerra@pi.infn.it> 
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// MTriggerBit
+//   This class stores the information about the L2 output Bit rates
+//   
+//
+/////////////////////////////////////////////////////////////////////////////
+#include "MTriggerBit.h"
+
+ClassImp(MTriggerBit);
+
+using namespace std;
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerBit.h
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerBit.h	(revision 4157)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerBit.h	(revision 4157)
@@ -0,0 +1,58 @@
+#ifndef MARS_MTriggerBit
+#define MARS_MTriggerBit
+
+#ifndef MARS_MCamEvent
+#include "MCamEvent.h"
+#endif
+#ifndef MARS_MParContainer
+#include "MParContainer.h"
+#endif 
+
+#ifndef ROOT_TArrayL
+#include <TArrayL.h>
+#endif
+
+class MTriggerBit : public MParContainer, public MCamEvent
+{
+    friend class MReportTrigger;
+
+private:
+    Byte_t  fStatus;        // Monitor of the L2T status
+    
+    Int_t gsNBits=16;        // number of output bits
+
+    TArrayL fBit; // Array with the prescaling factors
+
+public:
+    MTriggerBit() : fBit(gsNBits)  
+    {
+        fName  = "MTriggerBit";
+        fTitle = "Container for the L2 output bits rates ";
+    }
+
+    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
+    {
+      if (idx > gsNBits)
+	return kFALSE;
+
+      val = fBit[idx];	
+
+      return val>0;
+    }
+
+    Double_t operator[](const UInt_t idx) 
+      {  
+	if (idx > gsNBits)
+	  return kFALSE;
+	
+	return fBit[idx]; 
+      }
+
+    void DrawPixelContent(Int_t num) const
+    {
+    }
+
+    ClassDef(MTriggerBit, 1) // Container for the L2 output bits rates
+};
+
+#endif
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerCell.cc
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerCell.cc	(revision 4157)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerCell.cc	(revision 4157)
@@ -0,0 +1,37 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
+!              Antonio Stamerra, 05/2004 <mailto:antonio.stamerra@pi.infn.it> 
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// MTriggerCell
+//   This class stores the information about the Trigger Cell Rates
+//   
+//
+/////////////////////////////////////////////////////////////////////////////
+#include "MTriggerCell.h"
+
+ClassImp(MTriggerCell);
+
+using namespace std;
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerCell.h
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerCell.h	(revision 4157)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerCell.h	(revision 4157)
@@ -0,0 +1,58 @@
+#ifndef MARS_MTriggerCell
+#define MARS_MTriggerCell
+
+#ifndef MARS_MCamEvent
+#include "MCamEvent.h"
+#endif
+#ifndef MARS_MParContainer
+#include "MParContainer.h"
+#endif 
+
+#ifndef ROOT_TArrayL
+#include <TArrayL.h>
+#endif
+
+class MTriggerCell : public MParContainer, public MCamEvent
+{
+    friend class MReportTrigger;
+private:
+    Byte_t  fStatus;         // Monitor of the L2T status
+
+    Int_t gsNCells=19;       //Number of trigger cells
+
+    TArrayL fCellRate;       // Array of the measured L1 cell rates
+
+public:
+    MTriggerCell() : fCellRate(gsNCells)
+    {
+        fName  = "MTriggerCell";
+        fTitle = "Container for the measured cell rates";
+    }
+
+    Float_t GetMean() const { return fCellRate.GetSum()/fCellRate.GetSize(); }
+
+    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
+    {
+      if (idx > gsNCells)
+	return kFALSE;
+      
+      val = fCellRate[idx];
+        return val>0;
+    }
+
+    Double_t operator[](const UInt_t idx) 
+      { 
+	if (idx > gsNCells)
+	  return kFALSE;
+	
+	return fCellRate[idx]; 
+      }
+
+    void DrawPixelContent(Int_t num) const
+    {
+    }
+
+    ClassDef(MTriggerCell, 1) // Container for the trigger cell rates
+};
+
+#endif
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerIPR.h
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerIPR.h	(revision 4156)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerIPR.h	(revision 4157)
@@ -15,12 +15,14 @@
 class MTriggerIPR : public MParContainer, public MCamEvent
 {
-    friend class MReportCamera;
+    friend class MReportTrigger;
 private:
     Byte_t  fStatus;        // Monitor of the L2T status
 
-    TArrayL fIPR;            // Array of the measured IPR
+    TArrayL fIPR;            // [Hz] IPR (Individual Pixel Rates)
+    
+    Int_t gsNTrigPix=397;  // number of trigger pixels
 
 public:
-    MTriggerIPR() : fIPR(397)
+    MTriggerIPR() : fIPR(gsNTrigPix)
     {
         fName  = "MTriggerIPR";
@@ -32,9 +34,18 @@
     Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
     {
-        val = fIPR[idx];
-        return val>0;
+      if (idx > gsNTrigPix)
+	return kFALSE;
+
+      val = fIPR[idx];
+      return val>0;
     }
 
-    Double_t operator[](const UInt_t idx) { return fIPR[idx]; }
+    Double_t operator[](const UInt_t idx) 
+      {
+	if (idx > gsNTrigPix)
+	  return kFALSE;
+
+	return fIPR[idx]; 
+      } 
 
     void DrawPixelContent(Int_t num) const
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerLiveTime.cc
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerLiveTime.cc	(revision 4157)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerLiveTime.cc	(revision 4157)
@@ -0,0 +1,37 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
+!              Antonio Stamerra, 05/2004 <mailto:antonio.stamerra@pi.infn.it> 
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// MTriggerLiveTime
+//   This class stores the information about the livetime and deadtime
+//   measured by the scalers 
+//
+/////////////////////////////////////////////////////////////////////////////
+#include "MTriggerLiveTime.h"
+
+ClassImp(MTriggerLiveTime);
+
+using namespace std;
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerLiveTime.h
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerLiveTime.h	(revision 4157)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerLiveTime.h	(revision 4157)
@@ -0,0 +1,58 @@
+#ifndef MARS_MTriggerLiveTime
+#define MARS_MTriggerLiveTime
+
+#ifndef MARS_MCamEvent
+#include "MCamEvent.h"
+#endif
+#ifndef MARS_MParContainer
+#include "MParContainer.h"
+#endif 
+
+#ifndef ROOT_TArrayL
+#include <TArrayL.h>
+#endif
+
+class MTriggerLiveTime : public MParContainer, public MCamEvent
+{
+    friend class MReportTrigger;
+
+private:
+    Byte_t  fStatus;        // Monitor of the L2T status
+    
+    Int_t gsNScalers=5;        // number of scalers
+
+    TArrayL fLiveTime; // Array with the livetime
+    TArrayL fDeadTime; // Array with the deadtime
+
+public:
+    MTriggerLiveTime() : fLiveTime(gsNScalers)  
+    {
+        fName  = "MTriggerLiveTime";
+        fTitle = "Container for the Live-deadtime      ";
+    }
+
+    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
+    {
+      if (idx > gsNScalers)
+	return kFALSE;
+
+      val = fLiveTime[idx];	
+
+      return val>0;
+    }
+
+    Double_t operator[](const UInt_t idx) 
+      {  
+	Double_t val=0;
+
+	return GetPixelContent(&val, idx)>0? val: -1; 
+      }
+
+    void DrawPixelContent(Int_t num) const
+    {
+    }
+
+    ClassDef(MTriggerLiveTime, 1) // Container for the Live-Deadtime
+};
+
+#endif
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerPrescFact.cc
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerPrescFact.cc	(revision 4157)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerPrescFact.cc	(revision 4157)
@@ -0,0 +1,37 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
+!              Antonio Stamerra, 05/2004 <mailto:antonio.stamerra@pi.infn.it> 
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// MTriggerPrescFact
+//   This class stores the information about the L2 prescaling factors
+//   
+//
+/////////////////////////////////////////////////////////////////////////////
+#include "MTriggerPrescFact.h"
+
+ClassImp(MTriggerPrescFact);
+
+using namespace std;
Index: /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerPrescFact.h
===================================================================
--- /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerPrescFact.h	(revision 4157)
+++ /trunk/MagicSoft/Mars/mtemp/mpisa/classes/MTriggerPrescFact.h	(revision 4157)
@@ -0,0 +1,58 @@
+#ifndef MARS_MTriggerPrescFact
+#define MARS_MTriggerPrescFact
+
+#ifndef MARS_MCamEvent
+#include "MCamEvent.h"
+#endif
+#ifndef MARS_MParContainer
+#include "MParContainer.h"
+#endif 
+
+#ifndef ROOT_TArrayL
+#include <TArrayL.h>
+#endif
+
+class MTriggerPrescFact : public MParContainer, public MCamEvent
+{
+    friend class MReportTrigger;
+
+private:
+    Byte_t  fStatus;        // Monitor of the L2T status
+    
+    Int_t gsNPrescFacts=8;        // number of factors
+
+    TArrayL fPrescFact; // Array with the prescaling factors
+
+public:
+    MTriggerPrescFact() : fPrescFact(gsNPrescFacts)  
+    {
+        fName  = "MTriggerPrescFact";
+        fTitle = "Container for the L2 Prescaling Factors      ";
+    }
+
+    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
+    {
+      if (idx > gsNPrescFacts)
+	return kFALSE;
+
+      val = fPrescFact[idx];	
+
+      return val>0;
+    }
+
+    Double_t operator[](const UInt_t idx) 
+      {  
+	if (idx > gsNPrescFacts)
+	  return kFALSE;
+	
+	return fPrescFact[idx]; 
+      }
+
+    void DrawPixelContent(Int_t num) const
+    {
+    }
+
+    ClassDef(MTriggerPrescFact, 1) // Container for the L2 Prescaling Factors
+};
+
+#endif
