Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2520)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2521)
@@ -12,4 +12,10 @@
    * mbase/MStatusDisplay.cc:
      - removed ==13 using TryLock() (this was wrong)
+
+   * mreport/*
+     - added
+
+   * macros/readrep.C:
+     - added
 
 
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 2520)
+++ trunk/MagicSoft/Mars/NEWS	(revision 2521)
@@ -5,4 +5,7 @@
      multi-telescope files which can be produced with the coming
      camera version 0.7.
+
+   - added classes to read and interprete central control report files
+     (Directory: mreport, Base-Class: MReport, Reader: MReportFileRead, ...)
 
 
Index: trunk/MagicSoft/Mars/mdata/MDataChain.cc
===================================================================
--- trunk/MagicSoft/Mars/mdata/MDataChain.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mdata/MDataChain.cc	(revision 2521)
@@ -77,4 +77,5 @@
 //   floor(x)  round down to the nearest integer (floor(9.9)=9)
 //   ceil(x)   round up   to the nearest integer (floor(9.1)=10)
+//   round(x)  round      to the nearest integer
 //   r2d(x)    transform radians to degrees
 //   d2r(x)    transform degrees to radians
@@ -565,4 +566,5 @@
     case kEFloor:    return TMath::Floor(val);
     case kECeil:     return TMath::Ceil(val);
+    case kERound:    return TMath::Nint(val);
     case kERad2Deg:  return val*180/TMath::Pi();
     case kEDeg2Rad:  return val*TMath::Pi()/180;
@@ -664,4 +666,5 @@
     case kEFloor:    str += "floor" ; break;
     case kECeil:     str += "ceil"  ; break;
+    case kERound:    str += "round" ; break;
     case kERad2Deg:  str += "r2d"   ; break;
     case kEDeg2Rad:  str += "d2r"   ; break;
Index: trunk/MagicSoft/Mars/mdata/MDataChain.h
===================================================================
--- trunk/MagicSoft/Mars/mdata/MDataChain.h	(revision 2520)
+++ trunk/MagicSoft/Mars/mdata/MDataChain.h	(revision 2521)
@@ -31,5 +31,5 @@
         kEPositive,
         kENegative,
-        kEFloor, kECeil,
+        kEFloor, kECeil, kERound,
         kERad2Deg, kEDeg2Rad, kERandom,
         kERandomP, kERandomE, kERandomI, kERandomG, kERandomL,
Index: trunk/MagicSoft/Mars/merpp.cc
===================================================================
--- trunk/MagicSoft/Mars/merpp.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/merpp.cc	(revision 2521)
@@ -55,10 +55,11 @@
     gLog << all << endl;
     gLog << "Sorry the usage is:" << endl;
-    gLog << "   merpp [-a0] [-vn] [-cn] inputfile[.raw] [outputfile[.root]]" << endl << endl;
+    gLog << "   merpp [-h] [-?] [-a0] [-vn] [-cn] inputfile[.raw] [outputfile[.root]]" << endl << endl;
     gLog << "     input file:   Magic DAQ binary file." << endl;
     gLog << "     ouput file:   Merpped root file." << endl;
     gLog << "     -a0: Do not use Ansii codes." << endl;
     gLog << "     -cn: Compression level n=1..9 [default=2]" << endl;
-    gLog << "     -vn: Verbosity level n [default=2]" << endl << endl;
+    gLog << "     -vn: Verbosity level n [default=2]" << endl;
+    gLog << "     -?/-h: This help" << endl << endl;
 }
 
@@ -71,4 +72,10 @@
     //
     MArgs arg(argc, argv);
+
+    if (arg.HasOption("-?") || arg.HasOption("-h"))
+    {
+        Usage();
+        return -1;
+    }
 
     //
Index: trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h	(revision 2520)
+++ trunk/MagicSoft/Mars/mfilter/FilterLinkDef.h	(revision 2521)
@@ -17,4 +17,5 @@
 #pragma link C++ class MFDataChain+;
 #pragma link C++ class MFDataMember+;
+#pragma link C++ class MFRealTimePeriod+;
 
 #pragma link C++ class MFCT1SelBasic+;
Index: trunk/MagicSoft/Mars/mfilter/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mfilter/Makefile	(revision 2520)
+++ trunk/MagicSoft/Mars/mfilter/Makefile	(revision 2521)
@@ -43,4 +43,5 @@
 	   MFGeomag.cc \
 	   MFParticleId.cc \
+           MFRealTimePeriod.cc \
 	   MFAlpha.cc \
 	   MFCT1SelBasic.cc \
Index: trunk/MagicSoft/Mars/mgeom/MGeomCam.h
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCam.h	(revision 2520)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCam.h	(revision 2521)
@@ -35,4 +35,12 @@
     void CalcNumSectors();
     void InitOuterRing();
+    void InitGeometry()
+    {
+        CalcNumSectors();
+        CalcMaxRadius();
+        CalcPixRatio();
+        InitOuterRing();
+    }
+
 
 public:
@@ -60,3 +68,2 @@
 
 #endif
-
Index: trunk/MagicSoft/Mars/mgeom/MGeomCamCT1.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCamCT1.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCamCT1.cc	(revision 2521)
@@ -56,7 +56,5 @@
     CreateCam();
     CreateNN();
-    CalcNumSectors();
-    CalcMaxRadius();
-    CalcPixRatio();
+    InitGeometry();
 } 
 
@@ -200,6 +198,4 @@
       (*this)[i].SetNeighbors(nn[i][0], nn[i][1], nn[i][2],
                               nn[i][3], nn[i][4], nn[i][5]);
-
-  InitOuterRing();
 }
 
Index: trunk/MagicSoft/Mars/mgeom/MGeomCamCT1Daniel.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCamCT1Daniel.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCamCT1Daniel.cc	(revision 2521)
@@ -60,7 +60,5 @@
     CreateCam();
     CreateNN();
-    CalcNumSectors();
-    CalcMaxRadius();
-    CalcPixRatio();
+    InitGeometry();
 } 
 
@@ -204,6 +202,4 @@
       (*this)[i].SetNeighbors(nn[i][0], nn[i][1], nn[i][2],
                               nn[i][3], nn[i][4], nn[i][5]);
-
-  InitOuterRing();
 }
 
Index: trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.cc	(revision 2521)
@@ -52,7 +52,5 @@
     CreateCam();
     CreateNN();
-    CalcNumSectors();
-    CalcMaxRadius();
-    CalcPixRatio();
+    InitGeometry();
 }
 
@@ -895,5 +893,3 @@
       (*this)[i].SetNeighbors(nn[i][0], nn[i][1], nn[i][2],
                               nn[i][3], nn[i][4], nn[i][5]);
-
-  InitOuterRing();
 }
Index: trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000HG.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000HG.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000HG.cc	(revision 2521)
@@ -56,7 +56,5 @@
     CreateCam();
     CreateNN();
-    CalcNumSectors();
-    CalcMaxRadius();
-    CalcPixRatio();
+    InitGeometry();
 }
 
@@ -3403,10 +3401,8 @@
     {  2285,  2286,  2398,  2400,  -1,  -1},
     {  2286,  2399,  -1,  -1,  -1,  -1} // 2400
-    };
+  };
 
   for (Int_t i=0; i<2401; i++)
       (*this)[i].SetNeighbors(nn[i][0], nn[i][1], nn[i][2],
                               nn[i][3], nn[i][4], nn[i][5]);
-
-  InitOuterRing();
 }
Index: trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc	(revision 2521)
@@ -48,8 +48,5 @@
     CreateCam();
     CreateNN();
-    CalcPixRatio();
-    CalcNumSectors();
-    CalcMaxRadius();
-    CalcPixRatio();
+    InitGeometry();
 }
 
@@ -925,5 +922,3 @@
         (*this)[i].SetNeighbors(nn[i][0], nn[i][1], nn[i][2],
                                 nn[i][3], nn[i][4], nn[i][5]);
-
-    InitOuterRing();
 }
Index: trunk/MagicSoft/Mars/mgeom/MGeomCamMagic919.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCamMagic919.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCamMagic919.cc	(revision 2521)
@@ -49,6 +49,5 @@
     CreateCam();
     CreateNN();
-    CalcMaxRadius();
-    CalcPixRatio();
+    InitGeometry();
 }
 
@@ -1362,5 +1361,3 @@
       (*this)[i].SetNeighbors(nn[i][0], nn[i][1], nn[i][2],
                               nn[i][3], nn[i][4], nn[i][5]);
-
-  InitOuterRing();
 }
Index: trunk/MagicSoft/Mars/mgeom/MGeomCamMagicHG.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCamMagicHG.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCamMagicHG.cc	(revision 2521)
@@ -48,7 +48,5 @@
     CreateCam();
     CreateNN();
-    CalcNumSectors();
-    CalcMaxRadius();
-    CalcPixRatio();
+    InitGeometry();
 }
 
@@ -3397,5 +3395,3 @@
         (*this)[i].SetNeighbors(nn[i][0], nn[i][1], nn[i][2],
                                 nn[i][3], nn[i][4], nn[i][5]);
-
-    InitOuterRing();
 }
Index: trunk/MagicSoft/Mars/mgeom/MGeomCorsikaCT.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCorsikaCT.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCorsikaCT.cc	(revision 2521)
@@ -64,4 +64,3 @@
   fCTdiam=ctdiam;
   fCTfocal=ctfocal;
-
 }
Index: trunk/MagicSoft/Mars/mgeom/MGeomMirror.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomMirror.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mgeom/MGeomMirror.cc	(revision 2521)
@@ -103,5 +103,6 @@
 }
 
-void MGeomMirror::SetMirrorDeviations(Float_t dev_x, Float_t dev_y){
+void MGeomMirror::SetMirrorDeviations(Float_t dev_x, Float_t dev_y)
+{
     fDeviationX=dev_x;  // deviation in x [cm]
     fDeviationY=dev_y;  // deviation in y [cm]
@@ -127,10 +128,2 @@
     fReflectivity = ref;
 }
-
-
-
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mgeom/MGeomPMT.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomPMT.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mgeom/MGeomPMT.cc	(revision 2521)
@@ -69,7 +69,2 @@
     fQE = qe;
 }
-
-
-
-
-
Index: trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MEventDisplay.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mmain/MEventDisplay.cc	(revision 2521)
@@ -60,7 +60,9 @@
 #include "MReadMarsFile.h"       // MReadMarsFile
 #include "MGeomApply.h"          // MGeomApply
+#include "MFDataMember.h"        // MFDataMember
 #include "MMcPedestalCopy.h"     // MMcPedestalCopy
 #include "MMcPedestalNSBAdd.h"   // MMcPedestalNSBAdd
 #include "MCerPhotCalc.h"        // MCerPhotCalc
+#include "MCerPhotAnal2.h"       // MCerPhotAnal2
 #include "MImgCleanStd.h"        // MImgCleanStd
 #include "MHillasCalc.h"         // MHillasCalc
@@ -182,4 +184,5 @@
     MMcPedestalNSBAdd *pdnsb = new MMcPedestalNSBAdd;
     MCerPhotCalc      *ncalc = new MCerPhotCalc;
+    MCerPhotAnal2     *nanal = new MCerPhotAnal2;
     MFillH            *fill1 = new MFillH(evt1, "MCerPhotEvt",  "MFillH1");
     MImgCleanStd      *clean = new MImgCleanStd;
@@ -193,7 +196,16 @@
     MHillasSrcCalc    *scalc = new MHillasSrcCalc;
 
+    MFilter *f1=new MFDataMember("MRawRunHeader.fRunType", '>', 255.5);
+    MFilter *f2=new MFDataMember("MRawRunHeader.fRunType", '<', 255.5);
+
+    ncalc->SetFilter(f1);
+    nanal->SetFilter(f2);
+
+    tlist->AddToList(f1);
+    tlist->AddToList(f2);
     tlist->AddToList(pcopy);
     tlist->AddToList(pdnsb);
     tlist->AddToList(ncalc);
+    tlist->AddToList(nanal);
     tlist->AddToList(fill1);
     tlist->AddToList(clean);
Index: trunk/MagicSoft/Mars/mmain/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mmain/Makefile	(revision 2520)
+++ trunk/MagicSoft/Mars/mmain/Makefile	(revision 2521)
@@ -24,5 +24,5 @@
 INCLUDES = -I. -I../mbase -I../manalysis -I../mdatacheck -I../mraw       \
 	   -I../mgui -I../mgeom -I../mhist -I../mmontecarlo -I../mfileio \
-           -I../mimage -I../mhistmc -I../mgbase
+           -I../mimage -I../mhistmc -I../mgbase -I../mfilter -I../mdata
 
 #------------------------------------------------------------------------------
Index: trunk/MagicSoft/Mars/mona.cc
===================================================================
--- trunk/MagicSoft/Mars/mona.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mona.cc	(revision 2521)
@@ -15,5 +15,4 @@
 #include "MFillH.h"
 #include "MFRealTimePeriod.h"
-#include "MOnlineDump2.h"
 #include "MHTriggerLvl0.h"
 #include "MHCamera.h"         // ::Class()
@@ -24,4 +23,145 @@
 #include "MHillasCalc.h"
 #include "MHillasSrcCalc.h"
+
+#include "MArgs.h"
+
+// --------------------------------------------------------------------
+
+#include "MTime.h"
+#include "MRawEvtHeader.h"       // MRawEvtHeader
+#include "MRawRunHeader.h"       // MRawRunHeader
+
+class MOnlineDump : public MTask
+{
+private:
+    MFillH *fFill1;
+    MFillH *fFill2;
+    MFillH *fFill3;
+    MFRealTimePeriod *fFilter;
+
+    UInt_t fRunNumber;
+    UInt_t fEvtNumber;
+
+    MRawEvtHeader *fRawEvtHeader;
+    MRawRunHeader *fRawRunHeader;
+
+    MTime *fEvtTime;
+    Double_t fTime;
+
+    void SetNoContextMenu(TObject *c)
+    {
+        if (fDisplay->HasCanvas((TCanvas*)c))
+            c->ResetBit(kNoContextMenu);
+    }
+    void DisplayTriggerRate()
+    {
+        if (*fEvtTime==0)
+            fEvtTime->SetTime(gSystem->Now());
+    
+        if (fEvtNumber==0 || fRawRunHeader->GetRunNumber()!=fRunNumber)
+        {
+            fEvtNumber = fRawEvtHeader->GetDAQEvtNumber();
+            fRunNumber = fRawRunHeader->GetRunNumber();
+            fTime      = *fEvtTime;
+            return;
+        }
+    
+        const UInt_t  evts = fRawEvtHeader->GetDAQEvtNumber() - fEvtNumber;
+        const Double_t sec = *fEvtTime-fTime;
+    
+        if (evts>0 && sec>0 && fDisplay)
+            fDisplay->SetStatusLine2(Form("Trigger Rate: %.1fHz", evts/sec));
+    }
+
+public:
+    MOnlineDump() { fName = "MOnlineDump"; }
+    Int_t PreProcess(MParList *pList)
+    {
+        if (gROOT->IsBatch())
+        {
+            *fLog << err << "We are in batch mode!" << endl;
+            return kFALSE;
+        }
+        if (!fDisplay)
+        {
+            *fLog << err << "fDisplay not set." << endl;
+            return kFALSE;
+        }
+    
+        MTaskList *tasks = (MTaskList*)pList->FindObject("MTaskList");
+        if (!tasks)
+        {
+            *fLog << err << "MTaskList not found... abort." << endl;
+            return kFALSE;
+        }
+    
+        fFill1 = (MFillH*)tasks->FindObject("MFillCamEvent");
+        if (!fFill1)
+        {
+            *fLog << err << "MFillCamEvent not found... abort." << endl;
+            return kFALSE;
+        }
+        fFill2 = (MFillH*)tasks->FindObject("MFillEvent");
+        if (!fFill2)
+        {
+            *fLog << err << "MFillEvent not found... abort." << endl;
+            return kFALSE;
+        }
+        fFill3 = (MFillH*)tasks->FindObject("MFillTriggerLvl0");
+        if (!fFill3)
+        {
+            *fLog << err << "MFillTriggerLvl0 not found... abort." << endl;
+            return kFALSE;
+        }
+        fRawEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");
+        if (!fRawEvtHeader)
+        {
+            *fLog << err << "MRawEvtHeader not found... abort." << endl;
+            return kFALSE;
+        }
+    
+        fRawRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
+        if (!fRawRunHeader)
+        {
+            *fLog << err << "MRawRunHeader not found... abort." << endl;
+            return kFALSE;;
+        }
+    
+        fEvtTime = (MTime*)pList->FindObject("MRawEvtTime");
+        if (!fEvtTime)
+        {
+            *fLog << err << "MRawEvtTime not found... abort." << endl;
+            return kFALSE;
+        }
+    
+        fRunNumber = 0xffffffff;
+        fEvtNumber = 0;
+    
+        SetNoContextMenu((TObject*)fFill1->GetCanvas());
+        SetNoContextMenu((TObject*)fFill2->GetCanvas());
+        SetNoContextMenu((TObject*)fFill3->GetCanvas());
+    
+        return kTRUE;
+    }
+    Int_t Process()
+    {
+        DisplayTriggerRate();
+    
+        if (fDisplay)
+            fDisplay->SetProgressBarPosition((Float_t)fEvtNumber/fRawRunHeader->GetNumEvents());
+    
+        return kTRUE;
+    } 
+    Int_t PostProcess()
+    {
+        if (fDisplay)
+            fDisplay->SetProgressBarPosition(1);
+    
+        return kTRUE;
+    }
+//    ClassDef(MOnlineDump, 0) // Task to fill a histogram with data from a parameter container
+};
+//ClassImp(MOnlineDump);
+// --------------------------------------------------------------------
 
 void StartUpMessage()
@@ -73,5 +213,5 @@
 }
 
-Bool_t Loop(MStatusDisplay *display)
+Bool_t Loop(MStatusDisplay *display, Int_t port)
 {
     //
@@ -81,5 +221,5 @@
     //
     MRawSocketRead reader;
-    reader.SetPort(7000);
+    reader.SetPort(port);
 
     //
@@ -112,5 +252,5 @@
     tasks.AddToList(&fill3);
 
-    MOnlineDump2 dump;
+    MOnlineDump dump;
     dump.SetFilter(&filter);
     tasks.AddToList(&dump);
@@ -151,4 +291,6 @@
 void *thread(void *ptr)
 {
+    const Int_t port = *(Int_t*)ptr;
+
     MStatusDisplay d;
     d.Resize(740, 600);
@@ -159,5 +301,5 @@
     //
     while (d.CheckStatus()!=MStatusDisplay::kFileExit)
-        Loop(&d);
+        Loop(&d, port);
 
     gLog << dbg << "Exit System Loop... " << flush;
@@ -194,7 +336,49 @@
 */
 
