Do not accept any event if the selection is wrong (Chiara)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Oct 2012 14:49:50 +0000 (14:49 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Oct 2012 14:49:50 +0000 (14:49 +0000)
RAW/AliRawReader.cxx

index a44d6b1..d951d6f 100644 (file)
@@ -543,10 +543,11 @@ Bool_t AliRawReader::IsEventSelected() const
     // Possibility to introduce downscaling
     TPRegexp("(%\\s*\\d+)").Substitute(expr,Form("&& !(%d$1)",GetEventIndex()),"g");
     Int_t error;
-    if ((gROOT->ProcessLineFast(expr.Data(),&error) == 0) &&
-       (error == TInterpreter::kNoError)) {
+    Bool_t result = gROOT->ProcessLineFast(expr.Data(),&error);
+    if ( error == TInterpreter::kNoError)
+      return result;
+    else
       return kFALSE;
-    }
   }
 
   return kTRUE;