Changeset 6240 for trunk/MagicSoft/Mars/mfbase
- Timestamp:
- 02/03/05 14:23:41 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mfbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfbase/MFilterList.cc
r5911 r6240 237 237 } 238 238 239 // -------------------------------------------------------------------------- 240 // 241 // If you want to add a new filters from a TCollection to the list call 242 // this function. 243 // 244 Bool_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 } 239 263 240 264 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mfbase/MFilterList.h
r5875 r6240 44 44 45 45 Bool_t AddToList(MFilter *filter); 46 Bool_t AddToList(const TCollection &col); 46 47 void SetOwner(Bool_t enable=kTRUE) { enable ? SetBit(kIsOwner) : ResetBit(kIsOwner); } 47 48
Note:
See TracChangeset
for help on using the changeset viewer.