Index: trunk/MagicSoft/Mars/macros/getCollArea.C
===================================================================
--- trunk/MagicSoft/Mars/macros/getCollArea.C	(revision 963)
+++ trunk/MagicSoft/Mars/macros/getCollArea.C	(revision 965)
@@ -24,5 +24,5 @@
 
 
-void getCollArea(char *filename = "data/gamma_15_on.root" )
+void getCollArea(char *filename = "camera.root")
 { 
     // FIXME: Harald, you should tell the people what the result of
@@ -55,8 +55,15 @@
     //
     MReadTree reader("Events", filename);
+    reader.UseLeaf("fImpact");
+    reader.UseLeaf("fEnergy");
+    reader.UseLeaf("fNumFirstLevel");
     tasklist.AddToList(&reader);
 
     MMcCollectionAreaCalc effi;
     tasklist.AddToList(&effi);
+
+    MTask task;
+    tasklist.AddToList(&task);
+
 
     //
Index: trunk/MagicSoft/Mars/mbase/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 963)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 965)
@@ -38,4 +38,11 @@
 // MReadTree::SetEventNum after instantiating your MReadTree-object.       //
 //                                                                         //
+// To make reading much faster (up to a factor of 10 to 20) you can        //
+// ensure that only the data you are really processing is enabled by       //
+// calling MReadTree::UseLeaf.                                             //
+//                                                                         //
+// Later we'll use TChain::SetNotify to notify MReadTree if the TChain     //
+// starts to read a new file.                                              //
+//                                                                         //
 /////////////////////////////////////////////////////////////////////////////
 
@@ -67,5 +74,6 @@
 //
 MReadTree::MReadTree(const char *tname, const char *fname,
-                     const char *name, const char *title) : fNumEntry(0)
+                     const char *name, const char *title)
+    : fNumEntry(0), fLeafEnabled(kFALSE)
 {
     *fName  = name  ? name  : "MReadTree";
@@ -113,5 +121,8 @@
 //  anymore, tree wich are not existing in the first file are never read)
 //
-/*Int_t*/ void MReadTree::AddFile(const char *fname)
+//  Name may use the wildcarding notation, eg "xxx*.root" means all files
+//  starting with xxx in the current file system directory.
+//
+Int_t MReadTree::AddFile(const char *fname)
 {
     //
@@ -121,5 +132,24 @@
     // returns the number of file which were added
     //
-    /*return  root >3.0*/ fChain->Add(fname);
+    return fChain->Add(fname);
+}
+
+// --------------------------------------------------------------------------
+//
+// The first time this function is called all leafes/branches are disabled
+// and the given branch/leaf is enabled. By enabling only the branches you
+// are processing you can speed up your calculation many times (up to
+// a factor of 10 or 20)
+//
+void MReadTree::UseLeaf(const char *name)
+{
+    if (!fLeafEnabled)
+    {
+        *fLog << "Leaf choosing method enabled (only enabled leaves are read)." << endl;
+        fChain->SetBranchStatus("*", kFALSE);
+        fLeafEnabled = kTRUE;
+    }
+
+    fChain->SetBranchStatus(name, kTRUE);
 }
 
@@ -170,5 +200,5 @@
         // Get Name of Branch
         //
-        const char *name  = branch->GetName();
+        const char *name = branch->GetName();
 
         //
@@ -208,4 +238,5 @@
         //
         fChain->SetBranchAddress(name, pcont);
+
         *fLog << "Branch " << name << " enabled for reading." << endl;
 
@@ -227,18 +258,5 @@
 Bool_t MReadTree::Process()
 {
-    //
-    // check for end of file
-    //
-    if (fNumEntry>=fNumEntries)
-        return kFALSE;
-
-    //
-    // get entry
-    //
-    fChain->GetEntry(fNumEntry);
-
-    fNumEntry++;
-
-    return kTRUE;
+    return fChain->GetEntry(fNumEntry++, 0) == 0 ? kFALSE : kTRUE;
 }
 
@@ -249,7 +267,5 @@
 Bool_t MReadTree::GetEvent()
 {
-    fChain->GetEntry(fNumEntry);
-
-    return kTRUE;
+    return fChain->GetEntry(fNumEntry) == 0 ? kFALSE : kTRUE;
 }
 
Index: trunk/MagicSoft/Mars/mbase/MReadTree.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.h	(revision 963)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.h	(revision 965)
@@ -21,4 +21,6 @@
     UInt_t   fNumEntries; // Number of Events in Tree
 
+    Bool_t   fLeafEnabled; // Flag whether UseLeaf is called the first time or not
+
     Bool_t HasVeto(const char *name) const;
 
@@ -30,6 +32,8 @@
     Bool_t Process();
 
-    void AddFile(const char *fname);
-    void VetoBranch(const char *name);
+    Int_t AddFile(const char *fname);
+    void  VetoBranch(const char *name);
+
+    void UseLeaf(const char *name);
 
     Bool_t GetEvent();
