Ignore:
Timestamp:
08/24/07 13:58:50 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mfbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mfbase/MFDataPhrase.cc

    r8310 r8706  
    107107// the class description above.
    108108//
    109 MFDataPhrase::MFDataPhrase(const char *text, const char *name, const char *title) : fAllowEmpty(kFALSE)
     109MFDataPhrase::MFDataPhrase(const char *text, const char *name, const char *title) : fData(NULL), fAllowEmpty(kFALSE)
    110110{
    111111    fName  = name  ? name  : gsDefName.Data();
    112112    fTitle = title ? title : gsDefTitle.Data();
     113
     114    if (!text)
     115        return;
    113116
    114117    *fLog << inf << "Parsing filter rule... " << flush;
     
    162165Int_t MFDataPhrase::Process()
    163166{
    164     if (fData)
    165         fResult = fData->GetValue()>0.5;
     167    fResult = fData ? fData->GetValue()>0.5 : fDefault;
    166168
    167169    return kTRUE;
  • trunk/MagicSoft/Mars/mfbase/MFDataPhrase.h

    r8091 r8706  
    1818    MData *fData;
    1919    Bool_t fAllowEmpty;              // Not a Bit to be stored
     20    Bool_t fDefault;                 // Default for empty case
    2021
    2122    Bool_t fResult; //!
     
    3839    void SetAllowEmpty(Bool_t b=kTRUE) { fAllowEmpty = b; }
    3940    Bool_t IsAllowEmpty() const { return fAllowEmpty; }
     41
     42    void SetDefault(Bool_t b) { fDefault = b;    }
     43    Bool_t GetDefault() const { return fDefault; }
    4044
    4145    // MFilter
Note: See TracChangeset for help on using the changeset viewer.