Ignore:
Timestamp:
02/03/05 14:23:41 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mfbase
Files:
2 edited

Legend:

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

    r5911 r6240  
    237237}
    238238
     239// --------------------------------------------------------------------------
     240//
     241// If you want to add a new filters from a TCollection to the list call
     242// this function.
     243//
     244Bool_t MFilterList::AddToList(const TCollection &col)
     245{
     246    TIter Next(&col);
     247    MFilter *f=0;
     248    Int_t idx=0;
     249    while ((f=(MFilter*)Next()))
     250    {
     251        if (!f->InheritsFrom(MFilter::Class()))
     252        {
     253            *fLog << warn << "WARNING - An object in TCollection doesn't inherit from MFilter... ignored." << endl;
     254            continue;
     255        }
     256
     257        f->SetName(Form("F%d", idx++));
     258        if (!AddToList(f))
     259            return kFALSE;
     260    }
     261    return kTRUE;
     262}
    239263
    240264// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mfbase/MFilterList.h

    r5875 r6240  
    4444
    4545    Bool_t AddToList(MFilter *filter);
     46    Bool_t AddToList(const TCollection &col);
    4647    void SetOwner(Bool_t enable=kTRUE) { enable ? SetBit(kIsOwner) : ResetBit(kIsOwner); }
    4748
Note: See TracChangeset for help on using the changeset viewer.