Ignore:
Timestamp:
08/24/07 09:37:31 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mdata
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mdata/MDataMember.cc

    r8073 r8704  
    9797Double_t MDataMember::GetValue() const
    9898{
     99    if (!fObject)
     100    {
     101        *fLog << err << "ERROR - MDataMember::GetValue: fObject not initialized ";
     102        *fLog << "(not PreProcessed)... returning 0." << endl;
     103        return 0;
     104    }
     105
    99106    if (!fCall)
    100107    {
     
    138145    // the original statement "if (fCall)" is replaced by the statement
    139146    if (fCall && !fObject)
    140             return kTRUE;
     147        return kTRUE;
    141148
    142149    TString cname(fDataMember);
  • trunk/MagicSoft/Mars/mdata/MDataPhrase.cc

    r8635 r8704  
    469469//  Evaluates and returns the result of the member list.
    470470//
    471 Double_t MDataPhrase::GetValue() const
     471Double_t MDataPhrase::Eval(const Double_t *x) const
    472472{
    473473    const Int_t n = fMembers.GetEntriesFast();
     
    490490
    491491    // Evaluate function
    492     return fFormula->EvalPar(0, arr);
     492    return fFormula->EvalPar(x, arr);
    493493}
    494494
  • trunk/MagicSoft/Mars/mdata/MDataPhrase.h

    r8635 r8704  
    4646    Bool_t   IsValid() const;
    4747    Bool_t   HasValidRule() const { return fFormula ? kTRUE : kFALSE; }
    48     Double_t GetValue() const;
     48    Double_t GetValue() const { return Eval((Double_t*)NULL); }
     49    Double_t Eval(const Double_t *x) const;
     50    Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
     51    {
     52        const Double_t xx[4] = { x, y, z, t };
     53        return Eval(xx);
     54    }
    4955    TString  GetRule() const;
    5056    TString  GetRuleRaw() const;
Note: See TracChangeset for help on using the changeset viewer.