Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2606)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2607)
@@ -9,4 +9,6 @@
      - removed wrong comment in MHMcCollectionArea::CalcEfficiency2
 
+
+
  2003/12/05: Thomas Bretz
 
@@ -27,5 +29,6 @@
      mfileio/MReadReports.cc, mhist/MHPixVsTime.cc,
      mhist/MHVsTime.cc, mmain/MOnlineDump.cc,
-     mmontecarlo/MMcTimeGenerate.cc, mreport/MReport.cc
+     mmontecarlo/MMcTimeGenerate.cc, mreport/MReport.cc,
+     manalysis/MEventRateCalc.cc:
      - adapted to new MTime
 
@@ -47,4 +50,21 @@
    * mfileio/Makefile, mfileio/FileIOLinkDef.h:
      - removed MReadCurrent
+
+   * readdaq.cc:
+     - changed to display board information on request 
+       (MRawCrateArray)
+
+   * mfileio/MReadMarsFile.cc:
+     - small changes to output
+     
+   * mfileio/MReadReports.[h,cc]:
+     - added 'Master' tree as a workaround for reading RunHeaders
+     
+   * mfileio/MReadTree.cc:
+     - call Notify() of all members of fNotify in Notify()
+     
+   * mraw/MRawCrateArray.[h,cc]:
+     - added Print() member function
+     
 
 
Index: /trunk/MagicSoft/Mars/manalysis/MEventRateCalc.cc
===================================================================
--- /trunk/MagicSoft/Mars/manalysis/MEventRateCalc.cc	(revision 2606)
+++ /trunk/MagicSoft/Mars/manalysis/MEventRateCalc.cc	(revision 2607)
@@ -94,5 +94,5 @@
 Int_t MEventRateCalc::Process()
 {
-    fTime->SetTime(gSystem->Now());
+    fTime->Now();
 
     const ULong_t exec = GetNumExecutions();
Index: /trunk/MagicSoft/Mars/mbase/MTime.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 2606)
+++ /trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 2607)
@@ -38,12 +38,19 @@
 //  - removed fTimeStamp[2]
 //
+// Version 3:
+// ----------
+//  - removed fDurtaion - we may put it back when it is needed
+//  - complete rewrite of the data members (old ones completely replaced)
+//
 /////////////////////////////////////////////////////////////////////////////
 #include "MTime.h"
 
 #include <iomanip>
+#include <sys/time.h> // struct timeval
 
 #include <TTime.h>
 
 #include "MLog.h"
+#include "MAstro.h"
 
 ClassImp(MTime);
@@ -51,15 +58,54 @@
 using namespace std;
 
-void MTime::SetTime(const TTime &t)
+void MTime::GetDate(UShort_t &y, Byte_t &m, Byte_t &d) const
 {
-    SetTime((ULong_t)t);
+    MAstro::Mjd2Ymd((Long_t)fTime<0?fMjd-1:fMjd, y, m, d);
+}
+
+Bool_t MTime::Set(UShort_t y, Byte_t m, Byte_t d, Byte_t h, Byte_t min, Byte_t s, UShort_t ms, UInt_t ns)
+{
+    if (h>23 || min>59 || s>59 || ms>999 || ns>999999)
+        return kFALSE;
+
+    const Int_t mjd = MAstro::Ymd2Mjd(y, m, d);
+    if (mjd<0)
+        return kFALSE;
+
+    const ULong_t tm = ((((h*60+min)*60)+s)*1000)+ms;
+
+    return Set(mjd, tm, ns);
+}
+
+void MTime::SetSystemTimer(const struct timeval &tv)
+{
+    const ULong_t hor = 3600000; // One Hour in milliseconds
+
+    const UInt_t mjd = tv.tv_sec/(60*60*24) + 40587;
+    const Long_t tm  = (tv.tv_usec/1000)%(24*hor);
+
+    Set(mjd, tm, tv.tv_usec*1000);
+}
+
+void MTime::Now()
+{
+#ifdef __LINUX__
+    struct timeval tv;
+    gettimeofday(&tv, NULL);
+    SetSystemTimer(tv);
+#else
+    Reset();
+#endif
 }
 
 void MTime::Print(Option_t *) const
 {
-    *fLog << GetDescriptor() << ": " << dec << setfill('0');
-    *fLog << setw(2) << (int)fHour << ":";
-    *fLog << setw(2) << (int)fMin  << ":";
-    *fLog << setw(2) << (int)fSec  << ".";
-    *fLog << setw(9) << fNanoSec << endl;
+    UShort_t yea, ms;
+    Byte_t mon, day, h, m, s;
+
+    GetDate(yea, mon, day);
+    GetTime(h, m, s, ms);
+
+    *fLog << GetDescriptor() << ": ";
+    *fLog << Form("%4d/%02d/%02d %02d:%02d:%02d.%03d (+%dns)",
+                  yea, mon, day, h, m, s, ms, fNanoSec) << endl;
 } 