+static void Usage()
+{
+    gLog << all << endl;
+    gLog << "Sorry the usage is:" << endl;
+    gLog << "   mona [-?] [-h] [-a0] [-h] [-pn] [-vn]" << endl << endl;
+    gLog << "     -a0: Do not use Ansii codes." << endl;
+    gLog << "     -pn: TCP/IP port n [default=7000]" << endl;
+    gLog << "     -vn: Verbosity level n [default=2]" << endl << endl;
+    gLog << "     -?/-h: This help" << endl << endl;
+}
+
+
 int main(int argc, char **argv)
 {
     StartUpMessage();
+
+    //
+    // Evaluate arguments
+    //
+    MArgs arg(argc, (const char**)argv);
+
+    if (arg.HasOption("-?") || arg.HasOption("-h"))
+    {
+        Usage();
+        return -1;
+    }
+
+    //
+    // Set verbosity to highest level.
+    //
+    gLog.SetDebugLevel(arg.HasOption("-v") ? arg.GetIntAndRemove("-v") : 2);
+
+    if (arg.HasOption("-a") && arg.GetIntAndRemove("-a")==0)
+        gLog.SetNoColors();
+
+    const Int_t port = arg.HasOption("-p") ? arg.GetIntAndRemove("-p") : 7000;
+
+    //
+    // check for the right usage of the program
+    //
+    if (arg.GetNumArguments()>0)
+    {
+        Usage();
+        return -1;
+    }
 
     TApplication app("Mars", &argc, argv);
@@ -204,4 +388,5 @@
         return 1;
     }
