Index: trunk/MagicSoft/Mars/mtrigger/MTriggerBit.cc
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MTriggerBit.cc	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/MTriggerBit.cc	(revision 4264)
@@ -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/mtrigger/MTriggerBit.h
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MTriggerBit.h	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/MTriggerBit.h	(revision 4264)
@@ -0,0 +1,57 @@
+#ifndef MARS_MTriggerBit
+#define MARS_MTriggerBit
+
+#ifndef MARS_MCamEvent
+#include "MCamEvent.h"
+#endif
+#ifndef MARS_MParContainer
+#include "MParContainer.h"
+#endif 
+
+#ifndef ROOT_TArrayF
+#include <TArrayF.h>
+#endif
+
+class MTriggerBit : public MParContainer, public MCamEvent
+{
+    friend class MReportTrigger;
+
+private:
+    
+    static const Int_t gsNBits=20;        // number of output bits
+
+    TArrayF fBit; // Array with the output bit rates
+
+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 Int_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/mtrigger/MTriggerCell.cc
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MTriggerCell.cc	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/MTriggerCell.cc	(revision 4264)
@@ -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/mtrigger/MTriggerCell.h
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MTriggerCell.h	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/MTriggerCell.h	(revision 4264)
@@ -0,0 +1,57 @@
+#ifndef MARS_MTriggerCell
+#define MARS_MTriggerCell
+
+#ifndef MARS_MCamEvent
+#include "MCamEvent.h"
+#endif
+#ifndef MARS_MParContainer
+#include "MParContainer.h"
+#endif 
+
+#ifndef ROOT_TArrayF
+#include <TArrayF.h>
+#endif
+
+class MTriggerCell : public MParContainer, public MCamEvent
+{
+    friend class MReportTrigger;
+private:
+    static const Int_t gsNCells=32; //Number of fields with cell rates
+                                    // 19 cells and 12 dummy 
+
+    TArrayF 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 Int_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/mtrigger/MTriggerIPR.cc
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MTriggerIPR.cc	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/MTriggerIPR.cc	(revision 4264)
@@ -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
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// MTriggerIPR
+//   This class stores the information about the Individual Pixel Rates
+//   
+//
+/////////////////////////////////////////////////////////////////////////////
+#include "MTriggerIPR.h"
+
+ClassImp(MTriggerIPR);
+
+using namespace std;
Index: trunk/MagicSoft/Mars/mtrigger/MTriggerIPR.h
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MTriggerIPR.h	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/MTriggerIPR.h	(revision 4264)
@@ -0,0 +1,56 @@
+#ifndef MARS_MTriggerIPR
+#define MARS_MTriggerIPR
+
+#ifndef MARS_MCamEvent
+#include "MCamEvent.h"
+#endif
+#ifndef MARS_MParContainer
+#include "MParContainer.h"
+#endif 
+
+#ifndef ROOT_TArrayL
+#include <TArrayL.h>
+#endif
+
+class MTriggerIPR : public MParContainer, public MCamEvent
+{
+    friend class MReportTrigger;
+private:
+    TArrayL fIPR;            // [Hz] IPR (Individual Pixel Rates)
+    
+    static const Int_t gsNTrigPix=397;  // number of trigger pixels
+
+public:
+    MTriggerIPR() : fIPR(gsNTrigPix)
+    {
+        fName  = "MTriggerIPR";
+        fTitle = "Container for the Individual Pixel Rate (IPR)";
+    }
+
+    Float_t GetMean() const { return fIPR.GetSum()/fIPR.GetSize(); }
+
+    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
+    {
+      if (idx > gsNTrigPix)
+	return kFALSE;
+
+      val = fIPR[idx];
+      return val>0;
+    }
+
+    Double_t operator[](const Int_t idx) 
+      {
+	if (idx > gsNTrigPix)
+	  return kFALSE;
+
+	return fIPR[idx]; 
+      } 
+
+    void DrawPixelContent(Int_t num) const
+    {
+    }
+
+    ClassDef(MTriggerIPR, 1) // Container for the Individual Pixel Rate (IPR)
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mtrigger/MTriggerLiveTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MTriggerLiveTime.cc	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/MTriggerLiveTime.cc	(revision 4264)
@@ -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/mtrigger/MTriggerLiveTime.h
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MTriggerLiveTime.h	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/MTriggerLiveTime.h	(revision 4264)
@@ -0,0 +1,57 @@
+#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:
+    static const Int_t gsNScalers=5;        // number of scalers
+
+    TArrayL fLiveTime; // Array with the livetime
+    TArrayL fDeadTime; // Array with the deadtime
+
+public:
+    MTriggerLiveTime() : fLiveTime(gsNScalers), fDeadTime(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 Int_t idx) 
+      {  	
+	if (idx > gsNScalers)
+	  return -1;
+	
+	return fLiveTime[idx]; 
+      }
+
+    void DrawPixelContent(Int_t num) const
+    {
+    }
+
+    ClassDef(MTriggerLiveTime, 1) // Container for the Live-Deadtime
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mtrigger/MTriggerPrescFact.cc
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MTriggerPrescFact.cc	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/MTriggerPrescFact.cc	(revision 4264)
@@ -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/mtrigger/MTriggerPrescFact.h
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/MTriggerPrescFact.h	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/MTriggerPrescFact.h	(revision 4264)
@@ -0,0 +1,57 @@
+#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:
+    
+    static const 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 Int_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
Index: trunk/MagicSoft/Mars/mtrigger/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/Makefile	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/Makefile	(revision 4264)
@@ -0,0 +1,35 @@
+##################################################################
+#
+#   makefile
+# 
+#   for the MARS software
+#
+##################################################################
+include ../Makefile.conf.$(OSTYPE)
+include ../Makefile.conf.general
+
+#------------------------------------------------------------------------------
+
+#
+# Handling name of the Root Dictionary Files
+#
+CINT  = Trigger
+
+#
+#  connect the include files defined in the config.mk file
+#
+INCLUDES = -I. -I../mbase -I../mgui
+
+SRCFILES = MTriggerIPR.cc \
+	   MTriggerCell.cc\
+	   MTriggerBit.cc\
+	   MTriggerPrescFact.cc\
+	   MTriggerLiveTime.cc
+
+############################################################
+
+all: $(OBJS)
+
+include ../Makefile.rules
+
+mrproper:	clean rmbak
Index: trunk/MagicSoft/Mars/mtrigger/TriggerIncl.h
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/TriggerIncl.h	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/TriggerIncl.h	(revision 4264)
@@ -0,0 +1,3 @@
+#ifndef __CINT__
+
+#endif // __CINT__
Index: trunk/MagicSoft/Mars/mtrigger/TriggerLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mtrigger/TriggerLinkDef.h	(revision 4264)
+++ trunk/MagicSoft/Mars/mtrigger/TriggerLinkDef.h	(revision 4264)
@@ -0,0 +1,13 @@
+#ifdef __CINT__
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#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
