ATO-98 add explicilty first tree from the list to the list of tree friends
authormivanov <marian.ivanov@cern.ch>
Fri, 19 Dec 2014 10:48:23 +0000 (11:48 +0100)
committermivanov <marian.ivanov@cern.ch>
Fri, 19 Dec 2014 10:50:38 +0000 (11:50 +0100)
TPC/TPCbase/AliTPCcalibDButil.cxx

index e7c9ee4..f2b1446 100644 (file)
@@ -3364,7 +3364,10 @@ TTree* AliTPCcalibDButil::ConnectDistortionTrees(TString baseDir, TString  selec
       if (!tree) continue;
       TString friendName=TString::Format("%s.%s.%s",path->At(plength-3)->GetName(),path->At(plength-2)->GetName(), tree->GetName()); 
       ::Info("AliTPCcalibDButil::ConnectDistortionTrees","%s",friendName.Data());  
-      if (tMain==0) tMain=tree;
+      if (tMain==0) {
+       tMain=tree;
+       tree  = dynamic_cast<TTree*>(finput->Get(list->At(ikey)->GetName()));
+      }
       tMain->AddFriend(tree,friendName.Data());  
     }
   }