Index: /trunk/MagicSoft/Mars/mbase/MTime.h
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MTime.h	(revision 2606)
+++ /trunk/MagicSoft/Mars/mbase/MTime.h	(revision 2607)
@@ -14,22 +14,29 @@
 #endif
 
-class TTime;
+#ifndef ROOT_TTime
+#include <TTime.h>
+#endif
+
+struct timeval;
 
 class MTime : public MParContainer
 {
+    friend bool operator==(MTime &t1, MTime &t2);
+    friend bool operator!=(MTime &t1, MTime &t2);
+    friend bool operator< (MTime &t1, MTime &t2);
+    friend bool operator> (MTime &t1, MTime &t2);
+    //friend bool operator<=(MTime &t1, MTime &t2);
+    //friend bool operator>=(MTime &t1, MTime &t2);
+
 private:
-    //UInt_t   fTimeStamp[2]; // type of raw event which should be processed by this task
-    UInt_t   fDuration;     // time of validity
+     UInt_t fMjd;     // [d]  Day in the century        (Day of sun rise)
+     TTime  fTime;    // [ms] Time of Day               (-11h<=x<13h)
+     UInt_t fNanoSec; // [ns] NanoSec part of TimeOfDay (<1000000)
 
-    Byte_t   fHour;
-    Byte_t   fMin;
-    Byte_t   fSec;
-    UInt_t   fNanoSec;
-
-    /*
-     UInt_t   fMjd;     // Day in the century        (Day of sun rise)
-     TTime    fTime;    // Time of Day               (43,200,000<x<43,200,000)
-     UShort_t fNanoSec; // NanoSec part of TimeOfDay (<1000)
-     */
+     ULong_t GetTime24() const
+     {
+         const ULong_t hor = 3600000; // One Hour in milliseconds
+         return (Long_t)fTime<0 ? (Long_t)fTime+24*hor : (ULong_t)fTime;
+     }
 
 public:
@@ -39,79 +46,69 @@
         fTitle = title;
 
-        SetTime((ULong_t)0);
+        Reset();
     }
 
     MTime(MTime& t) { *this = t; }
 
+    void Reset() { fMjd=0; fTime=0; fNanoSec=0; }
+
     void operator=(MTime &t)
     {
-        fDuration = t.fDuration;
-        fHour     = t.fHour;
-        fMin      = t.fMin;
-        fSec      = t.fSec;
-        fNanoSec  = t.fNanoSec;
+        fMjd     = t.fMjd;
+        fTime    = t.fTime;
+        fNanoSec = t.fNanoSec;
     }
 
     void Print(Option_t *t=NULL) const;
 
