Actually this IS needed to work offline (with Offline created ESDs)
authorzampolli <chiara.zampolli@cern.ch>
Mon, 22 Sep 2014 11:53:49 +0000 (13:53 +0200)
committerzampolli <chiara.zampolli@cern.ch>
Mon, 22 Sep 2014 11:53:49 +0000 (13:53 +0200)
TPC/Calib/AliAnalysisTaskPt.cxx

index 62e2ec3..8e81dd8 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 {