]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fixed check on MC before to check file path
authorantoniol <antoniol@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Mar 2013 13:32:56 +0000 (13:32 +0000)
committerantoniol <antoniol@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 1 Mar 2013 13:32:56 +0000 (13:32 +0000)
ANALYSIS/AliAnalysisTaskPIDResponse.cxx

index 52b6d17212ddedfbd0a903eb7c392372fd09fafe..438b01303b126e0820db63d27ce3de2dd79b4fb1 100644 (file)
@@ -175,7 +175,8 @@ void AliAnalysisTaskPIDResponse::SetRecoInfo()
     fPIDResponse->SetCurrentFile(fileName.Data());
   }
 
-  if ( (prodInfo.IsMC() == kFALSE) || (fIsMC == kFALSE) ) {      // reco pass is needed only for data
+  if (prodInfo.IsMC() == kTRUE) fIsMC=kTRUE;         // protection if user didn't use macro switch
+  if ( (prodInfo.IsMC() == kFALSE) && (fIsMC == kFALSE) ) {      // reco pass is needed only for data
     fRecoPass = prodInfo.GetRecoPass();
     if (fRecoPass < 0) {   // as last resort we find pass from file name (UGLY, but not stored in ESDs/AODs before LHC12d )
       TString fileName(file->GetName());
@@ -193,8 +194,9 @@ void AliAnalysisTaskPIDResponse::SetRecoInfo()
     } 
     if (fRecoPass <= 0) {
       AliError(" ******** Failed to find reconstruction pass number *********");
-      AliError(" ******** Insert pass number inside the path of your local file ******");
       AliError(" ******** PID information loaded for 'pass 0': parameters unreliable ******");
+      AliError("      --> If these are MC data: please set kTRUE first argument of AddTaskPIDResponse");
+      AliError("      --> If these are real data: please insert pass number inside the path of your local file ******");
     }
   }