-    void SetCT1Time(UInt_t t1, UInt_t t0)
+    void Now();
+
+    Double_t GetMjd() const
+    {
+        return fMjd+((Long_t)fTime+fNanoSec/1e6)/1000;
+    }
+
+    void SetSystemTimer(const struct timeval &tv);
+
+    Bool_t Set(UInt_t mjd, ULong_t ms, UInt_t ns=0)
+    {
+        const ULong_t hor = 3600000; // One Hour in milliseconds
+        if (ms>24*hor-1 || ns>999999)
+            return kFALSE;
+
+        const Bool_t am = ms < hor*13;
+
+        fMjd     = am ? mjd : mjd + 1;
+        fTime    = (Long_t)(am ? ms  : ms - hor*24);
+        fNanoSec = ns%1000000;
+
+        return kTRUE;
+    }
+
+    Bool_t Set(UShort_t y, Byte_t m, Byte_t d, Byte_t h, Byte_t min, Byte_t s, UShort_t ms, UInt_t ns=0);
+
+    void SetCT1Time(UInt_t mjd, UInt_t t1, UInt_t t0)
     {
         // int   isecs_since_midday; // seconds passed since midday before sunset (JD of run start)
         // int   isecfrac_200ns;     // fractional part of isecs_since_midday
         // fTime->SetTime(isecfrac_200ns, isecs_since_midday);
-        fNanoSec  = 200*t1;
-        fSec      = t0%60;
-        t0 /= 60;
-        fMin      = t0%60;
-        t0 /= 60;
-        fHour     = (t0+12)%24;
+        const ULong_t hor = 3600000; // One Hour in milliseconds
+
+        fNanoSec         = (200*t1)%1000000;
+        const ULong_t ms = (200*t1)/1000000 + t0+12*hor;
+
+        fTime = (Long_t)(ms<13*hor ? ms : ms-24*hor);
+
+        fMjd = mjd+1;
     }
-
-    void SetTime(ULong_t t)
+    /*
+    void SetSystemTime(const TTime &tm)
     {
-        // t [millisec]
-        fNanoSec  = (t*1000000)%1000;
-        t /= 1000;
-        fSec      = t%60;
-        t /= 60;
-        fMin      = t%60;
-        t /= 60;
-        fHour     = t%24;
+        fTime = (ULong_t)tm%(24*hor);
     }
-
-    void SetTime(const TTime &t);
-
-    void SetTime(Double_t t)
-    {
-        // t [s]
-        fNanoSec  = (UInt_t)(fmod(t, 1)*1e9);
-        fSec      = (Byte_t)fmod(t, 60);
-        t /= 60;
-        fMin      = (Byte_t)fmod(t, 60);
-        t /= 60;
-        fHour     = (Byte_t)fmod(t, 24);
-    }
-
-    void SetTime(Byte_t h, Byte_t m, Byte_t s, UInt_t ns)
-    {
-        fHour    = h;
-        fMin     = m;
-        fSec     = s;
-        fNanoSec = ns;
-    }
-
-    void SetDuration(UInt_t t)
-    {
-	fDuration = t;
-    }
-
-    UInt_t GetDuration()
-    {
-	return fDuration;
-    }
-
+     */
     operator double() const //[s]
     {
-        return fNanoSec/1e9+(fHour*60*60+fMin*60+fSec);
+        return fMjd*24*3600+((Long_t)fTime+fNanoSec*1e6)*1000;
     }
     double operator()() const //[s]
@@ -120,41 +117,63 @@
     }
 
-    Byte_t GetHour() const { return fHour; }
-    Byte_t GetMin() const { return fMin; }
-    Byte_t GetSec() const { return fSec; }
-    UInt_t GetNanoSec() const { return fNanoSec; }
+    void GetDate(UShort_t &y, Byte_t &m, Byte_t &d) const;
+    void GetTime(Byte_t &h, Byte_t &m, Byte_t &s, UShort_t &ms) const // Time of Day returned in the range [0h, 24h)
+    {
+        Long_t tm = GetTime24();
+        ms  = tm%1000;
+        tm /= 1000;
+        s   = tm%60;
+        tm /= 60;
+        m   = tm%60;
+        tm /= 60;
+        h   = tm;
+    }
+    Long_t GetTime() const // Time of Day returned in the range [-11h, 13h)
+    { return (Long_t)fTime; }
 
-    ClassDef(MTime, 2)	//A generalized MARS time stamp
+    void GetTime(Byte_t &h, Byte_t &m, Byte_t &s) const
+    {
+        UShort_t ms;
+        GetTime(h, m, s, ms);
+    }
+
+    ClassDef(MTime, 3)	//A generalized MARS time stamp
 };
 
-inline Double_t operator-(MTime &t1, MTime &t2)
+inline bool operator<(MTime &t1, MTime &t2)
 {
-    return t1()-t2();
+    if (t1.fMjd<t2.fMjd)
+        return true;
+    if (t1.fMjd==t2.fMjd && t1.fTime<t2.fTime)
+        return true;
+    if (t1.fMjd==t2.fMjd && t1.fTime==t2.fTime && t1.fNanoSec<t2.fNanoSec)
+        return true;
+    return false;
 }
