Index: trunk/MagicSoft/Mars/mdatacheck/DataCheckLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/DataCheckLinkDef.h	(revision 667)
+++ trunk/MagicSoft/Mars/mdatacheck/DataCheckLinkDef.h	(revision 698)
@@ -5,7 +5,12 @@
 #pragma link off all functions;
 
+#pragma link C++ class MHFadcCam;
+#pragma link C++ class MHFadcPix;
+#pragma link C++ class MHHillas;
+
 #pragma link C++ class MShowSpect;
-#pragma link C++ class MHistosAdc;
-#pragma link C++ class MFillAdcSpect;
+
+#pragma link C++ class MFillHFadc;
+#pragma link C++ class MFillHHillas;
 
 #pragma link C++ class MDumpEvtHeader;
Index: trunk/MagicSoft/Mars/mdatacheck/MDumpEvtHeader.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MDumpEvtHeader.h	(revision 667)
+++ trunk/MagicSoft/Mars/mdatacheck/MDumpEvtHeader.h	(revision 698)
@@ -26,5 +26,5 @@
   Bool_t Process() ;
   
-  ClassDef(MDumpEvtHeader, 1)	// Class to dump the pixel ids of a raw evt to the screen
+  ClassDef(MDumpEvtHeader, 0)	// Class to dump the pixel ids of a raw evt to the screen
 
 };
