Coverity fix (Diego)
authorscompar <scompar@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 26 Mar 2013 09:15:03 +0000 (09:15 +0000)
committerscompar <scompar@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 26 Mar 2013 09:15:03 +0000 (09:15 +0000)
PWGPP/MUON/lite/AliAnalysisTaskMuonQA.cxx

index 676f5d3..75efe1b 100644 (file)
@@ -404,10 +404,12 @@ void AliAnalysisTaskMuonQA::UserExec(Option_t *)
   Bool_t t0PileUp = kFALSE, spdPileUp = kFALSE, bgID = kFALSE;
   spdPileUp = fESD->IsPileupFromSPDInMultBins();
   AliPhysicsSelection *physicsSelection = (AliPhysicsSelection*)((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->GetEventSelection();
-  AliTriggerAnalysis * triggerAnalysis = (AliTriggerAnalysis*)physicsSelection->GetTriggerAnalysis();
-  if ( physicsSelection && triggerAnalysis ) {
-    t0PileUp = triggerAnalysis->EvaluateTrigger(fESD, (AliTriggerAnalysis::Trigger) (AliTriggerAnalysis::kOfflineFlag | AliTriggerAnalysis::kT0Pileup));
-    bgID = triggerAnalysis->EvaluateTrigger(fESD,  (AliTriggerAnalysis::Trigger) (AliTriggerAnalysis::kSPDClsVsTrkBG | AliTriggerAnalysis::kOfflineFlag)); 
+  if ( physicsSelection ) {
+    AliTriggerAnalysis * triggerAnalysis = (AliTriggerAnalysis*)physicsSelection->GetTriggerAnalysis();
+    if ( triggerAnalysis ) {
+      t0PileUp = triggerAnalysis->EvaluateTrigger(fESD, (AliTriggerAnalysis::Trigger) (AliTriggerAnalysis::kOfflineFlag | AliTriggerAnalysis::kT0Pileup));
+      bgID = triggerAnalysis->EvaluateTrigger(fESD,  (AliTriggerAnalysis::Trigger) (AliTriggerAnalysis::kSPDClsVsTrkBG | AliTriggerAnalysis::kOfflineFlag));
+    }
   }
 
   UInt_t geomAccMask = ( AliMuonTrackCuts::kMuEta | AliMuonTrackCuts::kMuThetaAbs );