-
-inline Bool_t operator<(MTime &t1, MTime &t2)
+inline bool operator>(MTime &t1, MTime &t2)
 {
-    return t1()<t2();
+    if (t1.fMjd>t2.fMjd)
+        return true;
+    if (t1.fMjd==t2.fMjd && t1.fTime>t2.fTime)
+        return true;
+    if (t1.fMjd==t2.fMjd && t1.fTime==t2.fTime && t1.fNanoSec>t2.fNanoSec)
+        return true;
+    return false;
 }
-
-inline Bool_t operator>(MTime &t1, MTime &t2)
+inline bool operator<=(MTime &t1, MTime &t2)
 {
-    return t1()>t2();
+    return !(t1>t2);
 }
-
-inline Bool_t operator<=(MTime &t1, MTime &t2)
+inline bool operator>=(MTime &t1, MTime &t2)
 {
-    return t1<=t2();
+    return !(t1<t2);
 }
-
-inline Bool_t operator>=(MTime &t1, MTime &t2)
+inline bool operator==(MTime &t1, MTime &t2)
 {
-    return t1()>=t2();
+    return t1.fNanoSec==t2.fNanoSec && t1.fTime==t2.fTime && t1.fMjd==t2.fMjd;
 }
-
-inline Bool_t operator==(MTime &t1, MTime &t2)
+inline bool operator!=(MTime &t1, MTime &t2)
 {
-    return t1()==t2();
+    return t1.fNanoSec!=t2.fNanoSec || t1.fTime!=t2.fTime || t1.fMjd!=t2.fMjd;
 }
-
 #endif
Index: /trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc	(revision 2606)
+++ /trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc	(revision 2607)
@@ -190,5 +190,5 @@
     //MReadTree::Notify();
 
-    *fLog << err << "ERROR - ReInit of '" << tlist->GetName() << "' failed." << endl;
+    *fLog << err << "ERROR - ReInit of '" << tlist->GetDescriptor() << "' failed." << endl;
     return kFALSE;
 }
Index: /trunk/MagicSoft/Mars/mfileio/MReadReports.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MReadReports.cc	(revision 2606)
+++ /trunk/MagicSoft/Mars/mfileio/MReadReports.cc	(revision 2607)
@@ -70,6 +70,7 @@
 #include "MTime.h"
 #include "MParList.h"
-#include "MReadTree.h"
 #include "MTaskList.h"
+
+#include "MReadMarsFile.h"
 
 ClassImp(MReadReports);
@@ -124,7 +125,7 @@
 // name in time.
 //