+
     /*
     TGApplication app("Mona", &argc, argv);
@@ -219,5 +404,5 @@
     //
     gLog << dbg << "Starting Thread..." << endl;
-    TThread t(thread);
+    TThread t(thread, (void*)&port);
     t.Run();
 
Index: trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawFileRead.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/mraw/MRawFileRead.cc	(revision 2521)
@@ -242,4 +242,6 @@
 Int_t MRawFileRead::PostProcess()
 {
+    fIn->close();
+
     //
     // Sanity check for the number of events
Index: trunk/MagicSoft/Mars/mraw/MRawRunHeader.h
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawRunHeader.h	(revision 2520)
+++ trunk/MagicSoft/Mars/mraw/MRawRunHeader.h	(revision 2521)
@@ -23,4 +23,8 @@
 const UShort_t kMagicNumber = 0xc0c0;
 
+//
+// enum for the Run Type. Monte Carlo Runs have
+// to have a value greater than 255 (>0xff)
+//
 enum {
     kRTData        = 0,
Index: trunk/MagicSoft/Mars/mraw/RawIncl.h
===================================================================
--- trunk/MagicSoft/Mars/mraw/RawIncl.h	(revision 2520)
+++ trunk/MagicSoft/Mars/mraw/RawIncl.h	(revision 2521)
@@ -1,10 +1,6 @@
 #ifndef __CINT__
 
-#include "MTime.h"
 #include "MArrayB.h"
 #include "MArrayS.h"
-#include "MParList.h"
-
-#include <TClonesArray.h>
 
 #endif // __CINT__
Index: trunk/MagicSoft/Mars/readraw.cc
===================================================================
--- trunk/MagicSoft/Mars/readraw.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/readraw.cc	(revision 2521)
@@ -52,9 +52,10 @@
     gLog << all << endl;
     gLog << "Sorry the usage is:" << endl;
-    gLog << "   readraw [-vn] [-dec] [-a0] inputfile[.root]" << endl << endl;
+    gLog << "   readraw [-h] [-?] [-vn] [-dec] [-a0] inputfile[.root]" << endl << endl;
     gLog << "     input file:   Magic DAQ binary file." << endl;
     gLog << "     -a0: Do not use Ansii codes." << endl;
     gLog << "     -vn: Verbosity level n [default=2]" << endl;
     gLog << "     -d1: print data in decimal values" << endl;
+    gLog << "     -?/-h: This help" << endl << endl;
 }
 
@@ -76,4 +77,10 @@
     //
     MArgs arg(argc, argv);
+
+    if (arg.HasOption("-?") || arg.HasOption("-h"))
+    {
+        Usage();
+        return -1;
+    }
 
     //
Index: trunk/MagicSoft/Mars/status.cc
===================================================================
--- trunk/MagicSoft/Mars/status.cc	(revision 2520)
+++ trunk/MagicSoft/Mars/status.cc	(revision 2521)
@@ -53,4 +53,5 @@
 #include "MFillH.h"
 #include "MEvtLoop.h"
+#include "MFDataMember.h"
 
 #include <TApplication.h>
@@ -80,5 +81,6 @@
     gLog << "     input file:   Mars root file." << endl;
     gLog << "     -a0: Do not use Ansii codes." << endl;
-    gLog << "     -vn: Verbosity level n [default=2]" << endl << endl;
+    gLog << "     -vn: Verbosity level n [default=2]" << endl;
+    gLog << "     -?/-h: This help" << endl << endl;
 }
 
@@ -92,4 +94,10 @@
     //
     MArgs arg(argc, (const char**)argv);
+
+    if (arg.HasOption("-?") || arg.HasOption("-h"))
+    {
+        Usage();
+        return -1;
+    }
 
     //
@@ -181,5 +189,11 @@
     MMcPedestalNSBAdd pnsb;
     MCerPhotCalc      ncalc;
-//    MCerPhotAnal2     ncalc;
+    MCerPhotAnal2     nanal;
+
+    MFDataMember f1("MRawRunHeader.fRunType", '>', 255.5);
+    MFDataMember f2("MRawRunHeader.fRunType", '<', 255.5);
+
+    ncalc.SetFilter(&f1);
+    nanal.SetFilter(&f2);
 /*
     TArrayS blinds(6);
@@ -230,8 +244,11 @@
 
     tlist.AddToList(&read);
+    tlist.AddToList(&f1);
+    tlist.AddToList(&f2);
     tlist.AddToList(&geomapl);
     tlist.AddToList(&pcopy);
     tlist.AddToList(&pnsb);
     tlist.AddToList(&ncalc);
+    tlist.AddToList(&nanal);
     //tlist.AddToList(&blind);
     tlist.AddToList(&hfill0);
