Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 9040)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 9041)
@@ -19,4 +19,28 @@
                                                  -*-*- END OF LINE -*-*-
 
+ 2008/07/25 Thomas Bretz
+
+   * mbase/MStatusDisplay.cc:
+     - expand path name for csv files
+
+   * mfileio/MReadFiles.cc:
+     - print a warning if no file was added
+
+   * mfileio/MReadTree.cc:
+     - updated warning if no file was added
+     
+   * mfileio/MReadScanFile.[h,cc]:
+     - for safety add a postprocessing removing the contents
+       from the list
+     - also removing the contents from the list before filling
+
+   * mhbase/MH3.cc:
+     - fixed an output
+
+   * mtools/MTFillMatrix.[h,cc]:
+     - added a maximum number the eventloop is running over
+
+
+
  2008/07/23 Thomas Bretz
 
@@ -51,4 +75,8 @@
      - added a second InsertUpdate
      - added ExistRow
+
+   * datacenter/scripts/runcallisto:
+     - adapted to all other changes
+     - removed merpping of caco-files
 
 
Index: /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 9040)
+++ /trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc	(revision 9041)
@@ -2950,4 +2950,6 @@
         return kFALSE;
 
+    gSystem->ExpandPathName(name);
+
     ofstream fout(name);
     if (!fout)
Index: /trunk/MagicSoft/Mars/mfileio/MReadFiles.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MReadFiles.cc	(revision 9040)
+++ /trunk/MagicSoft/Mars/mfileio/MReadFiles.cc	(revision 9041)
@@ -260,4 +260,7 @@
         *fLog << inf2 << num << " files added to list." << endl;
 
+    if (num==0)
+        *fLog << warn << "WARNING - No files found at " << txt << endl;
+
     return num;
 }
Index: /trunk/MagicSoft/Mars/mfileio/MReadScanFile.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MReadScanFile.cc	(revision 9040)
+++ /trunk/MagicSoft/Mars/mfileio/MReadScanFile.cc	(revision 9041)
@@ -177,4 +177,6 @@
 Bool_t MReadScanFile::AnalyzeHeader(MParList &plist)
 {
+    fList.Clear("nodelete");
+
     fLength = -1;
     if (!ReadDelimiter())
@@ -191,4 +193,5 @@
     }
  */
+ 
     TObjArray *arr = line.Tokenize('*');
 
@@ -215,4 +218,10 @@
 }
 
+Int_t MReadScanFile::PostProcess()
+{
+    fList.Clear("nodelete");
+    return kTRUE;
+}
+
 UInt_t MReadScanFile::GetEntries()
 {
Index: /trunk/MagicSoft/Mars/mfileio/MReadScanFile.h
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MReadScanFile.h	(revision 9040)
+++ /trunk/MagicSoft/Mars/mfileio/MReadScanFile.h	(revision 9041)
@@ -21,4 +21,5 @@
     Bool_t ReadHeader();
     Int_t  ReadEvent();
+    Int_t  PostProcess();
 
 public:
Index: /trunk/MagicSoft/Mars/mfileio/MReadTree.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 9040)
+++ /trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 9041)
@@ -295,4 +295,6 @@
 Bool_t MReadTree::Notify()
 {
+    cout << "--notify1--" << endl;
+
     //
     // Do a consistency check for all branches
@@ -300,4 +302,6 @@
     if (!CheckBranchSize())
         return kFALSE;
+
+    cout << "--notify2--" << endl;
 
     *fLog << inf << GetDescriptor() << ": Next file #" << GetFileIndex();
@@ -342,4 +346,6 @@
         }
 
+    cout << "--done--" << endl;
+
     return kTRUE;
 }
@@ -390,5 +396,5 @@
     }
     else
-        *fLog << warn << "WARNING: '" << newname << "' not added to " << GetDescriptor() << endl;
+        *fLog << warn << GetDescriptor() << ": WARNING - No files found at " << newname << endl;
 
     return numfiles;
@@ -994,9 +1000,12 @@
 
     if (fChain)
+    {
+//        cout << "LE: " << (int)fChain->GetLastError() << endl;
+
         switch (fChain->GetLastError())
         {
         case MChain::kFatalError:
             *fLog << err << GetDescriptor() << " - ERROR: Notify() failed." << endl;
-            return kERROR;
+            return kTRUE;
         case MChain::kCannotAccessFile:
             *fLog << err << GetDescriptor() << " - ERROR: TChain::LoadTree is unable to access requested file." << endl;
@@ -1010,4 +1019,5 @@
             return kTRUE;
         }
+    }
 
     return rc;
@@ -1180,5 +1190,5 @@
 // --------------------------------------------------------------------------
 //
-//  This schedules a TObject which Notify(9 function is called in case
+//  This schedules a TObject which Notify() function is called in case
 //  of MReadTree (TChain) switches from one file in the chain to another
 //  one.