-// All calls to AddTree _must_ be before the calls to AddFile!
-//
-void MReadReports::AddTree(const char *tree, const char *time)
+// All calls to AddTree _must_ be BEFORE the calls to AddFile!
+//
+void MReadReports::AddTree(const char *tree, const char *time, Bool_t master)
 {
     /*
@@ -136,7 +137,16 @@
     }
     */
-    MReadTree *t = new MReadTree(tree);
+
+    if (master && TestBit(kHasMaster))
+    {
+        *fLog << warn << GetDescriptor() << " already has a master tree... ignored." << endl;
+        master = kFALSE;
+    }
+
+    MReadTree *t = master ? new MReadMarsFile(tree) : new MReadTree(tree);
     t->SetName(tree);
     t->SetTitle(time?time:"");
+    if (master)
+        t->SetBit(kHasMaster);
 
     if (!fEnableAutoScheme)
@@ -154,5 +164,5 @@
 // Schedule a file or several files (using widcards) for reading.
 //
-// All calls to AddTree _must_ be before the calls to AddFile!
+// All calls to AddTree _must_ be BEFORE the calls to AddFile!
 //
 Int_t MReadReports::AddFile(const char *fname, Int_t entries)
@@ -188,4 +198,10 @@
     while ((tree=(MReadTree*)NextT()))
     {
+        if (((TChain*)tree->fChain)->GetListOfFiles()->GetEntries()==0)
+        {
+            *fLog << warn << "No files for Tree " << tree->GetName() << "... skipped." << endl;
+            continue;
+        }
+
         TString tn(tree->GetTitle());
         if (tn.IsNull())
@@ -224,5 +240,5 @@
     }
 
-    fPos.Set(i);
+    fPosEntry.Set(i);
 
     return fTrees->CallPreProcess(plist);
@@ -241,4 +257,62 @@
 // --------------------------------------------------------------------------
 //
+// Do not use if fChains->GetSize()==0 !!!
+//
+Int_t MReadReports::FindNextTime()
+{
+    Int_t i=0;
+
+    TIter NextC(fChains);
+    TChain *c=0;
+
+    Int_t nmin=0;
+    MTime tmin(**GetTime((TChain*)NextC()));
+
+    while ((c=(TChain*)NextC()))
+    {
+        MTime &t = **GetTime(c);
+        i++;
+
+        if (t >= tmin)
+            continue;
+
+        tmin = t;
+        nmin = i;
+    }
+    return nmin;
+}
+
+/*
+Bool_t MReadReports::Notify()
+{
+    Bool_t same = kTRUE;
+    for (int i=1; i<fPosTree.GetSize(); i++)
+        if (fPosTree[i]!=fPosTree[0])
+        {
+            same = kFALSE;
+            break;
+        }
+
+    Int_t tn = chain->GetTreeNumber();
+
+    Bool_t read=kFALSE;
+    if (fPosTree[nmin] != tn)
+    {
+        fPosTree[nmin] = tn;
+        read = kTRUE;
+    }
+
+    if (!same || !read)
+        return kTRUE;
+
+
+    *fLog << dbg << "Read Run Headers!" << endl;
+
+    return kTRUE;
+}
+*/
+
+// --------------------------------------------------------------------------
+//
 // Check which is the next tree to read from. Read an event from this tree.
 // Sets the StreamId accordingly.
@@ -248,37 +322,18 @@
     while (fChains->GetSize())
     {
-        Int_t i=0;
-
-        MTime tmin;
-
-        Int_t nmin=0;
-
-        TIter NextC(fChains);
-        TChain *c=0;
-        while ((c=(TChain*)NextC()))
+        const Int_t nmin=FindNextTime();
+
+        TChain *chain = (TChain*)fChains->At(nmin);
+
+        //Int_t before = chain->GetTreeNumber();
+        if (chain->GetEntry(++fPosEntry[nmin])>0)
         {
-            MTime &t = **GetTime(c);
-
-            if (i==0)
-                tmin = t;
-
-            if (t < tmin)
+            MTask *task = (MTask*)fTrees->GetList()->At(nmin);
+
+            if (task->CallProcess())
             {
-                tmin = t;
-                nmin = i;
+                fList->SetStreamId(task->GetName());
+                return kTRUE;
             }
-            i++;
-        }
-
-        TChain *chain = (TChain*)fChains->At(nmin);
-
-        chain->GetEntry(++fPos[nmin]);
-
-        // FIXME: Use Stream ID and call CallProcess() ?
-        Bool_t rc = ((MTask*)fTrees->GetList()->At(nmin))->CallProcess();
-        if (rc)
-        {
-            fList->SetStreamId(fTrees->GetList()->At(nmin)->GetName());
-            return kTRUE;
         }
 
Index: /trunk/MagicSoft/Mars/mfileio/MReadReports.h
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MReadReports.h	(revision 2606)
+++ /trunk/MagicSoft/Mars/mfileio/MReadReports.h	(revision 2607)
@@ -17,14 +17,16 @@
 {
 private:
-    MTaskList *fTrees;  // Hold the trees which are scheduled for reading
-    TList     *fChains; // Hold TChains to read the times in advance
+    MTaskList *fTrees;    // Hold the trees which are scheduled for reading
+    TList     *fChains;   // Hold TChains to read the times in advance
 
-    TArrayL    fPos;    // Store the position in each tree/chain
+    TArrayL    fPosEntry; // Store the position in each tree/chain
+    TArrayL    fPosTree;  // Number of Tree in file.
 
-    MTask     *fList;   // pointer to the task list to set the stream id
+    MTask     *fList;     // pointer to the task list to set the stream id
 
     Bool_t     fEnableAutoScheme;
 
     MTime** GetTime(TChain *c) const;
+    Int_t   FindNextTime();
 
     UInt_t  GetEntries() { return 0; }
@@ -34,9 +36,20 @@
     Int_t   PostProcess();
 
+    //Bool_t  Notify();
+
+    enum {
+        //MReadTree::kChainWasChanged = BIT(14)
+        kHasMaster = BIT(15)
+    };
+
 public:
     MReadReports(); 
     ~MReadReports(); 
 
-    void  AddTree(const char *tree, const char *time=NULL);
+    void  AddTree(const char *tree, const char *time=NULL, Bool_t master=kFALSE);
+    void  AddTree(const char *tree, Bool_t master)
+    {
+        AddTree(tree, NULL, master);
+    }
     Int_t AddFile(const char *fname, Int_t entries=-1);
     void  AddToBranchList(const char *name);
@@ -44,5 +57,5 @@
     void  PrintStatistics(const Int_t lvl=0, Bool_t title=kFALSE) const;
 
-    void  EnableAutoScheme(Bool_t e=kTRUE) { fEnableAutoScheme = e; }
+    void  EnableAutoScheme(Bool_t e=kTRUE) { fEnableAutoScheme = e; } // Must be called BEFORE AddTree!
 
     ClassDef(MReadReports, 0) // Reads events and reports from a root file ordered in time
Index: /trunk/MagicSoft/Mars/mfileio/MReadTree.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 2606)
+++ /trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 2607)
@@ -192,5 +192,5 @@
                 continue;
 
-            *fLog << err << "ERROR - File corrupttion detected:" << endl;
+            *fLog << err << "ERROR - File corruption detected:" << endl;
             *fLog << "  Due to several circumstances (such at a bug in MReadTree or wrong" << endl;
             *fLog << "  usage of the file UPDATE mode) you may have produced a file in which" << endl;
@@ -232,5 +232,15 @@
     *fLog << GetNumEntry()-1 << ")" << endl;
 
-    //fNotify->Notify();
+    if (!fNotify)
+        return kTRUE;
+
+    TIter Next(fNotify);
+    TObject *o=NULL;
+    while ((o=Next()))
+        if (!o->Notify())
+        {
+            *fLog << err << "Calling Notify() for object " << o->GetName() << " failed... abort." << endl;
+            return kFALSE;
+        }
 
     return kTRUE;
Index: /trunk/MagicSoft/Mars/mraw/MRawCrateArray.cc
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawCrateArray.cc	(revision 2606)
+++ /trunk/MagicSoft/Mars/mraw/MRawCrateArray.cc	(revision 2607)
@@ -81,4 +81,9 @@
 }
 
