Coverity (Francesco)
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 Jan 2011 15:18:31 +0000 (15:18 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 31 Jan 2011 15:18:31 +0000 (15:18 +0000)
PWG3/vertexingHF/AliAnalysisTaskSEDplus.cxx
PWG3/vertexingHF/AliAnalysisTaskSEDs.cxx

index d2ff3ac..bb72e94 100644 (file)
@@ -425,10 +425,10 @@ void AliAnalysisTaskSEDplus::Init(){
   
   //PostData(2,fRDCutsloose);//we should then put those cuts in a tlist if we have more than 1
   fListCuts=new TList();
-  AliRDHFCutsDplustoKpipi *production = new AliRDHFCutsDplustoKpipi();
-  production=fRDCutsProduction;
-  AliRDHFCutsDplustoKpipi *analysis = new AliRDHFCutsDplustoKpipi();
-  analysis=fRDCutsAnalysis;
+  AliRDHFCutsDplustoKpipi *production = new AliRDHFCutsDplustoKpipi(*fRDCutsProduction);
+  production->SetName("ProductionCuts");
+  AliRDHFCutsDplustoKpipi *analysis = new AliRDHFCutsDplustoKpipi(*fRDCutsAnalysis);
+  analysis->SetName("AnalysisCuts");
   
   fListCuts->Add(production);
   fListCuts->Add(analysis);
@@ -786,7 +786,7 @@ void AliAnalysisTaskSEDplus::UserExec(Option_t */*option*/)
     arrayLikeSign=(TClonesArray*)aod->GetList()->FindObject("LikeSign3Prong");
   }
 
-  if(!array3Prong) {
+  if(!aod || !array3Prong) {
     printf("AliAnalysisTaskSEDplus::UserExec: Charm3Prong branch not found!\n");
     return;
   }
@@ -833,7 +833,7 @@ void AliAnalysisTaskSEDplus::UserExec(Option_t */*option*/)
     arrayMC =  (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
     if(!arrayMC) {
       printf("AliAnalysisTaskSEDplus::UserExec: MC particles branch not found!\n");
-      //    return;
+      return;
     }
     
   // load MC header
index 65169ef..451a189 100644 (file)
@@ -215,10 +215,10 @@ void AliAnalysisTaskSEDs::Init()
   if(fDebug > 1) printf("AnalysisTaskSEDs::Init() \n");
 
   fListCuts=new TList();
-  AliRDHFCutsDstoKKpi *production = new AliRDHFCutsDstoKKpi();
-  production=fProdCuts;
-  AliRDHFCutsDstoKKpi *analysis = new AliRDHFCutsDstoKKpi();
-  analysis=fAnalysisCuts;
+  AliRDHFCutsDstoKKpi *production = new AliRDHFCutsDstoKKpi(*fProdCuts);
+  production->SetName("ProductionCuts");
+  AliRDHFCutsDstoKKpi *analysis = new AliRDHFCutsDstoKKpi(*fAnalysisCuts);
+  analysis->SetName("AnalysisCuts");
   
   fListCuts->Add(production);
   fListCuts->Add(analysis);
@@ -415,7 +415,7 @@ void AliAnalysisTaskSEDs::UserExec(Option_t */*option*/)
     array3Prong=(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
   }
 
-  if(!array3Prong) {
+  if(!aod || !array3Prong) {
     printf("AliAnalysisTaskSEDs::UserExec: Charm3Prong branch not found!\n");
     return;
   }