Index: /trunk/MagicSoft/Mars/mhbase/MH3.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 9040)
+++ /trunk/MagicSoft/Mars/mhbase/MH3.cc	(revision 9041)
@@ -580,5 +580,5 @@
                 if (!binsx)
                 {
-                    *fLog << err << dbginf << "Neither '" << bx << "' nor '" << binsx << fName << "' found... aborting." << endl;
+                    *fLog << err << dbginf << "Neither '" << bx << "' nor '" << fName << "' found... aborting." << endl;
                     return kFALSE;
                 }
Index: /trunk/MagicSoft/Mars/mtools/MTFillMatrix.cc
===================================================================
--- /trunk/MagicSoft/Mars/mtools/MTFillMatrix.cc	(revision 9040)
+++ /trunk/MagicSoft/Mars/mtools/MTFillMatrix.cc	(revision 9041)
@@ -76,4 +76,17 @@
 // fill.WriteMatrices("myfile.root");
 //
+//
+// Task List execution
+// ----------------------------------------------
+//
+// The tasklist is excuted in the follwowing order:
+//   - fReader      set by SetReader
+//   - fPreTasks    in the order as set with the SetPreTask functions
+//   - fPreCuts     in the order as set with the SetPreCut  functions
+//   - Selection    the event selection
+//   - fPostTasks   in the order as set with the SetPostTask functions
+//   - Fill Matrix
+//   - Write output
+//
 /////////////////////////////////////////////////////////////////////////////
 #include "MTFillMatrix.h"
@@ -163,5 +176,6 @@
 MTFillMatrix::MTFillMatrix(const char *name, const char *title)
 : fReference(0), fReader(0), fDestMatrix1(0), fDestMatrix2(0),
-  fNumDestEvents1(0), fNumDestEvents2(0), fWriteFile1(0), fWriteFile2(0)
+  fNumDestEvents1(0), fNumDestEvents2(0), fNumMaxEvents(0),
+  fWriteFile1(0), fWriteFile2(0)
 {
     Init(name, title);
@@ -180,5 +194,6 @@
 MTFillMatrix::MTFillMatrix(const MH3 *ref, const char *name, const char *title)
 : fReference(0), fReader(0), fDestMatrix1(0), fDestMatrix2(0),
-  fNumDestEvents1(0), fNumDestEvents2(0), fWriteFile1(0), fWriteFile2(0)
+  fNumDestEvents1(0), fNumDestEvents2(0), fNumMaxEvents(0),
+  fWriteFile1(0), fWriteFile2(0)
 {
     Init(name, title);
@@ -413,5 +428,5 @@
     evtloop.SetLogStream(fLog);
 
-    const Bool_t rc = evtloop.Eventloop();
+    const Bool_t rc = evtloop.Eventloop(fNumMaxEvents);
 
     if (selector)
Index: /trunk/MagicSoft/Mars/mtools/MTFillMatrix.h
===================================================================
--- /trunk/MagicSoft/Mars/mtools/MTFillMatrix.h	(revision 9040)
+++ /trunk/MagicSoft/Mars/mtools/MTFillMatrix.h	(revision 9041)
@@ -27,4 +27,6 @@
     Int_t     fNumDestEvents2;
 
+    Int_t     fNumMaxEvents;
+
     MTask    *fWriteFile1;
     MTask    *fWriteFile2;
@@ -52,5 +54,5 @@
         fDestMatrix1 = matrix;
         if (num>0)
-            fNumDestEvents1 = num;
+            SetNumDestEvents1(num);
     }
     void SetWriteFile1(MTask *write, UInt_t num=0)
@@ -58,9 +60,5 @@
         fWriteFile1 = write;
         if (num>0)
-            fNumDestEvents1 = num;
-    }
-    void SetNumDestEvents1(UInt_t num)
-    {
-        fNumDestEvents1 = num;
+            SetNumDestEvents1(num);
     }
     void SetDestMatrix2(MHMatrix *matrix, UInt_t num=0)
@@ -68,5 +66,5 @@
         fDestMatrix2 = matrix;
         if (num>0)
-            fNumDestEvents2 = num;
+            SetNumDestEvents2(num);
     }
     void SetWriteFile2(MTask *write, UInt_t num=0)
@@ -74,10 +72,9 @@
         fWriteFile2 = write;
         if (num>0)
-            fNumDestEvents2 = num;
+            SetNumDestEvents2(num);
     }
-    void SetNumDestEvents2(UInt_t num)
-    {
-        fNumDestEvents2 = num;
-    }
+    void SetNumDestEvents1(UInt_t num) { fNumDestEvents1 = num; }
+    void SetNumDestEvents2(UInt_t num) { fNumDestEvents2 = num; }
+    void SetMaxEvents(UInt_t num)      { fNumMaxEvents = num; }
 
     void SetReader(MRead *task) { fReader = task; }