+void MRawCrateArray::Print(Option_t *t) const
+{
+    fArray->Print();
+}
+
 void MRawCrateArray::SetSize(Int_t i)
 {
Index: /trunk/MagicSoft/Mars/mraw/MRawCrateArray.h
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawCrateArray.h	(revision 2606)
+++ /trunk/MagicSoft/Mars/mraw/MRawCrateArray.h	(revision 2607)
@@ -24,4 +24,5 @@
 
     void Clear(Option_t *opt=NULL);
+    void Print(Option_t *t=NULL) const;
 
     void SetSize(Int_t i);
Index: /trunk/MagicSoft/Mars/readdaq.cc
===================================================================
--- /trunk/MagicSoft/Mars/readdaq.cc	(revision 2606)
+++ /trunk/MagicSoft/Mars/readdaq.cc	(revision 2607)
@@ -54,4 +54,5 @@
     gLog << "     -vn: Verbosity level n [default=2]" << endl;
     gLog << "     -d1: print data in decimal values" << endl;
+    gLog << "     -c1: print MRawCrateArray data" << endl;
     gLog << "     -?/-h: This help" << endl << endl;
 }
@@ -80,5 +81,6 @@
         gLog.SetNoColors();
 
-    const bool kDecimal = arg.HasOption("-d") && arg.GetIntAndRemove("-d")==1;
+    const bool kDecimal    = arg.HasOption("-d") && arg.GetIntAndRemove("-d")==1;
+    const bool kPrintArray = arg.HasOption("-c") && arg.GetIntAndRemove("-c")==1;
 
     //
@@ -164,5 +166,6 @@
     tasks.AddToList(&print1);
     tasks.AddToList(&print2);
-    tasks.AddToList(&print3);
+    if (kPrintArray)
+        tasks.AddToList(&print3);
     tasks.AddToList(&print4);
 