Index: trunk/MagicSoft/Mars/mdatacheck/MFillAdcSpect.cc
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MFillAdcSpect.cc	(revision 667)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#include "MFillAdcSpect.h"
-
-#include "MLog.h"
-#include "MLogManip.h"
-#include "MParList.h"
-#include "MHistosAdc.h"
-#include "MRawEvtData.h"
-#include "MRawEvtPixelIter.h"
-
-ClassImp(MFillAdcSpect)
-
-    MFillAdcSpect::MFillAdcSpect (const char *name, const char *title) : fRawEvtData(NULL)
-{
-  *fName  = name  ? name  : "MFillAdcSpect";
-  *fTitle = title ? title : "Task to fill the adc spectra with  raw data";
-}
-
-Bool_t MFillAdcSpect::PreProcess (MParList *pList)
-{
-  // connect the raw data with this task
-  
-  fHistos = (MHistosAdc*)pList->FindCreateObj("MHistosAdc");
-  if (!fHistos)
-      return kFALSE;
-
-  fRawEvtData = (MRawEvtData*)pList->FindCreateObj("MRawEvtData");
-  if (!fRawEvtData)
-  {
-      *fLog << dbginf << " Error: MRawEvtData not found... exit." << endl;
-      return kFALSE ;
-  }
-
-  return kTRUE ; 
-
-} 
-
-Bool_t MFillAdcSpect::Process()
-{
-  //  loop over the pixels and fill the values in the histograms
-  
-  MRawEvtPixelIter pixel(fRawEvtData);
-
-  const Int_t nhisamples = fRawEvtData->GetNumHiGainSamples() ;
-  const Int_t nlosamples = fRawEvtData->GetNumLoGainSamples() ;
-
-  //  cout << "HighSamples " << iHighSamples ;
-
-  while ( pixel.Next() )
-    { 
-      for (Int_t i=0 ; i<nhisamples ; i++ )
-	{ 
-	  fHistos->FillAdcHistHi ( pixel.GetPixelId(),
-                                   pixel.GetHiGainFadcSamples()[i] );
-	}
-
-      for (Int_t i=0 ; i<nlosamples ; i++ )
-	{ 
-	  fHistos->FillAdcHistLo ( pixel.GetPixelId(),
-				   pixel.GetLoGainFadcSamples()[i] );
-	}
-    } 
-  
-  return kTRUE;
-  
-} 
Index: trunk/MagicSoft/Mars/mdatacheck/MFillAdcSpect.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MFillAdcSpect.h	(revision 667)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#ifndef MFILLADCSPECT_H
-#define MFILLADCSPECT_H
-
-#ifndef MAGIC_H
-#include "MAGIC.h"
-#endif
-
-#ifndef MTASK_H
-#include "MTask.h"
-#endif
-
-class MParList;
-class MHistosAdc;
-class MRawEvtData;
-
-class MFillAdcSpect : public MTask {
- private:
-  MRawEvtData      *fRawEvtData;
-
-  MHistosAdc       *fHistos ; 
-
- public:   
-  MFillAdcSpect (const char *name=NULL, const char *title=NULL); 
-
-  Bool_t PreProcess(MParList *pList);
-  Bool_t Process() ;
-  
-  ClassDef(MFillAdcSpect, 1)	// Task to fill a MHistosAdc Container with data
-
-};
-    
-#endif
-
Index: trunk/MagicSoft/Mars/mdatacheck/MFillHFadc.cc
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MFillHFadc.cc	(revision 698)
+++ trunk/MagicSoft/Mars/mdatacheck/MFillHFadc.cc	(revision 698)
@@ -0,0 +1,65 @@
+#include "MFillHFadc.h"
+
+#include "MLog.h"
+#include "MLogManip.h"
+#include "MParList.h"
+#include "MHFadcCam.h"
+#include "MRawEvtData.h"
+#include "MRawEvtPixelIter.h"
+
+ClassImp(MFillHFadc)
+
+    MFillHFadc::MFillHFadc (const char *name, const char *title) : fRawEvtData(NULL)
+{
+  *fName  = name  ? name  : "MFillHFadc";
+  *fTitle = title ? title : "Task to fill the adc spectra with  raw data";
+}
+
+Bool_t MFillHFadc::PreProcess (MParList *pList)
+{
+  // connect the raw data with this task
+  
+  fHistos = (MHFadcCam*)pList->FindCreateObj("MHFadcCam");
+  if (!fHistos)
+      return kFALSE;
+
+  fRawEvtData = (MRawEvtData*)pList->FindCreateObj("MRawEvtData");
+  if (!fRawEvtData)
+  {
+      *fLog << dbginf << " Error: MRawEvtData not found... exit." << endl;
+      return kFALSE ;
+  }
+
+  return kTRUE ; 
+
+} 
+
+Bool_t MFillHFadc::Process()
+{
+  //  loop over the pixels and fill the values in the histograms
+  
+  MRawEvtPixelIter pixel(fRawEvtData);
+
+  const Int_t nhisamples = fRawEvtData->GetNumHiGainSamples() ;
+  const Int_t nlosamples = fRawEvtData->GetNumLoGainSamples() ;
+
+  //  cout << "HighSamples " << iHighSamples ;
+
+  while ( pixel.Next() )
+    { 
+      for (Int_t i=0 ; i<nhisamples ; i++ )
+	{ 
+            fHistos->FillHi ( pixel.GetPixelId(),
+                              pixel.GetHiGainFadcSamples()[i] );
+	}
+
+      for (Int_t i=0 ; i<nlosamples ; i++ )
+	{ 
+            fHistos->FillLo ( pixel.GetPixelId(),
+                              pixel.GetLoGainFadcSamples()[i] );
+	}
+    } 
+  
+  return kTRUE;
+  
+} 
Index: trunk/MagicSoft/Mars/mdatacheck/MFillHFadc.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MFillHFadc.h	(revision 698)
+++ trunk/MagicSoft/Mars/mdatacheck/MFillHFadc.h	(revision 698)
@@ -0,0 +1,33 @@
+#ifndef MFILLHFADC_H
+#define MFILLHFADC_H
+
+#ifndef MAGIC_H
+#include "MAGIC.h"
+#endif
+
+#ifndef MTASK_H
+#include "MTask.h"
+#endif
+
+class MParList;
+class MHFadcCam;
+class MRawEvtData;
+
+class MFillHFadc : public MTask {
+ private:
+  MRawEvtData      *fRawEvtData;
+
+  MHFadcCam        *fHistos ;
+
+ public:   
+  MFillHFadc (const char *name=NULL, const char *title=NULL); 
+
+  Bool_t PreProcess(MParList *pList);
+  Bool_t Process() ;
+  
+  ClassDef(MFillHFadc, 0)	// Task to fill a MHistosAdc Container with data
+
+};
+    
+#endif
+
Index: trunk/MagicSoft/Mars/mdatacheck/MFillHHillas.cc
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MFillHHillas.cc	(revision 698)
+++ trunk/MagicSoft/Mars/mdatacheck/MFillHHillas.cc	(revision 698)
@@ -0,0 +1,37 @@
+#include "MFillHHillas.h"
+
+#include "MLog.h"
+#include "MLogManip.h"
+#include "MHHillas.h"
+#include "MParList.h"
+
+ClassImp(MFillHHillas)
+
+MFillHHillas::MFillHHillas (const char *name, const char *title)
+{
+    *fName  = name  ? name  : "MFillHHillas";
+    *fTitle = title ? title : "Task to fill Hillas histograms";
+}
+
+Bool_t MFillHHillas::PreProcess (MParList *pList)
+{
+    fEvt = (MHillas*)pList->FindObject("MHillas");
+    if (!fEvt)
+    {
+        *fLog << dbginf << "MHillas not found... aborting." << endl;
+        return kFALSE ;
+    }
+
+    fHistos = (MHHillas*)pList->FindCreateObj("MHHillas");
+    if (!fHistos)
+        return kFALSE;
+
+    return kTRUE ;
+} 
+
+Bool_t MFillHHillas::Process()
+{
+    fHistos->Fill(fEvt);
+
+    return kTRUE;
+} 
Index: trunk/MagicSoft/Mars/mdatacheck/MFillHHillas.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MFillHHillas.h	(revision 698)
+++ trunk/MagicSoft/Mars/mdatacheck/MFillHHillas.h	(revision 698)
@@ -0,0 +1,32 @@
+#ifndef MFILLHHILLAS_H
+#define MFILLHHILLAS_H
+
+#ifndef MAGIC_H
+#include "MAGIC.h"
+#endif
+
+#ifndef MTASK_H
+#include "MTask.h"
+#endif
+
+class MParList;
+class MHHillas;
+class MHillas;
+
+class MFillHHillas : public MTask {
+ private:
+  MHillas  *fEvt;
+  MHHillas *fHistos ;
+
+ public:   
+  MFillHHillas (const char *name=NULL, const char *title=NULL); 
+
+  Bool_t PreProcess(MParList *pList);
+  Bool_t Process() ;
+  
+  ClassDef(MFillHHillas, 0)	// Task to fill the Hillas histograms
+
+};
+    
+#endif
+
Index: trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.cc
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.cc	(revision 667)
+++ trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.cc	(revision 698)
@@ -23,5 +23,5 @@
 } ; 
 
