coverity fixes and changing Printf to AliError or AliInfo (MW)
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 28 May 2013 07:49:12 +0000 (07:49 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 28 May 2013 07:49:12 +0000 (07:49 +0000)
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBF.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBFPsi.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskEffContBF.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskEffContBF.h
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskEfficiencyBF.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskEfficiencyBFPsi.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskEventMixingBF.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskToyModel.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskTriggeredBF.cxx

index 5b4d5a3..c21e84c 100755 (executable)
@@ -24,6 +24,7 @@
 #include "AliMCEvent.h"
 #include "AliStack.h"
 #include "AliESDtrackCuts.h"
+#include "AliLog.h"
 
 #include "TH2D.h"                  
 #include "AliPID.h"                
@@ -424,7 +425,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
   if(gAnalysisLevel == "ESD") {
     AliESDEvent* gESD = dynamic_cast<AliESDEvent*>(InputEvent()); // from TaskSE
     if (!gESD) {
-      Printf("ERROR: gESD not available");
+      AliError("ERROR: gESD not available");
       return;
     }
 
@@ -474,7 +475,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                  for (Int_t iTracks = 0; iTracks < gESD->GetNumberOfTracks(); iTracks++) {
                    AliESDtrack* track = dynamic_cast<AliESDtrack *>(gESD->GetTrack(iTracks));
                    if (!track) {
-                     Printf("ERROR: Could not receive track %d", iTracks);
+                     AliError(Form("ERROR: Could not receive track %d", iTracks));
                      continue;
                    }   
                    
@@ -662,7 +663,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
   else if(gAnalysisLevel == "AOD") {
     AliAODEvent* gAOD = dynamic_cast<AliAODEvent*>(InputEvent()); // from TaskSE
     if(!gAOD) {
-      Printf("ERROR: gAOD not available");
+      AliError("ERROR: gAOD not available");
       return;
     }
 
@@ -745,7 +746,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                  for (Int_t iTracks = 0; iTracks < gAOD->GetNumberOfTracks(); iTracks++) {
                    AliAODTrack* aodTrack = dynamic_cast<AliAODTrack *>(gAOD->GetTrack(iTracks));
                    if (!aodTrack) {
-                     Printf("ERROR: Could not receive track %d", iTracks);
+                     AliError(Form("ERROR: Could not receive track %d", iTracks));
                      continue;
                    }
                    Int_t gID = aodTrack->GetID();
@@ -759,7 +760,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                  for (Int_t iTracks = 0; iTracks < gAOD->GetNumberOfTracks(); iTracks++) {
                    AliAODTrack* aodTrack = dynamic_cast<AliAODTrack *>(gAOD->GetTrack(iTracks));
                    if (!aodTrack) {
-                     Printf("ERROR: Could not receive track %d", iTracks);
+                     AliError(Form("ERROR: Could not receive track %d", iTracks));
                      continue;
                    }
                    
@@ -972,13 +973,13 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
   if(gAnalysisLevel == "MCESD") {
     AliMCEvent*  mcEvent = MCEvent(); 
     if (!mcEvent) {
-      Printf("ERROR: mcEvent not available");
+      AliError("ERROR: mcEvent not available");
       return;
     }
 
     AliESDEvent* gESD = dynamic_cast<AliESDEvent*>(InputEvent()); // from TaskSE
     if (!gESD) {
-      Printf("ERROR: gESD not available");
+      AliError("ERROR: gESD not available");
       return;
     }
 
@@ -1027,7 +1028,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                  for (Int_t iTracks = 0; iTracks < gESD->GetNumberOfTracks(); iTracks++) {
                    AliESDtrack* track = dynamic_cast<AliESDtrack *>(gESD->GetTrack(iTracks));
                    if (!track) {
-                     Printf("ERROR: Could not receive track %d", iTracks);
+                     AliError(Form("ERROR: Could not receive track %d", iTracks));
                      continue;
                    }   
                    
@@ -1123,7 +1124,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
   else if(gAnalysisLevel == "MC") {
     AliMCEvent*  mcEvent = MCEvent(); 
     if (!mcEvent) {
-      Printf("ERROR: mcEvent not available");
+      AliError("ERROR: mcEvent not available");
       return;
     }
 
@@ -1171,11 +1172,11 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
          fHistVy->Fill(gVertexArray.At(1));
          fHistVz->Fill(gVertexArray.At(2));
          
-         Printf("There are %d tracks in this event", mcEvent->GetNumberOfPrimaries());
+         AliInfo(Form("There are %d tracks in this event", mcEvent->GetNumberOfPrimaries()));
          for (Int_t iTracks = 0; iTracks < mcEvent->GetNumberOfPrimaries(); iTracks++) {
            AliMCParticle* track = dynamic_cast<AliMCParticle *>(mcEvent->GetTrack(iTracks));
            if (!track) {
-             Printf("ERROR: Could not receive particle %d", iTracks);
+             AliError(Form("ERROR: Could not receive particle %d", iTracks));
              continue;
            }
            
@@ -1335,12 +1336,12 @@ void  AliAnalysisTaskBF::FinishTaskOutput(){
   //Printf("END BF");
 
   if (!fBalance) {
-    Printf("ERROR: fBalance not available");
+    AliError("ERROR: fBalance not available");
     return;
   }  
   if(fRunShuffling) {
     if (!fShuffledBalance) {
-      Printf("ERROR: fShuffledBalance not available");
+      AliError("ERROR: fShuffledBalance not available");
       return;
     }
   }
index 4f88e0c..c7049b2 100755 (executable)
@@ -30,6 +30,7 @@
 #include "AliESDtrackCuts.h"\r
 #include "AliEventplane.h"\r
 #include "AliTHn.h"    \r
+#include "AliLog.h"\r
 \r
 #include "AliEventPoolManager.h"           \r
 \r
@@ -929,8 +930,9 @@ Double_t AliAnalysisTaskBFPsi::GetRefMultiOrCentrality(AliVEvent *event){
     }//ESD\r
     else if(gAnalysisLevel == "MC"){\r
       Double_t gImpactParameter = 0.;\r
-      if(dynamic_cast<AliMCEvent*>(event)){\r
-       AliCollisionGeometry* headerH = dynamic_cast<AliCollisionGeometry*>(dynamic_cast<AliMCEvent*>(event)->GenEventHeader());      \r
+      AliMCEvent *gMCEvent = dynamic_cast<AliMCEvent*>(event);\r
+      if(gMCEvent){\r
+       AliCollisionGeometry* headerH = dynamic_cast<AliCollisionGeometry*>(gMCEvent->GenEventHeader());      \r
        if(headerH){\r
          gImpactParameter = headerH->ImpactParameter();\r
          gCentrality      = gImpactParameter;\r
@@ -1207,80 +1209,82 @@ TObjArray* AliAnalysisTaskBFPsi::GetAcceptedTracks(AliVEvent *event, Double_t gC
     \r
     AliMCEvent* mcEvent = MCEvent();\r
     if (!mcEvent) {\r
-      Printf("ERROR: Could not retrieve MC event");\r
+      AliError("ERROR: Could not retrieve MC event");\r
     }\r
-    \r
-    for (Int_t iTracks = 0; iTracks < mcEvent->GetNumberOfTracks(); iTracks++) {\r
-      AliAODMCParticle *aodTrack = (AliAODMCParticle*) mcEvent->GetTrack(iTracks); \r
-      if (!aodTrack) {\r
-       Printf("ERROR: Could not receive track %d (mc loop)", iTracks);\r
-       continue;\r
-      }\r
-      \r
-      if(!aodTrack->IsPhysicalPrimary()) continue;   \r
-\r
-      vCharge = aodTrack->Charge();\r
-      vEta    = aodTrack->Eta();\r
-      vY      = aodTrack->Y();\r
-      vPhi    = aodTrack->Phi();// * TMath::RadToDeg();\r
-      vPt     = aodTrack->Pt();\r
+    else{\r
       \r
-      // Kinematics cuts from ESD track cuts\r
-      if( vPt < fPtMin || vPt > fPtMax)      continue;\r
-      if( vEta < fEtaMin || vEta > fEtaMax)  continue;\r
-\r
-      // Remove neutral tracks\r
-      if( vCharge == 0 ) continue;\r
-\r
-      //Exclude resonances\r
-      if(fExcludeResonancesInMC) {\r
+      for (Int_t iTracks = 0; iTracks < mcEvent->GetNumberOfTracks(); iTracks++) {\r
+       AliAODMCParticle *aodTrack = (AliAODMCParticle*) mcEvent->GetTrack(iTracks); \r
+       if (!aodTrack) {\r
+         AliError(Form("ERROR: Could not receive track %d (mc loop)", iTracks));\r
+         continue;\r
+       }\r
        \r
-       Bool_t kExcludeParticle = kFALSE;\r
-       Int_t gMotherIndex = aodTrack->GetMother();\r
-       if(gMotherIndex != -1) {\r
-         AliAODMCParticle* motherTrack = dynamic_cast<AliAODMCParticle *>(mcEvent->GetTrack(gMotherIndex));\r
-         if(motherTrack) {\r
-           Int_t pdgCodeOfMother = motherTrack->GetPdgCode();\r
-           //if((pdgCodeOfMother == 113)||(pdgCodeOfMother == 213)||(pdgCodeOfMother == 221)||(pdgCodeOfMother == 223)||(pdgCodeOfMother == 331)||(pdgCodeOfMother == 333)) {\r
-           //if(pdgCodeOfMother == 113) {\r
-           if(pdgCodeOfMother == 113  // rho0\r
-              || pdgCodeOfMother == 213 || pdgCodeOfMother == -213 // rho+\r
-              // || pdgCodeOfMother == 221  // eta\r
-              // || pdgCodeOfMother == 331  // eta'\r
-              // || pdgCodeOfMother == 223  // omega\r
-              // || pdgCodeOfMother == 333  // phi\r
-              || pdgCodeOfMother == 311  || pdgCodeOfMother == -311 // K0\r
-              // || pdgCodeOfMother == 313  || pdgCodeOfMother == -313 // K0*\r
-              // || pdgCodeOfMother == 323  || pdgCodeOfMother == -323 // K+*\r
-              || pdgCodeOfMother == 3122 || pdgCodeOfMother == -3122 // Lambda\r
-              || pdgCodeOfMother == 111  // pi0 Dalitz\r
-              ) {\r
-             kExcludeParticle = kTRUE;\r
+       if(!aodTrack->IsPhysicalPrimary()) continue;   \r
+       \r
+       vCharge = aodTrack->Charge();\r
+       vEta    = aodTrack->Eta();\r
+       vY      = aodTrack->Y();\r
+       vPhi    = aodTrack->Phi();// * TMath::RadToDeg();\r
+       vPt     = aodTrack->Pt();\r
+       \r
+       // Kinematics cuts from ESD track cuts\r
+       if( vPt < fPtMin || vPt > fPtMax)      continue;\r
+       if( vEta < fEtaMin || vEta > fEtaMax)  continue;\r
+       \r
+       // Remove neutral tracks\r
+       if( vCharge == 0 ) continue;\r
+       \r
+       //Exclude resonances\r
+       if(fExcludeResonancesInMC) {\r
+         \r
+         Bool_t kExcludeParticle = kFALSE;\r
+         Int_t gMotherIndex = aodTrack->GetMother();\r
+         if(gMotherIndex != -1) {\r
+           AliAODMCParticle* motherTrack = dynamic_cast<AliAODMCParticle *>(mcEvent->GetTrack(gMotherIndex));\r
+           if(motherTrack) {\r
+             Int_t pdgCodeOfMother = motherTrack->GetPdgCode();\r
+             //if((pdgCodeOfMother == 113)||(pdgCodeOfMother == 213)||(pdgCodeOfMother == 221)||(pdgCodeOfMother == 223)||(pdgCodeOfMother == 331)||(pdgCodeOfMother == 333)) {\r
+             //if(pdgCodeOfMother == 113) {\r
+             if(pdgCodeOfMother == 113  // rho0\r
+                || pdgCodeOfMother == 213 || pdgCodeOfMother == -213 // rho+\r
+                // || pdgCodeOfMother == 221  // eta\r
+                // || pdgCodeOfMother == 331  // eta'\r
+                // || pdgCodeOfMother == 223  // omega\r
+                // || pdgCodeOfMother == 333  // phi\r
+                || pdgCodeOfMother == 311  || pdgCodeOfMother == -311 // K0\r
+                // || pdgCodeOfMother == 313  || pdgCodeOfMother == -313 // K0*\r
+                // || pdgCodeOfMother == 323  || pdgCodeOfMother == -323 // K+*\r
+                || pdgCodeOfMother == 3122 || pdgCodeOfMother == -3122 // Lambda\r
+                || pdgCodeOfMother == 111  // pi0 Dalitz\r
+                ) {\r
+               kExcludeParticle = kTRUE;\r
+             }\r
            }\r
          }\r
+         \r
+         //Exclude from the analysis decay products of rho0, rho+, eta, eta' and phi\r
+         if(kExcludeParticle) continue;\r
        }\r
        \r
-       //Exclude from the analysis decay products of rho0, rho+, eta, eta' and phi\r
-       if(kExcludeParticle) continue;\r
-      }\r
-\r
-      // fill QA histograms\r
-      fHistPt->Fill(vPt,gCentrality);\r
-      fHistEta->Fill(vEta,gCentrality);\r
-      fHistRapidity->Fill(vY,gCentrality);\r
-      if(vCharge > 0) fHistPhiPos->Fill(vPhi,gCentrality);\r
-      else if(vCharge < 0) fHistPhiNeg->Fill(vPhi,gCentrality);\r
-      fHistPhi->Fill(vPhi,gCentrality);\r
-      if(vCharge > 0)      fHistEtaPhiPos->Fill(vEta,vPhi,gCentrality);                 \r
-      else if(vCharge < 0) fHistEtaPhiNeg->Fill(vEta,vPhi,gCentrality);\r
-      \r
-      //=======================================correction\r
-      Double_t correction = GetTrackbyTrackCorrectionMatrix(vEta, vPhi, vPt, vCharge, gCentrality);  \r
-      //Printf("CORRECTIONminus: %.2f | Centrality %lf",correction,gCentrality);   \r
-      \r
-      // add the track to the TObjArray\r
-      tracksAccepted->Add(new AliBFBasicParticle(vEta, vPhi, vPt, vCharge, correction));  \r
-    }//aodTracks\r
+       // fill QA histograms\r
+       fHistPt->Fill(vPt,gCentrality);\r
+       fHistEta->Fill(vEta,gCentrality);\r
+       fHistRapidity->Fill(vY,gCentrality);\r
+       if(vCharge > 0) fHistPhiPos->Fill(vPhi,gCentrality);\r
+       else if(vCharge < 0) fHistPhiNeg->Fill(vPhi,gCentrality);\r
+       fHistPhi->Fill(vPhi,gCentrality);\r
+       if(vCharge > 0)      fHistEtaPhiPos->Fill(vEta,vPhi,gCentrality);                \r
+       else if(vCharge < 0) fHistEtaPhiNeg->Fill(vEta,vPhi,gCentrality);\r
+       \r
+       //=======================================correction\r
+       Double_t correction = GetTrackbyTrackCorrectionMatrix(vEta, vPhi, vPt, vCharge, gCentrality);  \r
+       //Printf("CORRECTIONminus: %.2f | Centrality %lf",correction,gCentrality);   \r
+       \r
+       // add the track to the TObjArray\r
+       tracksAccepted->Add(new AliBFBasicParticle(vEta, vPhi, vPt, vCharge, correction));  \r
+      }//aodTracks\r
+    }//MC event\r
   }//MCAOD\r
   //==============================================================================================================\r
 \r
index 188ecb7..1f40e92 100644 (file)
@@ -33,7 +33,6 @@ ClassImp(AliAnalysisTaskEffContBF)
 AliAnalysisTaskEffContBF::AliAnalysisTaskEffContBF(const char *name) 
   : AliAnalysisTaskSE(name), 
     fAOD(0),
-    fAODtrackCutBit(128),
     fArrayMC(0), 
     fQAList(0), 
     fOutputList(0), 
@@ -63,12 +62,14 @@ AliAnalysisTaskEffContBF::AliAnalysisTaskEffContBF(const char *name)
     fHistSurvivedPhiEtaMinusMinus(0),
     fHistGeneratedPhiEtaPlusMinus(0),
     fHistSurvivedPhiEtaPlusMinus(0),
+    fAnalysisMode(0), 
     fCentralityEstimator("V0M"), 
     fCentralityPercentileMin(0.0), 
     fCentralityPercentileMax(5.0), 
     fVxMax(3.0), 
     fVyMax(3.0),
     fVzMax(10.), 
+    fAODTrackCutBit(128),
     fMinNumberOfTPCClusters(80),
     fMaxChi2PerTPCCluster(4.0),
     fMaxDCAxy(3.0),
@@ -299,7 +300,7 @@ void AliAnalysisTaskEffContBF::UserExec(Option_t *) {
   
   AliMCEvent* mcEvent = MCEvent();
   if (!mcEvent) {
-    Printf("ERROR: Could not retrieve MC event");
+    AliError("ERROR: Could not retrieve MC event");
     return;
   }
   
@@ -361,7 +362,7 @@ void AliAnalysisTaskEffContBF::UserExec(Option_t *) {
                    AliAODTrack* track = fAOD->GetTrack(jTracks);
                    if(!track) continue;
                    
-                   if (!track->TestFilterBit(fAODtrackCutBit))
+                   if (!track->TestFilterBit(fAODTrackCutBit))
                      continue;
                    
                    //acceptance
@@ -395,7 +396,7 @@ void AliAnalysisTaskEffContBF::UserExec(Option_t *) {
                  for (Int_t iTracks = 0; iTracks < mcEvent->GetNumberOfTracks(); iTracks++) {
                    AliAODMCParticle *mcTrack = (AliAODMCParticle*) mcEvent->GetTrack(iTracks); 
                    if (!mcTrack) {
-                     Printf("ERROR: Could not receive track %d (mc loop)", iTracks);
+                     AliError(Form("ERROR: Could not receive track %d (mc loop)", iTracks));
                      continue;
                    }
                    
@@ -456,7 +457,7 @@ void AliAnalysisTaskEffContBF::UserExec(Option_t *) {
                    AliAODTrack *trackAOD = static_cast<AliAODTrack*>(fAOD->GetTrack(iTracks));    
                    if(!trackAOD) continue;
                    
-                   if (!trackAOD->TestFilterBit(fAODtrackCutBit)) 
+                   if (!trackAOD->TestFilterBit(fAODTrackCutBit)) 
                      continue; 
                    
                    Int_t label = TMath::Abs(trackAOD->GetLabel()); 
index f3ce35a..334d885 100644 (file)
@@ -23,7 +23,6 @@ class AliAnalysisTaskEffContBF : public AliAnalysisTaskSE {
  public:
   AliAnalysisTaskEffContBF() : AliAnalysisTaskSE(), 
     fAOD(0), 
-    fAODtrackCutBit(128), 
     fArrayMC(0),  
     fQAList(0), 
     fOutputList(0),
@@ -60,6 +59,7 @@ class AliAnalysisTaskEffContBF : public AliAnalysisTaskSE {
     fVxMax(3.0), 
     fVyMax(3.0), 
     fVzMax(10.), 
+    fAODTrackCutBit(128),
     fMinNumberOfTPCClusters(80), 
     fMaxChi2PerTPCCluster(4.0),
     fMaxDCAxy(3.0), 
@@ -147,7 +147,6 @@ class AliAnalysisTaskEffContBF : public AliAnalysisTaskSE {
 
  private:
   AliAODEvent* fAOD; //! AOD object  
-  Int_t fAODtrackCutBit;  
   TClonesArray *fArrayMC; //! array of MC particles  
   TList       *fQAList; //! QA list
   TList       *fOutputList; //! Output list
index b03a0b0..5483b83 100644 (file)
@@ -16,6 +16,7 @@
 #include "AliESDInputHandler.h"
 #include "AliESDtrackCuts.h"
 #include "AliCentrality.h"
+#include "AliLog.h"
 
 #include "AliAnalysisTaskEfficiencyBF.h"
 
@@ -316,12 +317,12 @@ void AliAnalysisTaskEfficiencyBF::UserExec(Option_t *) {
   
   AliMCEvent* mcEvent = MCEvent();
   if (!mcEvent) {
-    Printf("ERROR: Could not retrieve MC event");
+    AliError("ERROR: Could not retrieve MC event");
     return;
   }
   AliStack* stack = mcEvent->Stack();
   if (!stack) {
-    Printf("ERROR: Could not retrieve MC stack");
+    AliError("ERROR: Could not retrieve MC stack");
     return;
   }
 
@@ -370,7 +371,7 @@ void AliAnalysisTaskEfficiencyBF::UserExec(Option_t *) {
                  for (Int_t iTracks = 0; iTracks < mcEvent->GetNumberOfTracks(); iTracks++) {
                    AliMCParticle *mcTrack = (AliMCParticle*) mcEvent->GetTrack(iTracks);
                    if (!mcTrack) {
-                     Printf("ERROR: Could not receive track %d (mc loop)", iTracks);
+                     AliError(Form("ERROR: Could not receive track %d (mc loop)", iTracks));
                      continue;
                    }
                    
index b1c0e7c..66d7419 100644 (file)
@@ -297,12 +297,12 @@ void AliAnalysisTaskEfficiencyBFPsi::UserExec(Option_t *) {
   
   AliMCEvent* mcEvent = MCEvent();
   if (!mcEvent) {
-    Printf("ERROR: Could not retrieve MC event");
+    AliError("ERROR: Could not retrieve MC event");
     return;
   }
   AliStack* stack = mcEvent->Stack();
   if (!stack) {
-    Printf("ERROR: Could not retrieve MC stack");
+    AliError("ERROR: Could not retrieve MC stack");
     return;
   }
 
@@ -362,7 +362,7 @@ void AliAnalysisTaskEfficiencyBFPsi::UserExec(Option_t *) {
                  for (Int_t iTracks = 0; iTracks < mcEvent->GetNumberOfTracks(); iTracks++) {
                    AliMCParticle *mcTrack = (AliMCParticle*) mcEvent->GetTrack(iTracks);
                    if (!mcTrack) {
-                     Printf("ERROR: Could not receive track %d (mc loop)", iTracks);
+                     AliError(Form("ERROR: Could not receive track %d (mc loop)", iTracks));
                      continue;
                    }
                    
index fa8d441..c992c2f 100755 (executable)
@@ -364,12 +364,12 @@ void  AliAnalysisTaskEventMixingBF::FinishTaskOutput(){
   //Printf("END EventMixingBF");\r
 \r
   if (!fBalance) {\r
-    Printf("ERROR: fBalance not available");\r
+    AliError("ERROR: fBalance not available");\r
     return;\r
   }  \r
   if(fRunShuffling) {\r
     if (!fShuffledBalance) {\r
-      Printf("ERROR: fShuffledBalance not available");\r
+      AliError("ERROR: fShuffledBalance not available");\r
       return;\r
     }\r
   }\r
@@ -422,12 +422,12 @@ void AliAnalysisTaskEventMixingBF::UserExecMix(Option_t *)
     if(gAnalysisLevel == "AOD") {\r
       AliAODEvent* aodEventMain = dynamic_cast<AliAODEvent*>(fMainEvent); \r
       if(!aodEventMain) {\r
-       Printf("ERROR: aodEventMain not available");\r
+       AliError("ERROR: aodEventMain not available");\r
        return;\r
       }\r
       AliAODEvent *aodEventMix  = dynamic_cast<AliAODEvent *>(fMixEvent); \r
      if(!aodEventMix) {\r
-       Printf("ERROR: aodEventMix not available");\r
+       AliError("ERROR: aodEventMix not available");\r
        return;\r
       }\r
 \r
@@ -510,7 +510,7 @@ void AliAnalysisTaskEventMixingBF::UserExecMix(Option_t *)
                    for (Int_t iTracksMain = 0; iTracksMain < aodEventMain->GetNumberOfTracks(); iTracksMain++) {\r
                      AliAODTrack* aodTrackMain = dynamic_cast<AliAODTrack *>(aodEventMain->GetTrack(iTracksMain));\r
                      if (!aodTrackMain) {\r
-                       Printf("ERROR: Could not receive track %d", iTracksMain);\r
+                       AliError(Form("ERROR: Could not receive track %d", iTracksMain));\r
                        continue;\r
                      }\r
                      \r
@@ -577,7 +577,7 @@ void AliAnalysisTaskEventMixingBF::UserExecMix(Option_t *)
 \r
                        AliAODTrack* aodTrackMix = dynamic_cast<AliAODTrack *>(aodEventMix->GetTrack(iTracksMix));\r
                        if (!aodTrackMix) {\r
-                         Printf("ERROR: Could not receive track %d", iTracksMix);\r
+                         AliError(Form("ERROR: Could not receive track %d", iTracksMix));\r
                          continue;\r
                        }\r
 \r
index 44300bd..99ba00c 100755 (executable)
@@ -1134,7 +1134,7 @@ void  AliAnalysisTaskToyModel::FinishOutput() {
   //fList->Write("listQA",TObject::kSingleKey);\r
 \r
   if (!fBalance) {\r
-    Printf("ERROR: fBalance not available");\r
+    AliError("ERROR: fBalance not available");\r
     return;\r
   }  \r
   fListBF->SetName("listBF");\r
@@ -1144,7 +1144,7 @@ void  AliAnalysisTaskToyModel::FinishOutput() {
 \r
   if(fRunShuffling) {\r
     if (!fShuffledBalance) {\r
-      Printf("ERROR: fShuffledBalance not available");\r
+      AliError("ERROR: fShuffledBalance not available");\r
       return;\r
     }\r
     fListBFS->SetName("listBFShuffled");\r
@@ -1155,7 +1155,7 @@ void  AliAnalysisTaskToyModel::FinishOutput() {
 \r
   if(fRunMixing) {\r
     if (!fMixedBalance) {\r
-      Printf("ERROR: fMixedBalance not available");\r
+      AliError("ERROR: fMixedBalance not available");\r
       return;\r
     }\r
     fListBFM->SetName("listBFMixed");\r
index ae49008..261891c 100755 (executable)
@@ -877,7 +877,7 @@ TObjArray* AliAnalysisTaskTriggeredBF::GetAcceptedV0s(AliVEvent *event){
       AliAODTrack *pTrack=(AliAODTrack *)v0->GetDaughter(0); //0->Positive Daughter\r
       AliAODTrack *nTrack=(AliAODTrack *)v0->GetDaughter(1); //1->Negative Daughter\r
       if (!pTrack || !nTrack) {\r
-       Printf("ERROR: Could not retreive one of the daughter track");\r
+       AliError("ERROR: Could not retreive one of the daughter track");\r
        continue;\r
       }\r
 \r