Added protection for TOF header and VZERO data
authoragheata <Andrei.Gheata@cern.ch>
Wed, 9 Apr 2014 08:35:44 +0000 (10:35 +0200)
committeragheata <Andrei.Gheata@cern.ch>
Wed, 9 Apr 2014 08:35:59 +0000 (10:35 +0200)
ANALYSIS/AliAnalysisTaskSE.cxx

index cdc7c3d..074bdb3 100644 (file)
@@ -411,9 +411,9 @@ void AliAnalysisTaskSE::Exec(Option_t* option)
            }
             if ((handler->NeedsTOFHeaderReplication() || merging) && (fgTOFHeader))
             {
-              *fgTOFHeader =  *(aod->GetTOFHeader());
+              if (aod->GetTOFHeader()) *fgTOFHeader =  *(aod->GetTOFHeader());
             }
-            if ((handler->NeedsVZEROReplication() || merging) && (fgAODVZERO))
+            if ((handler->NeedsVZEROReplication() || merging) && (fgAODVZERO) && aod->GetVZEROData())
             {
               *fgAODVZERO = *(aod->GetVZEROData());
             }