Changeset 3788 for trunk/MagicSoft/Mars/mfbase
- Timestamp:
- 04/21/04 15:38:08 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mfbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfbase/MFilterList.cc
r3682 r3788 38 38 // invert the meaning of a filter, by eg: 39 39 // 40 // MF anyfilter("MHillas.fAlpha"); 41 // 42 // MFilterList alist; 43 // alist.AddToList(&anyfilter); 44 // 45 // alist.SetInverted(); 40 // MF anyfilter("MHillas.fAlpha"); 41 // 42 // MFilterList alist; 43 // alist.AddToList(&anyfilter); 44 // 45 // alist.SetInverted(); 46 // 47 // or do 48 // 49 // MFilterList alist(&anyfilter); 50 // 46 51 // 47 52 // Adding the filterlist to the eventloop will process all contained filters. … … 72 77 // -------------------------------------------------------------------------- 73 78 // 74 // Constructor. 79 // Wrapper to simplify constructors. 80 // 81 void MFilterList::Init(const char *name, const char *title) 82 { 83 fName = name ? name : gsDefName.Data(); 84 fTitle = title ? title : gsDefTitle.Data(); 85 86 gROOT->GetListOfCleanups()->Add(&fFilters); 87 fFilters.SetBit(kMustCleanup); 88 89 fFilterType = kEAnd; 90 } 91 92 // -------------------------------------------------------------------------- 93 // 94 // Default Constructor. 75 95 // 76 96 // Specify the boolean operation which is used to evaluate the … … 91 111 MFilterList::MFilterList(const char *type, const char *name, const char *title) 92 112 { 93 fName = name ? name : gsDefName.Data(); 94 fTitle = title ? title : gsDefTitle.Data(); 95 96 gROOT->GetListOfCleanups()->Add(&fFilters); 97 fFilters.SetBit(kMustCleanup); 98 99 fFilterType = kEAnd; 113 Init(name, title); 100 114 101 115 TString str(type); … … 113 127 // -------------------------------------------------------------------------- 114 128 // 129 // Constructor. 130 // 131 // Setup an '&&' filter list, adds the filter to the list and 132 // call MFilterList::SetInverted() 133 // 134 // To be used as a logical NOT. 135 // 136 MFilterList::MFilterList(MFilter *f, const char *name, const char *title) 137 { 138 Init(name, title); 139 140 SetInverted(); 141 AddToList(f); 142 } 143 144 // -------------------------------------------------------------------------- 145 // 115 146 // CopyConstructor 116 147 // -
trunk/MagicSoft/Mars/mfbase/MFilterList.h
r3573 r3788 31 31 void StreamPrimitive(ofstream &out) const; 32 32 33 void Init(const char *name, const char *title); 34 33 35 public: 34 36 MFilterList(const char *type="&&", const char *name=NULL, const char *title=NULL); 37 MFilterList(MFilter *f, const char *name=NULL, const char *title=NULL); 35 38 MFilterList(MFilterList &ts); 36 39 ~MFilterList()
Note:
See TracChangeset
for help on using the changeset viewer.