]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/Calib/AliAnalysisTaskPt.cxx
Actually this IS needed to work offline (with Offline created ESDs)
[u/mrichter/AliRoot.git] / TPC / Calib / AliAnalysisTaskPt.cxx
index 62e2ec3c3357cb93de17f78efaa9befb66e6e24e..8e81dd8c758bbb8b5d5700330a3a0e18f5156b13 100644 (file)
@@ -72,7 +72,18 @@ void AliAnalysisTaskPt::ConnectInputData(Option_t *)
        if (classInputHandler.Contains("HLT")) { // we are running in HLT
          fESDfriend = esdH->GetVfriendEvent();
        }
-       
+       else { /// we are running offline
+         if (esdH && esdH->GetTree()) {
+           Printf("...We got the tree...");
+           if (esdH->GetTree()->GetBranch("ESDfriend.")){
+             Printf("Yu-huuuu!!! friend branch found");
+             fESDfriend = ((AliESDInputHandler*)esdH)->GetESDfriend();
+           }
+           else {
+             Printf("No friend branch found");
+           }
+         }
+       }       
        Printf("and the result is: fESDfriend = %p", fESDfriend);
       }
       else {