Ignore:
Timestamp:
04/10/03 10:43:24 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MFilter.cc

    r1524 r1936  
    7272ClassImp(MFilter);
    7373
    74 MFilter::MFilter(const char *name, const char *title)
     74MFilter::MFilter(const char *name, const char *title) : fInverted(kFALSE)
    7575{
    7676    fName  = name  ? name  : "MFilter";
    7777    fTitle = title ? title : "Base Class for a filter";
    78 }
    79 
    80 // --------------------------------------------------------------------------
    81 //
    82 Bool_t MFilter::PreProcess(MParList *pList)
    83 {
    84     return kTRUE;
    85 }
    86 
    87 // --------------------------------------------------------------------------
    88 //
    89 Bool_t MFilter::Process()
    90 {
    91     return kTRUE;
    92 }
    93 
    94 // --------------------------------------------------------------------------
    95 //
    96 Bool_t MFilter::PostProcess()
    97 {
    98     return kTRUE;
    9978}
    10079
  • trunk/MagicSoft/Mars/mbase/MFilter.h

    r1668 r1936  
    1111{
    1212private:
    13     virtual Bool_t PreProcess(MParList *pList);
    14     virtual Bool_t Process();
    15     virtual Bool_t PostProcess();
     13    Bool_t fInverted;
     14
     15    virtual Bool_t IsExpressionTrue() const = 0;
    1616
    1717public:
    1818    MFilter(const char *name=NULL, const char *title=NULL);
    1919
    20     virtual Bool_t IsExpressionTrue() const = 0;
    2120    virtual TString GetRule() const;
     21
     22    Bool_t IsConditionTrue() const { return fInverted ? !IsExpressionTrue() : IsExpressionTrue(); }
     23
     24    void SetInverted(Bool_t i) { fInverted=i; }
     25    Bool_t IsInverted() const  { return fInverted; }
    2226
    2327    ClassDef(MFilter, 0)                // Abstract base class for the filters
  • trunk/MagicSoft/Mars/mbase/MTask.cc

    r1657 r1936  
    198198    // this task.
    199199    //
    200     const Bool_t exec = fFilter ? fFilter->IsExpressionTrue() : kTRUE;
     200    const Bool_t exec = fFilter ? fFilter->IsConditionTrue() : kTRUE;
    201201
    202202    if (!exec)
Note: See TracChangeset for help on using the changeset viewer.