Fix when not being able to open the input file
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 May 2013 15:30:06 +0000 (15:30 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 May 2013 15:30:06 +0000 (15:30 +0000)
STEER/AOD/AliAODInputHandler.cxx

index 13178ab..a88b779 100644 (file)
@@ -248,6 +248,10 @@ void AliAODInputHandler::ConnectFriends()
        TString aodTreeFName,aodFriendTreeFName;
        TTree *ttree = fTree->GetTree();
        if (!ttree) ttree = fTree;
+   if(!ttree->GetCurrentFile()){
+     AliWarning("Couldn't get current AOD file, not connecting friends");
+     return;
+   }
        aodTreeFName = ttree->GetCurrentFile()->GetName();
        
        while((obj = (TNamed*)next())) {