-MGDisplayAdc::MGDisplayAdc ( MHistosAdc *histos,
+MGDisplayAdc::MGDisplayAdc ( MHFadcCam *histos,
 			    const TGWindow *p, const TGWindow *main, 
 			    UInt_t w, UInt_t h, 
@@ -218,5 +218,5 @@
     //   Histogramms in there.
     //
-    //   In the class MHistosAdc are in fact two lists. One for the high and
+    //   In the class MHFadcCam are in fact two lists. One for the high and
     //   one for the low gain. Here we will use only the high gain list!!!
     //   With some special options (settings in the gui) we will also be able
@@ -224,5 +224,5 @@
     //
 
-    const Int_t nhi = fHists->GetHiEntries();
+    const Int_t nhi = fHists->GetEntries();
     for ( Int_t i=0 ; i < nhi; i++ ) {
         fHistoList->AddEntry(fHists->GetHistHi(i)->GetName(), i+1) ;
Index: trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.h	(revision 667)
+++ trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.h	(revision 698)
@@ -12,6 +12,6 @@
 #endif
 
-#ifndef MHISTOSADC_H
-#include "MHistosAdc.h"
+#ifndef MHFADCCAM_H
+#include "MHFadcCam.h"
 #endif
 
@@ -24,5 +24,5 @@
     private:
 	
-	MHistosAdc *fHists;		// Pointer to Container with the histograms
+	MHFadcCam *fHists;		// Pointer to Container with the histograms
 	
 	// Create a main frame with a number of different buttons.
@@ -71,5 +71,5 @@
 	TCanvas *fCanvas;
 	
-	MGDisplayAdc(MHistosAdc *fHists , 
+	MGDisplayAdc(MHFadcCam *fHists ,
 		     const TGWindow *p, const TGWindow *main, 
 		     UInt_t w, UInt_t h, 
Index: trunk/MagicSoft/Mars/mdatacheck/MHFadcCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MHFadcCam.cc	(revision 698)
+++ trunk/MagicSoft/Mars/mdatacheck/MHFadcCam.cc	(revision 698)
@@ -0,0 +1,66 @@
+///////////////////////////////////////////////////////////////////////
+//
+// MHFadcCam
+//
+// This class contains a list of all ADC spektra histograms
+//
+///////////////////////////////////////////////////////////////////////
+
+#include "MHFadcCam.h"
+
+#include <TH1.h>
+
+ClassImp(MHFadcCam)
+
+MHFadcCam::MHFadcCam (const char *name, const char *title)
+{
+    //
+    //  default constructor
+    //  creates an a list of histograms for all pixels and both gain channels
+    //
+
+    //
+    //   set the name and title of this object
+    //
+    
+    *fName  = name  ? name  : "MHFadcCam" ;
+    *fTitle = title ? title : "Container for ADC spectra histograms" ;
+
+    //
+    //   loop over all Pixels and create two histograms
+    //   one for the Low and one for the High gain
+    //   connect all the histogram with the container fHist
+    //
+    fArray = new TObjArray(577);
+
+    for (Int_t i=0; i<577; i++)
+        (*fArray)[i] = new MHFadcPix(i);
+}
+
+MHFadcCam::~MHFadcCam ()
+{
+    delete fArray;
+}
+
+/*void MHFadcCam::SaveHist(char *name)
+{
+    //
+    //   save all histogram in this class to a root file
+    //
+
+    //
+    // FIXME: Don't open a file and write to this file!
+    // just Fill the current container (or the two histograms
+    // to an open file. The user must choose a file before.
+    //
+    TFile out( name, "recreate") ;
+
+    //
+    //  loop over all pixels and write the files out
+    //
+
+    fHistLo->Write() ;
+    fHistHi->Write() ;
+}
+
+  */
Index: trunk/MagicSoft/Mars/mdatacheck/MHFadcCam.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MHFadcCam.h	(revision 698)
+++ trunk/MagicSoft/Mars/mdatacheck/MHFadcCam.h	(revision 698)
@@ -0,0 +1,54 @@
+#ifndef MHFADCCAM_H
+#define MHFADCCAM_H
+
+#ifndef MAGIC_H
+#include "MAGIC.h"
+#endif
+
+#ifndef ROOT_TObjArray
+#include <TObjArray.h>
+#endif
+
+#ifndef MPARCONTAINER_H
+#include "MParContainer.h"
+#endif
+#ifndef MHFADCPIX_H
+#include "MHFadcPix.h"
+#endif
+
+class TH1F;
+
+class MHFadcCam : public MParContainer
+{
+private:
+    TObjArray *fArray;	// List of Lo/Hi gain Histograms
+
+public:
+     MHFadcCam(const char *name=NULL, const char *title=NULL);
+    ~MHFadcCam();
+
+    void FillHi(UInt_t ipix, Byte_t data) { (*this)[ipix]->FillHi(data); }
+    void FillLo(UInt_t ipix, Byte_t data) { (*this)[ipix]->FillLo(data); }
+
+    //    void SaveHist(char *name);
+
+    MHFadcPix *operator[](UInt_t i) { return (MHFadcPix*)(fArray->At(i)); }
+
+    TH1F *GetHistHi(UInt_t i)  { return (*this)[i]->GetHistHi(); }
+    TH1F *GetHistLo(UInt_t i)  { return (*this)[i]->GetHistLo(); }
+
+    void DrawHi(UInt_t i) { GetHistHi(i)->Draw(); }
+    void DrawLo(UInt_t i) { GetHistLo(i)->Draw(); }
+
+    void Draw(UInt_t i) { (*this)[i]->Draw(); }
+
+    Int_t GetEntries()
+    {
+        return fArray->GetEntries() ;
+    }
+
+    ClassDef(MHFadcCam, 1)	// list of Histograms with ADC spectra
+};
+
+#endif
+
Index: trunk/MagicSoft/Mars/mdatacheck/MHFadcPix.cc
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MHFadcPix.cc	(revision 698)
+++ trunk/MagicSoft/Mars/mdatacheck/MHFadcPix.cc	(revision 698)
@@ -0,0 +1,31 @@
+///////////////////////////////////////////////////////////////////////
+//
+// MHistosAdc
+//
+// This class contains a list of all ADC spektra histograms
+//
+///////////////////////////////////////////////////////////////////////
+
+#include "MHFadcPix.h"
+
+#include <TPad.h>
+
+ClassImp(MHFadcPix)
+
+void MHFadcPix::Draw(Option_t *)
+{
+    if (!gPad)
+    {
+        if (!gROOT->GetMakeDefCanvas())
+            return;
+        (gROOT->GetMakeDefCanvas())();
+    }
+
+    gPad->Divide(1, 2);
+
+    gPad->cd(0);
+    fHistHi->Draw();
+
+    gPad->cd(1);
+    fHistLo->Draw();
+}
Index: trunk/MagicSoft/Mars/mdatacheck/MHFadcPix.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MHFadcPix.h	(revision 698)
+++ trunk/MagicSoft/Mars/mdatacheck/MHFadcPix.h	(revision 698)
@@ -0,0 +1,54 @@
+#ifndef MHFADCPIX_H
+#define MHFADCPIX_H
+
+#ifndef MAGIC_H
+#include "MAGIC.h"
+#endif
+
+#ifndef ROOT_TH1
+#include <TH1.h>
+#endif
+
+class MHFadcPix : public TObject
+{
+private:
+    TH1F *fHistHi;
+    TH1F *fHistLo;
+
+public:
+    MHFadcPix(UInt_t pixid)
+    {
+        Char_t tmp1[40];
+        Char_t tmp2[40];
+
+        sprintf(tmp1, "high%d", pixid);
+        sprintf(tmp2, "high gain Pixel %d", pixid);
+
+        fHistHi =  new TH1F(tmp1, tmp2, 256, 0, 255);
+
+        sprintf(tmp1, "low %d", pixid);
+        sprintf(tmp2, "low gain Pixel %d", pixid);
+
+        fHistLo =  new TH1F(tmp1, tmp2, 256, 0, 255);
+    }
+    ~MHFadcPix()
+    {
+        delete fHistHi;
+        delete fHistLo;
+    }
+    TH1F *GetHistHi() { return fHistHi; }
+    TH1F *GetHistLo() { return fHistLo; }
+
+    void FillHi(Byte_t i) { fHistHi->Fill(i); }
+    void FillLo(Byte_t i) { fHistLo->Fill(i); }
+
+    void DrawHi() { fHistHi->Draw(); }
+    void DrawLo() { fHistLo->Draw(); }
+
+    void Draw(Option_t *opt=NULL);
+
+    ClassDef(MHFadcPix, 1)
+};
+
+#endif
+
Index: trunk/MagicSoft/Mars/mdatacheck/MHHillas.cc
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MHHillas.cc	(revision 698)
+++ trunk/MagicSoft/Mars/mdatacheck/MHHillas.cc	(revision 698)
@@ -0,0 +1,77 @@
+///////////////////////////////////////////////////////////////////////
+//
+// MHHillas
+//
+// This class contains histograms for every Hillas parameter
+//
+///////////////////////////////////////////////////////////////////////
+
+#include "MHHillas.h"
+
+#include <TH1.h>
+#include <TPad.h>
+
+#include "MHillas.h"
+
+ClassImp(MHHillas)
+
+MHHillas::MHHillas (const char *name, const char *title)
+{
+    //
+    //  default constructor
+    //  creates an a list of histograms for all pixels and both gain channels
+    //
+
+    //
+    //   set the name and title of this object
+    //
+    
+    *fName  = name  ? name  : "MHHillas" ;
+    *fTitle = title ? title : "Container for Hillas histograms" ;
+
+    //
+    //   loop over all Pixels and create two histograms
+    //   one for the Low and one for the High gain
+    //   connect all the histogram with the container fHist
+    //
+    fAlpha  = new TH1F("Alpha [deg]", "Alpha of Hillas",   90, 0,  90);
+    fWidth  = new TH1F("Width [mm]",  "Width of Hillas",  150, 0, 150);
+    fLength = new TH1F("Length [mm]", "Length of Hillas", 150, 0, 150);
+    fDist   = new TH1F("Dist [mm]",   "Dist of Hillas",   200, 0, 200);
+}
+
+MHHillas::~MHHillas()
+{
+    delete fAlpha;
+    delete fWidth;
+    delete fLength;
+    delete fDist;
+}
+
+void MHHillas::Fill(MHillas *par)
+{
+    fAlpha ->Fill(par->GetAlpha());
+    fWidth ->Fill(par->GetWidth());
+    fLength->Fill(par->GetLength());
+    fDist  ->Fill(par->GetDist());
+}
+
+#include <TCanvas.h>
+void MHHillas::Draw(Option_t *)
+{
+
+    TCanvas *c = new TCanvas("Hillas", "Histograms of Hillas Parameters");
+    c->Divide(2,2);
+
+    c->cd(1);
+    fAlpha->Draw();
+    c->cd(2);
+    fLength->Draw();
+    c->cd(3);
+    fDist->Draw();
+    c->cd(4);
+    fWidth->Draw();
+
+    c->Modified();
+    c->Update();
+}
Index: trunk/MagicSoft/Mars/mdatacheck/MHHillas.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MHHillas.h	(revision 698)
+++ trunk/MagicSoft/Mars/mdatacheck/MHHillas.h	(revision 698)
@@ -0,0 +1,48 @@
+#ifndef MHHILLAS_H
+#define MHHILLAS_H
+
+#ifndef MAGIC_H
+#include "MAGIC.h"
+#endif
+
+#ifndef ROOT_TH1
+#include <TH1.h>
+#endif
+
+#ifndef MPARCONTAINER_H
+#include "MParContainer.h"
+#endif
+
+class MHillas;
+
+class MHHillas : public MParContainer
+{
+private:
+    TH1F *fAlpha;
+    TH1F *fWidth;
+    TH1F *fLength;
+    TH1F *fDist;
+
+public:
+     MHHillas(const char *name=NULL, const char *title=NULL);
+    ~MHHillas();
+
+    void Fill(MHillas *par);
+
+    TH1F *GetHistAlpha()  { return fAlpha; }
+    TH1F *GetHistWidth()  { return fWidth; }
+    TH1F *GetHistLength() { return fLength; }
+    TH1F *GetHistDist()   { return fDist; }
+
+    void DrawAlpha()  { fAlpha->Draw(); }
+    void DrawWidth()  { fWidth->Draw(); }
+    void DrawLength() { fLength->Draw(); }
+    void DrawDist()   { fDist->Draw(); }
+
+    void Draw(Option_t *opt=NULL);
+
+    ClassDef(MHHillas, 1)	// list of Histograms with ADC spectra
+};
+
+#endif
+
Index: trunk/MagicSoft/Mars/mdatacheck/MHistosAdc.cc
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MHistosAdc.cc	(revision 667)
+++ 	(revision )
@@ -1,108 +1,0 @@
-///////////////////////////////////////////////////////////////////////
-//
-// MHistosAdc
-//
-// This class contains a list of all ADC spektra histograms
-//
-///////////////////////////////////////////////////////////////////////
-
-#include "MHistosAdc.h"
-
-#include <iostream.h>
-
-#include <TH1.h>
-#include <TFile.h>
-
-ClassImp(MHistosAdc)
-
-MHistosAdc::MHistosAdc (const char *name, const char *title)
-{
-    //
-    //  default constructor
-    //  creates an a list of histograms for all pixels and both gain channels
-    //
-
-    //
-    //   set the name and title of this object
-    //
-    
-    *fName  = name  ? name  : "MHistosAdc" ;
-    *fTitle = title ? title : "Container for ADC spectra histograms" ;
-
-    //
-    //   loop over all Pixels and create two histograms
-    //   one for the Low and one for the High gain
-    //   connect all the histogram with the container fHist
-    //
-    fHistHi = new TObjArray(577);
-    fHistLo = new TObjArray(577);
-
-    Char_t  tmp1[40];
-    Char_t  tmp2[40];
-
-    for ( Int_t i = 0 ; i < 577 ; i++)
-    {
-        sprintf ( tmp1, "high%d", i ) ;
-        sprintf ( tmp2, "high gain Pixel %d", i ) ;
-
-        fHistHi->Add( new TH1F ( tmp1, tmp2, 256, 0., 255. )  ) ;
-
-        sprintf ( tmp1, "low %d", i ) ;
-        sprintf ( tmp2, "low gain Pixel %d", i ) ;
-
-        fHistLo->Add( new TH1F ( tmp1, tmp2, 256, 0., 255. ) ) ;
-    }
-}
-
-MHistosAdc::~MHistosAdc ()
-{
-  
-  //   default destructor 
-  //
-  delete fHistHi ;
-  delete fHistLo ;
-}
-
-void MHistosAdc::Print(Option_t *)
-{
-  for ( Int_t i = 0 ; i < 576 ; i++)
-    {
-      fHistHi[i].Print() ;
-    }
-}
-
-void MHistosAdc::FillAdcHistHi ( Int_t iPix, Byte_t data)
-{
-  //
-  
-  GetHistHi(iPix)->Fill( (Float_t) data ) ;
-}
-
-void MHistosAdc::FillAdcHistLo ( Int_t iPix, Byte_t data)
-{
-  //
-  
-  GetHistLo(iPix)->Fill( (Float_t) data ) ;
-}
-
-void MHistosAdc::SaveHist ( char *name )
-{
-    //
-    //   save all histogram in this class to a root file
-    //
-
-    //
-    // FIXME: Don't open a file and write to this file!
-    // just Fill the current container (or the two histograms
-    // to an open file. The user must choose a file before.
-    //
-    TFile out( name, "recreate") ;
-
-    //
-    //  loop over all pixels and write the files out
-    //
-
-    fHistLo->Write() ;
-    fHistHi->Write() ;
-}
-
Index: trunk/MagicSoft/Mars/mdatacheck/MHistosAdc.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MHistosAdc.h	(revision 667)
+++ 	(revision )
@@ -1,68 +1,0 @@
-#ifndef MHISTOSADC_H
-#define MHISTOSADC_H
-
-#ifndef MAGIC_H
-#include "MAGIC.h"
-#endif
-
-#ifndef ROOT_TH1
-#include <TH1.h>
-#endif
-#ifndef ROOT_TObjArray
-#include <TObjArray.h>
-#endif
-
-#ifndef MPARCONTAINER_H
-#include "MParContainer.h"
-#endif
-
-class MHistosAdc : public MParContainer
-{
-private:
-    TObjArray *fHistHi;	// List of High gain Histograms
-    TObjArray *fHistLo;	// List of Low  gain Histograms
-
-public:
-     MHistosAdc(const char *name=NULL, const char *title=NULL);
-    ~MHistosAdc();
-
-    void FillAdcHistHi (Int_t iPix, Byte_t data);
-    void FillAdcHistLo (Int_t iPix, Byte_t data);
-
-    void SaveHist(char *name);
-
-    void Print(Option_t *t = NULL);
-
-    TH1F *GetHistHi(Int_t i)  { return (TH1F*)(fHistHi->At(i)); }
-    TH1F *GetHistLo(Int_t i)  { return (TH1F*)(fHistLo->At(i)); }
-
-    void DrawHi(Int_t i) { GetHistHi(i)->Draw(); }
-    void DrawLo(Int_t i) { GetHistHi(i)->Draw(); }
-
-/*
-    TObjArray* GetHiList()
-      { 
-	return fHistHi ;
-      }   
-
-    TObjArray* GetLoList()
-      { 
-	return fHistLo ;
-      } 
-*/
-    Int_t GetHiEntries()
-      { 
-	return fHistHi->GetEntries() ;
-      } 
-
-    Int_t GetLoEntries()
-      { 
-	return fHistLo->GetEntries() ;
-      } 
-
-      
-    ClassDef(MHistosAdc, 1)	// list of Histograms with ADC spectra
-};
-
-#endif
-
Index: trunk/MagicSoft/Mars/mdatacheck/MShowSpect.cc
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MShowSpect.cc	(revision 667)
+++ trunk/MagicSoft/Mars/mdatacheck/MShowSpect.cc	(revision 698)
@@ -34,12 +34,12 @@
   //   Do the preprocessing for MShowSpect
   // 
-  //   Connects Histogramms in the MHistosAdc container as the input
+  //   Connects Histogramms in the MHFadcCam container as the input
   //
 
-  fHists = (MHistosAdc*) pList->FindObject( fHistName );
+  fHists = (MHFadcCam*) pList->FindObject( fHistName );
   
   if (!fHists)
     {
-        *fLog << dbginf << " Error: MHistosAdc '" << fHistName << "' not found!" << endl;
+        *fLog << dbginf << " Error: MHFadcCam '" << fHistName << "' not found!" << endl;
         return kFALSE;
     }
Index: trunk/MagicSoft/Mars/mdatacheck/MShowSpect.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MShowSpect.h	(revision 667)
+++ trunk/MagicSoft/Mars/mdatacheck/MShowSpect.h	(revision 698)
@@ -11,5 +11,5 @@
 
 class MGDisplayAdc;
-class MHistosAdc;
+class MHFadcCam;
 class MParList ;
 
@@ -19,5 +19,5 @@
     char       fHistName[256] ;
 
-    MHistosAdc *fHists;		// Pointer to Container with the histograms
+    MHFadcCam *fHists;		// Pointer to Container with the histograms
   
  public:
@@ -29,5 +29,5 @@
      Bool_t PostProcess();
 
-     ClassDef(MShowSpect, 1)	// Fill the raw ADC in the histograms
+     ClassDef(MShowSpect, 0)	// Fill the raw ADC in the histograms
 };
 
Index: trunk/MagicSoft/Mars/mdatacheck/MViewAdcSpectra.cc
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MViewAdcSpectra.cc	(revision 667)
+++ trunk/MagicSoft/Mars/mdatacheck/MViewAdcSpectra.cc	(revision 698)
@@ -15,7 +15,7 @@
 #include "MReadTree.h" 
 #include "MDumpEvtHeader.h" 
-#include "MFillAdcSpect.h" 
+#include "MFillHFadc.h"
 #include "MShowSpect.h" 
-#include "MHistosAdc.h" 
+#include "MHFadcCam.h"
 
 MViewAdcSpectra::MViewAdcSpectra() 
@@ -65,5 +65,5 @@
   plist.AddToList(&evttime);
 
-  fHistosAdc= new MHistosAdc;
+  fHistosAdc= new MHFadcCam;
   plist.AddToList( fHistosAdc ) ;
 
@@ -80,8 +80,8 @@
   //  tasks->AddToList( dumpheader ) ; 
  
-  MFillAdcSpect fillspect;
+  MFillHFadc fillspect;
   tasks.AddToList( &fillspect ) ;
 
-  MShowSpect showspect( "MHistosAdc" ) ;
+  MShowSpect showspect( "MHFadcCam" ) ;
   tasks.AddToList( &showspect ) ;
 
Index: trunk/MagicSoft/Mars/mdatacheck/MViewAdcSpectra.h
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/MViewAdcSpectra.h	(revision 667)
+++ trunk/MagicSoft/Mars/mdatacheck/MViewAdcSpectra.h	(revision 698)
@@ -6,5 +6,5 @@
 #endif
 
-class MHistosAdc;
+class MHFadcCam;
 
 class MViewAdcSpectra {
@@ -12,5 +12,5 @@
  private:
 
-     MHistosAdc *fHistosAdc;
+     MHFadcCam *fHistosAdc;
 
  public:
Index: trunk/MagicSoft/Mars/mdatacheck/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mdatacheck/Makefile	(revision 667)
+++ trunk/MagicSoft/Mars/mdatacheck/Makefile	(revision 698)
@@ -22,5 +22,5 @@
 #  connect the include files defined in the config.mk file
 #
-INCLUDES = -I. -I../mbase -I../mraw
+INCLUDES = -I. -I../mbase -I../mraw -I../manalysis
 
 #------------------------------------------------------------------------------
@@ -29,7 +29,10 @@
 
 SRCFILES = MDumpEvtHeader.cc \
-	   MFillAdcSpect.cc \
+	   MFillHFadc.cc \
+           MFillHHillas.cc \
 	   MGDisplayAdc.cc \
-	   MHistosAdc.cc \
+           MHFadcPix.cc \
+           MHFadcCam.cc \
+           MHHillas.cc \
 	   MShowSpect.cc \
 	   MViewAdcSpectra.cc 
