Index: trunk/MagicSoft/Mars/mfileio/MChain.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MChain.cc	(revision 6084)
+++ trunk/MagicSoft/Mars/mfileio/MChain.cc	(revision 6085)
@@ -36,32 +36,33 @@
 using namespace std;
 
-//#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00)
-//Int_t MChain::LoadTree(Int_t entry)
-//#else
+// --------------------------------------------------------------------------
+//
+// This is the code from TChain::LoadTree but skips the
+// notification in LoadTree. If LoadTree raises the notification
+// a flag is set and the notification is done by hand. This
+// is done to be able to catch the return value from Notify. If
+// it has not been successfull -15 is returned.
+// This is to support return values from Notify()/Reinit().
+// The status can be checked afterward by HasError/HasFatalError/GetError
+//
 Long64_t MChain::LoadTree(Long64_t entry)
-//#endif
 {
-    //
-    // This is the code from TChain::LoadTree but skips the
-    // notification in LoadTree. If LoadTree raises the notification
-    // a flag is set and the notification is done by hand. This
-    // is done to be able to catch the return value from Notify. If
-    // it has not been successfull -15 is returned.
-    // This is to support return values from Notify()/Reinit()
-    //
     TObject *notify = GetNotify();
 
     SetNotify(this);
 
-//#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00)
-//    Int_t
-//#else
-    Long64_t
-//#endif
-        rc = TChain::LoadTree(entry);
+    Long64_t rc = TChain::LoadTree(entry);
 
-    if (rc >= 0 && fNotified && notify)
-        if (!notify->Notify())
+    // <0: LoadTree failed
+    // =0: LoadTree was ok
+    // >0: Notify failed
+    fLastError = rc;
+
+    if (rc>=0 && fNotified && notify)
+    {
+        fLastError = notify->Notify() ? 0 : kFatalError;
+        if (fLastError==kFatalError)
             rc = -15;
+    }
 
     SetNotify(notify);
@@ -69,3 +70,2 @@
     return rc;
 }
-
Index: trunk/MagicSoft/Mars/mfileio/MChain.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MChain.h	(revision 6084)
+++ trunk/MagicSoft/Mars/mfileio/MChain.h	(revision 6085)
@@ -8,21 +8,37 @@
 class MChain : public TChain
 {
+public:
+    // Taken from TChain::LoadTree --- may have to be updated for different root versions
+    enum {
+        kCannotAccessTree = -4,  // Tree not found in file
+        kCannotAccessFile = -3,  // File access impossible
+        kOutOfRange       = -2,  // Event doesn't exist
+        kNoError          =  0,  // LoadTree succeeded
+        kFatalError       =  1   // LoadTree succeeded, but Notify() returned fatal error
+    };
+
 private:
-    Bool_t fNotified;
+    Bool_t   fNotified;
+    Long64_t fLastError; // <0: LoadTree failed, =0: LoadTree was ok, >0: Notify failed
 
 public:
-    MChain() : TChain(), fNotified(kFALSE) {}
-    MChain(const char *name, const char *title="") : TChain(name, title), fNotified(kFALSE) {}
+    MChain() : TChain(), fNotified(kFALSE), fLastError(0) {}
+    MChain(const char *name, const char *title="") : TChain(name, title), fNotified(kFALSE), fLastError(0) {}
 
+    // Restart from scratch
     void ResetTree() { fTree = 0; fTreeNumber = -1; }
 
+    // Function to be notified and setting the notifier
     virtual Bool_t Notify() { fNotified = kTRUE; return kTRUE; }
     virtual void   SetNotify(TObject *obj) { fNotify = obj; fNotified = kFALSE; }
 
-//#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00)
-    Int_t LoadTree(Int_t entry) { return (Int_t)LoadTree((Long64_t)entry); }
-//#else
+    // Overwrite LoadTree (for different root versions)
+    Int_t    LoadTree(Int_t entry) { return (Int_t)LoadTree((Long64_t)entry); }
     Long64_t LoadTree(Long64_t entry);
-//#endif
+
+    // Handling for last error of LoadTree
+    Long64_t GetLastError() const { return fLastError; };
+    Bool_t   HasFatalError() const { return fLastError==kFatalError; }
+    Bool_t   HasError() const { return fLastError==0 ? kFALSE : kTRUE; }
 
     ClassDef(MChain, 1) // Class derived from TChain to give access to Notify-return value
Index: trunk/MagicSoft/Mars/mfileio/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 6084)
+++ trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 6085)
@@ -977,5 +977,26 @@
 
     if (rc)
+    {
         SetReadyToSave();
+        return kTRUE;
+    }
+
+    if (fChain)
+        switch (fChain->GetLastError())
+        {
+        case MChain::kFatalError:
+            *fLog << err << GetDescriptor() << " - ERROR: Notify() failed." << endl;
+            return kERROR;
+        case MChain::kCannotAccessFile:
+            *fLog << err << GetDescriptor() << " - ERROR: TChain::LoadTree is unable to access requested file." << endl;
+            return kERROR;
+        case MChain::kCannotAccessTree:
+            *fLog << err << GetDescriptor() << " - ERROR: TChain::LoadTree is unable to access requested tree." << endl;
+            return kERROR;
+        case MChain::kOutOfRange: // no more events available
+            return kFALSE;
+        case MChain::kNoError:    // go on!
+            return kTRUE;
+        }
 
     return rc;
Index: trunk/MagicSoft/Mars/mjobs/MJPedestal.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJPedestal.h	(revision 6084)
+++ trunk/MagicSoft/Mars/mjobs/MJPedestal.h	(revision 6085)
@@ -81,4 +81,6 @@
     Bool_t CheckEnvLocal();
 
+    const char*  GetOutputFileName() const;
+
 public:
     MJPedestal(const char *name=NULL, const char *title=NULL);
Index: trunk/MagicSoft/Mars/mpedestal/MPedPhotPix.h
===================================================================
--- trunk/MagicSoft/Mars/mpedestal/MPedPhotPix.h	(revision 6084)
+++ trunk/MagicSoft/Mars/mpedestal/MPedPhotPix.h	(revision 6085)
@@ -27,5 +27,5 @@
 
     //void SetMean(Float_t f) { fMean = f; }
-    void SetRms(Float_t f)  {MMath::ReducePrecision(f);  fRms  = f; }
+    void SetRms(Float_t f)  { MMath::ReducePrecision(f);  fRms  = f; }
     void Set(Float_t m, Float_t r, UInt_t n=1) { MMath::ReducePrecision(r); MMath::ReducePrecision(m); fMean = m; fRms = r; fNumEvents=n; }
 
