]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliExpression.cxx
Number of sigma pedestal cut increased to 4
[u/mrichter/AliRoot.git] / STEER / AliExpression.cxx
index 86637ee68c0e638dc8fe42dbaa6d30711da0ea0b..2ddb3e073b8cab8db6a8efe0fb5f5bb452438cc6 100644 (file)
@@ -20,7 +20,7 @@
 //  AliExpression Class                                                      //                                                                           //
 //                                                                           //
 //  Helper class to evaluate the condition expressions in                    //
-//  AliTriggerCondition                                                      //
+//  AliTrigger* classes                                                      //
 //  Implements a simple recursive-descent parser                             //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
@@ -103,10 +103,11 @@ AliExpression::AliExpression( int op, AliExpression* a ) :
 }
 
 //______________________________________________________________________________
-Bool_t AliExpression::Value( TObjArray &vars )
+Bool_t AliExpression::Value( const TObjArray &vars )
 {
    //  Evaluate the expression
-   if ( fArg2 == 0 && fVname.IsNull() ) {
+  if ( ( fArg2 == 0 && fVname.IsNull() ) ||
+       ( fArg2 == 0 && ( fOperator == kOpOR || fOperator == kOpAND || fOperator == kOpNOT ) ) ) {
        AliError( "Expression undefined." );
        return kFALSE;
    }
@@ -268,7 +269,6 @@ AliExpression* AliExpression::Element( TObjArray &st, Int_t &i )
       default:
           i--; // push back
           AliErrorGeneral( "AliExpression::Element", Form("Unexpected symbol on input. %s", token.Data()) );
-          if( result ) delete result;
           result = new AliExpression;
    }
    return result;
@@ -354,7 +354,7 @@ AliExpression* AliExpression::Expression( TObjArray &st,Int_t &i )
 ClassImp( AliVariableExpression )
 
 //______________________________________________________________________________
-Bool_t AliVariableExpression::Value( TObjArray& pgm )
+Bool_t AliVariableExpression::Value( const TObjArray& pgm )
 {
    // return the value
    TObject* dd = pgm.FindObject( fVname.Data() );