Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7423)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7424)
@@ -38,4 +38,5 @@
      - improved handling of allocated memory (still to be checked
        further)
+     - added Print function
 
    * mranforest/MRanForestCalc.[h,cc]:
@@ -44,7 +45,10 @@
      - set version number to 1 to allow writing it to ganymed output
      - added Print function
+     - Use GetEntriesFast and UncheckedAt in Process for
+       single tree forests
 
    * mranforest/MRanTree.[h,cc]:
      - replaced type of fClassify by Bool_t
+     - added Getter for fClassify
 
    * mjtrain/MJTrainDisp.cc, mjtrain/MJTrainEnegry.cc:
Index: trunk/MagicSoft/Mars/mranforest/MRanForest.cc
===================================================================
--- trunk/MagicSoft/Mars/mranforest/MRanForest.cc	(revision 7423)
+++ trunk/MagicSoft/Mars/mranforest/MRanForest.cc	(revision 7424)
@@ -133,7 +133,29 @@
 }
 
-MRanTree *MRanForest::GetTree(Int_t i)
-{
-    return (MRanTree*)(fForest->At(i));
+void MRanForest::Print(Option_t *o) const
+{
+    *fLog << inf << GetDescriptor() << ": " << endl;
+    MRanTree *t = GetTree(0);
+    if (t)
+    {
+        *fLog << "Setting up RF for training on target:" << endl;
+        *fLog << " " << t->GetTitle() << endl;
+    }
+    if (fRules)
+    {
+        *fLog << "Following rules are used as input to RF:" << endl;
+        for (Int_t i=0;i<fRules->GetNumEntries();i++)
+            *fLog << " " << i << ") " << (*fRules)[i].GetRule() << endl;
+    }
+    *fLog << "Random forest parameters:" << endl;
+    if (t)
+    {
+        *fLog << " - " << (t->IsClassify()?"classification":"regression") << " tree" << endl;
+        *fLog << " - Number of trys: " << t->GetNumTry() << endl;
+        *fLog << " - Node size: " << t->GetNdSize() << endl;
+    }
+    *fLog << " - Number of trees: " << fNumTrees << endl;
+    *fLog << " - User value: " << fUserVal << endl;
+    *fLog << endl;
 }
 
@@ -335,5 +357,4 @@
     for (Int_t i=0;i<dim;i++)
         *fLog << " " << i << ") " << (*fRules)[i].GetRule() << endl;
-
     *fLog << endl;
 
@@ -351,4 +372,5 @@
         return kFALSE;
     }
+    fRanTree->SetName(target_rule);
 
     const Int_t tryest = TMath::Nint(TMath::Sqrt(dim));
Index: trunk/MagicSoft/Mars/mranforest/MRanForest.h
===================================================================
--- trunk/MagicSoft/Mars/mranforest/MRanForest.h	(revision 7423)
+++ trunk/MagicSoft/Mars/mranforest/MRanForest.h	(revision 7424)
@@ -73,6 +73,7 @@
     MRanForest(const char *name=NULL, const char *title=NULL);
     MRanForest(const MRanForest &rf);
+    ~MRanForest();
 
-    ~MRanForest();
+    void Print(Option_t *o="") const; //*MENU*
 
     void SetGrid(const TArrayD &grid);
@@ -94,8 +95,8 @@
 
     // getter methods
-    TObjArray  *GetForest()      { return fForest; }
-    MRanTree   *GetCurTree()     { return fRanTree; }
-    MRanTree   *GetTree(Int_t i);
-    MDataArray *GetRules()       { return fRules; }
+    TObjArray  *GetForest() const      { return fForest; }
+    MRanTree   *GetCurTree() const     { return fRanTree; }
+    MRanTree   *GetTree(Int_t i) const { return static_cast<MRanTree*>(fForest->UncheckedAt(i)); }
+    MDataArray *GetRules() const       { return fRules; }
 
 
Index: trunk/MagicSoft/Mars/mranforest/MRanForestCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mranforest/MRanForestCalc.cc	(revision 7423)
+++ trunk/MagicSoft/Mars/mranforest/MRanForestCalc.cc	(revision 7424)
@@ -309,7 +309,7 @@
 
     // --------------- Single Tree RF -------------------
-    if (fEForests.GetEntries()==1)
-    {
-        MRanForest *rf = (MRanForest*)fEForests[0];
+    if (fEForests.GetEntriesFast()==1)
+    {
+        MRanForest *rf = static_cast<MRanForest*>fEForests.UncheckedAt(0);
         fRFOut->SetVal(rf->CalcHadroness(event));
         fRFOut->SetReadyToSave();
Index: trunk/MagicSoft/Mars/mranforest/MRanTree.h
===================================================================
--- trunk/MagicSoft/Mars/mranforest/MRanTree.h	(revision 7423)
+++ trunk/MagicSoft/Mars/mranforest/MRanTree.h	(revision 7424)
@@ -78,4 +78,5 @@
     Int_t GetNumNodes()          const { return fNumNodes; }
     Int_t GetNumEndNodes()       const { return fNumEndNodes; }
+    Int_t IsClassify() const { return fClassify; }
     Float_t GetError() const { return fError; }
 
